/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
    --primary-blue: #1e5ab3;
    --cyan-water: #00d2f3;
    --royal-blue: #0084f7;
    --dark-text: #1f2937;
    --light-bg: #f4f6f9;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

/* ==========================================
   HEADER Y NAVEGACIÓN (RESPONSIVA)
   ========================================== */
.site-header {
    background-color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

/* Desktop Nav */
.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.desktop-nav a:hover {
    color: var(--cyan-water);
    background-color: rgba(0, 210, 243, 0.08);
}

/* Sándwich Móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;
}

.mobile-nav-wrapper {
    display: none;
    background-color: var(--white);
    border-top: 2px solid var(--cyan-water);
    padding: 15px 20px;
}

.mobile-nav-wrapper ul {
    list-style: none;
}

.mobile-nav-wrapper li {
    margin-bottom: 12px;
}

.mobile-nav-wrapper a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 700;
    display: block;
    padding: 8px 0;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    position: relative;
    height: 450px;
    background-image: url('img/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30, 90, 179, 0.85) 0%, rgba(0, 210, 243, 0.35) 100%);
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-logo-box {
    background: rgba(255, 255, 255, 0.92);
    padding: 25px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: var(--shadow);
    backdrop-filter: blur(5px);
}

.hero-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
}

/* ==========================================
   SECCIÓN REDES SOCIALES
   ========================================== */
.social-section {
    padding: 60px 20px;
    background-color: var(--white);
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 800;
}

.social-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    color: #4b5563;
}

.facebook-wrapper {
    display: flex;
    justify-content: center;
}

.btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0056b3 100%);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-facebook:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(24, 119, 242, 0.45);
}

/* ==========================================
   SECCIÓN ATENCIÓN Y ANIMACIONES
   ========================================== */
.atencion-section {
    padding: 70px 20px;
}

.atencion-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Animación Lateral de la imagen */
.atencion-img-animated {
    max-width: 280px;
    height: auto;
    animation: sideToSide 3.5s ease-in-out infinite alternate;
}

@keyframes sideToSide {
    0% {
        transform: translateX(-15px);
    }
    100% {
        transform: translateX(15px);
    }
}

.atencion-text h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 800;
}

.importance-msg {
    font-size: 1.1rem;
    color: #374151;
}

/* Grilla de Teléfonos */
.phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.phone-card {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 6px solid var(--primary-blue);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.phone-card-op {
    border-left-color: var(--cyan-water);
}

.phone-card:hover {
    transform: translateY(-5px);
}

.phone-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(30, 90, 179, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-blue);
}

.phone-card-op .phone-icon-box {
    background: rgba(0, 210, 243, 0.1);
    color: var(--royal-blue);
}

.phone-info span {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.phone-info strong {
    font-size: 1.5rem;
    color: var(--dark-text);
}

.reporte-banner {
    text-align: center;
}

.reporte-img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-logo {
    height: 70px;
    background: var(--white);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--cyan-water);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyan-water);
}

.social-circle-btn {
    width: 45px;
    height: 45px;
    background: var(--cyan-water);
    color: var(--primary-blue);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-circle-btn:hover {
    transform: scale(1.1);
}

.footer-bottom {
    background-color: #143d7a;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   MEDIA QUERIES (RESPONSIVO)
   ========================================== */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .atencion-header {
        flex-direction: column;
        text-align: center;
    }

    .hero-section {
        justify-content: center;
    }
}

/* Feed de Facebook Contenedor */
.fb-widget-container {
    display: flex;
    justify-content: center;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    max-width: 530px;
    margin: 0 auto;
    overflow: hidden;
}

.fb-widget-container iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* Crédito Powered By */
.powered-by {
    margin-top: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.powered-by a {
    color: var(--cyan-water);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.powered-by a:hover {
    color: #ffffff;
    text-decoration: underline;
}


/* ==========================================
   POPUP EMERGENTE (MODAL)
   ========================================== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Clase para mostrar el popup */
.popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #ffffff;
    border-radius: 20px;
    position: relative;
    max-width: 500px;
    width: 100%;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.popup-overlay.is-active .popup-content {
    transform: scale(1);
}

/* Botón de Cierre (X) */
.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #475569;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    background-color: #ff3b68;
    color: #ffffff;
}

.popup-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-img {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}

/* ==========================================
   PÁGINAS INTERNAS (Cuenta Pública, CONAC)
   ========================================== */
.page-header-banner {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--cyan-water) 100%);
    padding: 60px 20px;
    text-align: center;
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
}

.banner-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.iframe-wrapper {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .page-header-banner {
        padding: 40px 20px;
    }
}

/* Tarjeta de Facebook Oficial */
.fb-card-community {
    background: #ffffff;
    max-width: 480px;
    margin: 25px auto 0 auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    padding: 25px;
    text-align: left;
}

.fb-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.fb-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    background: #f8fafc;
    padding: 4px;
    border: 1px solid #cbd5e1;
}

.fb-card-info {
    flex-grow: 1;
}

.fb-card-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color, #1e293b);
}

.fb-card-info span {
    font-size: 0.85rem;
    color: #64748b;
}

.fb-card-icon {
    font-size: 2rem;
    color: #1877f2;
}

.fb-card-body p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.fb-card-footer {
    text-align: center;
}