/**
 * Footer Styles - BeachHome
 *
 * Estilos para el footer personalizado de paginas WooCommerce.
 * Replica el diseno de 2 widgets: bh-newsletter + bh-footer.
 *
 * Secciones:
 * 1. Variables CSS
 * 2. Newsletter (bh-ftr-newsletter)
 * 3. Footer Principal (bh-ftr-main)
 * 4. Barra Inferior (bh-ftr-bottom)
 * 5. Responsive (tablet + mobile)
 * 6. Accesibilidad (prefers-reduced-motion)
 *
 * @package HelloElementorChild_BeachHome
 * @since   1.0.0
 */


/* ==========================================================================
   1. VARIABLES CSS - Definidas en global.css (no redeclarar aqui)
   Footer usa: --bh-bg-footer, --bh-bg-footer-dark, --bh-bg-mid, --bh-bg-deep,
   --bh-surface, --bh-text-muted, --bh-text-dim, --bh-text-subtle, --bh-text-faint,
   --bh-border-subtle, --bh-input-bg, --bh-glow-primary
   ========================================================================== */


/* ==========================================================================
   2. NEWSLETTER - SECCION DE SUSCRIPCION (bh-ftr-newsletter)
   ========================================================================== */

.bh-ftr-newsletter {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--bh-primary-rgb), 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(15, 52, 96, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, var(--bh-bg-footer) 0%, var(--bh-bg-mid) 50%, var(--bh-bg-deep) 100%);
    padding: 80px 30px;
    text-align: center;
}

/* Icono decorativo gigante (sobre) */
.bh-ftr-nl-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bh-text-white);
    opacity: 0.03;
    pointer-events: none;
    line-height: 0;
}

.bh-ftr-nl-deco svg {
    width: 400px;
    height: 400px;
}

/* Contenedor interno */
.bh-ftr-nl-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

/* Titulo */
.bh-ftr-nl-title {
    font-family: var(--bh-font-primary);
    font-size: 36px;
    font-weight: 700;
    color: var(--bh-text-white) !important;
    margin: 0 0 12px;
    line-height: 1.2;
}

/* Subtitulo */
.bh-ftr-nl-subtitle {
    font-family: var(--bh-font-secondary);
    font-size: 18px;
    font-weight: 400;
    color: var(--bh-text-silver) !important;
    margin: 0 0 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Formulario */
.bh-ftr-nl-form {
    display: flex;
    flex-direction: row;
    gap: 0;
    max-width: 520px;
    margin: 0 auto 16px;
}

/* Wrapper del input */
.bh-ftr-nl-input-wrap {
    position: relative;
    flex: 1;
}

/* Icono dentro del input */
.bh-ftr-nl-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--bh-text-subtle);
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Input de email */
.bh-ftr-nl-input {
    width: 100%;
    background: var(--bh-input-bg);
    border: 1px solid var(--bh-border-subtle);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 16px 16px 16px 48px;
    color: var(--bh-text-white);
    font-family: var(--bh-font-primary);
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.bh-ftr-nl-input::placeholder {
    color: var(--bh-text-subtle);
    opacity: 1;
}

.bh-ftr-nl-input:focus {
    border-color: var(--bh-primary);
    box-shadow: 0 0 0 3px var(--bh-glow-primary);
}

.bh-ftr-nl-input:focus ~ .bh-ftr-nl-input-icon,
.bh-ftr-nl-input-wrap:focus-within .bh-ftr-nl-input-icon {
    color: var(--bh-primary);
}

/* Boton de suscripcion */
.bh-ftr-nl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bh-primary) 0%, var(--bh-primary-dark) 100%);
    border: none;
    border-radius: 0 12px 12px 0;
    padding: 16px 28px;
    color: var(--bh-text-white);
    font-family: var(--bh-font-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.bh-ftr-nl-btn:hover {
    background: linear-gradient(135deg, var(--bh-primary-light) 0%, var(--bh-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--bh-primary-rgb), 0.4);
}

.bh-ftr-nl-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--bh-primary-rgb), 0.3);
}

/* Efecto shine en boton (reflejo animado) */
.bh-ftr-nl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: none;
    animation: bh-btn-shine 3s ease-in-out infinite;
}

@keyframes bh-btn-shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Texto legal */
.bh-ftr-nl-legal {
    font-family: var(--bh-font-secondary);
    font-size: 12px;
    color: var(--bh-text-subtle);
    opacity: 0.5;
    margin: 0;
    line-height: 1.4;
}

.bh-ftr-nl-legal a {
    color: var(--bh-text-subtle);
    text-decoration: underline;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.bh-ftr-nl-legal a:hover {
    color: var(--bh-primary);
    opacity: 1;
}


/* ==========================================================================
   3. FOOTER PRINCIPAL (bh-ftr-main)
   ========================================================================== */

.bh-ftr-main {
    background: linear-gradient(180deg, var(--bh-bg-footer) 0%, var(--bh-bg-footer-dark) 100%);
}

/* Contenedor interno - grid de 5 columnas */
.bh-ftr-main-inner {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 40px 50px;
}

/* --- Columna Logo (30%) --- */
.bh-ftr-col-logo {
    flex: 0 0 30%;
    max-width: 30%;
}

/* Logo: BEACH | HOME */
.bh-ftr-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.bh-ftr-logo-img {
    max-height: 45px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.bh-ftr-logo-text {
    font-family: var(--bh-font-primary);
    font-size: 22px;
    font-weight: 800;
    color: var(--bh-text-white) !important;
    letter-spacing: 1px;
    line-height: 1;
}

.bh-ftr-logo-bar {
    display: block;
    width: 3px;
    height: 28px;
    background: var(--bh-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Slogan */
.bh-ftr-slogan {
    font-family: var(--bh-font-secondary);
    font-size: 13px;
    font-weight: 500;
    color: var(--bh-primary) !important;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
    line-height: 1.4;
}

/* Descripcion */
.bh-ftr-desc {
    font-family: var(--bh-font-secondary);
    font-size: 13px;
    font-weight: 400;
    color: var(--bh-text-dim) !important;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Iconos de redes sociales */
.bh-ftr-social {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bh-ftr-social li {
    margin: 0;
    padding: 0;
}

.bh-ftr-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bh-surface);
    color: var(--bh-text-muted);
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.bh-ftr-social a:hover {
    background: var(--bh-primary);
    color: var(--bh-text-white);
    transform: translateY(-2px);
}

/* --- Columnas de links (17% cada una) --- */
.bh-ftr-col-links {
    flex: 0 0 17%;
    max-width: 17%;
}

/* --- Columna contacto (19%) --- */
.bh-ftr-col-contact {
    flex: 0 0 19%;
    max-width: 19%;
}

/* Titulos de columna */
.bh-ftr-col-title {
    font-family: var(--bh-font-primary);
    font-size: 16px;
    font-weight: 700;
    color: var(--bh-text-white) !important;
    margin: 0 0 20px;
    padding-bottom: 12px;
    position: relative;
    line-height: 1.3;
}

/* Underline decorativo teal debajo del titulo */
.bh-ftr-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--bh-primary);
    border-radius: 2px;
}

/* Links de columnas */
.bh-ftr-col-links ul,
.bh-ftr-col-contact ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bh-ftr-col-links li {
    margin: 0 0 10px;
    padding: 0;
}

.bh-ftr-col-links a {
    font-family: var(--bh-font-secondary);
    font-size: 14px;
    font-weight: 400;
    color: var(--bh-text-muted) !important;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease;
}

.bh-ftr-col-links a:hover {
    color: var(--bh-primary) !important;
    transform: translateX(4px);
}

/* Items de contacto */
.bh-ftr-col-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
}

.bh-ftr-col-contact li i {
    color: var(--bh-primary);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    text-align: center;
}

.bh-ftr-col-contact li span {
    font-family: var(--bh-font-secondary);
    font-size: 14px;
    font-weight: 400;
    color: var(--bh-text-muted) !important;
    line-height: 1.5;
}


/* ==========================================================================
   4. BARRA INFERIOR (bh-ftr-bottom)
   ========================================================================== */

.bh-ftr-bottom {
    background: var(--bh-bg-footer-dark);
    padding: 0 40px 20px;
}

.bh-ftr-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Divider gradiente horizontal */
.bh-ftr-divider {
    border: none;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--bh-primary) 50%,
        transparent 100%
    );
    margin: 0 0 20px;
    opacity: 0.4;
}

/* Contenido del bottom */
.bh-ftr-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Metodos de pago */
.bh-ftr-payment {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bh-ftr-payment-label {
    font-family: var(--bh-font-secondary);
    font-size: 12px;
    color: var(--bh-text-muted);
    margin: 0;
    white-space: nowrap;
}

.bh-ftr-payment-logos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bh-ftr-payment-item {
    display: inline-block;
    background: var(--bh-surface);
    padding: 6px 16px;
    border-radius: 4px;
    font-family: var(--bh-font-secondary);
    font-size: 12px;
    font-weight: 500;
    color: var(--bh-text-muted);
    line-height: 1;
}

/* Copyright */
.bh-ftr-copyright {
    font-family: var(--bh-font-secondary);
    font-size: 12px;
    color: var(--bh-text-faint);
    margin: 0;
    line-height: 1.4;
}


/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */

/* --- Tablet (max 1024px) --- */
@media (max-width: 1024px) {

    /* Newsletter */
    .bh-ftr-newsletter {
        padding: 60px 20px;
    }

    .bh-ftr-nl-title {
        font-size: 28px;
    }

    .bh-ftr-nl-subtitle {
        font-size: 16px;
    }

    .bh-ftr-nl-deco svg {
        width: 300px;
        height: 300px;
    }

    /* Footer grid: logo 100%, links 3 columnas, contacto 100% */
    .bh-ftr-main-inner {
        flex-wrap: wrap;
        padding: 50px 30px 40px;
        gap: 30px 20px;
    }

    .bh-ftr-col-logo {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .bh-ftr-logo {
        justify-content: center;
    }

    .bh-ftr-slogan,
    .bh-ftr-desc {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .bh-ftr-slogan {
        margin-bottom: 12px;
    }

    .bh-ftr-desc {
        margin-bottom: 20px;
    }

    .bh-ftr-social {
        justify-content: center;
    }

    .bh-ftr-col-links {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
    }

    .bh-ftr-col-contact {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Bottom bar */
    .bh-ftr-bottom {
        padding: 0 30px 20px;
    }

    .bh-ftr-bottom-content {
        justify-content: center;
        text-align: center;
    }

    .bh-ftr-payment {
        justify-content: center;
        width: 100%;
    }

    .bh-ftr-copyright {
        width: 100%;
        text-align: center;
    }
}

/* --- Mobile (max 640px) --- */
@media (max-width: 640px) {

    /* Newsletter */
    .bh-ftr-newsletter {
        padding: 60px 20px;
    }

    .bh-ftr-nl-title {
        font-size: 24px;
    }

    .bh-ftr-nl-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .bh-ftr-nl-deco svg {
        width: 220px;
        height: 220px;
    }

    /* Form: columna vertical */
    .bh-ftr-nl-form {
        flex-direction: column;
        gap: 12px;
    }

    .bh-ftr-nl-input {
        border-right: 1px solid var(--bh-border-subtle);
        border-radius: 12px;
    }

    .bh-ftr-nl-btn {
        border-radius: 12px;
        justify-content: center;
        padding: 16px 24px;
    }

    /* Footer grid: todas las columnas 100% */
    .bh-ftr-main-inner {
        flex-direction: column;
        padding: 40px 20px 30px;
        gap: 30px;
    }

    .bh-ftr-col-logo,
    .bh-ftr-col-links,
    .bh-ftr-col-contact {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Centrar logo en mobile */
    .bh-ftr-col-logo {
        text-align: center;
    }

    .bh-ftr-logo {
        justify-content: center;
    }

    .bh-ftr-social {
        justify-content: center;
    }

    .bh-ftr-slogan,
    .bh-ftr-desc {
        margin-left: auto;
        margin-right: auto;
    }

    /* Bottom bar */
    .bh-ftr-bottom {
        padding: 0 20px 20px;
    }

    .bh-ftr-bottom-content {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .bh-ftr-payment {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .bh-ftr-payment-logos {
        justify-content: center;
    }
}


/* ==========================================================================
   6. ACCESIBILIDAD - prefers-reduced-motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    /* Desactivar animacion shine del boton */
    .bh-ftr-nl-btn::before {
        animation: none;
    }

    /* Desactivar transiciones y transforms */
    .bh-ftr-nl-input,
    .bh-ftr-nl-btn,
    .bh-ftr-nl-legal a,
    .bh-ftr-social a,
    .bh-ftr-col-links a,
    .bh-ftr-nl-input-icon {
        transition: none;
    }

    .bh-ftr-nl-btn:hover,
    .bh-ftr-social a:hover,
    .bh-ftr-col-links a:hover {
        transform: none;
    }
}
