/* =========================================================
   PORTAL WEB INSTITUCIONAL - CEB 5/4 PROFR. RAFAEL RAMÍREZ
   Inspirado en la jerarquía y estructura de UAEH
   Paleta de Color: Tonos Azules Institucionales y Neutros Limpios
   ========================================================= */

:root {
    --primary-blue: #1e3a8a;
    --primary-dark: #0f172a;
    --primary-light: #1e40af;
    --accent-blue: #2563eb;
    --accent-gold: #f59e0b;
    --accent-gold-hover: #d97706;
    --neutral-light: #f8fafc;
    --neutral-gray: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--neutral-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
}

/* Espaciados y Utilidades */
.py-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.z-index-2 {
    z-index: 2;
}

.bg-primary-soft {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

.extra-small {
    font-size: 0.75rem;
}

.hover-blue:hover {
    color: var(--accent-blue) !important;
}

/* =========================================================
   1. TOP UTILITY BAR (Estilo UAEH)
   ========================================================= */
.top-bar {
    background-color: #0b1528;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.top-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.top-link:hover {
    color: #ffffff;
}

/* =========================================================
   2. NAVBAR PRINCIPAL (Institucional en Tonos Azules)
   ========================================================= */
.main-navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-bottom: 3px solid var(--accent-gold);
    transition: all 0.3s ease;
}

.school-brand-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    line-height: 1.15;
}

.brand-title {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-sub {
    display: block;
    font-size: 0.72rem;
    color: #bfdbfe;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}

.main-navbar .nav-link {
    color: #f1f5f9 !important;
    font-size: 0.93rem;
    transition: color 0.2s ease;
    position: relative;
}

.main-navbar .nav-link:hover {
    color: #fde68a !important;
}

.btn-portal {
    background: var(--accent-gold);
    color: #0f172a !important;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    transition: all 0.25s ease;
}

.btn-portal:hover {
    background: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* =========================================================
   3. HERO CAROUSEL SLIDER (Gran Formato)
   ========================================================= */
.hero-carousel-container {
    background-color: var(--primary-dark);
}

.hero-carousel-container .carousel-item,
.hero-static {
    min-height: 560px;
    height: 80vh;
    max-height: 720px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.90) 0%, rgba(30, 58, 138, 0.75) 100%);
    z-index: 1;
}

.hero-title {
    line-height: 1.15;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    line-height: 1.6;
    font-weight: 300;
}

.btn-hero-cta {
    background-color: #2563eb;
    border: 1px solid #3b82f6;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.btn-hero-cta:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
}

.carousel-indicators .active {
    background-color: var(--accent-gold);
    width: 28px;
    border-radius: 6px;
}

.carousel-control-prev, .carousel-control-next {
    width: 6%;
    z-index: 5;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(15, 23, 42, 0.6);
    background-size: 50%;
}

/* =========================================================
   4. QUICK ACCESS RIBBON (Inspiración UAEH)
   ========================================================= */
.quick-ribbon-section {
    border-bottom: 1px solid var(--neutral-gray);
}

.ribbon-card {
    background: #ffffff;
    border: 1px solid var(--neutral-gray);
    transition: all 0.25s ease;
}

.ribbon-card:hover {
    background: #f1f5f9;
    border-color: #93c5fd;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.ribbon-title {
    font-size: 0.95rem;
    line-height: 1.3;
}

/* =========================================================
   5. SECCIÓN DE ASPIRANTES Y CONVOCATORIA
   ========================================================= */
.admission-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.admission-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

.admission-badge {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
}

.cta-admission-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0369a1 100%);
    border-left: 6px solid var(--accent-gold) !important;
}

/* =========================================================
   6. TARJETAS DE NOTICIAS (Estilo Calendario UAEH)
   ========================================================= */
.news-card {
    border: 1px solid var(--neutral-gray) !important;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08) !important;
}

.news-image-wrapper {
    overflow: hidden;
}

.news-thumbnail {
    transition: transform 0.4s ease;
}

.news-card:hover .news-thumbnail {
    transform: scale(1.06);
}

/* Insignia de fecha tipo calendario en tarjeta */
.news-date-badge {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    width: 54px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.news-date-day {
    font-size: 1.3rem;
    line-height: 1.15;
    padding: 4px 0 2px 0;
    color: var(--primary-dark);
}

.news-date-month {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background-color: var(--primary-blue);
    color: #ffffff;
    padding: 3px 0;
}

.news-title {
    font-size: 1.12rem;
    line-height: 1.35;
}

.news-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   7. DIRECTORIO DE PERSONAL (Fichas Descriptivas sin datos sensibles)
   ========================================================= */
.staff-card {
    border: 1px solid var(--neutral-gray) !important;
    transition: all 0.25s ease;
}

.staff-card:hover {
    border-color: #93c5fd !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06) !important;
}

.staff-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.staff-name {
    font-size: 0.98rem;
}

.staff-icon {
    width: 16px;
    text-align: center;
}

.filter-role-btn {
    font-size: 0.88rem;
}

/* =========================================================
   8. ENLACES RÁPIDOS Y SERVICIOS
   ========================================================= */
.service-link-card {
    background: #ffffff;
    border: 1px solid var(--neutral-gray) !important;
    transition: all 0.25s ease;
}

.service-link-card:hover {
    border-color: var(--accent-blue) !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08) !important;
}

.service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* =========================================================
   9. HOVER LIFTS Y FOOTER
   ========================================================= */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-section {
    background-color: #0b1528 !important;
    border-top: 4px solid var(--primary-blue);
}

.footer-logo {
    height: 48px;
    width: auto;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background-color: var(--accent-gold);
    color: #0f172a !important;
    border-color: var(--accent-gold);
}

.hover-white:hover {
    color: #ffffff !important;
}

/* Responsividad */
@media (max-width: 991.98px) {
    .hero-carousel-container .carousel-item,
    .hero-static {
        height: auto;
        min-height: 480px;
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .py-6 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
}