img,
video{
    max-width:100%;
    height:auto;
}

body{
    transition:background .3s ease, color .3s ease;
}

body.dark-mode{
    background:#0f172a;
    color:#f8fafc;
}

body.dark-mode header,
body.dark-mode .card,
body.dark-mode .info-card,
body.dark-mode .contact-form,
body.dark-mode .faq-item,
body.dark-mode .stat,
body.dark-mode .tech,
body.dark-mode .stats,
body.dark-mode footer{
    background:#111827;
    color:#f8fafc;
}

body.dark-mode header{
    box-shadow:0 2px 18px rgba(0,0,0,.35);
}

body.dark-mode nav a{
    color:#f8fafc;
}

body.dark-mode nav a:hover,
body.dark-mode .card h3,
body.dark-mode .project-content h2,
body.dark-mode .info-card i{
    color:#c084fc;
}

body.dark-mode .section-title p,
body.dark-mode .footer-content p,
body.dark-mode footer p{
    color:#cbd5e1;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea{
    background:#0b1120;
    border-color:#334155;
    color:#f8fafc;
}

body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder{
    color:#94a3b8;
}

.theme-toggle{
    width:66px;
    height:38px;
    margin-left:18px;
    border:0;
    border-radius:999px;
    background:transparent;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex:0 0 auto;
    transition:.3s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible{
    outline:none;
    transform:translateY(-2px);
}

.theme-toggle-track{
    position:relative;
    width:58px;
    height:30px;
    border-radius:999px;
    background:linear-gradient(135deg,#fde68a,#fb923c);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.6), 0 8px 20px rgba(251,146,60,.25);
    transition:.3s;
}

.theme-toggle-track::before,
.theme-toggle-track::after{
    content:"";
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    border-radius:50%;
    transition:.3s;
}

.theme-toggle-track::before{
    left:10px;
    width:9px;
    height:9px;
    background:#fff7ed;
    box-shadow:0 0 0 3px rgba(255,247,237,.32);
}

.theme-toggle-track::after{
    right:10px;
    width:10px;
    height:10px;
    background:#475569;
    box-shadow:-4px 0 0 #111827;
    opacity:.35;
}

.theme-toggle-knob{
    position:absolute;
    top:4px;
    left:4px;
    width:22px;
    height:22px;
    border-radius:50%;
    background:white;
    box-shadow:0 3px 10px rgba(15,23,42,.28);
    transition:.3s;
}

body.dark-mode .theme-toggle-track{
    background:linear-gradient(135deg,#1f2937,#4f46e5);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 22px rgba(79,70,229,.28);
}

body.dark-mode .theme-toggle-track::before{
    opacity:.35;
}

body.dark-mode .theme-toggle-track::after{
    background:#e0e7ff;
    box-shadow:-4px 0 0 #4f46e5;
    opacity:1;
}

body.dark-mode .theme-toggle-knob{
    transform:translateX(28px);
    background:#e0e7ff;
}

.menu-toggle{
    display:none;
    width:44px;
    height:44px;
    border:1px solid rgba(34,34,34,.14);
    border-radius:10px;
    background:white;
    color:var(--primary);
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:20px;
    box-shadow:0 4px 14px rgba(0,0,0,.08);
    transition:.3s;
}

.menu-toggle:hover,
.menu-toggle:focus-visible{
    color:var(--secondary);
    outline:none;
    transform:translateY(-2px);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after{
    display:block;
    width:20px;
    height:2px;
    border-radius:999px;
    background:currentColor;
    transition:.3s;
}

.menu-toggle-lines{
    position:relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after{
    content:"";
    position:absolute;
    left:0;
}

.menu-toggle-lines::before{
    top:-7px;
}

.menu-toggle-lines::after{
    top:7px;
}

.menu-toggle.is-active .menu-toggle-lines{
    background:transparent;
}

.menu-toggle.is-active .menu-toggle-lines::before{
    top:0;
    transform:rotate(45deg);
}

.menu-toggle.is-active .menu-toggle-lines::after{
    top:0;
    transform:rotate(-45deg);
}

body.dark-mode nav.site-nav,
body.dark-mode .menu-toggle{
    background:#1E1E1E;
}

body.dark-mode nav.site-nav a,
body.dark-mode .menu-toggle,
body.dark-mode .theme-toggle{
    color:white;
}

@media (max-width:900px){

    html,
    body{
        width:100%;
        overflow-x:hidden;
    }

    header{
        position:sticky;
        top:0;
        z-index:1000;
        width:100%;
        padding:12px 5%;
        flex-direction:row;
        flex-wrap:wrap;
        align-items:center;
        gap:0;
    }

    header .logo{
        flex:1 1 auto;
        display:flex;
        align-items:center;
        min-width:0;
        margin:0;
    }

    .logo img{
        height:52px;
        max-width:170px;
        object-fit:contain;
    }

    .menu-toggle{
        display:inline-flex;
        order:2;
        flex:0 0 auto;
    }

    .theme-toggle{
        order:3;
        width:66px;
        height:44px;
        margin-left:8px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
    }

    .has-mobile-menu nav.site-nav{
        order:4;
        flex:0 0 100%;
        width:100%;
        display:flex;
        flex-direction:column;
        justify-content:flex-start;
        gap:0;
        margin:12px 0 0;
        max-height:0;
        overflow:hidden;
        opacity:0;
        pointer-events:none;
        transform:translateY(-8px);
        background:white;
        border:1px solid rgba(34,34,34,.08);
        border-radius:14px;
        box-shadow:0 18px 40px rgba(15,23,42,.14);
        transition:max-height .3s ease, opacity .2s ease, transform .2s ease;
    }

    .has-mobile-menu nav.site-nav.is-open{
        max-height:420px;
        opacity:1;
        pointer-events:auto;
        transform:translateY(0);
    }

    .has-mobile-menu nav.site-nav a{
        width:100%;
        margin:0;
        padding:14px 16px;
        border-bottom:1px solid rgba(34,34,34,.08);
        font-size:15px;
        line-height:1.25;
        text-align:left;
    }

    .has-mobile-menu nav.site-nav a:last-child{
        border-bottom:0;
    }

    body.dark-mode nav.site-nav{
        border-color:rgba(255,255,255,.12);
        box-shadow:0 18px 40px rgba(0,0,0,.32);
    }

    body.dark-mode nav.site-nav a{
        border-color:rgba(255,255,255,.12);
    }

    .hero,
    .cta{
        padding-left:5%;
        padding-right:5%;
    }

    .hero{
        padding-top:80px;
        padding-bottom:80px;
    }

    .hero h1{
        font-size:2.35rem;
        line-height:1.15;
        overflow-wrap:anywhere;
    }

    .hero p,
    .cta p,
    .project-content p{
        font-size:1rem;
        line-height:1.7;
    }

    .section,
    .services,
    .technologies,
    .process,
    .faq,
    .contact,
    .stats{
        padding-left:5%;
        padding-right:5%;
    }

    .section-title{
        margin-bottom:36px;
    }

    .section-title h2,
    .cta h2{
        font-size:2.1rem;
        line-height:1.2;
    }

    .cards,
    .card-grid{
        grid-template-columns:minmax(0,1fr);
    }

    .card,
    .info-card,
    .contact-form,
    .stat{
        border-radius:14px;
    }

    .about-content,
    .contact{
        grid-template-columns:1fr;
        gap:30px;
    }

    .contact-form{
        padding:24px;
    }

    .contact-form input,
    .contact-form textarea{
        font-size:16px;
    }

    .stats{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:18px;
    }

    .stat{
        width:100%;
        min-width:0;
    }

    .project,
    .project.reverse{
        flex-direction:column;
        align-items:stretch;
        gap:32px;
        padding:70px 5%;
    }

    .project-image{
        text-align:center;
    }

    .project-image img{
        max-width:340px;
    }

    .project-content h2{
        font-size:2rem;
        line-height:1.2;
        overflow-wrap:anywhere;
    }
}

@media (max-width:600px){

    .logo img{
        height:48px;
        max-width:150px;
    }

    .hero{
        padding-top:70px;
        padding-bottom:70px;
    }

    .hero h1{
        font-size:2rem;
    }

    .section,
    .services,
    .technologies,
    .process,
    .faq,
    .contact,
    .cta,
    .stats{
        padding-top:60px;
        padding-bottom:60px;
    }

    .section-title h2,
    .cta h2{
        font-size:1.75rem;
    }

    .buttons{
        flex-direction:column;
        align-items:center;
    }

    .btn{
        width:100%;
        max-width:320px;
        text-align:center;
    }

    .stats{
        grid-template-columns:1fr;
    }

    .whatsapp{
        right:14px;
        bottom:14px;
        width:52px;
        height:52px;
        font-size:24px;
        transition:.3s;
    }

    .mobile-menu-open .whatsapp{
        opacity:0;
        pointer-events:none;
        transform:translateY(12px);
    }
}

@media (max-width:380px){

    .logo img{
        height:44px;
        max-width:130px;
    }

    .menu-toggle,
    .theme-toggle{
        width:58px;
        height:40px;
        margin-left:6px;
    }

    .theme-toggle-track{
        width:52px;
        height:28px;
    }

    .theme-toggle-knob{
        width:20px;
        height:20px;
    }

    body.dark-mode .theme-toggle-knob{
        transform:translateX(24px);
    }

    .hero h1{
        font-size:1.75rem;
    }

    .section-title h2,
    .cta h2,
    .project-content h2{
        font-size:1.55rem;
    }
}
