/* =========================================
   COMMON STYLES — shared across all pages
   (reset, header, language switcher, footer)
========================================= */

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    color:#10264d;
    background:#fff;
}
a,button,input,select,textarea{font-family:inherit}
button,a{cursor:pointer}

:root{
    --blue:#102b58;
    --blue2:#173e76;
    --yellow:#f6c64c;
    --light:#f3f7fc;
    --soft:#f3f7fc;
    --green:#67a96b;
    --line:#e1e7ef;
    --cream:#fff9ed;
    --text:#18243b;
}

/* HEADER */
.header{
    min-height:88px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    row-gap:10px;
    column-gap:20px;
    padding:12px 5%;
    background:#fff;
    position:sticky;
    top:0;
    z-index:100;
    box-shadow:0 2px 15px rgba(0,0,0,.07);
}
.logo{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    flex-shrink:0;
}
.logo-icon{
    width:43px;
    height:43px;
    border:2px solid #e4b83e;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:25px;
    color:#e4b83e;
    flex-shrink:0;
}
.logo-title{
    font-size:20px;
    font-weight:800;
    color:var(--blue);
}
.logo-sub{
    font-size:11px;
    color:#444;
    margin-top:3px;
}

/* menu-panel (now just the .nav element itself, id="menuPanel")
   is a flex item of .header on desktop — links laid out in a row.
   On mobile it becomes a toggled dropdown (see media query below). */
.nav{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    row-gap:6px;
    column-gap:18px;
    min-width:0;
    flex:1 1 auto;
}
.nav a{
    color:#111c31;
    text-decoration:none;
    font-size:13px;
    white-space:nowrap;
}
.nav a:hover,
.nav a.active{color:#d59f1e}
.nav a.active{font-weight:700}

.right-head{text-align:right;min-width:0;flex-shrink:0}
.languages{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    row-gap:4px;
    column-gap:12px;
    margin-bottom:7px;
}
.lang{
    display:inline-block;
    border:0;
    background:none;
    font-size:12px;
    color:#26364e;
    padding:3px;
    text-decoration:none;
    white-space:nowrap;
}
.lang.active{
    font-weight:bold;
    color:#d39d13;
}
.phone{
    font-weight:bold;
    color:#172f56;
    white-space:nowrap;
}
.phone a{
    color:inherit;
    text-decoration:none;
}
.right-head small{font-size:10px;color:#4c5564}

/* NAV TOGGLE (hamburger) — hidden on desktop */
.nav-toggle{
    display:none;
    border:0;
    background:none;
    font-size:26px;
    line-height:1;
    color:var(--blue);
    padding:6px 8px;
    margin-left:auto;
}

/* SHARED BUTTONS / LINKS */
.back-link{
    display:inline-flex;
    align-items:center;
    gap:7px;
    margin-bottom:18px;
    color:#315b91;
    text-decoration:none;
    font-size:13px;
    font-weight:700;
}
.back-link:hover{color:#d59f1e}

.yellow-btn{
    display:inline-block;
    border:0;
    background:var(--yellow);
    color:#172b4d;
    padding:14px 24px;
    border-radius:9px;
    font-weight:800;
    text-decoration:none;
    transition:.2s;
}
.yellow-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 6px 16px rgba(200,150,20,.2);
}

/* FOOTER */
.footer{
    background:#082653;
    color:#fff;
    padding:36px 5% 30px;
}
.footer-inner{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:1.3fr 1fr 1fr;
    gap:32px;
    align-items:start;
}
.footer h3{
    margin:0 0 6px;
    font-size:18px;
}
.footer p{
    margin:0;
    font-size:11px;
    opacity:.85;
}
.footer-links{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.footer-links a{
    color:#fff;
    text-decoration:none;
    font-size:12px;
    opacity:.9;
}
.footer-links a:hover{color:#f6c64c}

.footer-contacts{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.footer-contacts h4{
    margin:0 0 2px;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
    font-weight:700;
    opacity:.65;
}
.footer-contacts a,
.footer-contacts span{
    color:#fff;
    text-decoration:none;
    font-size:12px;
    opacity:.9;
}
.footer-contacts a:hover{color:#f6c64c}

.copyright{
    max-width:1200px;
    margin:26px auto 0;
    padding-top:16px;
    border-top:1px solid rgba(255,255,255,.15);
    font-size:10px;
    text-align:right;
    opacity:.8;
}

/* FAQ — shared component used on every page, right before the footer */
.faq{
    max-width:900px;
    margin:44px auto;
    padding:0 20px;
}
.faq h2{
    text-align:center;
    margin:0 0 20px;
    font-size:22px;
    color:var(--blue);
}
.faq-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.faq-item{
    border:1px solid var(--line);
    border-radius:12px;
    padding:16px 18px;
    background:#fff;
}
.faq-item summary{
    cursor:pointer;
    font-weight:700;
    font-size:14px;
    color:var(--blue);
    list-style:none;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{
    content:'+';
    font-size:20px;
    line-height:1;
    color:#9aa7bb;
    flex-shrink:0;
}
.faq-item[open] summary::after{content:'−'}
.faq-item p{
    margin:12px 0 0;
    font-size:13px;
    line-height:1.6;
    color:#3a4a63;
}

/* MOBILE HEADER / FOOTER
   Breakpoint is intentionally wide (1300px, not just phone-sized) —
   with 8 nav items and longer EN/ES translations, the full horizontal
   nav only comfortably fits on genuinely wide desktop monitors. Below
   that, the hamburger menu keeps the header from overflowing the
   page width on common laptop screens (1280/1366px etc). */
@media(max-width:1300px){
    .header{padding:12px 20px}
    .nav-toggle{display:block}

    /* .nav (id="menuPanel") is the toggle target — only nav LINKS are
       collapsed behind the hamburger. Anchored to the header itself
       (top:100%) rather than the viewport (position:fixed) — iOS
       Safari's floating bottom toolbar (iOS 26+) sits on top of
       fixed-positioned elements pinned to the screen bottom, and
       position:fixed there also shifts unreliably while that toolbar
       shows/hides. Anchoring to the header's own box is immune to
       all of that — it just always sits right below the header. */
    .nav{
        display:none;
        position:absolute;
        top:100%;
        left:0;
        right:0;
        background:#fff;
        z-index:150;
        flex-direction:column;
        flex-wrap:nowrap;
        align-items:stretch;
        row-gap:0;
        column-gap:0;
        padding:8px 20px calc(20px + env(safe-area-inset-bottom));
        max-height:80dvh;
        overflow-y:auto;
        box-shadow:0 16px 34px rgba(10,25,50,.18);
        border-top:1px solid var(--line);
        border-bottom-left-radius:14px;
        border-bottom-right-radius:14px;
    }
    body.nav-open .nav{display:flex}
    body.nav-open{overflow:hidden}

    .nav a{
        padding:13px 4px;
        border-bottom:1px solid #eef1f6;
        font-size:15px;
    }
    .nav a:last-child{border-bottom:0}

    /* Always visible (not part of the collapsible menu) — wraps onto
       its own compact row below the logo/hamburger row. */
    .right-head{
        width:100%;
        text-align:left;
        display:flex;
        align-items:center;
        flex-wrap:wrap;
        column-gap:14px;
        row-gap:6px;
        margin-top:10px;
        padding-top:10px;
        border-top:1px solid var(--line);
    }
    .languages{
        justify-content:flex-start;
        flex-wrap:wrap;
        row-gap:6px;
        column-gap:8px;
        margin-bottom:0;
    }
    .lang{
        font-size:11.5px;
        padding:4px 8px;
        border:1px solid var(--line);
        border-radius:6px;
    }
    .lang.active{
        background:#fff7e6;
        border-color:#f0d488;
    }
    .phone{font-size:13px}
    .right-head small{font-size:10.5px;width:100%;margin-top:2px}
}
@media(max-width:900px){
    .footer-inner{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
    .logo{min-width:0}
    .logo-title{font-size:16px}
    .logo-sub{font-size:9px}
    .footer-inner{grid-template-columns:1fr}
    .copyright{text-align:left}
    .faq{margin:30px auto}
    .faq h2{font-size:19px}
    .faq-item{padding:13px 15px}
    .faq-item summary{font-size:13px}
}
