/* --- RESET Y VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a2540;   /* Azul Marino Institucional */
    --secondary-color: #1d4ed8; /* Azul Intermedio / Acento vibrante */
    --gold-color: #f59e0b;      /* Dorado / Éxito complementario */
    --dark-color: #1e293b;      /* Gris Oscuro / Pizarra */
    --light-color: #f8fafc;     /* Fondo Claro */
    --white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
}

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

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color:white;
}

.btn-primary:hover {
    background-color: #061826;
}

.btn-secondary {
    background-color: transparent;
    color:white;
    border: 2px solid var(--white)
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* --- HEADER Y MENÚ DE NAVEGACIÓN --- */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
    position: relative;
}

.logo-box {
    transform: translateX(-40px);
}

.logotipo {
    max-width: 264px;
    display: flex;
    left: auto;
}
.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    color: var(--primary-color);
    font-size: 16px;
    text-transform: uppercase;
    line-height: 1.2;
}

.logo-text span {
    color: var(--gold-color);
    font-size: 12px;
    font-weight: bold;
}

/* NAVBAR Y DROPDOWNS UNIFICADOS */
.navbar > ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.navbar > ul > li {
    position: relative;
}

.navbar a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.3s;
    cursor: pointer;
}

.navbar a:hover, 
.navbar li:hover > a {
    color: var(--primary-color);
}

/* SUBMENÚ DESPLEGABLE VERTICAL */
.navbar .dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 0 0 6px 6px;
    border-top: 3px solid var(--primary-color);
    padding: 8px 0;
    z-index: 1100;
    flex-direction: column !important;
    list-style: none;
}

/* Clase que activa el menú desplegable al hacer clic vía JS */
.navbar .dropdown-menu.show {
    display: flex !important;
}

.dropdown-menu li {
    width: 100%;
    position: static;
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 13px;
    color: var(--dark-color);
    font-weight: 500;
    white-space: normal;
    display: block;
    width: 100%;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* --- HERO SLIDER --- */
.hero-slider-container {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-color: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
}
.slide:nth-child(1) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('Logos,imagenes/Logo de fondo(2).jpg');
}
.slide:nth-child(2) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),  url('Logos,imagenes/Logo de fondo (3).jpg');
}
.slide:nth-child(3) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),  url('Logos,imagenes/Logo de fondo (4).jpg');
}
.slide .hero-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.slide.active .hero-content {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.badge-hero {
    background-color: var(--gold-color);
    color: black;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centra los elementos horizontalmente */
    text-align: center;     /* Centra el texto */
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    color:#f1f5f9;
    font-size: 44px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    color:#f1f5f9;
    font-size: 19px;
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Flechas de navegación lateral */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 20;
}

.arrow:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.arrow-left { left: 25px; }
.arrow-right { right: 25px; }

.dots-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: #ffffff;
    transform: scale(1.25);
}

/* --- ESTADÍSTICAS --- */
.stats {
    background-color:#000f61;
    color: var(--white);
    padding: 40px 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
    gap: 20px;
}

.stat-card h3 {
    font-size: 40px;
    color:#38bdf8;
    font-weight: 800;
}

.stat-card p {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SECCIÓN GENERAL / TÍTULOS --- */
.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-color);
}

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

.section-title h2 {
    font-size: 34px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-title p {
    color: #666;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
}

/* --- SECCIÓN BIENVENIDA --- */
.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.welcome-text h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 15px;
}

.welcome-text p {
    margin-bottom: 15px;
    text-align: justify;
}

.quote-box {
    background-color: var(--light-color);
    border-left: 5px solid var(--gold-color);
    padding: 20px;
    margin-top: 20px;
    font-style: italic;
    font-weight: 600;
}

.welcome-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.history-card {
    max-width: 900px;  /* Cambia este valor para hacer el bloque más ancho o más angosto (ej: 1000px, 800px, etc.) */
    width: 100%;
    margin: 0 auto;    /* Mantiene la tarjeta centrada */
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 40px;
}

.history-card p {
    text-align: justify; /* Mantiene el texto perfectamente uniforme de lado a lado */
    line-height: 1.7;    /* Espaciado vertical cómodo entre líneas */
}
.mv-grid {
    text-align: center;
    text-align: justify;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.mv-card {
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.mv-card h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- LEMA Y VALORES --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.value-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.value-card i {
    font-size: 35px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- ESPECIALIDADES --- */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link .card-body h3 {
    color: var(--primary-color);
}

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

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--primary-color);
}

.card-body p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

/* Contenedor principal de la sección */
.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas base */
    gap: 25px;
    max-width: 1250px;
    margin: 0 auto;
}

/* Tarjeta de Director(a) con ancho fijo de 1200px (o adaptado al contenedor) */
.com-card2 {
    grid-column: 1 / -1; /* Ocupa todo el ancho disponible del grid */
    width: 100%;
    max-width: 1200px;  /* Forzamos el límite exacto que pediste */
    margin: 0 auto;     /* Centrado automático */
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

/* Contenedor o envoltura para las tarjetas de los subdirectores (en columna única) */
.subdirectores-container {
    grid-column: 1 / -1; /* Ocupa toda la fila inferior */
    display: flex;
    gap: 20px;          /* Espacio vertical entre cada subdirector */
    align-items: center;
}

/* Tarjetas individuales de subdirector */
.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px; /* Ancho máximo de toda la sección */
    margin: 0 auto;
}

.com-card2 {
    grid-column: 1 / -1; /* Ocupa toda la línea superior de lado a lado */
    background: var(--white); /* Fondo blanco de tarjeta */
    border: 1px solid #e2e8f0; /* Borde sutil */
    border-radius: 8px; /* Esquinas redondeadas */
    padding: 30px; /* Espaciado interno */
    text-align: center; /* Centrar contenido */
}

/* --- ADMISIÓN --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.step-card {
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.step-number {
    width: 55px;
    height: 55px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 20px auto;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 40px 0;
}

.footer-content-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content-bottom p {
    font-size: 13px;
    color: #a0aec0;
    margin: 0;
}

/* Diseño del botón Volver Arriba */
.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .welcome-grid, .mv-grid {
        grid-template-columns: 1fr;
    }
    .navbar > ul {
        flex-wrap: wrap;
    }
    .hero-content h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .footer-content-bottom {
        flex-direction: column;
        text-align: center;
    }
}