/* ============================================
   ESTILOS MEJORADOS PARA EL PIE DE PÁGINA
   ============================================ */

.main-footer {
    background: linear-gradient(135deg, #00415a 0%, #005073 50%, #006188 100%),
                url('../img/footer/fondo-textura.png'); /* Textura de fondo */
    background-size: cover;
    background-blend-mode: overlay;
    color: #ffffff;
    padding: 0;
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    font-family: 'Times New Roman', Times, serif;
    margin-top: 60px;
    overflow: hidden;
    min-height: auto;
}

/* Línea decorativa superior */
.footer-top-border {
    height: 6px;
    background: linear-gradient(90deg, #9fc5d4, #d0e8f2, #9fc5d4);
    width: 100%;
    position: relative;
}

.footer-top-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 30px;
    width: 100%;
    position: relative;
}

/* Patrón de fondo sutil */
.footer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(159, 197, 212, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(159, 197, 212, 0.05) 0%, transparent 20%),
        url('../img/footer/patron-transparente.png'); /* Patrón decorativo */
    background-size: auto, auto, 300px;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.3;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.footer-column {
    margin-bottom: 30px;
    position: relative;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.footer-column:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 40px;
    background: #9fc5d4;
    border-radius: 0 4px 4px 0;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #ffffff;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(159, 197, 212, 0.5);
    position: relative;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #9fc5d4;
}

/* Columna 1: Información del Municipio */
.footer-info .logo-municipal {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info .logo-municipal i {
    color: #9fc5d4;
    font-size: 32px;
    /* O usar imagen local */
    background-image: url('../img/logos/logo-municipal.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 40px;
    height: 40px;
}

.footer-info p {
    color: #e6f7ff;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 25px;
    text-align: justify;
    opacity: 0.9;
}

.footer-contact {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
    color: #e6f7ff;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    color: #9fc5d4;
    font-size: 1.2rem;
    min-width: 25px;
    background: rgba(159, 197, 212, 0.1);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    /* Iconos locales como alternativa */
    background-image: url('../icons/icono-telefono.svg');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-item:hover i {
    background: #9fc5d4 url('../icons/icono-telefono-blanco.svg') no-repeat center;
    background-size: 60%;
    color: #005073;
    transform: scale(1.1);
}

/* Iconos específicos para cada contacto */
.contact-item:nth-child(1) i {
    background-image: url('../icons/telefono.svg');
}

.contact-item:nth-child(2) i {
    background-image: url('../icons/email.svg');
}

.contact-item:nth-child(3) i {
    background-image: url('../icons/ubicacion.svg');
}

/* Columna 2: Enlaces rápidos */
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
    transition: all 0.3s ease;
}

.footer-links ul li:hover {
    transform: translateX(5px);
}

.footer-links ul li::before {
    content: '→';
    color: #9fc5d4;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    /* O usar imagen de flecha */
    /* background-image: url('../icons/flecha-derecha.svg'); */
    /* background-size: contain; */
}

.footer-links ul li:hover::before {
    transform: translateX(5px);
    color: #ffffff;
}

.footer-links ul li a {
    color: #e6f7ff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: block;
    padding: 5px 0;
    border-bottom: 1px solid transparent;
}

.footer-links ul li a:hover {
    color: #ffffff;
    border-bottom: 1px solid #9fc5d4;
    padding-left: 5px;
}

/* Columna 3: Horarios de atención */
.footer-hours {
    position: relative;
}

.hours-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #9fc5d4;
    font-size: 0.9rem;
}

.hours-header i {
    font-size: 1.3rem;
    /* Icono de reloj local */
    background-image: url('../icons/reloj.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 24px;
    height: 24px;
}

.footer-hours .hours-item {
    margin-bottom: 18px;
    color: #e6f7ff;
    font-size: 1rem;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.footer-hours .hours-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid #9fc5d4;
    transform: translateX(5px);
}

.hours-item .day {
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.hours-item .day::before {
    content: '⏰';
    font-size: 0.9rem;
    /* O usar icono SVG */
    /* background-image: url('../icons/reloj-pequeno.svg'); */
}

.hours-item .time {
    color: #9fc5d4;
    font-size: 0.95rem;
    padding-left: 25px;
}

.hours-note {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(159, 197, 212, 0.1), rgba(208, 232, 242, 0.05));
    border-left: 4px solid #9fc5d4;
    font-size: 0.9rem;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.hours-note::before {
    content: 'ℹ️';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
    /* O usar icono SVG */
    /* background-image: url('../icons/info.svg'); */
    /* background-size: contain; */
}

/* Columna 4: Redes Sociales */
.footer-social h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.footer-social h3 i {
    color: #9fc5d4;
    font-size: 1.3rem;
    /* Icono de redes sociales local */
    background-image: url('../icons/redes-sociales.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 24px;
    height: 24px;
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.social-btn::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.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-icon {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
    /* Usar iconos locales para redes sociales */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Iconos específicos para cada red social */
.social-btn.fb .social-icon {
    background-image: url('../icons/facebook.svg');
}

.social-btn.tw .social-icon {
    background-image: url('../icons/twitter.svg');
}

.social-btn.ig .social-icon {
    background-image: url('../icons/instagram.svg');
}

.social-btn.yt .social-icon {
    background-image: url('../icons/youtube.svg');
}

.social-btn:hover .social-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Colores específicos para redes sociales con gradientes */
.social-btn.fb { 
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.1), transparent);
    border-color: rgba(24, 119, 242, 0.3);
}
.social-btn.fb .social-icon { color: #1877f2; }
.social-btn.fb:hover { 
    background: linear-gradient(135deg, #1877f2, #0d5fd0);
    border-color: #1877f2;
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.4);
}

.social-btn.tw { 
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.1), transparent);
    border-color: rgba(29, 161, 242, 0.3);
}
.social-btn.tw .social-icon { color: #1da1f2; }
.social-btn.tw:hover { 
    background: linear-gradient(135deg, #1da1f2, #0c8bda);
    border-color: #1da1f2;
    box-shadow: 0 10px 25px rgba(29, 161, 242, 0.4);
}

.social-btn.ig { 
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.1), transparent);
    border-color: rgba(225, 48, 108, 0.3);
}
.social-btn.ig .social-icon { color: #e1306c; }
.social-btn.ig:hover { 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(225, 48, 108, 0.4);
}

.social-btn.yt { 
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), transparent);
    border-color: rgba(255, 0, 0, 0.3);
}
.social-btn.yt .social-icon { color: #ff0000; }
.social-btn.yt:hover { 
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border-color: #ff0000;
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.4);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.02);
    color: #ffffff !important;
}

/* Pie inferior del footer */
.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 0.95rem;
    color: #9fc5d4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #9fc5d4, transparent);
}

.footer-copyright {
    color: #e6f7ff;
    font-style: italic;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-copyright i {
    color: #9fc5d4;
    font-size: 1.1rem;
    /* Icono de copyright local */
    background-image: url('../icons/copyright.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 16px;
    height: 16px;
}

.footer-legal-links {
    display: flex;
    gap: 30px;
}

.footer-legal-links a {
    color: #e6f7ff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.footer-legal-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #9fc5d4;
    transition: width 0.3s ease;
}

.footer-legal-links a:hover {
    color: #ffffff;
}

.footer-legal-links a:hover::after {
    width: 100%;
}

/* Sello municipal decorativo */
.footer-seal {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0.05;
    font-size: 80px;
    color: #ffffff;
    pointer-events: none;
    /* Usar imagen del sello municipal */
    background-image: url('../img/logos/sello-municipal.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 200px;
    height: 200px;
    font-size: 0; /* Ocultar texto si usamos imagen */
}

/* ============================================
   MEDIA QUERIES PARA RESPONSIVE DEL FOOTER
   ============================================ */

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-column {
        padding: 15px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-legal-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-footer {
        margin-top: 40px;
        padding: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-container {
        padding: 40px 20px 20px;
    }
    
    .footer-bottom {
        gap: 20px;
        margin-top: 40px;
    }
    
    .footer-legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .footer-copyright {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-column {
        padding: 15px;
    }
    
    .footer-info p {
        max-width: 100%;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-links ul li {
        padding-left: 0;
    }
    
    .footer-links ul li::before {
        display: none;
    }
    
    .social-icons {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .footer-column {
        padding: 15px 10px;
    }
    
    .footer-legal-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-btn {
        padding: 14px 15px;
        font-size: 0.95rem;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 20px;
    }
}

/* ============================================
   MEDIA QUERIES GENERALES PARA RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .page-header h1,
    .page-header p {
        padding: 0 15px;
    }
    
    .page-content {
        padding: 20px 15px;
        margin: 0 15px;
        width: calc(100% - 30px);
    }
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 25px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-section {
        padding: 20px;
    }
    
    .page-header {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .page-content {
        padding: 15px;
        margin: 0 10px;
        width: calc(100% - 20px);
    }
}