/* Estilos del Footer Moderno */

/* Variables CSS para el Footer */
:root {
    --footer-bg: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --footer-text: #ffffff;
    --footer-text-muted: rgba(255, 255, 255, 0.85);
    --footer-border: rgba(255, 255, 255, 0.15);
    --footer-hover: #ffd700;
    --footer-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    --footer-accent: #3b82f6;
    --footer-radius: 12px;
}

/* Footer Principal Moderno */
.footer-modern {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 0;
    margin-top: auto;
    box-shadow: var(--footer-shadow);
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--footer-hover), transparent);
}

.footer-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23footerGrid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Contenido del Footer */
.footer-content {
    position: relative;
    z-index: 2;
    padding-bottom: 2rem;
}

/* Secciones del Footer */
.footer-section-title {
    color: var(--footer-text);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--footer-hover), var(--footer-accent), transparent);
    border-radius: 2px;
}

/* Brand Section */
.footer-brand-section {
    text-align: left;
    margin-bottom: 1.5rem;
}

.footer-logo-container {
    margin-bottom: 1rem;
}

.footer-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.footer-logo:hover {
    filter: brightness(1);
}

.establishment-name {
    margin-bottom: 0.8rem;
}

.establishment-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--footer-text);
    margin-bottom: 0;
    line-height: 1.3;
}

/* Información de Contacto Simple */
.contact-info-simple {
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
    color: var(--footer-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

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

.contact-item i {
    font-size: 1rem;
    color: var(--footer-accent);
    min-width: 18px;
    text-align: center;
}

.contact-item span {
    color: var(--footer-text-muted);
}

.contact-item.junji-code-simple {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item.junji-code-simple i {
    color: var(--footer-hover);
}

.contact-item.junji-code-simple span {
    color: var(--footer-text);
}

.contact-item.junji-code-simple strong {
    color: var(--footer-hover);
    font-weight: 700;
}

.contact-link {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    color: var(--footer-hover);
    border-bottom-color: var(--footer-hover);
    text-decoration: none;
}

/* Enlaces de Navegación */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
}

.footer-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--footer-hover);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--footer-hover);
    transform: translateX(8px);
}

.footer-link:hover::before {
    width: 100%;
}

.external-link::after {
    content: '\f35d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Sección SLEP */


/* Redes Sociales */
.slep-social-links,
.establishment-social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.137);
    border-radius: 50%;
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

/* Colores específicos para cada red social - Estado normal */
.social-link.facebook {
    color: #1877f2;
}

.social-link.instagram {
    color: #e6683c;
}

.social-link.twitter {
    color: #000000;
}

.social-link.linkedin {
    color: #0077b5;
}

.social-link.youtube {
    color: #ff0000;
}

.social-link.tiktok {
    color: #000000;
}

/* Colores específicos para cada red social - Estado hover */
.social-link.facebook:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #1877f2;
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

.social-link.facebook:hover::before {
    background: #1877f2;
    opacity: 1;
}

.social-link.instagram:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #e6683c;
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
}

.social-link.instagram:hover::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    opacity: 1;
}

.social-link.twitter:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #000000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.social-link.twitter:hover::before {
    background: #000000;
    opacity: 1;
}

.social-link.linkedin:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #0077b5;
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
}

.social-link.linkedin:hover::before {
    background: #0077b5;
    opacity: 1;
}

.social-link.youtube:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #ff0000;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

.social-link.youtube:hover::before {
    background: #ff0000;
    opacity: 1;
}

.social-link.tiktok:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    border-color: #000000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.social-link.tiktok:hover::before {
    background: #000000;
    opacity: 1;
}

/* Hover genérico para redes sociales sin clase específica */
.social-link:hover:not(.facebook):not(.instagram):not(.twitter):not(.linkedin):not(.youtube):not(.tiktok) {
    color: var(--footer-text);
    transform: translateY(-5px) scale(1.1);
    border-color: var(--footer-hover);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.social-link:hover:not(.facebook):not(.instagram):not(.twitter):not(.linkedin):not(.youtube):not(.tiktok)::before {
    opacity: 1;
}

.social-link i {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* Separador del Footer */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--footer-border), transparent);
    margin: 2rem 0 1.5rem;
    position: relative;
}

.footer-divider::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--footer-hover);
    border-radius: 2px;
}

/* Footer Bottom */
.footer-bottom {
    padding: 1.5rem 0 2rem;
    position: relative;
    z-index: 2;
}

.copyright-text,
.credits-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--footer-text-muted);
    line-height: 1.5;
}

.copyright-text {
    font-weight: 500;
}

.credits-text {
    text-align: right;
    font-weight: 400;
}

.slep-link {
    color: var(--footer-hover);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.slep-link:hover {
    color: var(--footer-text);
    text-shadow: 0 0 8px var(--footer-hover);
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-modern {
        padding: 3rem 0 2rem;
    }
    
    .footer-section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-brand-section {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .footer-logo {
        max-height: 60px;
    }
    
    .establishment-title {
        font-size: 1.3rem;
    }
    
    .slep-social-links,
    .establishment-social-links {
        justify-content: center;
    }
    
    /* Prevenir overflow del email en pantallas medianas */
    .contact-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .contact-item .contact-link {
        word-break: break-all;
        display: inline-block;
        max-width: 100%;
        line-height: 1.3;
    }
    
    /* Mejorar espaciado en tablets */
    .footer-links-section,
    .slep-section,
    .establishment-social-section {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .footer-modern {
        padding: 2.5rem 0 1.5rem;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .footer-brand-section {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .footer-links-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .footer-links-list li {
        margin-bottom: 0;
    }
    
    .footer-logo {
        max-height: 50px;
    }
    
    .establishment-title {
        font-size: 1.2rem;
    }
    
    /* Centrar secciones en móviles */
    .footer-links-section,
    .slep-section,
    .establishment-social-section {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .footer-section-title::after {
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        background: linear-gradient(90deg, transparent, var(--footer-hover), var(--footer-accent), var(--footer-hover), transparent);
    }
    
    .slep-social-links,
    .establishment-social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .footer-links-list {
        text-align: center;
    }
    
    .footer-link {
        display: inline-block;
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    /* Ajustes para la estructura de dos columnas en móvil */
    .row.mt-3 {
        margin-top: 1rem !important;
    }
    
    .contact-info-simple {
        text-align: center;
        margin: 1rem auto;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
        margin-bottom: 16px;
        padding: 10px 0;
    }
    
    .contact-item.junji-code-simple {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .footer-link:hover {
        transform: translateY(-2px);
    }
    
    .credits-text {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    /* Ajustar espaciado entre filas */
    .footer-content .row.mt-3 {
        margin-top: 2rem !important;
    }
}

@media (max-width: 576px) {
    .footer-modern {
        padding: 2rem 0 1rem;
    }
    
    .footer-logo-container {
        padding: 0.75rem;
    }
    
    .footer-section-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-logo {
        max-height: 45px;
    }
    
    .establishment-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .junji-code {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .footer-links-list {
        gap: 0.6rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
        padding: 0.3rem 0;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .social-link i {
        font-size: 1.1rem;
    }
    
    .slep-social-links,
    .establishment-social-links {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .footer-bottom {
        padding: 1rem 0;
        font-size: 0.8rem;
    }
    
    .code-value {
        font-size: 1rem;
    }
    
    .copyright-text,
    .credits-text {
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* Espaciado mejorado para móviles pequeños */
    .footer-links-section,
    .slep-section,
    .establishment-social-section {
        margin-bottom: 1.8rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-modern .row > div {
    animation: fadeInUp 0.6s ease forwards;
}

.footer-modern .row > div:nth-child(1) { animation-delay: 0.1s; }
.footer-modern .row > div:nth-child(2) { animation-delay: 0.2s; }
.footer-modern .row > div:nth-child(3) { animation-delay: 0.3s; }
.footer-modern .row > div:nth-child(4) { animation-delay: 0.4s; }

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .footer-modern .row > div,
    .social-link,
    .footer-link,
    .footer-logo {
        animation: none;
        transition: none;
    }
    
    .social-link:hover,
    .footer-link:hover {
        transform: none;
    }
}