/* ==========================================================================
   FOOTER CSS - INDUPOLI | Polimeros Industriales

   Estilos del footer corporativo.
   Variables CSS definidas en global.css (no redeclarar aqui).

   INDICE:
   1. Footer principal (4 columnas)
   2. Logo y marca
   3. Redes sociales
   4. Titulos de columna
   5. Listas de enlaces
   6. Contacto
   7. Barra inferior (copyright)
   8. Responsive — tablet (max 1024px)
   9. Responsive — mobile (max 767px)

   @package HelloElementorChild_INDUPOLI
   @since   3.0.0
   ========================================================================== */


/* ==========================================================================
   1. FOOTER PRINCIPAL
   ========================================================================== */

.ip-footer {
    width: 100%;
    margin-top: auto;
    position: relative;
}

/* --- Linea decorativa verde limon en la parte superior --- */
.ip-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        var(--ip-verde-profundo) 0%,
        var(--ip-verde-limon) 20%,
        var(--ip-verde-limon-digital) 50%,
        var(--ip-verde-limon) 80%,
        var(--ip-verde-profundo) 100%);
    z-index: 1;
}

/* --- Gradiente de separacion entre contenido y footer --- */
.ip-footer::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(218, 246, 64, 0.06) 0%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.ip-footer-main {
    background-color: var(--ip-bg-footer);
    padding: 60px 0 48px;
    position: relative;
}

.ip-footer-container {
    width: 100%;
    max-width: var(--ip-width-full);
    margin: 0 auto;
    padding: 0 var(--ip-space-section-x);
}

.ip-footer-main > .ip-footer-container {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
}


/* ==========================================================================
   2. LOGO Y MARCA
   ========================================================================== */

.ip-footer-logo {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 16px;
    transition: opacity var(--ip-transition-fast);
}

.ip-footer-logo:hover {
    opacity: 0.85;
}

.ip-footer-logo-part1,
.ip-footer-logo-part2 {
    font-family: var(--ip-font-heading);
    font-weight: var(--ip-weight-extrabold);
    font-size: 1.75rem;
    letter-spacing: var(--ip-tracking-wide);
    text-transform: uppercase;
}

.ip-footer-logo-part1 {
    color: var(--ip-white);
}

.ip-footer-logo-separator {
    color: var(--ip-primary);
    font-family: var(--ip-font-heading);
    font-weight: var(--ip-weight-bold);
    font-size: 1.75rem;
    margin: 0 2px;
}

.ip-footer-logo-part2 {
    color: var(--ip-primary);
}

.ip-footer-description {
    font-family: var(--ip-font-body);
    font-size: var(--ip-text-small);
    font-weight: var(--ip-weight-regular);
    line-height: var(--ip-leading-body);
    color: var(--ip-gris-claro);
    margin-bottom: 20px;
    max-width: 280px;
}


/* ==========================================================================
   3. REDES SOCIALES
   ========================================================================== */

.ip-footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ip-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--ip-radius-full);
    border: 1px solid var(--ip-border);
    color: var(--ip-gris-claro);
    text-decoration: none;
    font-size: 1rem;
    transition: all var(--ip-transition-fast);
}

.ip-footer-social-link:hover,
.ip-footer-social-link:focus-visible {
    background-color: var(--ip-primary);
    border-color: var(--ip-primary);
    color: var(--ip-verde-profundo);
    transform: translateY(-2px);
}


/* ==========================================================================
   4. TITULOS DE COLUMNA
   ========================================================================== */

.ip-footer-heading {
    font-family: var(--ip-font-heading);
    font-weight: var(--ip-weight-semibold);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: var(--ip-tracking-wider);
    color: var(--ip-white);
    margin-bottom: 24px;
    padding-bottom: 12px;
    position: relative;
}

.ip-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg,
        var(--ip-primary) 0%,
        var(--ip-verde-limon-digital) 100%);
    border-radius: 2px;
    transition: width var(--ip-transition-smooth);
}

/* Expandir la linea al hacer hover en la columna */
.ip-footer-column:hover .ip-footer-heading::after {
    width: 60px;
}


/* ==========================================================================
   5. LISTAS DE ENLACES
   ========================================================================== */

.ip-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ip-footer-links li {
    margin-bottom: 10px;
}

.ip-footer-links li:last-child {
    margin-bottom: 0;
}

.ip-footer-links a {
    font-family: var(--ip-font-body);
    font-size: var(--ip-text-small);
    font-weight: var(--ip-weight-regular);
    color: var(--ip-gris-claro);
    text-decoration: none;
    transition: color var(--ip-transition-fast),
                padding-left var(--ip-transition-fast);
    display: inline-block;
    position: relative;
}

/* Underline animado en hover */
.ip-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--ip-primary);
    border-radius: 1px;
    transition: width var(--ip-transition-fast);
}

.ip-footer-links a:hover,
.ip-footer-links a:focus-visible {
    color: var(--ip-primary);
    padding-left: 4px;
}

.ip-footer-links a:hover::after,
.ip-footer-links a:focus-visible::after {
    width: 100%;
}


/* ==========================================================================
   6. CONTACTO
   ========================================================================== */

.ip-footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ip-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-family: var(--ip-font-body);
    font-size: var(--ip-text-small);
    color: var(--ip-gris-claro);
    line-height: var(--ip-leading-body);
}

.ip-footer-contact-item:last-child {
    margin-bottom: 0;
}

.ip-footer-contact-item i {
    color: var(--ip-primary);
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: text-shadow var(--ip-transition-fast);
}

.ip-footer-contact-item:hover i {
    text-shadow: 0 0 8px rgba(218, 246, 64, 0.5);
}

.ip-footer-contact-item a {
    color: var(--ip-gris-claro);
    text-decoration: none;
    transition: color var(--ip-transition-fast);
}

.ip-footer-contact-item a:hover,
.ip-footer-contact-item a:focus-visible {
    color: var(--ip-primary);
}

.ip-footer-contact-item span {
    color: var(--ip-gris-claro);
}


/* ==========================================================================
   7. BARRA INFERIOR (COPYRIGHT)
   ========================================================================== */

.ip-footer-bottom {
    background-color: var(--ip-bg-footer-dark);
    padding: 20px 0;
    position: relative;
}

/* Linea sutil separadora entre footer main y bottom */
.ip-footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: var(--ip-width-full);
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(218, 246, 64, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%);
}

.ip-footer-bottom > .ip-footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ip-footer-copyright {
    font-family: var(--ip-font-body);
    font-size: var(--ip-text-tiny);
    color: var(--ip-gris-meta);
    margin: 0;
}

.ip-footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-footer-legal a {
    font-family: var(--ip-font-body);
    font-size: var(--ip-text-tiny);
    color: var(--ip-gris-meta);
    text-decoration: none;
    transition: color var(--ip-transition-fast);
    position: relative;
}

.ip-footer-legal a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--ip-primary);
    transition: width var(--ip-transition-fast);
}

.ip-footer-legal a:hover,
.ip-footer-legal a:focus-visible {
    color: var(--ip-primary);
}

.ip-footer-legal a:hover::after,
.ip-footer-legal a:focus-visible::after {
    width: 100%;
}

.ip-footer-legal-separator {
    color: var(--ip-gris-meta);
    font-size: var(--ip-text-tiny);
    user-select: none;
}


/* ==========================================================================
   8. RESPONSIVE — TABLET (max 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .ip-footer-main > .ip-footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .ip-footer-brand {
        grid-column: 1 / -1;
    }

    .ip-footer-description {
        max-width: 400px;
    }
}


/* ==========================================================================
   9. RESPONSIVE — MOBILE (max 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .ip-footer-main {
        padding: 40px 0 32px;
    }

    .ip-footer-main > .ip-footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ip-footer-brand {
        grid-column: auto;
        text-align: center;
    }

    .ip-footer-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .ip-footer-social {
        justify-content: center;
    }

    .ip-footer-heading::after {
        /* Centrar la linea decorativa en mobile */
        left: 50%;
        transform: translateX(-50%);
    }

    .ip-footer-bottom > .ip-footer-container {
        flex-direction: column;
        text-align: center;
    }

    .ip-footer-legal {
        justify-content: center;
    }
}


/* ==========================================================================
   PREMIUM: Efectos visuales avanzados
   ========================================================================== */

/* Línea decorativa verde limón en la parte superior del footer */
.ip-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ip-verde-limon), transparent);
    z-index: 1;
}

/* Resplandor sutil debajo de la línea */
.ip-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(218, 246, 64, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Underline animado en enlaces de navegación */
.ip-footer-links a {
    position: relative;
}

.ip-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ip-verde-limon);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.ip-footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Línea del heading con gradiente que se expande al hover */
.ip-footer-heading::after {
    transition: width 0.4s ease, background 0.3s ease;
}

.ip-footer-column:hover .ip-footer-heading::after {
    width: 50px;
    background: linear-gradient(90deg, var(--ip-verde-limon), var(--ip-verde-limon-digital));
}

/* Glow en íconos de contacto al hover */
.ip-footer-contact li:hover i,
.ip-footer-contact li:hover .ip-footer-icon {
    filter: drop-shadow(0 0 6px rgba(218, 246, 64, 0.4));
}

/* Separador gradiente entre footer main y copyright */
.ip-footer-bottom {
    position: relative;
}

.ip-footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(218, 246, 64, 0.2), transparent);
}

/* Underline animado en enlaces legales */
.ip-footer-legal a {
    position: relative;
}

.ip-footer-legal a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ip-verde-limon);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.ip-footer-legal a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .ip-footer-links a::after,
    .ip-footer-legal a::after,
    .ip-footer-heading::after {
        transition: none;
    }
}
