/* ===== VARIABLES CSS CENTRALIZADAS ===== */
:root {
    /* Colores */
    --footer-primary: #FF6B35;
    --footer-secondary: #E55A2B;
    --footer-accent: #FF8A65;
    --footer-light: #FFE5D9;
    --footer-base: #fffef4;
    
    /* Transparencias */
    --footer-bg-light: rgba(255, 255, 255, 0.15);
    --footer-bg-lighter: rgba(255, 255, 255, 0.08);
    --footer-bg-medium: rgba(255, 255, 255, 0.25);
    
    /* Texto */
    --footer-text-primary: #ffffff;
    --footer-text-secondary: rgba(255, 255, 255, 0.9);
    --footer-text-tertiary: rgba(255, 255, 255, 0.85);
    --footer-text-muted: rgba(255, 255, 255, 0.8);
    
    /* Espaciado */
    --footer-gap-large: 40px;
    --footer-gap-medium: 30px;
    --footer-gap-small: 20px;
    --footer-gap-xs: 15px;
    
    /* Transiciones */
    --footer-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --footer-transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sombras */
    --footer-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.2);
    --footer-shadow-medium: 0 6px 15px rgba(0, 0, 0, 0.3);
    --footer-shadow-hover: 0 8px 25px rgba(255, 255, 255, 0.2);
    
    /* Tipografía fluida */
    --footer-text-base: clamp(0.85rem, 1.5vw, 0.95rem);
    --footer-text-small: clamp(0.8rem, 1.5vw, 0.9rem);
    --footer-text-title: clamp(1rem, 2vw, 1.1rem);
}

/* ===== CLASES UTILITARIAS REUTILIZABLES ===== */

/* Transiciones estándar */
.footer-transition { transition: var(--footer-transition); }
.footer-transition-slow { transition: var(--footer-transition-slow); }

/* Efectos hover comunes */
.footer-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--footer-shadow-hover);
}

.footer-hover-scale:hover {
    transform: scale(1.05);
}

.footer-hover-float:hover {
    transform: translateY(-4px) scale(1.05);
}

/* Fondos con transparencia */
.footer-bg-light { background: var(--footer-bg-light); }
.footer-bg-lighter { background: var(--footer-bg-lighter); }
.footer-bg-medium { background: var(--footer-bg-medium); }

/* Textos estándar */
.footer-text-primary { color: var(--footer-text-primary); }
.footer-text-secondary { color: var(--footer-text-secondary); }
.footer-text-tertiary { color: var(--footer-text-tertiary); }
.footer-text-muted { color: var(--footer-text-muted); }

/* Tipografía fluida */
.footer-text-base { font-size: var(--footer-text-base); }
.footer-text-small { font-size: var(--footer-text-small); }
.footer-text-title { font-size: var(--footer-text-title); }

/* Sombras de texto */
.footer-text-shadow { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }

/* ===== UNIFICAR FONDO ===== */
body,
.wp-site-blocks,
main,
.entry-content {
    background-color: var(--footer-base) !important;
}

/* ===== FOOTER PRINCIPAL ===== */
.tu-nutricion-footer {
    background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-secondary) 50%, var(--footer-accent) 100%);
    color: var(--footer-text-primary);
    font-family: 'Open Sans', sans-serif;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 30px rgba(255, 107, 53, 0.2);
}

/* Barra superior decorativa */
.tu-nutricion-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--footer-light), var(--footer-primary), var(--footer-light));
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* Container principal */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* ===== LAYOUT GRID ===== */
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: var(--footer-gap-large);
    padding: 50px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== COMPONENTES PRINCIPALES ===== */

/* Títulos de sección */
.footer-section h3 { display: none; }

.footer-section h4,
.footer-section h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h4 {
    font-size: var(--footer-text-title);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--footer-light), var(--footer-text-primary));
    border-radius: 2px;
    box-shadow: var(--footer-shadow-light);
}

/* Logo con efecto hover mejorado */
.footer-logo {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-logo img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(var(--footer-shadow-light));
    cursor: pointer;
    position: relative;
}

.footer-logo img:hover {
    transform: scale(1.1) translateY(-3px);
    filter: drop-shadow(var(--footer-shadow-medium)) brightness(1.1);
}

/* Indicador de clickeable */
.footer-logo::after {
    content: '↑';
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--footer-primary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.footer-logo:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Texto de marca */
.footer-brand p {
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 280px;
}

/* Redes sociales */
.footer-social {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--footer-text-primary), var(--footer-light));
    opacity: 0;
    z-index: -1;
}

.social-link:hover::before { opacity: 1; }
.social-link:hover {
    color: var(--footer-primary);
    border-color: var(--footer-text-primary);
}

.social-link i {
    font-size: 20px;
    z-index: 1;
}

/* Enlaces del footer */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 12px; }

.footer-links a {
    text-decoration: none;
    font-weight: 400;
    position: relative;
    padding-left: 0;
    display: inline-block;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--footer-text-primary), var(--footer-light));
    border-radius: 1px;
}

.footer-links a:hover {
    padding-left: 24px;
    transform: translateX(2px);
}

.footer-links a:hover::before { width: 12px; }

/* Información de contacto */
.contact-info { margin-bottom: 30px; }

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 0;
}

.contact-item:hover {
    transform: translateX(3px);
}

.contact-item i {
    font-size: 16px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    padding: 8px;
    border-radius: 50%;
}

.contact-item:hover i {
    transform: scale(1.1);
}

.contact-item span {
    font-weight: 500;
}

/* Badges informativos */
.footer-extra {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.badge {
    display: flex;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.badge:hover::before { left: 100%; }
.badge:hover { border-color: rgba(255, 255, 255, 0.3); }

.badge i {
    font-size: 22px;
    margin-right: 15px;
    padding: 10px;
    border-radius: 50%;
}

.badge:hover i { transform: scale(1.1); }

.badge span {
    font-weight: 600;
}

/* Footer bottom */
.footer-bottom { padding: 25px 0; }

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p { margin: 0; }

.footer-bottom-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.footer-bottom-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--footer-text-primary);
    transition: width 0.3s ease;
}

.footer-bottom-links a:hover { transform: translateY(-1px); }
.footer-bottom-links a:hover::after { width: 100%; }

/* ===== APLICAR CLASES UTILITARIAS ===== */

/* Transiciones */
.footer-logo img,
.social-link,
.footer-links a,
.contact-item,
.badge,
.footer-bottom-links a {
    transition: var(--footer-transition);
}

.badge { transition: var(--footer-transition-slow); }

/* Colores de texto */
.footer-section h4,
.footer-section h5,
.social-link,
.contact-item i,
.badge i {
    color: var(--footer-text-primary);
}

.footer-brand p,
.contact-item {
    color: var(--footer-text-secondary);
}

.footer-links a {
    color: var(--footer-text-tertiary);
}

.footer-bottom p,
.footer-bottom-links a {
    color: var(--footer-text-muted);
}

/* Fondos */
.social-link,
.contact-item i,
.badge i {
    background: var(--footer-bg-light);
}

.badge {
    background: var(--footer-bg-lighter);
}

.contact-item:hover i,
.badge:hover i {
    background: var(--footer-bg-medium);
}

.badge:hover {
    background: var(--footer-bg-light);
}

/* Tipografía fluida */
.footer-section h4,
.footer-section h5 {
    font-size: var(--footer-text-title);
}

.footer-brand p,
.footer-links a,
.contact-item span,
.footer-bottom p,
.footer-bottom-links a {
    font-size: var(--footer-text-base);
}

.badge span {
    font-size: var(--footer-text-small);
}

/* Sombras de texto */
.footer-section h4,
.footer-section h5,
.footer-brand p,
.footer-links a:hover,
.badge span {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVE SIMPLIFICADO ===== */
@media (max-width: 768px) {
    .tu-nutricion-footer.footer-visible {
        transform: translateY(0) !important;
    }
    
    .tu-nutricion-footer { margin-top: 50px; }
    .footer-container { padding: 0 16px; }
    .footer-main {
        display: block;
        text-align: center;
        padding: 35px 0 25px;
    }
    
    .footer-section:nth-child(1) { margin-bottom: 30px; }
    .footer-section:not(:first-child) { margin-bottom: 25px; }
    
    .footer-logo img {
        max-width: 130px;
        margin: 0 auto;
        display: block;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-badges { grid-template-columns: 1fr 1fr; }
    .badge {
        justify-content: center;
        text-align: center;
        padding: 15px 12px;
        flex-direction: column;
        gap: 8px;
    }
    .badge i { margin-right: 0; margin-bottom: 5px; }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .tu-nutricion-footer { margin-top: 40px; }
    .footer-main { padding: 30px 0 20px; }
    .footer-badges { grid-template-columns: 1fr; }
    .badge {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 0;
    }
    .badge i { margin-right: 12px; margin-bottom: 0; }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer-section {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section:nth-child(n) {
    animation-delay: calc(0.1s * var(--i, 1));
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}