* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
    --bg: #f7f8fa;
    --text: #111827;
    --teal: #1E3A8A; /* updated to match logo blue */
    --accent: #f59e0b;
    --muted: #4b5563;
    --line-opacity: 0.10;
    --card-bg: rgba(255,255,255,0.92);
    --glass: rgba(255,255,255,0.8);
    --section-soft: #f0f4fb;
}
html,body {
    height: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}
body{
    font-family: Inter, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    color: var(--text);
    transition: background .35s ease, color .35s ease;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    padding-top: 84px;
    line-height: 1.55;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* HEADER */
header{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    display:flex; align-items:center; justify-content:space-between;
    padding: 0 28px;
    gap: 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(2,6,23,0.06);
    z-index: 1400;
}

/* --- LOGO BUTTON --- */
.logo {
    backdrop-filter: blur(6px);
    padding: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.logo img {
    width: 100px;
    height: auto;
    display: block;
}
.logo:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(30, 58, 138, 0.35); /* updated glow */
    cursor: pointer;
}

/* dark mode tweak for logo button */
body.theme-dark .logo {
    background: rgba(20, 20, 20, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .logo:hover {
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.6); /* blue hover glow */
}

/* NAV */
nav{ display:flex; gap:14px; align-items:center; }
nav a{ color:var(--text); text-decoration:none; font-weight:600; padding:8px 10px; border-radius:8px; transition: background .18s, transform .12s; }
nav a:hover{ background: rgba(0,0,0,0.06); transform: translateY(-2px); color: #000; }
#theme-toggle{ cursor:pointer; font-size:1.15rem; padding:6px 8px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; transition: transform .18s; background:transparent; border:0; color:var(--text); }
#theme-toggle:hover{ transform:rotate(15deg); }

/* First-session header intro animation (logo + text buttons). */
html.header-first-visit .logo {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    animation: header-logo-intro 0.62s cubic-bezier(.2,.85,.25,1) forwards;
}

html.header-first-visit nav a,
html.header-first-visit #theme-toggle {
    opacity: 0;
    transform: translateY(-6px);
    animation: header-item-intro 0.52s ease forwards;
}

html.header-first-visit nav a:nth-child(1) { animation-delay: 0.12s; }
html.header-first-visit nav a:nth-child(2) { animation-delay: 0.18s; }
html.header-first-visit nav a:nth-child(3) { animation-delay: 0.24s; }
html.header-first-visit nav a:nth-child(4) { animation-delay: 0.30s; }
html.header-first-visit nav a:nth-child(5) { animation-delay: 0.36s; }
html.header-first-visit nav a:nth-child(6) { animation-delay: 0.42s; }
html.header-first-visit #theme-toggle { animation-delay: 0.5s; }
html.header-first-visit .hero-logo-bg img {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
    animation: hero-logo-intro 1.05s cubic-bezier(.2,.85,.25,1) 0.2s forwards;
}

@keyframes header-logo-intro {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes header-item-intro {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-logo-intro {
    from { opacity: 0; transform: translateY(14px) scale(0.9); }
    to { opacity: 0.7; transform: translateY(0) scale(1); }
}

/* HERO */
.hero{
    min-height: calc(100vh - 84px);
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    position:relative;
    padding:48px 20px;
    background-image: url("https://images.unsplash.com/photo-1603046891743-8f2072e4dede?auto=format&fit=crop&w=1920&q=80");
    background-position:center;
    background-size:cover;
    background-attachment:fixed;
    color:#fff;
    overflow:hidden;
}
.hero::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    z-index:0;
}
.hero-content{
    position:relative;
    z-index:2;
    max-width:1100px;
    padding:48px 1rem 64px;
}
.hero h1{ font-size:2.6rem; margin-bottom:0.6rem; }
.hero-lead{ font-size:1.08rem; opacity:0.97; margin:0 auto 1.4rem; max-width:900px; }
.cta-row{ display:inline-flex; gap:12px; align-items:center; }
.trust-strip{
    list-style:none;
    display:flex;
    gap:0.6rem;
    justify-content:center;
    flex-wrap:wrap;
    margin:1.05rem auto 0;
    padding:0;
}
.trust-strip li{
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: .1px;
}

/* HERO BACKGROUND LOGO */
.hero-logo-bg{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1;
    opacity:0.7;
    pointer-events:none;
}
.hero-logo-bg img{
    width:100%;
    max-width:600px;
    height:auto;
    object-fit:contain;
    filter:grayscale(100%) brightness(1.2);
}

/* BUTTONS */
.btn{ display:inline-block; padding:11px 18px; border-radius:10px; font-weight:700; text-decoration:none; }
.btn.primary{ background: linear-gradient(90deg,var(--teal), #3B82F6); color:#fff; box-shadow: 0 6px 18px rgba(30,58,138,0.15); }
.btn.ghost{ background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.45); }

/* SECTIONS */
section{ width:100%; padding:6.5rem 5%; display:block; position:relative; text-align:center; }
main{ width:100%; }
h2{ color:var(--teal); font-size:1.8rem; margin-bottom:0.6rem; }
section p{ max-width:980px; margin:0.5rem auto; color:var(--muted); line-height:1.6; }

#services,
#industries,
#enquiry {
    background: linear-gradient(180deg, rgba(255,255,255,0.72), var(--section-soft));
}

/* DIVIDERS */
section + section::before{
    content:"";
    position:absolute;
    top:0; left:50%;
    transform:translateX(-50%);
    width:94%; max-width:1400px; height:1px;
    border-radius:1px;
    background:linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,var(--line-opacity)), rgba(0,0,0,0));
}

/* GRID */
.grid{ display:grid; gap:1.6rem; align-items:stretch; }
.grid-1{ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); max-width:1000px; margin:0 auto; align-items:stretch; display: grid; }
.grid-2{ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); max-width:1000px; margin:0 auto; align-items:stretch; display: grid; gap:2rem; }
.grid-3{ grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); max-width:1200px; margin:0 auto; }

/* CARDS */
.card, .client-card{
    background: var(--card-bg);
    border-radius:14px; padding:22px;
    border: 1px solid rgba(2,6,23,0.06);
    box-shadow: 0 8px 24px rgba(2,6,23,0.05);
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover, .client-card:hover{ transform:translateY(-6px); box-shadow: 0 18px 44px rgba(2,6,23,0.11); border-color: rgba(30,58,138,0.2); }

/* CLIENT CARDS */
.client-card{ text-align:center; display:flex; flex-direction:column; align-items:center; }
.client-card img{ width:100%; border-radius:10px; margin-bottom:12px; }
.client-card h3{ margin:0.25rem 0; color:var(--teal); font-size:1.12rem; }
.client-card p{ color:var(--muted); }

/* TESTIMONIALS */
.testimonials blockquote{ max-width:980px; margin:1.2rem auto 0; font-style:italic; color:var(--muted); }
.testimonials cite{ display:block; margin-top:0.5rem; font-weight:700; color:var(--text); }

/* CLIENT LOGO MARQUEE */
.logo-marquee{
    position: relative;
    width: min(1200px, 100%);
    margin: 2rem auto 2.5rem;
    overflow: hidden;
    padding: 0.5rem 0;
}
.logo-marquee::before,
.logo-marquee::after{
    content: "";
    position: absolute;
    top: 0;
    width: 72px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.logo-marquee::before{
    left: 0;
    background: linear-gradient(90deg, var(--bg), rgba(255,255,255,0));
}
.logo-marquee::after{
    right: 0;
    background: linear-gradient(270deg, var(--bg), rgba(255,255,255,0));
}
.logo-marquee-track{
    display: flex;
    align-items: center;
    width: max-content;
    gap: 1rem;
    animation: logo-scroll 72s linear infinite;
}
.logo-item{
    width: 260px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(30, 58, 138, 0.12);
    background: rgba(255,255,255,0.88);
    box-shadow: 0 10px 24px rgba(2,6,23,0.10);
}
#clients .logo-marquee .logo-item img{
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
    border-radius: 0;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}
.logo-marquee:hover .logo-marquee-track,
.logo-marquee:focus-within .logo-marquee-track{
    animation-play-state: paused;
}

@keyframes logo-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* CONTACT */
#contact p{ margin:0.4rem auto; color:var(--muted); font-size:1rem; }
#contact a{ color:var(--teal); text-decoration:none; }
#contact a:hover{ text-decoration:underline; }

/* FOOTER */
footer{ padding:1.4rem 5%; text-align:center; background:var(--teal); color:white; }
footer .footer-credit{ margin-top:0.35rem; font-size:0.85rem; opacity:0.85; }
footer .footer-credit a{ color:inherit; text-decoration:none; }
footer .footer-credit a:hover,
footer .footer-credit a:focus-visible{ text-decoration:underline; }

/* ANIMATIONS */
.fade-in{ opacity:0; transform:translateY(18px); transition: opacity .75s ease, transform .75s ease; }
.fade-in.visible{ opacity:1; transform:translateY(0); }

/* DARK THEME */
body.theme-dark{
    --bg:#07090b;
    --text:#e6eef0;
    --teal:#3B82F6; /* updated dark mode blue */
    --accent:#fbbf24;
    --muted:#cbd5d6;
    --line-opacity:0.14;
    background:#07090b; color:var(--text);
}
body.theme-dark header{ background: rgba(10,12,14,0.65); box-shadow: 0 12px 32px rgba(0,0,0,0.7); }
body.theme-dark nav a{ color:var(--text); }
body.theme-dark nav a:hover{ background: rgba(255,255,255,0.03); color:var(--teal); }
body.theme-dark .card, body.theme-dark .client-card{ background: linear-gradient(180deg, rgba(18,20,24,0.6), rgba(12,16,20,0.64)); box-shadow: 0 8px 22px rgba(0,0,0,0.6); }
body.theme-dark section + section::before{ background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.12), rgba(255,255,255,0)); }
body.theme-dark footer{ background:#1E3A8A; }
body.theme-dark footer .footer-credit{ opacity:0.8; }
body.theme-dark .logo-item{
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
body.theme-dark #services,
body.theme-dark #industries,
body.theme-dark #enquiry {
    background: linear-gradient(180deg, rgba(12,16,20,0.55), rgba(7,9,11,0.85));
}
body.theme-dark .btn.ghost {
    color: #e6eef0;
    background: rgba(17, 24, 39, 0.4);
    border-color: rgba(148,163,184,0.45);
}
body.theme-dark .logo-marquee::before{ background: linear-gradient(90deg, #07090b, rgba(7,9,11,0)); }
body.theme-dark .logo-marquee::after{ background: linear-gradient(270deg, #07090b, rgba(7,9,11,0)); }



/* EVOLUTION SLIDER SECTION */
.slider-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: 3rem auto 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--teal), var(--accent));
    outline: none;
    transition: background 0.3s ease;
}

.slider.nudge {
    animation: slider-nudge 1.2s ease-in-out 3;
}

.slider-hint {
    min-height: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.92rem;
    color: var(--muted);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.slider-hint.visible {
    opacity: 0.95;
    transform: translateY(0);
    animation: hint-pulse 1.6s ease-in-out infinite;
}

@keyframes slider-nudge {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(10px); }
    65% { transform: translateX(-3px); }
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.72; }
    50% { opacity: 1; }
}

/* WebKit browsers (Chrome, Edge, Safari) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: url("../img/o_logo.png") center/contain no-repeat;
    border: 2px solid var(--teal);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}
.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(30, 58, 138, 0.3);
}

/* Firefox */
.slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: url("../img/o_logo.png") center/contain no-repeat;
    border: 2px solid var(--teal);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}
.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(30, 58, 138, 0.3);
}

.slider-points {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: -40px;
    width: 100%;
    pointer-events: none;
}

.stage {
    font-size: 1.5rem;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}
.stage.active {
    transform: scale(1.3);
    opacity: 1;
}

.info-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.info-box img {
    width: 100%;
    max-height: 250px;
    border-radius: 10px;
    margin-top: 1rem;
    object-fit: cover;
}
.info-box.hidden {
    opacity: 0;
    transform: translateY(15px);
}

/* dark mode tweaks */
body.theme-dark .info-box {
    background: rgba(25, 28, 33, 0.9);
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* smaller Etapa 6 image */
#infoBox img[alt*="Etapa 6"] {
    max-width: 70%;
    max-height: 180px;
    object-fit: contain;
}

/* ENQUIRY FORM */
.enquiry-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.enquiry-form label {
    text-align: left;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.15rem;
}

.enquiry-intro,
.enquiry-note {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.enquiry-note {
    font-size: 0.9rem;
    opacity: 0.9;
}

.enquiry-form input,
.enquiry-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.enquiry-form input:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 6px rgba(30,58,138,0.25);
}

.enquiry-form button {
    align-self: center;
    cursor: pointer;
}

#enquiry-status {
    text-align: center;
    font-weight: 600;
    margin-top: 0.75rem;
    color: var(--teal);
}


/* MAP SECTION */
#location {
    text-align: center;
    padding: 6rem 5% 4rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,247,250,0.95));
    position: relative;
}

body.theme-dark #location {
    background: linear-gradient(180deg, rgba(10,12,14,0.6), rgba(18,20,24,0.85));
}

#location h2 {
    color: var(--teal);
    font-size: 1.9rem;
    margin-bottom: 0.8rem;
}

#location p {
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* MAP SECTION */
#location {
    text-align: center;
    padding: 6rem 5% 4rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,247,250,0.95));
    position: relative;
}

body.theme-dark #location {
    background: linear-gradient(180deg, rgba(10,12,14,0.6), rgba(18,20,24,0.85));
}

#location h2 {
    color: var(--teal);
    font-size: 1.9rem;
    margin-bottom: 0.8rem;
}

#location p {
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

#leaflet-map {
    width: 100%;
    max-width: 1100px;
    height: 450px;
    margin: 2rem auto;
    border-radius: 16px;
    border: 2px solid rgba(30, 58, 138, 0.15);
    box-shadow: 0 8px 26px rgba(0,0,0,0.08);
}


/* =============================== */
/* 🌐 RESPONSIVE (Mobile & Tablet) */
/* =============================== */

@media (max-width: 900px) {

    /* --- General Layout Adjustments --- */
    section {
        padding: 4.5rem 6vw;
    }

    .hero {
        padding: 3rem 1rem;
        background-attachment: scroll;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero-lead {
        font-size: 1rem;
        line-height: 1.5;
    }

    .cta-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .trust-strip {
        gap: 0.45rem;
    }

    .trust-strip li {
        font-size: 0.82rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }

    /* --- Header spacing on small screens --- */
    header {
        padding: 0 1rem;
    }

    /* --- Clients Section --- */
    #clients {
        background: linear-gradient(180deg, #f5f7fb 0%, #e9eef7 100%);
        border-radius: 20px;
        padding: 5rem 2rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    }

    body.theme-dark #clients {
        background: linear-gradient(180deg, #101317 0%, #181c22 100%);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    }

    #clients h2 {
        font-size: 1.6rem;
    }

    #clients .grid-1,
    #clients .grid-2,
    #clients .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 1rem;
        justify-items: center;
    }

    #clients .logo-marquee {
        margin: 1.4rem auto 2rem;
    }

    #clients .logo-marquee::before,
    #clients .logo-marquee::after {
        width: 32px;
    }

    #clients .logo-item {
        width: 205px;
        height: 112px;
        padding: 0.5rem;
    }

    #clients img {
        width: 100%;
        max-width: 140px;
        height: auto;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        transition: transform 0.3s ease, filter 0.3s ease;
    }

    #clients img:hover {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 10px rgba(30, 58, 138, 0.25));
    }

    /* --- Info Cards (Testimonials, Services) --- */
    .client-card,
    .card {
        padding: 1rem;
        border-radius: 14px;
    }

    .client-card img {
        max-width: 100%;
        border-radius: 10px;
    }

    .client-card h3 {
        font-size: 1rem;
        margin-top: 0.4rem;
    }

    .testimonials blockquote {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* --- Enquiry Form --- */
    .enquiry-form {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .enquiry-form input,
    .enquiry-form textarea {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    body.theme-dark .enquiry-form input,
    body.theme-dark .enquiry-form textarea {
        background: rgba(25, 28, 33, 0.85);
        color: #e6eef0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* --- Footer --- */
    footer {
        padding: 2rem 5%;
        font-size: 0.9rem;
    }
}

/*@media (prefers-reduced-motion: reduce) {*/
/*    .logo-marquee-track {*/
/*        animation: none;*/
/*    }*/
/*}*/

/* ---------- FORCE DESKTOP NAV BACK (>=1101px) ---------- */
@media (min-width: 1101px) {
    nav {
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        transform: none !important;
        background: transparent !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    nav a {
        display: inline-block !important;
    }

    .menu-toggle,
    #menuToggle {
        display: none !important;
    }
}

/* ---------- MOBILE/TABLET NAV (<=1100px) ---------- */
@media (max-width: 1100px) {
    body.nav-open {
        overflow: hidden;
    }

    /* show hamburger */
    .menu-toggle,
    #menuToggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.6rem;
        color: var(--teal);
        cursor: pointer;
        z-index: 1600;
    }

    /* transform original nav into slide panel */
    nav {
        position: fixed;
        top: 72px;
        right: 0;
        width: 78%;
        max-width: 320px;
        height: calc(100vh - 72px);
        background: linear-gradient(180deg, #f7f8fa 0%, #e8ecf4 100%);
        backdrop-filter: blur(10px);
        box-shadow: -6px 0 24px rgba(0, 0, 0, 0.12);
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(.2,.9,.3,1);
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 2rem 1.25rem;
        border-left: 1px solid rgba(30,58,138,0.08);
        z-index: 1500;
    }

    /* visible state */
    nav.open {
        transform: translateX(0);
    }

    /* nav links full-width on mobile */
    nav a {
        display: block;
        width: 100%;
        padding: 0.85rem 0.25rem;
        color: var(--text);
        text-decoration: none;
        border-radius: 8px;
    }

    nav a:hover {
        background: rgba(0,0,0,0.04);
        color: var(--teal);
    }

    /* keep theme toggle inside nav nicely */
    #theme-toggle {
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.header-first-visit .logo,
    html.header-first-visit nav a,
    html.header-first-visit #theme-toggle,
    html.header-first-visit .hero-logo-bg img {
        animation: none;
        opacity: 1;
        transform: none;
    }

    html.header-first-visit .hero-logo-bg img {
        opacity: 0.7;
    }

    .slider.nudge,
    .slider-hint.visible {
        animation: none;
    }

    .fade-in {
        transition: none;
    }

    .card,
    .client-card,
    nav a,
    .btn,
    #phoneFab {
        transition: none;
    }
}

/* === Floating Phone Button === */
#phoneFab {
    position: fixed;
    bottom: 28px;
    right: 22px;
    width: 58px;
    height: 58px;
    background: var(--teal);
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 3000;
    transition: transform .2s ease, background .25s ease;
}
#phoneFab:hover {
    transform: scale(1.12);
}

/* === Overlay === */
#phoneOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    transition: opacity .3s ease;
}
#phoneOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.phone-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.25);
    text-align: center;
    position: relative;
    animation: popup .25s ease forwards;
}
@keyframes popup {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.phone-box a {
    color: var(--teal);
    text-decoration: none;
    font-size: 1.1rem;
}
.phone-box a:hover {
    text-decoration: underline;
}

/* Close button */
#closePhone {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--muted);
}

/* Dark mode adjustments */
body.theme-dark #phoneFab {
    background: #3B82F6;
}
body.theme-dark #phoneOverlay {
    background: rgba(0,0,0,0.75);
}
body.theme-dark .phone-box {
    background: rgba(20, 22, 26, 0.92);
    box-shadow: 0 10px 32px rgba(0,0,0,0.6);
}
body.theme-dark #closePhone {
    color: #e5e7eb;
}