/* ═══════════════════════════════════════════════════════════
   SISTEMA DE DISEÑO INSTITUCIONAL UPES LEARNING
   Paleta de Colores Corporativa LMS:
   - Primary Blue: #006194 (Azul Institucional)
   - Primary Container: #007bb9 / #004b73
   - Secondary / Mint Emerald: #00714d / #4edea3 / #059669
   - Terciario / Amber Warm: #894d00 / #d97706
   - Superficie & Fondo: #f7f9fb / #ffffff / #0f172a
   (CERO TONOS MORADOS O VIOLETAS)
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Paleta Institucional Principal */
    --color-primary: #006194;          /* Azul Institucional UPES */
    --color-primary-dark: #004b73;     /* Azul Oscuro Profundo */
    --color-primary-container: #007bb9;/* Azul Contenedor */
    --color-primary-soft: #e0f2fe;     /* Azul Suave */

    /* Acentos Secundarios (Verde Cooperativo & Ámbar Crecimiento) */
    --color-accent-teal: #00714d;      /* Verde Institucional */
    --color-accent-emerald: #059669;   /* Verde Éxito Academic */
    --color-accent-mint: #4edea3;      /* Menta Fresco */
    --color-amber: #894d00;            /* Ámbar / Dorado Cálido */
    --color-amber-soft: #fffbeb;
    
    /* Superficies y Fondos */
    --bg-body: #f7f9fb;                /* Fondo Principal Suave */
    --bg-card: #ffffff;                /* Blanco Puro Tarjetas */
    --bg-glass: rgba(255, 255, 255, 0.88); /* Glassmorphism */
    --bg-dark-hero: #091a28;           /* Azul Noche Institucional */
    
    /* Textos */
    --text-heading: #0f172a;           /* Texto Encabezados */
    --text-body: #334155;              /* Texto Lectura Principal */
    --text-muted: #64748b;             /* Texto Secundario */
    --text-soft: #94a3b8;              /* Texto Deshabilitado/Sutil */

    /* Bordes y Elevaciones */
    --border-subtle: #e2e8f0;
    --border-focus: #7dd3fc;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 97, 148, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 97, 148, 0.08);
    --shadow-lg: 0 20px 40px rgba(9, 26, 40, 0.12);
    --shadow-glow: 0 0 25px rgba(0, 97, 148, 0.25);
}

/* Reset Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

/* Sticky Header Glassmorphism */
.upes-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-heading);
    font-family: 'Outfit', sans-serif;
}

.brand-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-teal));
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botones Institucionales */
.btn-upes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 97, 148, 0.4);
    color: #ffffff;
}

.btn-outline-soft {
    background: transparent;
    color: var(--text-body);
    border-color: var(--border-subtle);
}

.btn-outline-soft:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Hero Section Limpia & Profesional */
.hero-wrapper {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(0, 113, 77, 0.08) 0%, rgba(0, 97, 148, 0.05) 50%, transparent 100%), #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 4rem 1.5rem 5rem 1.5rem;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0, 97, 148, 0.15);
}

.hero-title {
    font-size: 3.25rem;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text-heading);
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.25rem;
    max-width: 540px;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s ease;
    max-width: 580px;
}

.hero-search-box:focus-within {
    border-color: var(--color-primary);
}

.hero-search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: var(--text-heading);
    background: transparent;
}

/* Tarjetas de Cursos Públicos (Coursera Style con colores LMS) */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 97, 148, 0.3);
}

.course-thumb-wrapper {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #091a28, #004b73);
    overflow: hidden;
}

.course-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform 0.4s ease;
}

.course-card:hover .course-thumb-img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    background: rgba(9, 26, 40, 0.8);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

.course-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-category {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent-teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.course-title {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.course-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* Footer Institucional Azul Oscuro */
.upes-footer {
    background: var(--bg-dark-hero);
    color: #94a3b8;
    padding: 4rem 1.5rem 2rem 1.5rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 320px;
}

.footer-column h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    color: #94a3b8;
}

.footer-bottom a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Utilities Grid */
.container-xl {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 4.5rem 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem auto;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

/* Custom Responsive Classes for Home.razor */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--color-primary);
}

.stat-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-body);
}

.stat-border {
    border-left: 1px solid var(--border-subtle);
    padding-left: 2rem;
}

.color-teal { color: var(--color-accent-teal) !important; }
.color-amber { color: var(--color-amber) !important; }

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mobile Menu Settings */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.mobile-menu {
    display: none;
}

/* Responsividad */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-search-box {
        margin: 0 auto;
    }
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    .stat-border {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-subtle);
        padding-top: 1rem;
    }
    .stat-item {
        align-items: center;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .mobile-menu {
        display: block;
        background: var(--bg-card);
        border-top: 1px solid var(--border-subtle);
        padding: 1.5rem 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    .mobile-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .mobile-menu .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-subtle);
    }
    .navbar-container {
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .brand-logo {
        font-size: 1.15rem;
        gap: 0.4rem;
    }
    .brand-logo span {
        white-space: nowrap;
    }
    .brand-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    .nav-btn-text {
        display: none;
    }
    .nav-actions .btn-upes {
        padding: 0.55rem 0.85rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .cta-buttons {
        flex-direction: column;
    }
    .cta-buttons a {
        width: 100%;
    }
}