/* =============================================================================
   1. CONFIGURACIÓN GENERAL Y FONDO GEOMÉTRICO (LOW-POLY)
   ============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5eeff; /* Base lila de respaldo */
    
    /* Capas de degradados cruzados matemáticos que imitan los polígonos facetados */
    background-image: 
        linear-gradient(215deg, rgba(230, 126, 34, 0.12) 0%, transparent 40%),
        linear-gradient(125deg, rgba(142, 68, 173, 0.15) 0%, transparent 50%),
        linear-gradient(0deg, rgba(241, 148, 138, 0.18) 0%, transparent 70%),
        linear-gradient(315deg, rgba(187, 143, 206, 0.2) 0%, transparent 60%),
        conic-gradient(from 180deg at 70% 60%, #fdedec 0deg, #f5eeff 90deg, #faf0e6 180deg, #fdedec 360deg);
        
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #334155;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Envoltura intermedia para mantener el contenido centrado y dar aire al diseño */
.content-wrapper {
    padding: 20px;
    flex: 1; /* Empuja el footer hacia abajo si hay poco contenido */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.main-app-container {
    max-width: 650px;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 40px;
}

.style-hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   2. ENCABEZADO INSTITUCIONAL (HEADER)
   ============================================================================= */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 40px;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
    letter-spacing: -0.5px;
}

.logo-hidalgo {
    color: #621132; /* Guinda Institucional */
}

.logo-dot {
    color: #b38e5d; /* Dorado Institucional */
    margin: 0 1px;
}

.logo-gob, .logo-mx {
    color: #621132;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-menu a {
    text-decoration: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-menu a:hover {
    color: #621132;
}

.menu-sep {
    color: #cbd5e1;
    font-size: 0.85rem;
}

/* =============================================================================
   3. BARRA DE SEGURIDAD Y PESTAÑAS DE NAVEGACIÓN INTERNA
   ============================================================================= */
.top-security-bar {
    width: 100%;
    max-width: 650px;
    text-align: center; 
    background-color: #fef08a; 
    color: #713f12; 
    padding: 12px; 
    font-size: 0.9rem; 
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.app-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 650px;
}

.nav-link {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #475569;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.nav-link:hover {
    background-color: #ffffff;
    color: #1e293b;
    transform: translateY(-1px);
}

.active-nav {
    background-color: #8e44ad; /* Color Lila/Morado de control activo */
    color: white !important;
    border-color: #8e44ad;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.25);
}

/* =============================================================================
   4. TARJETA DE BIENVENIDA (PÁGINA DE ENTRADA)
   ============================================================================= */
.welcome-card {
    background-color: #ffffff;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-card h1 {
    color: #1e293b;
    font-size: 1.75rem;
    margin-top: 0;
    margin-bottom: 12px;
}

.intro-sub {
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.quote-box {
    background-color: #f8fafc;
    border-left: 4px solid #8e44ad; 
    padding: 22px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 25px;
    text-align: left;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#phrase-text {
    font-style: italic;
    font-size: 1.05rem;
    color: #334155;
    margin: 0 0 6px 0;
    line-height: 1.45;
}

#phrase-author {
    font-size: 0.88rem;
    font-weight: bold;
    color: #8e44ad;
}

.info-seguridad {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 35px;
    text-align: left;
    line-height: 1.45;
}

.btn-iniciar {
    background-color: #8e44ad;
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 1.15rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
    transition: all 0.2s ease;
}

.btn-iniciar:hover {
    background-color: #732d91;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
}

/* =============================================================================
   5. CUESTIONARIO ACTIVO (PREGUNTAS)
   ============================================================================= */
.quiz-card {
    background-color: #ffffff;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.4s ease-out;
}

.progress-bar {
    font-size: 0.85rem;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: bold;
}

.pregunta-texto {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 25px;
    line-height: 1.45;
}

.opciones-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-opcion {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-opcion:hover {
    background-color: #f8fafc;
    border-color: #cbd5e0;
    color: #0f172a;
    transform: translateX(4px);
}

/* =============================================================================
   6. PANTALLA DE RESULTADOS: MEDIDOR DE 4 COLORES (MÁXIMO 100)
   ============================================================================= */
.result-container {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.gauge-wrapper {
    position: relative;
    width: 300px;
    height: 150px;
    margin: 30px auto;
    overflow: hidden;
}

/* Degradado calibrado simétricamente en 4 arcos para Verde, Amarillo, Naranja y Rojo */
.gauge-bg {
    position: absolute;
    width: 100%;
    height: 200%;
    border-radius: 50%;
    background: conic-gradient(
        from 270deg,
        #2ecc71 0% 12.5%,   /* Verde (0-25) */
        #fbc02d 12.5% 25%,  /* Amarillo (26-50) */
        #f57c00 25% 37.5%,  /* Naranja (51-75) */
        #d32f2f 37.5% 50%,  /* Rojo (76-100) */
        #e2e8f0 50% 100%    /* Segmento muerto inferior */
    );
}

.gauge-cover {
    position: absolute;
    width: 80%;
    height: 160%;
    background-color: #ffffff;
    border-radius: 50%;
    top: 10%;
    left: 10%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 50%;
}

#puntos-display {
    font-size: 2.6rem;
    font-weight: bold;
    color: #1e293b;
}

.gauge-needle {
    position: absolute;
    width: 4px;
    height: 90px;
    background-color: #2c3e50;
    bottom: 0;
    left: calc(50% - 2px);
    transform-origin: bottom center;
    z-index: 3;
    border-radius: 4px 4px 0 0;
    transform: rotate(-90deg); 
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.gauge-center {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #2c3e50;
    border-radius: 50%;
    bottom: -6px;
    left: calc(50% - 6px);
    z-index: 4;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    width: 290px;
    margin: -10px auto 25px auto;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: bold;
}

.alerta-cuadro {
    background-color: #f8fafc;
    padding: 22px;
    border-radius: 10px;
    margin: 25px 0;
    text-align: left;
}

.alerta-cuadro h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.alerta-cuadro p {
    line-height: 1.55;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.directorio-ayuda {
    background-color: #1e293b;
    color: white;
    padding: 25px 20px;
    border-radius: 10px;
    margin-top: 25px;
}

.directorio-ayuda h4 { 
    margin-top: 0; 
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.telefonos {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-tel {
    background-color: #22c55e;
    color: white !important;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.2s;
    display: inline-block;
}

.btn-tel:hover {
    background-color: #16a34a;
}

/* =============================================================================
   7. SECCIÓN DEDICADA A LA MUJER (ESPACIO VIOLETA Y NARANJA)
   ============================================================================= */
/* =============================================================================
   7. SECCIÓN DEDICADA AL APOYO GENERALIZADO (CUADRÍCULA DE 4 COLUMNAS)
   ============================================================================= */
.mujer-card {
    background-color: #ffffff;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.5s ease-out;
}

.mujer-header {
    text-align: center;
    margin-bottom: 35px;
}

.mujer-header h2 {
    color: #2c3e50;
    font-size: 1.7rem;
    margin-top: 0;
}

.mujer-header p {
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.5;
}

/* Nueva distribución responsiva en cuadrícula para 4 elementos */
.mujer-grid-cuatros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.info-tile-new {
    padding: 22px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-tile-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

.info-tile-new h3 {
    margin-top: 0;
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.info-tile-new p {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
    color: #444444;
}

/* Bloque 1: Círculo de la Violencia (Morado) */
.tile-purple-new {
    background-color: #f7f3fb;
    border-top: 4px solid #a855f7;
}
.tile-purple-new h3 {
    color: #a855f7;
}

/* Bloque 2: Día Naranja (Naranja) */
.tile-orange-new {
    background-color: #fff9f5;
    border-top: 4px solid #f97316;
}
.tile-orange-new h3 {
    color: #f97316;
}

/* Bloque 3: Apoyo Mujeres (Verde) */
.tile-green-new {
    background-color: #f3fbf7;
    border-top: 4px solid #10b981;
}
.tile-green-new h3 {
    color: #10b981;
}

/* Bloque 4: Masculinidades y Hombres (Azul) */
.tile-blue-new {
    background-color: #f0f7ff;
    border-top: 4px solid #3b82f6;
}
.tile-blue-new h3 {
    color: #3b82f6;
}
.mujer-ayuda-directorio {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.mujer-ayuda-directorio h3 {
    margin-top: 0;
    color: #1e293b;
}

.mujer-ayuda-directorio p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.telefonos-mujer {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-tel-m {
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    color: white;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-tel-m:hover {
    transform: translateY(-2px);
}

.purple-m {
    background-color: #8e44ad;
}
.purple-m:hover {
    background-color: #732d91;
}

.orange-m {
    background-color: #e67e22;
}
.orange-m:hover {
    background-color: #d35400;
}

/* =============================================================================
   8. PIE DE PÁGINA - MAQUETACIÓN CORREGIDA (IGUAL A IMAGE_DEE3DE)
   ============================================================================= */
/* =============================================================================
   8. PIE DE PÁGINA - DISTRIBUCIÓN HORIZONTAL PROPORCIONAL
   ============================================================================= */
.custom-site-footer {
    background-color: #621132 !important; /* Guinda Institucional */
    color: #ffffff !important;
    font-family: sans-serif !important;
    width: 100% !important;
    margin-top: auto !important;
    box-sizing: border-box !important;
    padding-top: 30px !important;
}

.footer-row-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 10px 20px 40px 20px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;        /* Centrado vertical perfecto con el logo */
    justify-content: flex-start !important; /* Punto de inicio a la izquierda */
    flex-wrap: nowrap !important;          /* Evita saltos de línea incorrectos */
    box-sizing: border-box !important;
}

/* Columna 1: Control de dimensiones del Logo */
.footer-col-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
}

.footer-logo-img {
    height: 65px !important;               /* Altura balanceada idéntica al diseño oficial */
    width: auto !important;                /* Mantiene la proporción original de la imagen */
    display: block !important;
}

/* Columna 2: Emergencias (El "margin-left: auto" crea el gran vacío central) */
.footer-col-emergency {
    display: flex !important;
    flex-direction: row !important;
    gap: 55px !important;                  /* Distancia exacta entre 911 y 089 */
    margin-left: auto !important;          /* EMPUJA TODO EL GRUPO HACIA LA DERECHA */
    margin-right: 70px !important;         /* Separación con el bloque de dirección */
    flex: 0 0 auto !important;
}

/* Columna 3: Contacto (Fijado al extremo derecho) */
.footer-col-contact {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    align-items: flex-start !important;
}

/* --- Tipografías y Estilos Internos --- */
.emergency-block {
    text-align: center !important;
}
.emergency-number {
    font-size: 1.4rem !important;
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 2px !important;
}
.emergency-label {
    font-size: 0.9rem !important;
    white-space: nowrap !important;
}

.privacy-link-style {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin-bottom: 12px !important;
    display: inline-block !important;
}
.contact-header-text {
    margin: 0 0 4px 0 !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
}
.contact-body-text {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;        /* Evita que se rompan las líneas de dirección */
}

/* --- Línea Divisoria Inferior --- */
.footer-copyright-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 25px 0 !important;
    width: 100% !important;
}
.copyright-inner-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    text-align: left !important;
}
.copyright-inner-container p {
    margin: 0 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.2px !important;
}

/* =============================================================================
   9. RESPONSIVO EXCLUSIVO PARA DISPOSITIVOS MÓVILES
   ============================================================================= */
@media (max-width: 920px) {
    .footer-row-container {
        flex-direction: column !important;
        gap: 35px !important;
        text-align: center !important;
    }
    .footer-col-emergency {
        margin: 0 auto !important;
    }
    .footer-col-contact {
        align-items: center !important;
        text-align: center !important;
    }
    .contact-body-text {
        white-space: normal !important;
    }
    .copyright-inner-container {
        text-align: center !important;
    }
}

.header-logo-img {
    height: 130px; 
    width: auto;
    display: block;
    object-fit: contain;
}


.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 40px; 
    width: 100%;
}

.footer-logo-img {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* =============================================================================
   10. SECCIÓN DE ESTADÍSTICAS Y GRÁFICAS
   ============================================================================= */
.stats-section {
    padding: 60px 20px;
    background-color: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stats-container h2 {
    color: #621132; /* El guinda institucional */
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-family: sans-serif;
}

.stats-subtitle {
    color: #666666;
    margin: 0 0 30px 0;
    font-size: 1rem;
}

/* Barra de Filtros */
.filter-bar {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    background-color: #f4f6f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333333;
}

.input-date {
    padding: 10px 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
}

.input-date:focus {
    border-color: #621132;
}

.btn-stats-filter {
    background-color: #621132;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    height: 43px;
}

.btn-stats-filter:hover {
    background-color: #4a0d25;
}

/* Contenedor de la gráfica */
.chart-wrapper {
    position: relative;
    margin: 0 auto;
    height: 380px; /* Altura controlada para que la gráfica no sea gigante */
    max-width: 500px; /* Ancho idóneo para una gráfica de pastel/dona */
}

/* =============================================================================
   11. BARRA DE NAVEGACIÓN FIJA SUPERIOR
   ============================================================================= */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Asegura que siempre quede por encima del contenido */
    font-family: sans-serif;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-weight: bold;
    color: #621132; /* Guinda institucional */
    font-size: 1.2rem;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn-nav {
    background: none;
    border: 1px solid #621132;
    color: #621132;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav:hover {
    background-color: rgba(98, 17, 50, 0.05);
}

/* Botón llamativo para el Reporte */
.btn-reporte-destacado {
    background-color: #621132;
    color: #ffffff;
}

.btn-reporte-destacado:hover {
    background-color: #4a0d25;
    color: #ffffff;
}

/* Compensación de espacio para que el menú fijo no tape el inicio del test */
body {
    padding-top: 70px; 
    scroll-behavior: smooth; /* Hace que el deslizamiento de pantalla sea suave */
}
/* Busca donde definiste .btn-nav y agrega la etiqueta 'a' para quitar la decoración de enlace */
.btn-nav {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    /* ... Todo el resto de tus estilos de padding, border y colores se quedan igual ... */
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Estilo específico para resaltar el botón de ayuda para hombres */
.btn-tel-hombres {
    background-color: #3b82f6 !important; /* Azul complementario */
}

.btn-tel-hombres:hover {
    background-color: #2563eb !important; /* Azul más oscuro al pasar el cursor */
}