/**
 * Footer Styles - AGEEMCTI A.C.
 * 
 * Estilos específicos para el footer institucional
 * Responsive, accesible y con animaciones sutiles
 * 
 * @package AGEEMCTI
 * @version 1.0
 */

/* ============================================
   FOOTER BASE STYLES
   ============================================ */

footer[role="contentinfo"] {
    position: relative;
    overflow: hidden;
}

/* Fondo decorativo opcional - patrón sutil */
footer[role="contentinfo"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(201, 168, 76, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(17, 34, 64, 0.5) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   LINK EFFECTS
   ============================================ */

/* Efecto de subrayado en hover para links del footer */
footer a[href]:not([class*="rounded-full"]) {
    position: relative;
}

footer a[href]:not([class*="rounded-full"])::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-gold, #C9A84C);
    transition: width 0.3s ease;
}

footer a[href]:not([class*="rounded-full"]):hover::after {
    width: 100%;
}

/* Links de navegación con efecto de flecha */
footer nav a[href].group:hover span:first-child {
    width: 0.5rem !important;
    margin-right: 0.5rem !important;
}

/* ============================================
   SOCIAL ICONS STYLES
   ============================================ */

footer .rounded-full {
    position: relative;
    overflow: hidden;
}

/* Efecto de onda al hacer hover en iconos sociales */
footer .rounded-full::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(201, 168, 76, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

footer .rounded-full:hover::before {
    width: 150%;
    height: 150%;
}

/* Focus visible para accesibilidad */
footer .rounded-full:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* ============================================
   CONTACT ICONS ANIMATION
   ============================================ */

footer li svg {
    transition: transform 0.2s ease, color 0.2s ease;
}

footer li:hover svg {
    transform: scale(1.1);
}

/* ============================================
   FILIALES CARD
   ============================================ */

footer .footer-filiales-card {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(201, 168, 76, 0.18);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(6, 18, 36, 0.85)),
        rgba(9, 22, 44, 0.9);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

footer .footer-filiales-card--wide {
    margin-top: 2.5rem;
    padding: 1.25rem 1.25rem 1.35rem;
}

footer .footer-filiales-card--wide .footer-filiales-card__header {
    margin-bottom: 1rem;
}

footer .footer-filiales-card--wide .footer-filiales-card__title {
    font-size: 1.05rem;
}

footer .footer-filiales-card__media--image-only {
    padding: 0.75rem;
}

footer .footer-filiales-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(201, 168, 76, 0.14), transparent 55%);
    pointer-events: none;
}

footer .footer-filiales-card__header {
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

footer .footer-filiales-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #d8b85e;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

footer .footer-filiales-card__eyebrow::before {
    content: '';
    width: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, #c9a84c, transparent);
}

footer .footer-filiales-card__title {
    margin-top: 0.3rem;
    color: #f4e6bb;
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 700;
}

footer .footer-filiales-card__media {
    position: relative;
    z-index: 1;
    padding: 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

footer .footer-filiales-card__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.8rem;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

footer .footer-filiales-card:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

/* ============================================
   COPYRIGHT SECTION
   ============================================ */

footer .border-t {
    position: relative;
}

/* Gradiente sutil en el borde superior del copyright */
footer .border-t::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.3) 20%,
        rgba(201, 168, 76, 0.3) 80%,
        transparent 100%
    );
}

/* ============================================
   LOGO SVG STYLES
   ============================================ */

footer svg[viewBox="0 0 200 60"] {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease, filter 0.3s ease;
}

footer a:hover svg[viewBox="0 0 200 60"] {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    footer .grid {
        gap: 2rem;
    }
    
    footer h3 {
        font-size: 1rem;
    }
    
    footer h4 {
        font-size: 0.875rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    footer {
        text-align: left;
    }
    
    footer .grid > div {
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(17, 34, 64, 0.5);
    }
    
    footer .grid > div:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    /* Centrar iconos sociales en mobile */
    footer .flex-wrap[role="list"] {
        justify-content: flex-start;
    }
    
    /* Ajustar copyright en mobile */
    footer .border-t .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    footer .border-t p,
    footer .border-t .flex > div {
        text-align: center;
    }
}

/* Small Mobile (< 640px) */
@media (max-width: 639px) {
    footer .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    footer .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    footer .gap-8 {
        gap: 1.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    footer a[href]::after,
    footer .rounded-full::before,
    footer li svg,
    footer svg[viewBox="0 0 200 60"],
    footer .rounded-full {
        transition: none !important;
    }
    
    footer a[href]:hover::after {
        width: 0;
    }
    
    footer .rounded-full:hover::before {
        width: 0;
        height: 0;
    }
    
    footer li:hover svg {
        transform: none;
    }

    footer .footer-filiales-card:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    footer {
        border-top: 2px solid #C9A84C;
    }
    
    footer a {
        text-decoration: underline;
    }
}

/* Focus visible para navegación por teclado */
footer a:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip link para footer (accesibilidad) */
.footer-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #C9A84C;
    color: #061224;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
    font-weight: 600;
}

.footer-skip-link:focus {
    top: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    footer {
        background: white !important;
        color: black !important;
        border-top: 2px solid #000;
    }
    
    footer a {
        color: black !important;
        text-decoration: underline;
    }
    
    footer .rounded-full {
        display: none;
    }
    
    footer svg[viewBox="0 0 200 60"] {
        filter: none;
    }
    
    footer .text-gold,
    footer h3,
    footer h4 {
        color: black !important;
    }

    footer .footer-filiales-card {
        background: white !important;
        border-color: black !important;
        box-shadow: none !important;
    }
}
