/* =========================
   1. Fuentes
   ========================= */

@font-face {
    font-family: Regular-Inria;
    src: url(../font/InriaSans-Light.ttf);
    font-display: swap;
}

@font-face {
    font-family: Black-Inria;
    src: url(../font/InriaSans-Bold.ttf);
    font-display: swap;
}

/* =========================
   2. Variables
   ========================= */

:root {
    --color1: #214052;
    --color2: #ffffff;
    --color3: #F3B950;
    --color4: #7E0010;
    --color5: #D50022;
    --color6: rgba(0, 0, 0, .7);
    --color7: #b8b8b8;
    --color8: #29a719;
    --color9: rgba(255, 255, 255, 0.5);
    --gradient: linear-gradient(180deg, #D50022 10%, #7E0010 60%);
    --shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-box: 0px 10px 20px rgba(0, 0, 0, .7);
    --parrafos: 1rem;
    --footer-size: .7rem;
}

/* =========================
   3. Base global
   ========================= */

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    background-color: var(--color2);
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1em;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* =========================
   4. Header
   ========================= */

.site-header {
    width: 100%;
    background: var(--color2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: .8em 1.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav,
.locale-selectors,
.whatsapp-header-link {
    display: none;
}

/* Hamburger */
.hamburger {
    background: var(--color3);
    border: none;
    cursor: pointer;
    padding: .5em 1em;
    display: flex;
    align-items: center;
    gap: .5em;
    border-radius: 2em;
    font-family: Black-Inria;
    color: var(--color1);
    font-size: var(--parrafos);
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--color1);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease, width .3s ease;
    animation-duration: .5s;
    animation-fill-mode: forwards;
}

.hamburger.open span:nth-child(1) { animation-name: top-line-open; }
.hamburger.open span:nth-child(2) { animation-name: mid-line-open; }
.hamburger.open span:nth-child(3) { animation-name: bot-line-open; }
.hamburger:not(.open) span:nth-child(1) { animation-name: top-line-close; }
.hamburger:not(.open) span:nth-child(2) { animation-name: mid-line-close; }
.hamburger:not(.open) span:nth-child(3) { animation-name: bot-line-close; }

@keyframes top-line-open {
    50%, 100% { transform: translateY(8px) rotate(-45deg); }
}
@keyframes bot-line-open {
    50%, 100% { transform: translateY(-8px) rotate(45deg); }
}
@keyframes mid-line-open {
    20%, 100% { width: 0; opacity: 0; }
}
@keyframes top-line-close {
    0% { transform: translateY(8px) rotate(-45deg); }
    50%, 100% { transform: translateY(0) rotate(0deg); }
}
@keyframes bot-line-close {
    0% { transform: translateY(-8px) rotate(45deg); }
    50%, 100% { transform: translateY(0) rotate(0deg); }
}
@keyframes mid-line-close {
    0% { width: 0; opacity: 0; }
    20%, 100% { width: 24px; opacity: 1; }
}

/* Drawer mobile */
.mobile-drawer {
    width: min(85vw, 360px);
    height: 100dvh;
    margin: 0;
    margin-left: auto;
    border: none;
    padding: 1.5em;
    background: var(--color2);
    box-shadow: var(--shadow-box);
}

.mobile-drawer::backdrop {
    background: var(--color6);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

.drawer-header .greeting {
    font-family: Black-Inria;
    font-size: 1.5rem;
    color: var(--color1);
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color1);
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-drawer:hover {
    background: #f0f0f0;
}

.drawer-section {
    margin: 1em 0;
}

.drawer-section label {
    display: block;
    font-family: Black-Inria;
    font-size: .85rem;
    color: var(--color1);
    margin-bottom: .3em;
}

.drawer-section select {
    width: 100%;
    padding: .7em;
    border: 1px solid #ccc;
    border-radius: .5em;
    font-family: Regular-Inria;
    font-size: var(--parrafos);
}

.drawer-nav ul {
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.drawer-nav a {
    color: var(--color1);
    font-family: Regular-Inria;
    font-size: 1.1rem;
    display: block;
    padding: .5em 0;
    border-bottom: 1px solid #f0f0f0;
}

.drawer-nav a:hover {
    color: var(--color5);
}

.drawer-contact {
    margin-top: 1.5em;
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.drawer-contact a {
    color: var(--color1);
    font-family: Regular-Inria;
    font-size: .95rem;
}

/* =========================
   5. Footer
   ========================= */

.site-footer {
    background: var(--color1);
    color: var(--color2);
    padding: 2em 1em 1em;
    font-size: var(--footer-size);
    font-family: Regular-Inria;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-column {
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-column summary {
    list-style: none;
    cursor: pointer;
    padding: .8em 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Black-Inria;
    font-size: .9rem;
}

.footer-column summary::-webkit-details-marker {
    display: none;
}

.footer-column .plus {
    font-size: 1.3rem;
    transition: transform .2s ease;
    line-height: 1;
}

.footer-column[open] .plus {
    transform: rotate(45deg);
}

.footer-column ul {
    padding: .5em 0 1em;
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.footer-column a {
    color: var(--color2);
    opacity: .85;
    font-size: .85rem;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--color3);
}

.footer-column address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: .4em;
    padding-bottom: 1em;
    font-size: .85rem;
}

.footer-column address a {
    color: var(--color2);
    opacity: .85;
}

.footer-secondary {
    margin-top: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: flex-start;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

.footer-logo-row img {
    height: 40px;
    width: auto;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: .8em;
}

.footer-social span {
    font-family: Black-Inria;
    font-size: .8rem;
}

.footer-social a img {
    width: 24px;
    height: 24px;
}

.footer-social a:hover img {
    transform: translateY(-2px);
    transition: transform .1s ease;
}

.footer-regulatory {
    display: flex;
    align-items: center;
    gap: .5em;
    font-size: .8rem;
}

.footer-regulatory img {
    height: 32px;
    width: auto;
}

.footer-developer {
    display: flex;
    align-items: center;
    gap: .5em;
    font-size: .8rem;
}

.footer-developer img {
    height: 20px;
    width: auto;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    font-size: .7rem;
    opacity: .6;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid rgba(255,255,255,.1);
}

/* =========================
   6. WhatsApp flotante
   ========================= */

.floating-whatsapp {
    position: fixed;
    bottom: 1.5em;
    right: 1em;
    width: 4em;
    height: 4em;
    background: var(--color8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 50;
    overflow: visible;
}

.floating-whatsapp img {
    width: 28px;
    height: 28px;
}

.floating-whatsapp::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color8);
    opacity: .7;
    animation: pulse 1.5s infinite ease-out;
    z-index: -1;
}

@keyframes pulse {
    0%   { transform: scale(1); opacity: .7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.floating-whatsapp:hover {
    transform: scale(1.05);
    transition: transform .2s ease;
}

/* =========================
   7. Botones globales
   ========================= */

.btn-primary {
    font-family: Black-Inria;
    font-size: .95rem;
    padding: .7em 1.5em;
    border-radius: 2em;
    border: none;
    cursor: pointer;
    background: var(--color5);
    color: var(--color2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    transition: background .2s ease, transform .1s ease;
}

.btn-primary:hover {
    background: #b8001c;
    transform: translateY(-2px);
}

/* =========================
   8. Toasts
   ========================= */

#toast-container {
    position: fixed;
    top: 1em;
    right: 1em;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.toast {
    background: var(--color1);
    color: var(--color2);
    padding: 1em 1.5em;
    border-radius: .5em;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transform: translateX(120%);
    transition: transform .3s ease;
    max-width: 400px;
    font-family: Regular-Inria;
}

.toast.show { transform: translateX(0); }
.toast-success { background: #2E7D32; }
.toast-error   { background: #C62828; }

/* =========================
   9. Media Queries
   ========================= */

/* Tablets / Móviles grandes */
@media only screen and (min-width: 481px) and (max-width: 768px) {

    /* Header */
    .header-inner {
        padding: .8em 2em;
    }
}

/* Tablets Pro vertical */
@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: portrait) {

    /* Header */
    .header-inner {
        padding: .8em 3em;
    }
}

/* Laptops pequeñas / Tablets horizontal */
@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {

    /* Header */
    .header-inner {
        padding: .8em 3em;
    }
}

/* Escritorio / Monitores grandes */
@media only screen and (min-width: 1280px) {

    /* Header */
    .header-inner {
        padding: 1em 5dvw;
    }

    .hamburger {
        display: none;
    }

    .main-nav {
        display: block;
        flex: 1;
        margin-left: 2em;
    }

    .main-nav ul {
        display: flex;
        gap: 1.5em;
        list-style: none;
    }

    .main-nav a {
        color: var(--color1);
        font-family: Regular-Inria;
        font-size: .95rem;
        padding: .5em 0;
        border-bottom: 2px solid transparent;
        transition: border-color .2s ease, color .2s ease;
    }

    .main-nav a:hover,
    .main-nav a[aria-current="page"] {
        border-color: var(--color5);
        color: var(--color5);
    }

    .locale-selectors {
        display: flex;
        gap: .5em;
    }

    .lang-selector,
    .currency-selector {
        background: transparent;
        border: 1px solid #ccc;
        border-radius: 1em;
        padding: .4em .8em;
        cursor: pointer;
        font-family: Regular-Inria;
        font-size: .85rem;
        display: flex;
        align-items: center;
        gap: .4em;
    }

    .lang-selector:hover,
    .currency-selector:hover {
        border-color: var(--color5);
        color: var(--color5);
    }

    .whatsapp-header-link {
        display: flex;
        align-items: center;
        gap: .5em;
        background: var(--color8);
        color: var(--color2);
        padding: .6em 1em;
        border-radius: 2em;
        font-family: Regular-Inria;
        font-size: .85rem;
    }

    .whatsapp-header-link:hover {
        background: #1e8c12;
    }

    /* Footer */
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        gap: 2em;
        padding-bottom: 1.5em;
    }

    .footer-column {
        flex: 1;
        border-bottom: none;
    }

    .footer-column summary {
        cursor: default;
        pointer-events: none;
    }

    .footer-column .plus {
        display: none;
    }

    .footer-column ul {
        display: flex !important;
    }

    .footer-secondary {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 1em;
    }

    .footer-copyright {
        text-align: left;
    }
}
