/* Footer - Rediseñado y Mejorado */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 80px 0 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 1;
}

body.light-mode footer {
    background: linear-gradient(135deg, #b71c1c 0%, #e53935 50%, #ff5252 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

/* Columnas del Footer */
.footer-col h4 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    color: white;
    font-weight: 700;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    bottom: 0;
    left: 0;
    transition: width 0.4s ease;
}

.footer-col:hover h4::after {
    width: 60px;
}

/* Primera columna (Logo y descripción) */
.footer-col:first-child {
    max-width: 300px;
}

.footer-col:first-child p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

/* Listas del Footer */
.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.footer-col ul li:last-child {
    margin-bottom: 0;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    position: relative;
    padding: 5px 0;
}

.footer-col ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.4s ease;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 12px;
}

.footer-col ul li a:hover::before {
    width: 100%;
}

/* Información de contacto */
.footer-col:last-child ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
}

.footer-col:last-child ul li i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.footer-col:last-child ul li:hover i {
    color: white;
    transform: scale(1.2);
}

/* Enlaces Sociales Mejorados */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.social-links a:hover::before {
    left: 100%;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Facebook */
.social-links a:nth-child(1):hover {
    background: linear-gradient(135deg, #1877f2, #0d5fbb);
}

/* Instagram */
.social-links a:nth-child(2):hover {
    background: linear-gradient(135deg, #e4405f, #c13584);
}

/* LinkedIn */
.social-links a:nth-child(3):hover {
    background: linear-gradient(135deg, #0077b5, #005582);
}

/* WhatsApp */
.social-links a:nth-child(4):hover {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Footer Bottom Mejorado */
.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

/* Animaciones para scroll */
.footer-col.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-col.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animación escalonada para las columnas */
.footer-col:nth-child(1).animate-on-scroll.animated { transition-delay: 0.1s; }
.footer-col:nth-child(2).animate-on-scroll.animated { transition-delay: 0.2s; }
.footer-col:nth-child(3).animate-on-scroll.animated { transition-delay: 0.3s; }
.footer-col:nth-child(4).animate-on-scroll.animated { transition-delay: 0.4s; }

/* Elementos decorativos */
footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light), var(--accent));
    opacity: 0.7;
}

/* Responsive Design Mejorado */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 40px;
    }
    
    .footer-col:last-child {
        grid-column: 1 / -1;
        margin-top: 20px;
    }
    
    .footer-col:last-child ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-col:first-child {
        grid-column: 1 / -1;
        max-width: 100%;
        text-align: center;
    }
    
    .footer-col:first-child h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
}

/* FOOTER RESPONSIVE - CORREGIDO */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        margin-bottom: 40px;
        padding: 0 15px;
    }
    
    footer {
        padding: 50px 0 20px;
    }
    
    .footer-col:first-child {
        max-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 0 10px;
        gap: 25px;
    }
    
    .footer-col h4 {
        font-size: 1.2rem;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
}

/* Efectos de hover para toda la columna */
.footer-col {
    transition: all 0.3s ease;
}

.footer-col:hover {
    transform: translateY(-5px);
}

/* Modo claro específico - Asegurar legibilidad */
body.light-mode .footer-col h4,
body.light-mode .footer-col p,
body.light-mode .footer-col ul li,
body.light-mode .footer-col ul li a,
body.light-mode .footer-col ul li i,
body.light-mode .footer-bottom {
    color: white;
}

body.light-mode .footer-col ul li a {
    color: rgba(255, 255, 255, 0.9);
}

body.light-mode .footer-col ul li a:hover {
    color: white;
}

/* Animación de aparición suave para los elementos de contacto */
.footer-col:last-child ul li {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.footer-col.animate-on-scroll.animated ul li:nth-child(1) {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateX(0);
}

.footer-col.animate-on-scroll.animated ul li:nth-child(2) {
    transition-delay: 0.6s;
    opacity: 1;
    transform: translateX(0);
}

.footer-col.animate-on-scroll.animated ul li:nth-child(3) {
    transition-delay: 0.7s;
    opacity: 1;
    transform: translateX(0);
}