/* ============================================================
   FOOTER GLOBAL (includes/footer.php)
   ============================================================ */
.footer {
    position: relative;
    background: #03060c;
    padding: 80px 0 0;
    border-radius: 28px 28px 0 0;
    margin-top: 40px;
    overflow: hidden;
    border-top: 1px solid rgba(96, 165, 250, .14);
    font-family: inherit;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(ellipse 70% 100% at 50% -40%, rgba(37, 99, 235, .18), transparent 65%);
    pointer-events: none;
}
.footer .container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 32px);
}
.footer__top {
    display: grid;
    grid-template-columns: 1.9fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer__brand { max-width: 400px; }
.footer__logo {
    height: 50px;
    width: auto;
    max-width: 100%;
    margin-bottom: 20px;
    object-fit: contain;
}
.footer__desc {
    max-width: 400px;
    font-size: 16px;
    color: #d7dfea;
    line-height: 1.7;
    margin: 0 0 24px;
}
.footer__badges { margin-bottom: 20px; }
.footer__badge-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #e2e8f0;
    margin: 0 0 12px;
}
.footer__badge-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    min-height: 50px;
}
.footer__badge-img {
    max-height: 100px;
    width: auto;
    max-width: min(300px, 100%);
    object-fit: contain;
    border-radius: 6px;
}
.footer__title {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 24px;
    color: #fff;
}
.footer__column-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: default;
    font-family: inherit;
    color: inherit;
    text-align: left;
}
.footer__column-chevron {
    display: none;
    transition: transform .3s ease;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: 12px;
}
.footer__column.open .footer__column-chevron {
    transform: rotate(180deg);
    color: #60a5fa;
}
.footer__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer__link {
    font-size: 16px;
    text-decoration: none;
    color: #d7dfea;
    transition: color .25s ease, padding-left .25s ease;
    line-height: 1.4;
    width: fit-content;
}
.footer__link:hover {
    color: #60a5fa;
    padding-left: 4px;
}
.footer__middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid rgba(96, 165, 250, .12);
    border-bottom: 1px solid rgba(96, 165, 250, .12);
}
.footer__locale {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer__dropdown { position: relative; display: inline-block; }
.footer__dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(96, 165, 250, .16);
    border-radius: 10px;
    color: #d7dfea;
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    transition: border-color .25s ease, color .25s ease;
    font-family: inherit;
}
.footer__dropdown-toggle:hover,
.footer__dropdown.open .footer__dropdown-toggle {
    border-color: #3b82f6;
    color: #60a5fa;
}
.footer__dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.footer__dropdown-icon svg { width: 100%; height: 100%; }
.footer__dropdown-icon--flag svg {
    width: auto;
    height: 13px;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.footer__dropdown-label { white-space: nowrap; }
.footer__dropdown-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform .2s ease;
}
.footer__dropdown.open .footer__dropdown-chevron { transform: rotate(180deg); }
.footer__dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    background: #081120;
    border: 1px solid rgba(96, 165, 250, .18);
    border-radius: 12px;
    padding: 6px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.footer__dropdown.open .footer__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.footer__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d7dfea;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.footer__dropdown-item:hover,
.footer__dropdown-item.active {
    background: rgba(59, 130, 246, .14);
    color: #93c5fd;
}
.footer__dropdown-item.active { font-weight: 700; }
.footer__middle-social { display: flex; gap: 12px; }
.footer__social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(96, 165, 250, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.footer__social-link:hover {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border-color: transparent;
    color: #fff;
    transform: translateY(-4px);
}
.footer__middle-social .footer__social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.footer__bottom {
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}
.footer__copyright { max-width: 720px; }
.footer__copyright p {
    font-size: .8rem;
    color: #d7dfea;
    line-height: 1.6;
    margin: 0 0 10px;
}
.footer__copyright p:last-child { margin-bottom: 0; }
.footer__legal {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer__legal-label {
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
}
.footer__legal-link {
    text-decoration: none;
    font-size: .85rem;
    color: #d7dfea;
    transition: color .25s ease;
}
.footer__legal-link:hover { color: #60a5fa; }

/* Botón volver arriba */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 10px 26px rgba(37, 99, 235, .4);
    z-index: 90;
}
.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, .55);
}

/* Responsive del footer */
@media (max-width: 1200px) {
    .footer__top { grid-template-columns: repeat(3, 1fr); gap: 40px; }
    .footer__brand { grid-column: 1 / -1; max-width: 100%; }
}
@media (max-width: 768px) {
    .footer { padding-top: 60px; }
    .footer__top { grid-template-columns: repeat(2, 1fr); gap: 32px; margin-bottom: 32px; }
    .footer__brand { grid-column: 1 / -1; }
    .footer__middle { flex-direction: column; align-items: flex-start; }
    .footer__bottom { flex-direction: column; }
    .scroll-top { bottom: 24px; right: 24px; width: 48px; height: 48px; }
}
@media (max-width: 480px) {
    .footer__top { grid-template-columns: 1fr; gap: 10px; }
    .footer__brand {
        border-bottom: 1px solid rgba(96, 165, 250, .12);
        padding-bottom: 16px;
    }
    .footer__column {
        border-bottom: 1px solid rgba(96, 165, 250, .12);
        padding-bottom: 8px;
    }
    .footer__title {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: normal;
        text-transform: none;
        margin-bottom: 6px;
    }
    .footer__column.open .footer__title { margin-bottom: 0; }
    .footer__column-toggle { cursor: pointer; padding: 4px 0; }
    .footer__column-chevron {
        display: block;
        width: 20px;
        height: 20px;
        color: #fff;
        flex-shrink: 0;
        margin-left: 12px;
    }
    .footer__links {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .35s ease, opacity .25s ease, margin .25s ease;
        gap: 0;
    }
    .footer__column.open .footer__links {
        max-height: 500px;
        opacity: 1;
        margin-top: 8px;
        gap: 8px;
    }
    .footer__legal { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .footer__link,
    .footer__social-link,
    .footer__badge-img,
    .footer__dropdown-toggle,
    .footer__dropdown-menu,
    .scroll-top { transition: none; }
    .scroll-top:hover { transform: none; }
}
