/* ============================================================
   BERATIEL — styles_rp/footer.css  v3.0
   Dark minimalista · Coherente con navbar · Variables :root
   Mobile-first · Breakpoints completos inc. todos los iPhones
   ============================================================ */


/* ============================================================
   1. FOOTER — Estructura base
   ============================================================ */
.footer {
    position: relative;
    background: #080f1c;
    /* mismo tono base del navbar */
    color: var(--beratiel-text-inverse);
    font-family: var(--font-body);
    border-top: 1px solid rgba(56, 189, 248, 0.08);
}


/* ============================================================
   2. LÍNEA NEÓN SUPERIOR (idéntica a navbar)
   ============================================================ */
.footer__neon-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--beratiel-primary) 30%,
            rgba(56, 189, 248, 0.55) 70%,
            transparent 100%);
    box-shadow:
        0 0 12px rgba(56, 189, 248, 0.65),
        0 0 28px rgba(56, 189, 248, 0.3);
}


/* ============================================================
   3. CONTENEDOR INTERNO
   ============================================================ */
.footer__inner {
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-16) var(--container-padding-x) var(--space-6);
}


/* ============================================================
   4. BLOQUE SUPERIOR — Grid 4 cols → mobile 1 col
   ============================================================ */
.footer__top {
    display: grid;
    grid-template-columns: 1fr;
    /* mobile: 1 col */
    gap: var(--space-10);
}


/* ============================================================
   5. BLOQUE MARCA (Col 1)
   ============================================================ */
.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.footer__logo-link {
    display: inline-flex;
    width: fit-content;
    transition: opacity var(--transition-fast), transform var(--transition-base);
}

.footer__logo-link:hover {
    opacity: 0.85;
    transform: scale(0.97);
}

.footer__logo-img {
    width: auto;
    height: 48px;
    object-fit: cover;

    transition: border-color var(--transition-base);
}

.footer__logo-link:hover .footer__logo-img {
    border-color: var(--beratiel-primary);
}

/* Tagline */
.footer__tagline {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.95);
    /* blanco más visible */
    line-height: var(--lh-relaxed);
    max-width: 240px;
}

.footer__tagline-accent {
    color: var(--beratiel-primary);
    font-weight: var(--fw-semibold);
}

/* Botón social LinkedIn — estilo pill igual al CTA del navbar */
.footer__social {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    text-decoration: none;
    width: fit-content;
    letter-spacing: var(--ls-wide);
    transition:
        color var(--transition-base),
        border-color var(--transition-base),
        background var(--transition-base),
        transform var(--transition-fast);
}

.footer__social:hover {
    color: var(--beratiel-primary);
    border-color: var(--beratiel-primary);
    background: rgba(56, 189, 248, 0.07);
    transform: translateY(-1px);
}

.footer__social i {
    font-size: var(--text-sm);
}


/* ============================================================
   6. COLUMNAS NAV / SERVICIOS / CONTACTO
   ============================================================ */
.footer__nav,
.footer__services,
.footer__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Título de columna */
.footer__nav-title {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
}

/* Lista de links */
.footer__nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer__nav-link {
    font-size: var(--text-sm);
    color: #ffffff;
    /* blanco puro */
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
    width: fit-content;
}

/* Underline animado — igual que navbar */
.footer__nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--beratiel-primary);
    border-radius: var(--radius-pill);
    transition: width var(--transition-base);
}

.footer__nav-link:hover {
    color: #fff;
}

.footer__nav-link:hover::after {
    width: 100%;
}


/* ============================================================
   7. CONTACTO
   ============================================================ */
.footer__contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: #ffffff;
    /* blanco puro */
    line-height: var(--lh-normal);
}

.footer__contact-item i {
    color: var(--beratiel-primary);
    font-size: var(--text-sm);
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    margin-top: 2px;
}

.footer__contact-link {
    color: #ffffff;
    /* blanco puro */
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__contact-link:hover {
    color: var(--beratiel-primary);
}

/* CTA Cotizar — sin degradado, azul sólido */
.footer__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-pill);
    background: var(--beratiel-primary);
    /* azul sólido #38bdf8 */
    color: #040c18;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    width: fit-content;
    letter-spacing: var(--ls-wide);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.2);
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        background var(--transition-fast);
    margin-top: var(--space-2);
}

.footer__cta:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(56, 189, 248, 0.45);
    color: #040c18;
}

.footer__cta i {
    font-size: var(--text-xs);
    transition: transform var(--transition-fast);
}

.footer__cta:hover i {
    transform: translateX(3px);
}


/* ============================================================
   8. BARRA INFERIOR
   ============================================================ */
.footer__bottom {
    margin-top: var(--space-12);
}

.footer__divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: var(--space-5);
}

/* Mobile: columna centrada */
.footer__bottom-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
}

.footer__rights {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: var(--ls-wide);
}

.footer__dev {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.60);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.footer__heart {
    color: #ef4444;
    font-size: 10px;
    animation: ft-heartbeat 1.6s ease infinite;
}

@keyframes ft-heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.3);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.18);
    }

    60% {
        transform: scale(1);
    }
}


/* ============================================================
   9. BOTÓN FLOTANTE WHATSAPP
   ============================================================ */
.wa-btn {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-4);
    height: 48px;
    border-radius: var(--radius-pill);
    background: #25d366;
    color: #fff;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: var(--z-toast);
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        opacity var(--transition-base),
        max-width var(--transition-base);
    overflow: hidden;
    max-width: 180px;
    -webkit-tap-highlight-color: transparent;
}

.wa-btn i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.wa-btn__label {
    white-space: nowrap;
    font-size: var(--text-xs);
    letter-spacing: var(--ls-wide);
}

.wa-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* En móvil: solo ícono */
@media (max-width: 640px) {
    .wa-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        max-width: 50px;
    }

    .wa-btn__label {
        display: none;
    }
}

/* Oculto cuando se ve el footer */
.wa-btn--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.9);
}


/* ============================================================
   10. RESPONSIVE — MOBILE FIRST
   ============================================================ */

/* ── 640px: 2 columnas ────────────────────────────────────── */
@media (min-width: 640px) {
    .footer__top {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

/* ── 1024px: 4 columnas ───────────────────────────────────── */
@media (min-width: 1024px) {
    .footer__top {
        grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
        gap: var(--space-10);
    }

    .footer__bottom-row {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ── 1200px: más espacio ──────────────────────────────────── */
@media (min-width: 1200px) {
    .footer__inner {
        padding-top: var(--space-20);
    }
}


/* ── Móviles ≤ 630px: centrar ─────────────────────────────── */
@media (max-width: 630px) {

    .footer__brand,
    .footer__nav,
    .footer__services,
    .footer__contact {
        align-items: center;
        text-align: center;
    }

    .footer__tagline {
        text-align: center;
    }

    .footer__contact-item {
        justify-content: center;
    }

    .footer__nav-link::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer__cta {
        align-self: center;
    }
}

/* ── iPhone 14 Pro Max / Plus → 428–430px ────────────────── */
@media (max-width: 430px) {
    .footer__inner {
        padding-top: var(--space-12);
        padding-bottom: var(--space-5);
    }

    .footer__top {
        gap: var(--space-8);
    }

    .wa-btn {
        bottom: var(--space-4);
        right: var(--space-4);
    }
}

/* ── iPhone XR → 414px ────────────────────────────────────── */
@media (max-width: 414px) {
    .footer__logo-img {
        width: 44px;
        height: 44px;
    }
}

/* ── iPhone 12 Pro / 14 / 14 Pro → 390–393px ─────────────── */
@media (max-width: 393px) {
    .footer__tagline {
        font-size: var(--text-xs);
    }

    .footer__nav-title {
        letter-spacing: var(--ls-wider);
    }
}

/* ── iPhone SE / 12 mini → 375px ─────────────────────────── */
@media (max-width: 375px) {
    .footer__inner {
        padding-inline: var(--space-4);
    }

    .footer__logo-img {
        width: 40px;
        height: 40px;
    }

    .footer__cta {
        padding: var(--space-2) var(--space-4);
    }

    .wa-btn {
        width: 46px;
        height: 46px;
        bottom: var(--space-3);
        right: var(--space-3);
    }
}

/* ── < 320px ──────────────────────────────────────────────── */
@media (max-width: 320px) {
    .footer__inner {
        padding-inline: var(--space-3);
    }

    .footer__logo-img {
        width: 36px;
        height: 36px;
    }

    .wa-btn {
        width: 42px;
        height: 42px;
    }
}

/* ── Safe area iOS (notch + home bar) ────────────────────── */
@supports (padding: max(0px)) {
    .wa-btn {
        bottom: max(var(--space-6), calc(env(safe-area-inset-bottom) + var(--space-3)));
        right: max(var(--space-6), calc(env(safe-area-inset-right) + var(--space-4)));
    }

    @media (max-width: 430px) {
        .wa-btn {
            bottom: max(var(--space-4), calc(env(safe-area-inset-bottom) + var(--space-2)));
        }
    }
}

/* ============================================================
   11. ACCESIBILIDAD
   ============================================================ */
.footer__nav-link:focus-visible,
.footer__contact-link:focus-visible,
.footer__social:focus-visible,
.footer__cta:focus-visible,
.footer__logo-link:focus-visible,
.wa-btn:focus-visible {
    outline: 2px solid var(--beratiel-primary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    .footer__heart {
        animation: none;
    }

    .footer__nav-link::after,
    .footer__social,
    .footer__cta,
    .wa-btn,
    .footer__logo-link {
        transition: none !important;
    }
}