/* Modern Theme System */
:root {
    --bg-canvas: #ffffff;
    --bg-surface: #f4f5f7;
    --bg-surface-elevated: #ffffff;
    --text-primary: #111827;
    --text-secondary: #3a3a3a;
    --text-muted: #9ca3af;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --accent-primary: #e41c24;
    --accent-hover: #c3161e;
    --shadow-subtle: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-canvas: #0b0d10;
    --bg-surface: #14171c;
    --bg-surface-elevated: #181a1f;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-subtle: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Global Transitions */
body,
header,
section,
footer,
.services-item,
.team-item,
.reviews-item,
input,
textarea,
.form-right form,
.header-bottom,
.header-top,
.header-logo,
.modal-form {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Base Styling */
body {
    background-color: var(--bg-canvas) !important;
    color: var(--text-secondary) !important;
    font-family: 'Montserrat', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.def-title,
.center-title,
.numbers-num,
.team-name,
.reviews-name,
.services-title,
.modal-form-title,
.why-features-title {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.banner-title,
.banner-subtitle {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.def-desc,
.services-desc,
.reviews-comment,
.why-features-desc,
.footer-desc,
.Justificado {
    color: var(--text-secondary) !important;
}

/* Section Backgrounds */
.s-about,
.s-form,
.s-services,
.s-team,
.s-gallery {
    background-color: var(--bg-canvas) !important;
}

.s-numbers,
.site-footer,
.header-top,
.header-mobile-wrap,
.s-why,
.s-reviews {
    background-color: #3c3c3c !important;
    color: #ffffff !important;
}

.s-numbers .def-title,
.site-footer .footer-title,
.site-footer .footer-desc,
.s-numbers .numbers-num,
.s-numbers .numbers-desc,
.site-footer .footer-info-text,
.header-desc,
.header-info span,
.header-mobile-info span,
.s-why .def-title,
.s-why .def-desc,
.s-why .why-desc,
.s-why .why-features-title,
.s-reviews .def-title,
.s-reviews .def-desc {
    color: #ffffff !important;
}

.s-why .why-features-desc {
    color: rgba(255, 255, 255, 0.8) !important;
}

.site-footer .footer-nav ul li a,
.site-footer .footer-social a {
    color: #ffffff !important;
}

.site-footer .footer-nav ul li a:hover,
.site-footer .footer-social a:hover {
    color: var(--accent-primary) !important;
}

/* Header adjustments */
.header-bottom-row {
    background-color: var(--bg-surface-elevated) !important;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-subtle) !important;
    border-radius: 0 0 24px 24px;
}

.header-logo {
    background-color: transparent !important;
    clip-path: none !important;
    padding: 15px 40px !important;
}

/* Mobile Header Modernization */
@media screen and (max-width: 992px) {
    .header-top {
        background-color: var(--bg-surface-elevated) !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        padding: 10px 20px !important;
        position: relative !important;
        z-index: 105 !important;
    }

    .header-mobile-logo {
        background-color: transparent !important;
        clip-path: none !important;
        padding: 0 !important;
        margin-left: 0 !important;
    }

    .hamburger span {
        background-color: var(--text-primary) !important;
    }

    .header-mobile-wrap {
        padding-top: 50px !important;
    }
}

.header-nav ul li a {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

.header-nav ul li a:hover {
    color: var(--accent-primary) !important;
}

.header-top {
    border-bottom: 1px solid var(--border-subtle);
}

/* Cards */
.services-item,
.team-item,
.reviews-item,
.form-right form,
.modal-form {
    background-color: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-subtle) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.team-body {
    background-color: transparent !important;
}

.services-item:hover,
.team-item:hover,
.reviews-item:hover {
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-4px);
}

.services-thumb img,
.team-thumb img,
.reviews-thumb img {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

/* Form Elements */
input,
textarea {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

/* Buttons */
.def-btn,
.def-btn3,
.form-button {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(228, 28, 36, 0.3) !important;
    border: none !important;
    letter-spacing: 0.02em;
}

.def-btn:hover,
.def-btn3:hover,
.form-button:hover {
    background-color: var(--accent-hover) !important;
    box-shadow: 0 6px 20px rgba(228, 28, 36, 0.4) !important;
    transform: translateY(-2px);
}

.def-btn2 {
    border-radius: 50px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(4px);
}

.def-btn2:hover {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

/* Dark Mode Exceptions */
[data-theme="dark"] .site-footer {
    border-top: 1px solid var(--border-subtle);
}

[data-theme="dark"] .footer-info-icon img,
[data-theme="dark"] .header-info img,
[data-theme="dark"] .header-mobile-info img {
    filter: brightness(0) invert(1) opacity(0.8);
}

[data-theme="dark"] .s-numbers,
[data-theme="dark"] .site-footer,
[data-theme="dark"] .header-top,
[data-theme="dark"] .header-mobile-wrap,
[data-theme="dark"] .s-why,
[data-theme="dark"] .s-reviews {
    background-color: var(--bg-surface-elevated) !important;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .s-numbers .def-title,
[data-theme="dark"] .s-numbers .numbers-num,
[data-theme="dark"] .site-footer .footer-title,
[data-theme="dark"] .s-why .def-title,
[data-theme="dark"] .s-why .why-features-title,
[data-theme="dark"] .s-reviews .def-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .s-numbers .def-desc,
[data-theme="dark"] .s-numbers .numbers-desc,
[data-theme="dark"] .site-footer .footer-desc,
[data-theme="dark"] .site-footer .footer-nav ul li a,
[data-theme="dark"] .site-footer .footer-info-text,
[data-theme="dark"] .site-footer .footer-social a,
[data-theme="dark"] .header-desc,
[data-theme="dark"] .header-info span,
[data-theme="dark"] .header-mobile-info span,
[data-theme="dark"] .s-why .def-desc,
[data-theme="dark"] .s-why .why-desc,
[data-theme="dark"] .s-why .why-features-desc,
[data-theme="dark"] .s-reviews .def-desc {
    color: var(--text-secondary) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
}

.theme-toggle:hover {
    transform: scale(1.05);
    color: var(--accent-primary);
}

.theme-toggle-mobile {
    margin: 20px auto 0 auto;
}

/* Layout Polishes */
.center-title::after {
    background-color: var(--accent-primary) !important;
}

.def-title::before {
    background-color: var(--accent-primary) !important;
}

.numbers-left,
.numbers-right {
    border-color: var(--border-subtle) !important;
}

.footer-nav ul li a,
.footer-social a {
    color: var(--text-secondary) !important;
}

.footer-nav ul li a:hover {
    color: var(--accent-primary) !important;
}

.about-right,
.why-right,
.form-image {
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-subtle) !important;
}

.about-right img,
.why-right img,
.form-image img {
    border-radius: var(--radius-md) !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.s-partners {
    background-color: #ebeef2 !important;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 40px 0 !important;
}

[data-theme="dark"] .s-partners {
    background-color: #1a1d24 !important;
}

[data-theme="dark"] .partners-item img {
    background-color: #ffffff !important;
}

.s-partners {
    overflow: hidden !important;
}

.partners-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    animation: partners-scroll 20s linear infinite !important;
    column-gap: 40px !important;
}

.partners-row:hover {
    animation-play-state: paused !important;
}

@keyframes partners-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-33.33333% - 13.33px));
    }
}

.partners-item {
    flex-shrink: 0 !important;
}

.partners-item img {
    border-radius: var(--radius-sm) !important;
    background-color: var(--bg-surface-elevated) !important;
    padding: 10px !important;
    box-shadow: var(--shadow-subtle) !important;
    height: 70px !important;
    object-fit: contain !important;
}

/* Minimalist Scroll Up */
.go-up {
    position: fixed !important;
    right: 35px !important;
    bottom: 110px !important;
    z-index: 998 !important;
    width: 45px !important;
    height: 45px !important;
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: var(--shadow-subtle) !important;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition) !important;
    transform: none !important;
    text-decoration: none !important;
}

.go-up i {
    font-size: 18px;
}

.go-up.is-active {
    opacity: 0.8 !important;
    visibility: visible !important;
}

.go-up:hover {
    opacity: 1;
    transform: translateY(-3px) !important;
    color: var(--accent-primary) !important;
}

.gallery-item {
    border-radius: var(--radius-md);
}

.why-features-icon {
    background-color: var(--bg-surface-elevated);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--border-subtle);
}

.why-features-icon img {
    width: 24px;
    height: 24px;
}

.gallery-wrap a img {
    transition: var(--transition);
}

.gallery-wrap a:hover img {
    transform: scale(1.05);
}