:root {
  --navy: #0b2a4a;
  --navy-2: #12365c;
  --green: #0d6b4a;
  --green-2: #14835c;
  --gold: #c9a227;
  --gold-2: #e0bc4a;
  --saffron: #e67a22;
  --cream: #f6f1e4;
  --paper: #fffdf8;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #e6ddc8;
  --shadow: 0 18px 40px rgba(11, 42, 74, 0.12);
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans Bengali", "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* Top bar */
.topbar {
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #f3ead3;
  font-size: 13px;
}
.topbar .wrap {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: center; padding: 8px 0; flex-wrap: wrap;
}
.topbar span { opacity: .92; margin-right: 14px; white-space: nowrap; }
.topbar a { color: var(--gold-2); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,253,248,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand img {
  width: 64px; height: 64px; object-fit: contain;
  background: #fff; border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px #fff;
}
.brand h1 {
  font-family: "Tiro Bangla", "Noto Serif Bengali", serif;
  font-size: 22px; line-height: 1.2; color: var(--navy);
}
.brand h1 small {
  display: block; font-family: "DM Sans", sans-serif;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green); font-weight: 700;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--navy);
}
.nav a:hover, .nav a.active { background: #efe6cd; color: var(--green); }
.nav .cta {
  background: var(--green); color: #fff !important;
  padding: 9px 16px;
}
.nav-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang-btn {
  border: 2px solid var(--green); background: #fff; color: var(--green);
  font-weight: 800; font-size: 13px; letter-spacing: .04em;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; min-width: 48px;
}
.lang-btn:hover { background: var(--green); color: #fff; }
.menu-btn {
  display: none; border: 1px solid var(--line); background: #fff;
  padding: 8px 12px; border-radius: 10px; font-weight: 700;
}

/* Hero */
.hero {
  position: relative; min-height: 420px;
  display: grid; place-items: end start;
  color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #0b2a4a 0%, #0d6b4a 100%);
}
.hero::after { display: none; }
.hero-copy { position: relative; z-index: 1; padding: 70px 0; max-width: 760px; }
.kicker {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-weight: 800; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.hero h2 {
  font-family: "Tiro Bangla", serif;
  font-size: clamp(32px, 5vw, 54px); line-height: 1.2; margin-bottom: 10px;
}
.hero p { font-size: 17px; max-width: 640px; color: #f4ebd8; margin-bottom: 22px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--navy); font-weight: 800;
  padding: 12px 18px; border-radius: 12px;
}
.btn.ghost { background: transparent; color: #fff; border: 1.5px solid #fff; }

/* Cards / sections */
section { padding: 64px 0; }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h3 {
  font-family: "Tiro Bangla", serif; font-size: 32px; color: var(--navy);
}
.sec-head p { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card img { width: 100%; height: 210px; object-fit: cover; object-position: center 30%; }
.card.hm-home img.hm-photo,
.hm-photo {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center top;
  background: #e8f0ea;
  display: block;
}
.hm-video {
  width: 100%;
  max-width: 720px;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16/9;
}

.page-photo {
  width: 100%; height: 340px; object-fit: cover; object-position: center 30%;
  border-radius: 18px; background: #eee;
}
.photo-row {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px;
}
.photo-row img { width: 100%; height: 220px; object-fit: cover; object-position: center 28%; border-radius: 16px; }
.card .body { padding: 18px; }
.card h4 { color: var(--navy); margin-bottom: 6px; }
.stat-strip {
  background: linear-gradient(90deg, var(--green), var(--navy));
  color: #fff; padding: 28px 0;
}
.stat-strip .wrap { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; text-align: center; }
.stat-strip b { display: block; font-size: 28px; color: var(--gold-2); }
.info-box { background: var(--cream); border-radius: var(--radius); padding: 24px; }
.notice {
  border-left: 4px solid var(--gold);
  background: #fff; padding: 12px 14px; margin-bottom: 10px;
  border-radius: 0 12px 12px 0;
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.gallery-grid img {
  width: 100%; height: 180px; object-fit: cover; border-radius: 14px;
  cursor: pointer;
}
.faculty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.person {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.person strong { color: var(--navy); display: block; }
.person span { color: var(--muted); font-size: 13px; }
.hm-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center;
  background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hm-card img { width: 100%; height: 280px; object-fit: cover; object-position: top; }
.hm-card .txt { padding: 8px 22px 8px 0; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
th { background: var(--navy); color: #fff; }
tr:nth-child(even) { background: #faf6ec; }
.page-hero {
  background: linear-gradient(135deg, #0b2a4a 0%, #0d6b4a 100%);
  color: #fff; padding: 56px 0 40px;
}
.portrait {
  width: 220px; height: 260px; object-fit: cover; object-position: center top;
  border-radius: 16px; border: 3px solid var(--gold); background: #fff;
}
.page-hero h2 { font-family: "Tiro Bangla", serif; font-size: 38px; }
footer {
  background: var(--navy); color: #eadfc8; padding: 42px 0 18px;
}
footer h4 { color: var(--gold-2); margin-bottom: 10px; }
footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
footer a:hover { color: #fff; }
.copy { text-align: center; margin-top: 24px; padding-top: 14px; border-top: 1px solid #2a4666; font-size: 13px; color: #c9b98e; }
form { display: grid; gap: 12px; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); font: inherit; background: #fff;
}
button[type=submit], .submit {
  border: 0; cursor: pointer; background: var(--green); color: #fff;
  font-weight: 800; padding: 12px 18px; border-radius: 12px;
}
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.86);
  display: none; place-items: center; z-index: 80; padding: 24px;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 10px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .faculty-grid, .gallery-grid, .stat-strip .wrap, footer .wrap, .grid-2, .hm-card, .photo-row {
    grid-template-columns: 1fr;
  }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: block; }
  .nav-wrap { width: 100%; justify-content: flex-end; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .brand-row { flex-wrap: wrap; }
  .hero { min-height: 460px; }
}

/* Admin */
.admin-body { background: #eef3f0; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--navy); color: #eadfc8; padding: 22px 16px;
}
.admin-side h2 { font-size: 16px; color: var(--gold-2); margin-bottom: 18px; }
.admin-side a {
  display: block; padding: 10px 12px; border-radius: 10px; margin-bottom: 4px; font-weight: 600;
}
.admin-side a:hover, .admin-side a.active { background: #1a446e; color: #fff; }
.admin-main { padding: 24px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.login-card {
  max-width: 420px; margin: 10vh auto; background: #fff; padding: 28px;
  border-radius: 18px; box-shadow: var(--shadow);
}
.table-actions { display: flex; gap: 8px; }
.table-actions button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; background: #fff; }
.table-actions .danger { color: #b42318; }
.ok-msg { background: #e8f6ee; color: #0d6b4a; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
@media (max-width: 800px) {
  .admin-shell { grid-template-columns: 1fr; }
}

.ticker {
  background: var(--gold);
  color: var(--navy);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.ticker-label {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 14px;
  float: left;
}
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
  padding: 8px 0 8px 120px;
  font-weight: 700;
  font-size: 14px;
}
.ticker-track span { padding-right: 8px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.site-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 70;
  display: grid; gap: 8px;
}
.fab-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer; font-weight: 800;
  background: var(--navy); color: #fff;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab-btn.wa { background: #128c7e; }
.tools-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; align-items: center; }
.tools-row input { max-width: 320px; }

.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 16px; font: inherit; font-weight: 700; color: var(--navy);
}
.faq-item .ans { display: none; padding: 0 16px 14px; color: var(--muted); }
.faq-item.open .ans { display: block; }

.cal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cal-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cal-item b { display: block; color: var(--green); }

html.dark {
  --paper: #121820; --ink: #e8e4d8; --muted: #b3b8c2; --line: #2a3340;
  --cream: #1a2330; --shadow: 0 18px 40px rgba(0,0,0,.35);
}
html.dark body { background: var(--paper); color: var(--ink); }
html.dark .site-header { background: rgba(18,24,32,.94); }
html.dark .card, html.dark .person, html.dark .info-box, html.dark .faq-item, html.dark .cal-item, html.dark table { background: #1b2430; }
html.dark tr:nth-child(even) { background: #16202c; }
html.dark input, html.dark textarea, html.dark select { background: #1b2430; color: var(--ink); }

@media print {
  .topbar, .site-header, footer, .site-fab, .tools-row, .page-hero, .menu-btn { display: none !important; }
}

@media (max-width: 900px) {
  .cal-grid { grid-template-columns: 1fr; }
}
