/* ===================================================
   Хүмүүнлэгийн Дээд Сургууль - Main CSS
   =================================================== */

:root {
    --primary: #005BAC;
    --secondary: #0E7AE6;
    --bg: #F5F8FC;
    --card: #FFFFFF;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 40px rgba(0,91,172,0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary); }
img { max-width: 100%; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text); }

/* ---- Utility ---- */
.section-padding { padding: 80px 0; }
.min-vh-section { min-height: 85vh; }
.opacity-85 { opacity: 0.85; }
.section-label {
    display: inline-block;
    background: rgba(0,91,172,0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
.section-text { color: var(--text-light); font-size: 1rem; }

/* ============ NAVBAR ============ */
#mainNav {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,91,172,0.3);
    z-index: 1040;
}
.navbar-logo {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}
.navbar-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}
.navbar-brand-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    line-height: 1;
}
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: var(--transition);
}
.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.15);
}
.btn-outline-light { font-weight: 500; border-width: 1.5px; }

/* ============ HERO SECTION ============ */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    overflow: hidden;
    padding: 80px 0 60px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,91,172,0.9) 0%, rgba(14,122,230,0.8) 100%);
}
.hero-section .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0;
}
.btn-hero-primary {
    background: white;
    color: var(--primary);
    font-weight: 700;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
}
.btn-hero-primary:hover {
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    color: var(--primary);
}
.btn-hero-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 12px 32px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.25);
    color: white;
    transform: translateY(-2px);
}
.hero-stats { gap: 24px; }
.hero-stat-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    backdrop-filter: blur(4px);
}
.hero-stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: white; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.75); }
.hero-image-wrapper {
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid rgba(255,255,255,0.3);
}
.hero-logo-large {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
}
.hero-icon-large { font-size: 8rem; color: rgba(255,255,255,0.8); }
.hero-scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-down {
    display: flex;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============ ABOUT SECTION ============ */
.about-features { display: flex; flex-direction: column; gap: 8px; }
.about-feature-item { font-size: 0.95rem; color: var(--text-light); }
.about-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.about-stat-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.about-stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.about-stat-card.primary { background: var(--primary); color: white; }
.about-stat-card.secondary { background: var(--secondary); color: white; }
.about-stat-card.light { background: #e8f4ff; }
.about-stat-card i { font-size: 1.8rem; margin-bottom: 8px; opacity: 0.8; }
.about-stat-card.primary i, .about-stat-card.secondary i { color: white; }
.about-stat-card.primary .stat-value, .about-stat-card.secondary .stat-value { color: white; }
.about-stat-card.primary .stat-label, .about-stat-card.secondary .stat-label { color: rgba(255,255,255,0.85); }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-light); }

/* ============ PROGRAM CARDS ============ */
.program-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.program-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.program-card-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}
.master-card .program-card-header { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.program-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.program-card-header h3 { color: white; font-size: 1.2rem; margin-bottom: 4px; }
.program-card-header p { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin: 0; }
.program-card-body { padding: 20px 24px; flex: 1; }
.program-features { list-style: none; padding: 0; margin: 0; }
.program-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.program-features li:last-child { border-bottom: none; }
.program-card-footer { padding: 20px 24px; }

/* ============ MAJORS TABLE ============ */
.majors-table { border-radius: var(--radius); overflow: hidden; }
.majors-table thead { background: var(--primary); color: white; }
.majors-table thead th { border: none; font-weight: 600; padding: 14px 16px; }
.majors-table tbody tr { transition: var(--transition); }
.majors-table tbody tr:hover { background: rgba(0,91,172,0.05); }
.majors-table td { padding: 12px 16px; border-color: var(--border); }

/* ============ MASTER SECTION ============ */
.master-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
}
.master-major-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}
.master-major-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-4px);
}
.master-major-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 16px;
}
.master-major-card h4 { color: white; font-size: 1rem; }
.master-major-card p { color: rgba(255,255,255,0.75); font-size: 0.85rem; }

/* ============ NEWS CARDS ============ */
.news-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.news-image { height: 180px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.news-card:hover .news-image img { transform: scale(1.05); }
.news-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--bg) 0%, #e8f4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.4;
}
.news-body { padding: 20px; }
.news-date { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; }
.news-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.news-excerpt { font-size: 0.85rem; color: var(--text-light); margin: 0; }

/* ============ CONTACT CTA ============ */
.contact-cta-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d3a5e 100%);
    padding: 50px 0;
    color: white;
}
.contact-cta-section h3 { color: white; margin-bottom: 8px; }
.contact-cta-phone { font-size: 1.8rem; font-weight: 800; color: white; margin-bottom: 4px; }
.contact-cta-email a { color: rgba(255,255,255,0.75); }
.contact-cta-address { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 4px; }

/* ============ FOOTER ============ */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 60px 0 20px;
}
.footer-logo { height: 60px; }
.footer-logo-icon { font-size: 3rem; color: var(--primary); }
.footer h5 { color: white; font-size: 1rem; }
.footer p { font-size: 0.85rem; }
.footer-heading { color: white; font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: white; padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-contact a { color: rgba(255,255,255,0.7); }
.footer-contact a:hover { color: white; }
.social-links { display: flex; gap: 10px; }
.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    transition: var(--transition);
}
.social-link:hover { background: var(--primary); color: white; }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 30px 0 20px; }
.footer-bottom { text-align: center; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ============ PAGE HEADER ============ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px 0;
}
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.7); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.5); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }
.page-header-title { font-size: 2rem; font-weight: 800; color: white; margin: 12px 0 8px; }
.page-header-subtitle { color: rgba(255,255,255,0.8); margin: 0; }

/* ============ ADMISSION FORM ============ */
.major-list { max-height: 400px; overflow-y: auto; }
.major-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.major-item:last-child { border-bottom: none; }
.major-item:hover, .major-item.active {
    background: rgba(0,91,172,0.08);
}
.major-item.active { border-left: 3px solid var(--primary); }
.major-item-num {
    width: 26px;
    height: 26px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.major-item.active .major-item-num { background: var(--primary); color: white; }
.major-item-body { flex: 1; min-width: 0; }
.major-item-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.major-item-score { margin-top: 3px; }
.major-item-check { color: var(--text-light); font-size: 0.7rem; }
.major-item.active .major-item-check { color: var(--primary); }
.selected-major-display {
    background: rgba(0,91,172,0.06);
    border: 1px solid rgba(0,91,172,0.2);
    border-radius: 10px;
    padding: 14px 18px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0,91,172,0.15);
}
.file-upload-wrapper .form-control { cursor: pointer; }
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-content { text-align: center; }

/* ============ SUCCESS PAGE ============ */
.success-icon-wrapper { display: flex; justify-content: center; }
.success-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 30px rgba(16,185,129,0.3);
}
.app-number-display {
    background: var(--bg);
    border-radius: 12px;
    padding: 20px;
}
.app-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}
.application-summary { text-align: left; }
.file-attachment {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
    transition: var(--transition);
}
.file-attachment:hover { background: #e8f4ff; color: var(--primary); }

/* ============ BTN OVERRIDES ============ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); }
.btn-secondary { background: var(--secondary); border-color: var(--secondary); font-weight: 600; }
.btn-secondary:hover { background: #0d68c9; border-color: #0d68c9; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .section-padding { padding: 50px 0; }
    .hero-section { padding: 50px 0 40px; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .hero-stats { flex-direction: column; }
    .about-image-grid { grid-template-columns: 1fr 1fr; }
    .program-card-header { flex-direction: column; text-align: center; }
    .contact-cta-phone { font-size: 1.4rem; }
}

/* ============ PRINT ============ */
@media print {
    #mainNav, .footer, .hero-section > .container, .btn, nav { display: none !important; }
    .page-header { background: none !important; color: #333 !important; }
    .page-header-title { color: #333 !important; }
}
