/* NepaliExam website: the same look as the Android app.
   Brand blue, a soft blue-white background, white rounded cards, red section markers. */

:root {
    --ne-brand: #1D4ED8;
    --ne-brand-dark: #1E3A8A;
    --ne-brand-soft: #E8EEFF;
    --ne-accent: #DC2626;
    --ne-green: #16A34A;
    --ne-orange: #EA580C;
    --ne-bg: #F5F7FF;
    --ne-card: #FFFFFF;
    --ne-border: #E3E8F4;
    --ne-text: #0F172A;
    --ne-muted: #64748B;
    --ne-radius: 16px;
    --ne-radius-sm: 12px;
    --ne-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .06);
    --ne-shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 12px 28px rgba(29, 78, 216, .14);
    --ne-header-h: 64px;
    --ne-bottom-nav-h: 64px;

    /* Bootstrap follows the brand, so existing pages change colour too */
    --bs-primary: #1D4ED8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #1D4ED8;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: #1E3A8A;
    --bs-link-hover-color-rgb: 30, 58, 138;
    --bs-body-bg: #F5F7FF;
    --bs-body-color: #0F172A;
    --bs-body-font-family: 'Inter', 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 16px;
    --bs-border-color: #E3E8F4;
    --bs-focus-ring-color: rgba(29, 78, 216, .25);

    /* names used by older page styles */
    --primary: #1D4ED8;
    --primary-hover: #1E3A8A;
    --surface: #F5F7FF;
    --text-main: #0F172A;
    --text-muted: #64748B;
}

body {
    background: var(--ne-bg);
    color: var(--ne-text);
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
}
/* Nepali letters come from Mukta through the font stack above (Inter has no Devanagari).
   Never set font-family on :lang(ne) or [lang]: it would also replace the icon font. */

.btn-primary {
    --bs-btn-bg: var(--ne-brand); --bs-btn-border-color: var(--ne-brand);
    --bs-btn-hover-bg: var(--ne-brand-dark); --bs-btn-hover-border-color: var(--ne-brand-dark);
    --bs-btn-active-bg: var(--ne-brand-dark); --bs-btn-active-border-color: var(--ne-brand-dark);
    --bs-btn-disabled-bg: var(--ne-brand); --bs-btn-disabled-border-color: var(--ne-brand);
    font-weight: 600;
}
.btn-outline-primary {
    --bs-btn-color: var(--ne-brand); --bs-btn-border-color: var(--ne-brand);
    --bs-btn-hover-bg: var(--ne-brand); --bs-btn-hover-border-color: var(--ne-brand);
    --bs-btn-active-bg: var(--ne-brand-dark); --bs-btn-active-border-color: var(--ne-brand-dark);
    font-weight: 600;
}
.btn { border-radius: 10px; }
.btn-brand { background: var(--ne-brand); color: #fff; font-weight: 600; border-radius: 10px; }
.btn-brand:hover { background: var(--ne-brand-dark); color: #fff; }
.form-control, .form-select { border-radius: 10px; border-color: var(--ne-border); }
.form-control:focus, .form-select:focus { border-color: var(--ne-brand); box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .15); }
.card { border-color: var(--ne-border); }
.rounded-4 { border-radius: var(--ne-radius) !important; }
.shadow-sm { box-shadow: var(--ne-shadow) !important; }
.card-hover { transition: transform .2s, box-shadow .2s; border: 1px solid var(--ne-border); border-radius: var(--ne-radius); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--ne-shadow-hover); border-color: rgba(29, 78, 216, .35); }
a { text-underline-offset: 2px; }
:focus-visible { outline: 3px solid rgba(29, 78, 216, .45); outline-offset: 2px; }

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--ne-border);
}
.site-header .bar { height: var(--ne-header-h); display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.brand .name { font-weight: 900; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1; color: var(--ne-brand-dark); }
.brand .name span { color: #3B82F6; }
.brand .tagline { display: block; font-size: .7rem; font-weight: 600; color: var(--ne-muted); margin-top: 2px; }
.site-nav { display: flex; gap: .25rem; margin-left: 1rem; }
.site-nav a {
    display: flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px;
    color: #334155; font-weight: 600; font-size: .93rem; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--ne-brand-soft); color: var(--ne-brand); }
.site-nav a.active { background: var(--ne-brand-soft); color: var(--ne-brand); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: var(--ne-brand-dark); background: transparent; border: 0; text-decoration: none; font-size: 1.15rem;
}
.icon-btn:hover { background: var(--ne-brand-soft); color: var(--ne-brand); }
.avatar {
    width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ne-brand-soft); color: var(--ne-brand); font-weight: 800; border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ne-border);
}
.lang-btn { font-weight: 700; border-radius: 999px; padding: .3rem .8rem; }
.user-menu .dropdown-menu { border: 0; border-radius: 14px; box-shadow: var(--ne-shadow-hover); padding: .5rem; min-width: 230px; }
.user-menu .dropdown-item { border-radius: 8px; padding: .55rem .75rem; font-weight: 500; }
.user-menu .dropdown-item i { width: 1.25rem; color: var(--ne-muted); }

/* ------------------------------------------------------------------ bottom navigation (phones) */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: none;
    background: #fff; border-top: 1px solid var(--ne-border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
}
.bottom-nav .items { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--ne-bottom-nav-h); }
.bottom-nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #64748B; text-decoration: none; font-size: .72rem; font-weight: 600;
}
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active { color: var(--ne-brand); }
.bottom-nav a.active::before {
    content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ne-brand);
}
@media (max-width: 991.98px) {
    .site-nav { display: none; }
    .bottom-nav { display: block; }
    body { padding-bottom: calc(var(--ne-bottom-nav-h) + env(safe-area-inset-bottom)); }
    .brand .tagline { display: none; }
    .hide-mobile { display: none !important; }
}

/* ------------------------------------------------------------------ page */
.site-main { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 60vh; }
.page { max-width: 1100px; margin: 0 auto; }
.page-title { font-weight: 800; letter-spacing: -.01em; }
.ne-card { background: var(--ne-card); border: 1px solid var(--ne-border); border-radius: var(--ne-radius); box-shadow: var(--ne-shadow); }
a.ne-card { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.ne-card:hover { transform: translateY(-2px); box-shadow: var(--ne-shadow-hover); }

.section-title { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 .9rem; }
.section-title::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--ne-accent); flex-shrink: 0; }
.section-title h2 { font-size: 1.15rem; font-weight: 800; margin: 0; flex: 1; }
.section-title .see-all { font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }

/* hero */
.hero {
    position: relative; overflow: hidden; border-radius: 22px; color: var(--ne-brand-dark);
    background: linear-gradient(180deg, #EFF5FF 0%, #BFD8FF 100%);
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(4.5rem, 8vw, 6rem);
}
.hero svg.mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; }
.hero .content { position: relative; max-width: 560px; }
.hero h1 { font-weight: 900; font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.15; margin-bottom: .6rem; }
.hero p { font-weight: 600; font-size: clamp(1rem, 2vw, 1.15rem); opacity: .9; margin: 0; }
.hero-search { position: relative; margin-top: 1.25rem; display: flex; gap: .5rem; max-width: 560px; }
.hero-search input { height: 52px; border-radius: 14px; border: 0; padding-left: 2.8rem; box-shadow: var(--ne-shadow); }
.hero-search .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ne-muted); }
.hero-search button { height: 52px; border-radius: 14px; padding: 0 1.25rem; }

.progress-card { position: relative; margin: -3rem 1rem 0; padding: .9rem 1rem; display: flex; align-items: center; gap: .9rem; }
.progress-card .trophy { width: 46px; height: 46px; border-radius: 50%; background: #FFF4D6; color: #F59E0B;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
    .progress-card { margin: -3rem .5rem 0; flex-wrap: wrap; font-size: .92rem; }
    .progress-card .btn { width: 100%; }
    .hero-search button { padding: 0 1rem; }
}
.progress-card .progress { height: 8px; background: var(--ne-brand-soft); border-radius: 8px; }
.progress-card .progress-bar { background: var(--ne-brand); border-radius: 8px; }

/* tiles */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (min-width: 992px) { .tile-grid { grid-template-columns: repeat(8, 1fr); } }
.tile, a.ne-card.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem;
    padding: 1rem .4rem; min-height: 112px; font-size: .82rem; font-weight: 600; line-height: 1.25; }
.tile i { font-size: 1.8rem; }

.scroll-row { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x proximity; }
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }
.uni-card { width: 150px; padding: 1rem .75rem; text-align: center; font-size: .85rem; font-weight: 600; line-height: 1.25; }
.uni-logo { width: 56px; height: 56px; margin: 0 auto .5rem; border-radius: 50%; object-fit: contain; display: flex;
    align-items: center; justify-content: center; background: var(--ne-brand-soft); color: var(--ne-brand); font-weight: 900; font-size: .9rem; }
.vacancy-mini { width: 240px; padding: .9rem 1rem; }
.vacancy-mini .org { color: var(--ne-brand); font-weight: 700; font-size: .78rem; }
.vacancy-mini .title { font-weight: 700; line-height: 1.25; min-height: 2.5em; }
.days-left { font-weight: 800; color: var(--ne-green); }
.days-left.urgent { color: var(--ne-accent); }

.notice-panel { background: #EEF0FF; border: 0; border-radius: 18px; padding: 1rem 1.25rem; }
.notice-panel h2 { color: var(--ne-brand); font-weight: 900; font-size: 1.25rem; margin: 0; }
.notice-panel ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.notice-panel li { position: relative; padding: .3rem 0 .3rem 1.1rem; }
.notice-panel li::before { content: ""; position: absolute; left: 0; top: .8rem; width: 7px; height: 7px; border-radius: 50%; background: var(--ne-accent); }
.notice-panel a { color: inherit; text-decoration: none; font-weight: 500; }
.notice-panel a:hover { color: var(--ne-brand); }

.material { width: 140px; padding: 1rem .5rem; text-align: center; font-size: .85rem; font-weight: 600; }
.material i { display: block; font-size: 1.7rem; margin-bottom: .45rem; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem;
    font-weight: 600; background: var(--ne-brand-soft); color: var(--ne-brand); text-decoration: none; border: 1px solid transparent; }
a.chip:hover { border-color: var(--ne-brand); }
.chip-muted { background: #F1F5F9; color: #475569; }

.filter-pills { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-pills a { padding: .35rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--ne-border);
    color: #334155; font-weight: 600; font-size: .88rem; text-decoration: none; }
.filter-pills a.active { background: var(--ne-brand); border-color: var(--ne-brand); color: #fff; }

.empty-state { text-align: center; color: var(--ne-muted); padding: 2.5rem 1rem; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: #0F1B3D; color: #CBD5E1; padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
.site-footer a { color: #E2E8F0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; font-size: .9rem; }
.site-footer .brand .name { color: #fff; }
.site-footer .brand .name span { color: #93C5FD; }

/* ------------------------------------------------------------------ status colours */
.vacancy-open { background: #DCFCE7; color: #166534; }
.vacancy-double_fee { background: #FFEDD5; color: #9A3412; }
.vacancy-upcoming { background: #DBEAFE; color: #1E40AF; }
.vacancy-closed, .vacancy-finished { background: #F1F5F9; color: #475569; }
.notice-vacancy { background: #FEE2E2; color: #991B1B; }
.notice-admission { background: #DCFCE7; color: #166534; }
.notice-schedule { background: #DBEAFE; color: #1E40AF; }
.notice-result { background: #FEF3C7; color: #92400E; }
.notice-syllabus { background: #EDE9FE; color: #5B21B6; }
.notice-general { background: #F1F5F9; color: #334155; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
