/* ============================================
   Mobile responsive styles
   ============================================ */

/* ---- Hamburger button (hidden on desktop) ---- */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto;
    z-index: 200;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
    display: block;
    width: 26px;
    height: 3px;
    background: #046fba;
    border-radius: 2px;
}

.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before,
.nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
}
.nav-toggle__icon::before { top: -8px; }
.nav-toggle__icon::after  { top: 8px; }

/* ---- Desktop: normal nav ---- */
@media (min-width: 769px) {
    .nav-toggle { display: none !important; }
}

/* ================================================
   MOBILE (768px and below)
   ================================================ */
@media (max-width: 768px) {

    html { overflow-x: hidden !important; width: 100% !important; }

    body {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
    }

    body *, body *::before, body *::after {
        box-sizing: border-box !important;
    }

    /* --- #wrap --- */
    html body #wrap, body #wrap, #wrap {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    /* --- Header bar --- */
    header {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0.5rem 0.75rem !important;
        gap: 0.25rem;
        box-sizing: border-box !important;
        position: relative !important;
    }

    header h1 {
        position: static !important;
        float: none !important;
        flex: 1 1 auto;
        width: auto !important;
        max-width: 200px !important;
        height: 55px !important;
        margin: 0 !important;
    }

    header h1 a {
        display: block;
        max-width: 100% !important;
        height: 100% !important;
        background-size: contain !important;
        background-position: left center !important;
        background-repeat: no-repeat !important;
    }

    header h2 {
        position: static !important;
        float: none !important;
        width: 100% !important;
        height: 25px !important;
        order: 3;
        margin: 0.25rem 0 0 0 !important;
        background-size: contain !important;
        background-position: left center !important;
        background-repeat: no-repeat !important;
    }

    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 2;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    /* ---- Section overrides ---- */
    section {
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
    }

    section > div {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    section div.section_shadow {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ---- Footer ---- */
    footer.wrap, footer {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    footer p:before, footer p:after {
        display: none !important;
    }

    /* ================================================
       CONTACT PAGE
       ================================================ */

    /* Section: full width, centered, no float */
    body#contact section {
        float: none !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 1rem 0.75rem !important;
    }

    /* "Contact" heading */
    body#contact section h3 {
        width: 140px !important;
        height: 42px !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: left center !important;
        margin: 5px 0 10px 5px !important;
    }

    /* Content box */
    body#contact section > div:not(.section_shadow) {
        width: calc(100% - 1.5rem) !important;
        max-width: 100% !important;
        padding: 0 20px 10px !important;
        margin: 0 auto !important;
        background: rgba(237, 237, 237, 0.65) !important;
        border: solid 1px #b2b2b4 !important;
        border-radius: 5px !important;
    }

    /* Hide decorative shadow */
    body#contact section div.section_shadow {
        display: none !important;
    }

    /* HR dividers */
    body#contact section hr {
        width: 100% !important;
        margin: 0 -12px !important;
        width: calc(100% + 24px) !important;
    }

    /* Paragraphs: left-aligned for readability */
    body#contact section p {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.75rem 0 !important;
        padding: 0 !important;
        text-align: left !important;
        line-height: 24px !important;
        font-size: 14px !important;
    }

    body#contact section p strong {
        font-size: 14px !important;
        line-height: 24px !important;
    }

    /* "Se habla Español" stays centered */
    body#contact section p strong.red.center {
        text-align: center !important;
        display: block !important;
        margin-top: 0.5rem !important;
    }

    /* Envelope & Phone images: side by side, centered */
    body#contact img#envelope,
    body#contact img#phone {
        display: inline-block !important;
        float: none !important;
        margin: 15px 10px !important;
        max-width: 80px !important;
        height: auto !important;
        vertical-align: middle !important;
    }

    /* Center the images row */
    body#contact #wrap {
        text-align: center !important;
    }

    body#contact section,
    body#contact footer {
        text-align: left !important;
    }

    /* Tin can communication */
    body#contact figure.tin_can_communication {
        width: 100% !important;
        max-width: 100% !important;
        clear: both !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background-size: 100% auto !important;
    }

    body#contact figure.tin_can_communication img,
    body#contact img.tin_can_communication {
        max-width: 320px !important;
        width: auto !important;
        height: auto !important;
        margin: 10px auto !important;
        float: none !important;
        display: block !important;
    }

    /* Footer */
    body#contact footer {
        width: 100% !important;
        overflow: visible !important;
    }

    body#contact footer p {
        margin: 0 !important;
        padding: 10px 8px !important;
        height: auto !important;
        font-size: 11px !important;
        line-height: 16px !important;
    }

    /* Language switch */
    .lang_switch,
    .lang_switch:hover,
    .lang_switch:link,
    .lang_switch:visited {
        position: static !important;
        bottom: auto !important;
        margin: 0.25rem 0 !important;
        display: inline-block !important;
        font-size: 12px !important;
    }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
    header { padding: 0.4rem 0.5rem !important; }
    header h1 { max-width: 160px !important; height: 45px !important; }
    header h2 { height: 20px !important; }
}
