/* ====================================================
   MDU Rohtak - Responsive Clone Stylesheet
   Breakpoints: mobile <600, tablet 600-1024, desktop >1024
   iOS-safe: safe-area insets, -webkit tap, no zoom on input
==================================================== */
:root {
  --blue: #002147;
  --blue-dark: #001530;
  --blue-light: #008BE7;
  --red: #c0392b;
  --red-dark: #9c2c20;
  --gold: #f5b301;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #262626;
  --muted: #5b6577;
  --border: #eaeaea;
  --shadow: 0 4px 18px rgba(0, 33, 71, .08);
  --shadow-lg: 0 10px 40px rgba(0, 33, 71, .16);
  --radius: 14px;
  --maxw: 1240px;
  --fs: 16px;
  --header-h: 0px;
}

[data-theme="dark"] {
  --blue: #3A76D8;
  --blue-dark: #0a1830;
  --blue-light: #008BE7;
  --bg: #0c1322;
  --surface: #131c2e;
  --text: #e7ecf5;
  --muted: #9aa6bd;
  --border: #25304a;
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--fs); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; line-height: 1.25; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ TOP UTILITY BAR ============ */
.topbar {
  background: var(--blue-dark);
  color: #dce6ff;
  font-size: .8rem;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.topbar-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.topbar-links a { opacity: .9; transition: opacity .2s; white-space: nowrap; }
.topbar-links a:hover { opacity: 1; color: var(--gold); }
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.text-size { display: flex; gap: 2px; }
.text-size button {
  background: rgba(255,255,255,.12); color: #fff; width: 26px; height: 24px; border-radius: 5px; font-size: .72rem;
}
.text-size button:hover { background: var(--blue-light); }
.theme-toggle { background: rgba(255,255,255,.12); width: 30px; height: 26px; border-radius: 6px; color: #fff; }
.theme-toggle:hover { background: var(--gold); color: #222; }
.signin-btn { background: var(--red); color: #fff; padding: 5px 12px; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.signin-btn:hover { background: var(--red-dark); }

/* ============ HEADER ============ */
.site-header { background: var(--surface); border-bottom: 3px solid var(--blue); transition: background .3s; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.logo {
  width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--blue-light), var(--blue-dark));
  color: #fff; font-family: 'Poppins'; font-weight: 800; font-size: 1.5rem;
  display: grid; place-items: center; box-shadow: var(--shadow); border: 3px solid var(--gold);
}
.logo-img { width: 76px; height: auto; flex: 0 0 76px; object-fit: contain; }
.brand-text h1 { font-size: clamp(1.1rem, 2.6vw, 1.7rem); color: var(--blue); letter-spacing: .3px; }
.brand-sub { color: var(--muted); font-size: .9rem; }
.brand-act { color: var(--muted); font-size: .76rem; font-style: italic; margin-top: 1px; }
.brand-accred { color: var(--red); font-size: .82rem; font-weight: 600; margin-top: 2px; }
.brand-accred i { color: var(--gold); }
.header-greet { text-align: right; display: flex; flex-direction: column; gap: 3px; font-size: .85rem; color: var(--muted); }
#greeting { font-weight: 700; color: var(--blue); font-size: 1rem; }
.rank-badge { background: linear-gradient(90deg, var(--gold), #ffd351); color: #5a3d00; font-weight: 700; padding: 4px 10px; border-radius: 20px; font-size: .72rem; }
.header-badges { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 2px; }
.hbadge { font-size: .68rem; font-weight: 700; padding: 4px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.hbadge.naac { background: rgba(192,57,43,.12); color: var(--red); border: 1px solid rgba(192,57,43,.3); }
.hbadge.estd { background: rgba(11,61,145,.1); color: var(--blue); border: 1px solid rgba(11,61,145,.25); }

/* ============ STATISTICS COUNTERS ============ */
.stats-strip { background: linear-gradient(120deg, var(--blue-dark), var(--blue) 55%, var(--blue-light)); color: #fff; margin: 24px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 30px 18px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 15%; height: 70%; width: 1px; background: rgba(255,255,255,.2); }
.stat i { font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; display: block; }
.stat .num { font-family: 'Poppins'; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; display: block; line-height: 1.1; }
.stat small { font-size: .82rem; opacity: .9; }

/* ============ VICE-CHANCELLOR'S MESSAGE ============ */
.vc-section { margin: 24px 0; }
.vc-grid { display: grid; grid-template-columns: 240px 1fr; gap: 26px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; align-items: center; transition: background .3s; }
.vc-photo { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vc-avatar { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--blue-light), var(--blue-dark)); color: #fff; display: grid; place-items: center; font-size: 3.6rem; border: 4px solid var(--gold); box-shadow: var(--shadow); }
.vc-name { font-family: 'Poppins'; font-weight: 700; color: var(--blue); margin-top: 8px; }
.vc-role { font-size: .78rem; color: var(--muted); }
.vc-text p { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.vc-readmore { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-weight: 600; font-size: .88rem; }
.vc-readmore:hover { gap: 12px; }

/* ============ NAVIGATION ============ */
.main-nav { background: var(--blue); position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; }
.nav-logo-mini { display: none; color: #fff; font-family: 'Poppins'; font-weight: 800; padding: 12px 0; }
.nav-toggle { display: none; color: #fff; font-size: 1.4rem; padding: 12px; margin-left: auto; }
.nav-menu { list-style: none; display: flex; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block; color: #eaf0ff; padding: 14px 16px; font-weight: 500; font-size: .92rem; transition: background .2s;
}
.nav-menu > li > a:hover, .nav-menu > li > a.active { background: var(--blue-dark); color: #fff; }
.nav-menu .has-sub > a i { font-size: .7rem; margin-left: 4px; transition: transform .2s; }
.sub-menu {
  list-style: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: var(--surface); box-shadow: var(--shadow-lg); border-radius: 0 0 10px 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .22s; z-index: 210; overflow: hidden;
}
.nav-menu .has-sub:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .has-sub:hover > a i { transform: rotate(180deg); }
.sub-menu li a { display: block; padding: 11px 16px; color: var(--text); font-size: .88rem; border-bottom: 1px solid var(--border); }
.sub-menu li a:hover { background: var(--blue); color: #fff; padding-left: 22px; }
.sub-menu li:last-child a { border-bottom: none; }

/* ============ HERO CAROUSEL ============ */
.hero { padding: 18px 0 0; }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.slides { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.slide {
  flex: 0 0 100%; min-height: 380px; position: relative; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.slide-1 { background: linear-gradient(135deg, #002147, #008BE7 75%, #3A76D8); }
.slide-2 { background: linear-gradient(135deg, #001530, #002147 55%, #008BE7); }
.slide-3 { background: linear-gradient(135deg, #003a6b, #008BE7); }
.slide-4 { background: linear-gradient(135deg, #002147, #3A76D8); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 60%); }
.slide-caption { position: relative; z-index: 2; color: #fff; padding: 28px 32px; max-width: 640px; }
.slide-caption h2 { font-size: clamp(1.4rem, 3.5vw, 2.4rem); margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.slide-caption p { font-size: clamp(.9rem, 2vw, 1.05rem); opacity: .95; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--blue);
  display: grid; place-items: center; box-shadow: var(--shadow); transition: background .2s;
}
.car-btn:hover { background: #fff; }
.car-btn.prev { left: 14px; } .car-btn.next { right: 14px; }
.dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.dots button { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .2s; }
.dots button.active { background: var(--gold); width: 28px; border-radius: 6px; }

/* ============ NEWS TICKER ============ */
.ticker-wrap { margin: 16px 0; }
.ticker-inner { display: flex; align-items: stretch; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.ticker-label { background: var(--red); color: #fff; padding: 12px 16px; font-weight: 600; font-size: .85rem; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ticker { flex: 1; overflow: hidden; position: relative; }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; padding: 12px 0; width: max-content; animation: scroll-left 28s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { color: var(--text); font-size: .88rem; }
.ticker-track a::before { content: "\f0a4"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--blue); margin-right: 6px; }
.ticker-track a:hover { color: var(--red); }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ LAYOUT GRID ============ */
.layout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding-bottom: 40px; }
.col-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.col-side { display: flex; flex-direction: column; gap: 22px; }

.block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; transition: background .3s; }
.block-title {
  font-size: 1.1rem; color: var(--blue); margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 9px;
}
.block-title i { color: var(--red); }

/* PORTALS */
.portal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.portal-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border: 1px solid var(--border); border-radius: 12px; text-align: center; font-size: .8rem; font-weight: 500;
  transition: all .2s; background: var(--surface);
}
.portal-card i { font-size: 1.6rem; color: var(--blue); transition: transform .2s; }
.portal-card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-3px); }
.portal-card:hover i { transform: scale(1.15); color: var(--red); }

/* ============ RESULTS PDF PANEL ============ */
/* Roll number lookup */
.roll-lookup {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 12px; padding: 16px; margin-bottom: 16px; color: #fff;
}
.roll-lookup label { font-family: 'Poppins'; font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.roll-hint { font-size: .8rem; opacity: .9; margin: 4px 0 12px; }
.roll-row { display: flex; gap: 8px; }
.roll-row input {
  flex: 1; min-width: 0; padding: 11px 14px; border: none; border-radius: 9px;
  font-size: 16px; outline: none; color: var(--text); background: #fff;
}
.roll-row button {
  flex: 0 0 auto; background: var(--red); color: #fff; padding: 11px 16px; border-radius: 9px;
  font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: 6px; transition: background .2s; white-space: nowrap;
}
.roll-row button:hover { background: var(--red-dark); }
.roll-row button:disabled { opacity: .7; cursor: not-allowed; }
.roll-msg { font-size: .82rem; margin-top: 10px; min-height: 18px; font-weight: 500; }
.roll-msg.ok { color: #c8ffdf; }
.roll-msg.err { color: #ffd2cc; }
.roll-msg.info { color: #e7eeff; }
.roll-full { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .8rem; font-weight: 600; color: #fff; border-bottom: 1px dashed rgba(255,255,255,.6); }
.roll-full:hover { color: var(--gold); border-color: var(--gold); }
.recent-head { margin-bottom: 10px; }
.recent-head h4 { font-size: .92rem; color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 600; }
.recent-head h4 i { color: var(--blue); }

.results-panel { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 16px; }
.results-list { display: flex; flex-direction: column; min-width: 0; }
.results-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.search-box input {
  width: 100%; padding: 10px 12px 10px 34px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 16px; /* 16px prevents iOS zoom */ outline: none;
}
.search-box input:focus { border-color: var(--blue); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: var(--bg); border: 1px solid var(--border); font-size: .8rem; font-weight: 500; transition: all .2s; }
.chip.active, .chip:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.result-items { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.result-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .18s; background: var(--surface);
}
.result-item:hover { border-color: var(--blue); background: var(--bg); }
.result-item.active { border-color: var(--red); background: rgba(192,57,43,.06); box-shadow: var(--shadow); }
.result-item .ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; background: rgba(192,57,43,.12); color: var(--red); display: grid; place-items: center; font-size: 1.1rem; }
.result-item .meta { min-width: 0; flex: 1; }
.result-item .meta strong { display: block; font-size: .9rem; font-weight: 600; }
.result-item .meta span { font-size: .76rem; color: var(--muted); }
.result-item .tag { font-size: .65rem; font-weight: 700; padding: 3px 8px; border-radius: 12px; text-transform: uppercase; }
.tag.ug { background: rgba(11,61,145,.12); color: var(--blue); }
.tag.pg { background: rgba(10,125,99,.14); color: #0a7d63; }
.tag.reappear { background: rgba(245,179,1,.2); color: #8a6500; }

/* PDF VIEWER */
.pdf-viewer { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); min-height: 520px; }
.pdf-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--blue); color: #fff; }
#pdf-title { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.pdf-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-size: .85rem; transition: background .2s; }
.pdf-btn:hover { background: rgba(255,255,255,.35); }
.pdf-close-mobile { display: none; }
.pdf-frame-wrap { flex: 1; position: relative; }
#pdf-frame { width: 100%; height: 100%; border: none; min-height: 480px; display: none; background: #fff; }
.pdf-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; padding: 20px; }
.pdf-empty i { font-size: 3rem; color: var(--border); }

/* ABOUT */
.about-text { color: var(--muted); font-size: .92rem; }

/* NOTICES */
.notice-list { list-style: none; display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.notice-list li { padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--bg); border-radius: 0 8px 8px 0; }
.notice-list a { font-size: .85rem; font-weight: 500; }
.notice-list a:hover { color: var(--red); }
.notice-list .date { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.notice-list .new { background: var(--red); color: #fff; font-size: .58rem; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-left: 6px; vertical-align: middle; }

/* QUICK LINKS */
.quick-list { list-style: none; display: flex; flex-direction: column; }
.quick-list li a { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px dashed var(--border); font-size: .88rem; transition: padding .2s; }
.quick-list li a i { color: var(--red); font-size: .8rem; }
.quick-list li a:hover { padding-left: 10px; color: var(--blue); }
.quick-list li:last-child a { border-bottom: none; }

/* ============ FOOTER ============ */
.site-footer { background: #0a0a0a; color: #d8d8d8; margin-top: 0; }
.footer-social { display: flex; justify-content: center; gap: 14px; padding: 22px 0 6px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; font-size: 1rem; transition: all .2s;
}
.footer-social a:hover { background: var(--blue-light); transform: translateY(-2px); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; padding: 30px 18px 44px; }
.footer-col h4 {
  color: #fff; margin-bottom: 18px; font-size: 1.35rem; font-weight: 700;
  font-family: 'Roboto Slab', Georgia, serif; position: relative; padding-left: 12px;
}
.footer-col h4::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: #fff; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 13px; }
.footer-col ul a {
  font-size: .98rem; color: #e6e6e6; opacity: .92; transition: all .2s;
  display: inline-flex; align-items: flex-start; gap: 8px; line-height: 1.4;
}
.footer-col ul li a::before { content: "\f101"; font-family: FontAwesome; color: #fff; font-size: .85rem; margin-top: 2px; }
.footer-col ul a:hover { color: var(--blue-light); }
.footer-bottom { background: #f4f6f8; color: #444; padding: 14px 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.footer-bottom-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: .85rem; }
.footer-bottom a { color: var(--red); font-weight: 700; }

/* BACK TO TOP */
.to-top { position: fixed; bottom: 20px; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; box-shadow: var(--shadow-lg); z-index: 150; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--red-dark); }

/* ============ TABLET (<=1024) ============ */
@media (max-width: 1024px) {
  .layout-grid { grid-template-columns: 1fr; }
  .col-side { flex-direction: row; flex-wrap: wrap; }
  .col-side .block { flex: 1 1 300px; }
  .results-panel { grid-template-columns: 1fr; }
  .pdf-viewer { min-height: 480px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Mobile nav */
  .nav-inner { flex-wrap: wrap; }
  .nav-logo-mini { display: block; margin-right: auto; }
  .nav-toggle { display: block; }
  .nav-menu {
    flex-basis: 100%; flex-direction: column; display: none; max-height: 70vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 10px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 13px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav-menu .has-sub > a i { float: right; }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    max-height: 0; overflow: hidden; transition: max-height .3s; border-radius: 0; background: var(--blue-dark);
  }
  .nav-menu .has-sub.open > .sub-menu { max-height: 600px; }
  .nav-menu .has-sub:hover > .sub-menu { /* disable hover-open on touch */ max-height: 0; }
  .nav-menu .has-sub.open:hover > .sub-menu { max-height: 600px; }
  .sub-menu li a { color: #dce6ff; border-bottom-color: rgba(255,255,255,.08); }
  .sub-menu li a:hover { background: var(--blue); }
}

/* ============ MOBILE (<=600) ============ */
@media (max-width: 600px) {
  .topbar-links { display: none; }
  .topbar-inner { justify-content: flex-end; min-height: 40px; }
  .header-inner { justify-content: center; text-align: center; }
  .brand { flex-direction: column; text-align: center; }
  .header-greet { text-align: center; align-items: center; width: 100%; }
  .slide { min-height: 240px; }
  .slide-caption { padding: 18px; }
  .car-btn { width: 36px; height: 36px; }
  .ticker-label { padding: 12px 12px; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .col-side { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 30px 18px; }
  .block { padding: 16px; }

  /* PDF viewer becomes full-screen overlay on mobile when active */
  .pdf-viewer { display: none; }
  .pdf-viewer.mobile-active {
    display: flex; position: fixed; inset: 0; z-index: 500; border-radius: 0; min-height: 100vh;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  }
  .pdf-close-mobile { display: grid; }
  #pdf-frame { min-height: 0; }
}

/* iOS-specific tweaks */
@supports (-webkit-touch-callout: none) {
  #pdf-frame { -webkit-overflow-scrolling: touch; }
}

/* Stats + VC responsive */
@media (max-width: 768px) {
  .vc-grid { grid-template-columns: 1fr; text-align: center; }
  .vc-text .block-title { justify-content: center; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .stat:nth-child(2)::after { display: none; }
  .header-badges { justify-content: center; }
  .vc-avatar { width: 120px; height: 120px; font-size: 2.8rem; }
}

/* ===================== Section titles ===================== */
.sec-title {
  text-align: center;
  font-family: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: #8a8f99;
  margin: 6px 0 28px;
  letter-spacing: .3px;
}

/* ===================== About MDU ===================== */
.about-mdu { margin: 34px auto; }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.about-vc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.vc-img { width: 100%; display: block; object-fit: cover; }
.vc-caption { text-align: center; padding: 12px 10px; background: #f6f7f9; }
.vc-caption strong { display: block; font-size: 1.05rem; color: var(--text); }
.vc-caption span { display: block; font-size: .9rem; color: var(--muted); margin-top: 3px; }

.about-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid var(--blue-light); padding-bottom: 6px; }
.about-head h2 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.7rem; color: #555; font-weight: 700;
}
.about-readmore { color: var(--blue-light); font-size: .9rem; font-weight: 600; }
.about-body { display: grid; grid-template-columns: 220px 1fr; gap: 22px; margin-top: 18px; }
.about-badges { display: flex; flex-direction: column; gap: 14px; }
.about-badges img { width: 100%; max-width: 210px; border: 1px solid var(--border); border-radius: 4px; }

.tab-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab-btn {
  background: none; border: none; cursor: pointer;
  font-size: .95rem; color: var(--blue-light); padding: 6px 2px;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.tab-pane { display: none; animation: fadeIn .3s ease; }
.tab-pane.active { display: block; }
.tab-pane p { color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.vc-banner {
  background: linear-gradient(120deg, #7a0c1e, #9c1530);
  color: #fff; font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.4rem; font-weight: 700; padding: 22px 24px;
  border-radius: 6px; margin-bottom: 16px;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===================== Programmes Offered ===================== */
.prog-section { background: #fff; padding: 38px 0; border-top: 1px solid var(--border); }
.prog-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.prog-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth;
  padding: 8px 4px 16px; flex: 1; scroll-snap-type: x mandatory;
}
.prog-track::-webkit-scrollbar { height: 8px; }
.prog-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.prog-card {
  flex: 0 0 280px; scroll-snap-align: start;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.prog-thumb {
  position: relative; height: 170px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2f8, #dde6f2); color: var(--blue);
}
.prog-thumb i { font-size: 4.5rem; opacity: .85; }
.prog-badge {
  position: absolute; top: 14px; left: 14px;
  background: #1aaf8b; color: #fff; font-size: .8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 4px;
}
.prog-card h4 { font-size: 1rem; text-align: center; color: var(--text); padding: 16px 14px 10px; min-height: 64px; }
.prog-btn {
  display: block; margin: 0 auto 18px; background: #1aaf8b; color: #fff;
  padding: 9px 22px; border-radius: 4px; font-size: .82rem; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; width: max-content;
}
.prog-btn:hover { background: #148b6e; }
.prog-nav {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--blue);
  cursor: pointer; font-size: 1rem; box-shadow: var(--shadow);
}
.prog-nav:hover { background: var(--blue); color: #fff; }

/* ===================== News & Events ===================== */
.news-events { padding: 38px 0; background: #fafbfc; border-top: 1px solid var(--border); }
.ne-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.ne-col { position: relative; }
.ne-ribbon {
  position: relative; background: #3a76c4; color: #fff; text-align: center;
  font-family: 'Roboto Slab', Georgia, serif; font-size: 1.3rem; font-weight: 700;
  padding: 14px 10px; margin-bottom: 18px;
}
.ne-ribbon::before, .ne-ribbon::after {
  content: ""; position: absolute; top: 100%; border: 14px solid transparent;
  border-top-color: #28527f;
}
.ne-ribbon::before { left: 0; border-left-color: #28527f; }
.ne-ribbon::after { right: 0; border-right-color: #28527f; }
.ne-list { list-style: none; max-height: 360px; overflow-y: auto; padding-right: 6px; }
.ne-list li { padding: 12px 4px; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.ne-list a { color: var(--text); }
.ne-list a:hover { color: var(--blue-light); }
.ne-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ne-tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; color: #fff; }
.ne-tag.dept { background: #1d4bb8; }
.ne-tag.date { background: #1aaf3b; }
.ne-new { display: inline-block; background: var(--red); color: #fff; font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }

/* ===================== Social ===================== */
.social-section { padding: 38px 0; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.social-card {
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  box-shadow: var(--shadow); padding: 18px; min-height: 460px;
}
.social-head { color: var(--blue); font-size: 1.05rem; margin-bottom: 12px; font-weight: 600; }
.fb-frame { width: 100%; max-width: 100%; border: none; }
.social-actions { margin-top: 12px; }
.x-btn { display: inline-flex; align-items: center; gap: 8px; background: #111; color: #fff; padding: 8px 18px; border-radius: 20px; font-size: .85rem; font-weight: 600; }
.x-btn:hover { background: #000; }

/* ===================== Image Gallery ===================== */
.gallery-section { padding: 38px 0; background: #fafbfc; border-top: 1px solid var(--border); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.g-item { display: block; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.g-item:hover img { transform: scale(1.08); }

/* ===================== Alumni Speaks ===================== */
.alumni-section { padding: 38px 0; }
.alumni-title { text-align: left; font-size: 1.4rem; color: #444; margin-bottom: 22px; }
.alumni-list { display: flex; flex-direction: column; gap: 26px; }
.alumni-item { display: flex; gap: 20px; align-items: flex-start; margin: 0; }
.alumni-ava {
  flex: 0 0 92px; width: 92px; height: 110px; border-radius: 4px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.4rem;
}
.alumni-quote { position: relative; padding-left: 42px; }
.alumni-quote::before {
  content: "\201C"; position: absolute; left: 0; top: -10px;
  font-family: Georgia, serif; font-size: 4rem; color: var(--blue-light); line-height: 1;
}
.alumni-quote p { font-style: italic; color: #444; line-height: 1.7; font-size: .95rem; }
.alumni-quote cite { display: block; text-align: right; margin-top: 8px; color: var(--blue-light); font-weight: 600; font-style: normal; }

/* ===================== IT Technology Partners ===================== */
.partners-section { padding: 40px 0; background: #f3f7fb; border-top: 1px solid var(--border); }
.partners-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: center; }
.partner-item {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  height: 110px; display: flex; align-items: center; justify-content: center; padding: 14px;
}
.partner-item img { max-width: 100%; max-height: 70px; object-fit: contain; filter: grayscale(20%); transition: filter .3s; }
.partner-item:hover img { filter: none; }

/* ===================== New sections responsive ===================== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-vc { max-width: 340px; margin: 0 auto; }
  .about-body { grid-template-columns: 1fr; }
  .about-badges { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .about-badges img { width: auto; max-width: 140px; }
  .ne-grid, .social-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .sec-title { font-size: 1.5rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-card { flex-basis: 240px; }
  .alumni-item { flex-direction: column; align-items: center; text-align: center; }
  .alumni-quote { padding-left: 0; }
  .alumni-quote::before { position: static; display: block; }
  .alumni-quote cite { text-align: center; }
  .social-card { min-height: 0; }
  .vc-banner { font-size: 1.15rem; padding: 16px; }
}
