@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Open+Sans:wght@400;600;700&display=swap');

:root {
    /* Paleta Oficial IMSS-Bienestar / Gobierno de México */
    --gob-verde-oscuro: #0B231E;
    --gob-verde-medio: #13322B;
    --gob-verde-acento: #00a884;
    --gob-guinda: #691C32;
    --gob-dorado: #BC955C;
    --texto-oscuro: #0f172a;
    --texto-gris: #475569;
    --fondo-gris: #F8FAFC;
    --blanco: #FFFFFF;
    
    --sombra-card: 0 4px 15px rgba(0, 0, 0, 0.05);
    --sombra-hover: 0 12px 25px rgba(11, 35, 30, 0.12);
    --sombra-premium: 0 20px 40px -15px rgba(11, 35, 30, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--texto-oscuro);
    background-color: var(--fondo-gris);
    line-height: 1.6;
}

/* --- CINTILLA OFICIAL DE GOBIERNO --- */
.top-gob-bar {
    background: var(--gob-verde-oscuro);
    color: var(--blanco);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gob-dorado);
    letter-spacing: 0.5px;
}

/* --- ENCABEZADO PRINCIPAL --- */
.header-principal {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--blanco);
    border-bottom: 3px solid var(--gob-verde-oscuro);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}

.nav-menu a {
    color: var(--texto-oscuro);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-menu a:hover {
    color: var(--gob-verde-oscuro);
    background: #E8F3F0;
}

.btn-login-header {
    background: var(--gob-verde-oscuro);
    color: var(--blanco) !important;
    border: none;
    padding: 9px 22px !important;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700 !important;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 35, 30, 0.2);
    transition: all 0.2s ease !important;
}

.btn-login-header:hover {
    background: var(--gob-guinda);
    transform: translateY(-1px);
}

/* --- ENCABEZADO DE BIENVENIDA --- */
.hero-header-text {
    background: var(--blanco);
    text-align: center;
    padding: 45px 20px 20px;
}

.hero-header-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    color: var(--gob-verde-oscuro);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-header-text p {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    color: var(--texto-gris);
}

/* --- SHOWCASE DE LA FOTOGRAFÍA --- */
.hero-image-showcase {
    max-width: 1280px;
    margin: 20px auto 40px;
    padding: 0 20px;
}

.image-frame {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sombra-hover);
    border: 4px solid var(--blanco);
}

.image-frame img {
    width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: cover;
    display: block;
}

/* --- SECCIONES Y CONTENIDOS GENERALES --- */
.seccion-padding {
    padding: 70px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.titulo-seccion {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gob-verde-oscuro);
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.subtitulo-seccion {
    text-align: center;
    color: var(--texto-gris);
    font-size: 1.05rem;
    margin-bottom: 45px;
}

.titulo-seccion::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gob-dorado);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- SERVICIOS MÉRDACOS --- */
.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card-servicio {
    background: var(--blanco);
    border-radius: 14px;
    padding: 35px 25px;
    box-shadow: var(--sombra-card);
    border: 1px solid #E2E8F0;
    border-top: 5px solid var(--gob-verde-oscuro);
    transition: all 0.3s ease;
    text-align: center;
}

.card-servicio:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-hover);
    border-top-color: var(--gob-guinda);
}

.icono-servicio {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.card-servicio h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gob-verde-oscuro);
    margin-bottom: 10px;
}

.card-servicio p {
    font-size: 0.92rem;
    color: var(--texto-gris);
}

/* --- LÍNEA DEL TIEMPO HISTÓRICA --- */
.timeline-container {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--gob-verde-oscuro);
    top: 0; bottom: 0; left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-block {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-block.left { left: 0; text-align: right; }
.timeline-block.right { left: 50%; text-align: left; }

.timeline-content {
    padding: 25px;
    background: var(--blanco);
    border-radius: 12px;
    box-shadow: var(--sombra-card);
    border: 1px solid #E2E8F0;
}

.timeline-date {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--blanco);
    background: var(--gob-verde-oscuro);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--gob-verde-oscuro);
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--texto-gris);
}

/* --- FILOSOFÍA INSTITUCIONAL (MISIÓN, VISIÓN Y VALORES) --- */
.content-section {
    padding: 80px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title-box {
    text-align: center;
    margin-bottom: 45px;
}

.section-title-box h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gob-verde-oscuro);
    margin-bottom: 8px;
}

.section-title-box p {
    color: var(--texto-gris);
    font-size: 1.05rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.philosophy-card {
    background: var(--blanco);
    border-radius: 18px;
    padding: 40px 30px;
    box-shadow: var(--sombra-premium);
    border: 1px solid #E2E8F0;
    border-top: 6px solid var(--gob-verde-oscuro);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.philosophy-card:nth-child(2) {
    border-top-color: var(--gob-verde-acento);
}

.philosophy-card:nth-child(3) {
    border-top-color: var(--gob-guinda);
}

.philosophy-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra-hover);
}

.philosophy-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gob-verde-oscuro);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.philosophy-card p {
    font-size: 0.95rem;
    color: var(--texto-gris);
    line-height: 1.6;
}

/* ESTILOS DE VALORES COMO TARJETAS INTERNAS */
.valores-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.valor-item-card {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--gob-verde-acento);
    border-radius: 8px;
    padding: 10px 14px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.valor-item-card:hover {
    background: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.valor-titulo {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--gob-verde-oscuro);
    margin-bottom: 2px;
}

.valor-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--texto-gris);
    line-height: 1.3;
}

/* --- PIE DE PÁGINA INSTITUCIONAL --- */
.footer-sitio {
    background: var(--gob-verde-oscuro);
    color: #E2E8F0;
    padding: 55px 20px 25px;
    font-size: 0.92rem;
    border-top: 5px solid var(--gob-dorado);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto 35px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
    text-align: left;
}

.footer-col h4 {
    color: var(--blanco);
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-col p {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 22px;
    font-size: 0.88rem;
}

/* --- VENTANA MODAL LOGIN --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(11, 35, 30, 0.8);
    backdrop-filter: blur(6px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-box {
    background: var(--blanco);
    padding: 40px 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border-top: 6px solid var(--gob-verde-oscuro);
}

.btn-cerrar-modal {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #94A3B8;
    transition: color 0.2s;
}

.btn-cerrar-modal:hover { 
    color: var(--gob-guinda); 
}

.modal-box h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--gob-verde-oscuro);
    font-size: 1.5rem;
    margin-bottom: 6px;
    font-weight: 800;
}

.modal-box p {
    font-size: 0.88rem;
    color: var(--texto-gris);
    margin-bottom: 22px;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--texto-oscuro);
    margin-bottom: 6px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--gob-verde-oscuro);
}

.btn-submit-login {
    width: 100%;
    padding: 14px;
    background: var(--gob-verde-oscuro);
    color: var(--blanco);
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-submit-login:hover {
    background: var(--gob-guinda);
}

/* --- ADAPTACIÓN RESPONSIVA (MÓVIL Y TABLETS) --- */
@media (max-width: 768px) {
    .top-gob-bar { 
        flex-direction: column; 
        gap: 4px; 
        text-align: center; 
    }
    .nav-container { 
        padding: 10px;
    }
    .nav-menu { 
        width: 100%; 
        justify-content: center; 
        flex-wrap: wrap; 
        gap: 8px; 
    }
    .timeline-container::after { 
        left: 25px; 
    }
    .timeline-block { 
        width: 100%; 
        padding-left: 60px; 
        padding-right: 15px; 
    }
    .timeline-block.left, .timeline-block.right { 
        left: 0; 
        text-align: left; 
    }
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
}