/* RMS Dholpur - main stylesheet */
:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --maroon: #8c1c13;
  --gold: #c9a227;
  --gold-soft: #f3e7bf;
  --ink: #1f2933;
  --muted: #5f6b7a;
  --bg: #faf8f3;
  --card: #ffffff;
  --line: #e4ded0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "Source Sans 3", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.65; }
h1, h2, h3, h4, h5 { font-family: "Cinzel", Georgia, serif; color: var(--navy); }
a { color: var(--maroon); }
a:hover { color: var(--navy); }
img { max-width: 100%; }

/* ---------- header (layout as on the RMS Chail site) ---------- */
.site-header { background: #feeede; border-bottom: 3px solid var(--gold); padding: 10px 0 8px; }
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.h-cbse { font-size: 14px; color: var(--navy); font-weight: 600; line-height: 1.5; }
.h-cbse b { color: var(--maroon); }
.h-logos { display: flex; align-items: center; gap: 12px; justify-content: center; }
.logo-rms { height: 84px; width: auto; }
.logo-crests { height: 84px; width: auto; }
.h-right { display: flex; justify-content: flex-end; }
.logo-75 { height: 96px; width: auto; }
.h-title { text-align: center; margin-top: 6px; }
.school-name { font-family: "Cinzel", Georgia, serif; font-weight: 700; color: var(--maroon); text-decoration: none; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(20px, 3.4vw, 34px); line-height: 1.15; display: inline-block; }
.school-name:hover { color: var(--navy); }
.h-title .gov { margin: 2px 0 0; color: var(--navy); font-weight: 600; font-size: clamp(13px, 1.6vw, 16px); }
@media (max-width: 991.98px) {
  .logo-rms, .logo-crests { height: 64px; } .logo-75 { height: 72px; }
}
@media (max-width: 767.98px) {
  .header-row { grid-template-columns: 1fr auto; grid-template-areas: "cbse cbse" "logos right"; row-gap: 6px; }
  .h-cbse { grid-area: cbse; text-align: center; font-size: 13px; }
  .h-logos { grid-area: logos; justify-content: flex-start; gap: 6px; min-width: 0; }
  .h-right { grid-area: right; }
  .logo-rms { height: 52px; } .logo-crests { height: auto; max-height: 52px; max-width: calc(100vw - 150px); } .logo-75 { height: 58px; }
}

.main-nav { background: var(--maroon); padding: 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.main-nav .navbar-brand { color: #fff; font-family: "Cinzel", serif; }
.main-nav .nav-link { color: #fff !important; font-weight: 600; font-size: 15px; padding: 14px 11px !important; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { background: rgba(0,0,0,.18); color: var(--gold) !important; }
/* sub-menus: solid white panel with dark text (overrides Bootstrap's dark navbar theme) */
.main-nav .dropdown-menu {
  --bs-dropdown-bg: #ffffff; --bs-dropdown-link-color: var(--navy);
  --bs-dropdown-link-hover-bg: var(--maroon); --bs-dropdown-link-hover-color: #ffffff;
  --bs-dropdown-link-active-bg: var(--navy); --bs-dropdown-link-active-color: #ffffff;
  background: #ffffff !important; border: 0; border-top: 3px solid var(--gold); border-radius: 0; padding: 0; min-width: 240px; box-shadow: 0 10px 24px rgba(0,0,0,.18); margin-top: 0;
}
.main-nav .dropdown-item { padding: 10px 18px; font-weight: 600; color: var(--navy) !important; background: #ffffff; border-bottom: 1px solid #ece6d8; }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item:focus { background: var(--maroon) !important; color: #ffffff !important; }
.main-nav .dropdown-item.active { background: var(--navy) !important; color: #ffffff !important; }
.main-nav .dropdown-item:last-child { border-bottom: 0; }
@media (min-width: 1200px) {
  .main-nav .dropdown:hover > .dropdown-menu { display: block; }
}
@media (max-width: 1199.98px) {
  .main-nav .navbar-collapse { padding-bottom: 10px; }
  .main-nav .dropdown-menu { box-shadow: none; margin-bottom: 6px; }
}

/* ---------- hero slider ---------- */
.slider-area { position: relative; }
.slider-wrapper { min-height: 560px; display: flex; align-items: center; background-size: cover; background-position: center; position: relative; }
.slider-wrapper::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,20,40,.85) 0%, rgba(8,20,40,.45) 60%, rgba(8,20,40,.15) 100%); }
.slider-wrapper .container { position: relative; z-index: 1; }
.slider-text { max-width: 720px; color: #fff; padding: 60px 0; }
.slider-text h1 { color: #fff; font-size: clamp(30px, 5vw, 54px); margin-bottom: 18px; }
.slider-text p { font-size: clamp(16px, 2vw, 19px); color: #e9eef5; }
.hero-slider .owl-item.active .slider-text { animation: rise .9s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.slider-wrapper { background-color: var(--navy); }
.hero-slider .owl-nav button.owl-prev, .hero-slider .owl-nav button.owl-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50% !important; background: rgba(0,0,0,.35) !important; color: #fff !important; font-size: 28px !important; margin: 0 !important; }
.hero-slider .owl-nav button.owl-prev { left: 14px; } .hero-slider .owl-nav button.owl-next { right: 14px; }
.hero-slider .owl-nav button:hover { background: var(--gold) !important; color: var(--navy) !important; }
@media (max-width: 767.98px) { .hero-slider .owl-nav { display: none; } }
.owl-theme .owl-dots .owl-dot span { background: rgba(255,255,255,.5); }
.owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { background: var(--gold); }

.btn-rms { background: var(--gold); color: var(--navy); font-weight: 700; border-radius: 2px; padding: 10px 26px; border: 2px solid var(--gold); }
.btn-rms:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.content-section .btn-rms:hover { color: var(--navy); background: var(--gold-soft); }
.btn-rms-outline { border: 2px solid var(--navy); color: var(--navy); font-weight: 700; border-radius: 2px; padding: 8px 24px; }
.btn-rms-outline:hover { background: var(--navy); color: #fff; }

/* ---------- notice tabs ---------- */
.campus-area { margin-top: -50px; position: relative; z-index: 5; }
.tab-wrapper { background: #fff; box-shadow: 0 12px 34px rgba(11,37,69,.15); border-top: 4px solid var(--gold); }
.campus-tab { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.campus-tab .nav-link { border: 0; background: none; padding: 16px 22px; border-bottom: 3px solid transparent; }
.campus-tab .nav-link h4 { margin: 0; font-size: 17px; color: var(--muted); }
.campus-tab .nav-link.active { border-bottom-color: var(--maroon); }
.campus-tab .nav-link.active h4 { color: var(--maroon); }
.campus-content { padding: 26px 30px; min-height: 170px; }
.campus-content .fa { color: var(--maroon); margin-right: 6px; }
.notice { color: #ff007f; text-align: center; font-weight: 700; }
.blink { animation: blink 1.4s linear infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }

/* ---------- activities ---------- */
.activities-area { background: var(--navy); padding: 80px 0; margin-top: 80px; }
.activity-slider { max-width: 960px; margin: 0 auto; }
.act-item { border: 6px solid #fff; background: #050f1f; }
.act-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; display: block; }
.activity-slider .owl-nav button.owl-prev, .activity-slider .owl-nav button.owl-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50% !important; background: rgba(255,255,255,.85) !important; color: var(--navy) !important; font-size: 26px !important; margin: 0 !important; }
.activity-slider .owl-nav button.owl-prev { left: -22px; } .activity-slider .owl-nav button.owl-next { right: -22px; }
@media (max-width: 1000px) { .activity-slider .owl-nav button.owl-prev { left: 8px; } .activity-slider .owl-nav button.owl-next { right: 8px; } }
.activity-slider .owl-dots { margin-top: 20px !important; }

/* ---------- sections ---------- */
.content-section { padding: 70px 0; }
.content-section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(26px, 3.4vw, 36px); position: relative; display: inline-block; padding-bottom: 14px; margin-bottom: 6px; }
.section-title h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 70px; height: 3px; background: var(--gold); transform: translateX(-50%); }
.section-sub { color: var(--muted); font-style: italic; margin: 0; }
.section-title.light h2 { color: #fff; }
.section-title.light .section-sub { color: #c6d2e1; }
.lead-p { font-size: 19px; color: #34404d; }
.prose p { text-align: justify; }
.prose h3, .sub-h { font-size: 22px; margin: 34px 0 16px; color: var(--maroon); }

.page-banner { background: linear-gradient(120deg, var(--navy), var(--navy-2)); padding: 54px 0 46px; color: #fff; border-bottom: 4px solid var(--gold); }
.page-banner h1 { color: #fff; font-size: clamp(26px, 4vw, 40px); margin-bottom: 8px; }
.page-banner .breadcrumb { margin: 0; }
.page-banner .breadcrumb-item, .page-banner .breadcrumb-item a { color: #c6d2e1; text-decoration: none; }
.page-banner .breadcrumb-item.active { color: var(--gold); }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: #7f93ab; }

.info-box { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--maroon); padding: 24px 26px; }
.info-box h5 { margin-bottom: 12px; }
.info-box h5 .fa { color: var(--gold); margin-right: 6px; }
.glance li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; }
.glance li b { color: var(--navy); }
.note-box { background: var(--gold-soft); border: 1px solid #e2cf8c; padding: 18px 22px; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "\f00c"; font-family: FontAwesome; position: absolute; left: 4px; top: 10px; color: var(--maroon); }

/* home stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: var(--navy); color: #fff; padding: 22px 18px; text-align: center; }
.stat b { display: block; font-family: "Cinzel", serif; color: var(--gold); font-size: 32px; }
.stat span { font-size: 14px; color: #d4dce7; }

/* campus life */
.courses-area { padding: 70px 0; background: #fff; }
.life-card { display: block; position: relative; overflow: hidden; text-decoration: none; }
.life-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s; display: block; }
.life-card:hover img { transform: scale(1.06); }
.life-card div { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; background: linear-gradient(transparent, rgba(8,20,40,.9)); }
.life-card h4 { color: #fff; margin: 0; }
.life-card span { color: var(--gold); font-weight: 600; font-size: 14px; }

.choose-area { background: linear-gradient(120deg, var(--maroon), #5e120c); padding: 70px 0; }
.choose-card { display: block; text-align: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); padding: 30px 14px; text-decoration: none; transition: background .3s; height: 100%; }
.choose-card:hover { background: rgba(255,255,255,.16); }
.choose-card .fa { font-size: 40px; color: var(--gold); }
.choose-card h5 { color: #fff; margin: 14px 0 6px; }
.choose-card span { color: #f0d9d6; font-size: 14px; }

/* philosophy */
.motto-card { text-align: center; background: var(--navy); color: #fff; padding: 46px 20px; border: 3px double var(--gold); }
.motto-card .sk { display: block; font-family: "Cinzel", serif; font-size: clamp(24px, 4vw, 40px); color: var(--gold); }
.motto-card .en { font-size: 20px; letter-spacing: .06em; }

/* history timeline */
.timeline { border-left: 3px solid var(--gold); padding-left: 22px; position: sticky; top: 90px; }
.tl { position: relative; padding-bottom: 18px; }
.tl::before { content: ""; position: absolute; left: -31px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--maroon); border: 3px solid var(--bg); }
.tl b { display: block; font-family: "Cinzel", serif; color: var(--navy); }
.tl span { color: var(--muted); font-size: 15px; }

/* org chart */
.org-chart { display: flex; flex-direction: column; align-items: center; }
.org-node { background: #fff; border: 2px solid var(--navy); padding: 14px 30px; text-align: center; min-width: 240px; }
.org-node.top { background: var(--navy); }
.org-node.top b, .org-node.top span { color: #fff; }
.org-node b { display: block; font-family: "Cinzel", serif; color: var(--navy); font-size: 18px; }
.org-node span { color: var(--muted); font-size: 14px; }
.org-line { width: 3px; height: 34px; background: var(--gold); }

/* houses */
.house-card { background: #fff; border: 1px solid var(--line); border-bottom: 4px solid var(--navy); text-align: center; padding: 30px 12px; }
.house-card .fa { font-size: 34px; color: var(--maroon); }
.house-card h4 { margin: 12px 0 0; font-size: 19px; }

/* principal */
.principal-photo { width: 240px; max-width: 100%; margin: 0 auto; border: 6px solid #fff; box-shadow: 0 10px 28px rgba(11,37,69,.2); outline: 2px solid var(--gold); }
.principal-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.message .section-title { text-align: left; }
.message .section-title h2::after { left: 0; transform: none; }
.signoff { font-family: "Cinzel", serif; font-size: 22px; color: var(--maroon); font-weight: 700; }

/* fees */
.fee-card { background: #fff; border: 1px solid var(--line); height: 100%; }
.fee-card h5 { background: var(--navy); color: #fff; margin: 0; padding: 16px; text-align: center; font-size: 18px; }
.fee-card ul { list-style: none; margin: 0; padding: 10px 20px; }
.fee-card li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.fee-card li:last-child { border: 0; }
.fee-card li b { color: var(--maroon); }

/* tables */
.rms-table { background: #fff; border: 1px solid var(--line); margin: 0; }
.rms-table thead th { background: var(--navy); color: #fff; font-weight: 600; border: 0; white-space: nowrap; }
.rms-table td { vertical-align: middle; }
.rms-table tbody tr:nth-child(even) td { background: #f7f4ec; }

/* staff tree (Chail style cards) */
.staff-tree { display: flex; flex-direction: column; align-items: center; }
.tree-level { width: 100%; position: relative; padding-top: 40px; text-align: center; }
.tree-level.root { padding-top: 0; }
.tree-level:not(.root)::before { content: ""; position: absolute; top: 0; left: 50%; width: 3px; height: 30px; background: var(--gold); transform: translateX(-50%); }
.tree-label { display: inline-block; background: var(--maroon); color: #fff; font-size: 16px; padding: 8px 22px; margin-bottom: 26px; letter-spacing: .05em; }
.tree-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.staff-card { width: 200px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 18px 14px 14px; transition: transform .25s, box-shadow .25s; }
.staff-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(11,37,69,.15); }
.root .staff-card { width: 240px; border-top-color: var(--gold); }
.staff-photo { width: 130px; height: 130px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden; border: 4px solid var(--gold-soft); }
.root .staff-photo { width: 160px; height: 160px; }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-card h5 { font-family: "Source Sans 3", sans-serif; font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.staff-card .desig { color: var(--maroon); font-weight: 600; font-size: 14px; margin: 0; }
.staff-card .qual { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
@media (max-width: 480px) { .staff-card { width: calc(50% - 12px); } .staff-photo { width: 96px; height: 96px; } .tree-row { gap: 12px; } }

/* results */
.result-card { background: var(--navy); color: #fff; padding: 28px; text-align: center; height: 100%; }
.result-card .yr { color: #c6d2e1; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.result-card b { display: block; font-family: "Cinzel", serif; color: var(--gold); font-size: 40px; margin: 6px 0; }
.result-card p { margin: 0; color: #e3e9f1; }

/* infra / achievements / trips */
.infra-card, .ach-card { background: #fff; border: 1px solid var(--line); padding: 26px 22px; height: 100%; transition: box-shadow .25s; }
.infra-card:hover, .ach-card:hover { box-shadow: 0 12px 28px rgba(11,37,69,.12); }
.infra-card .fa { font-size: 30px; color: var(--maroon); margin-bottom: 14px; }
.infra-card h5, .ach-card h5 { font-size: 18px; }
.infra-card p, .ach-card p { margin: 0; color: #46525f; font-size: 16px; }
.ach-card { border-left: 4px solid var(--gold); }
.ach-card .tag { display: inline-block; background: var(--maroon); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 10px; margin-bottom: 10px; }
.trip-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--maroon); padding: 20px; text-align: center; height: 100%; }
.trip-card span { display: block; color: var(--muted); font-size: 14px; }
.trip-card b { font-family: "Cinzel", serif; color: var(--navy); font-size: 18px; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 25%; display: block; transition: opacity .2s; }
.g-item:hover img { opacity: .85; }
.gallery-empty { border: 2px dashed var(--line); background: #fff; text-align: center; padding: 34px 16px; color: var(--muted); margin-top: 10px; }
.gallery-empty .fa { font-size: 34px; color: var(--gold); }
.gallery-empty p { margin: 10px 0 0; }

/* publications */
.pub-list { display: flex; flex-direction: column; gap: 10px; }
.pub-item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); padding: 14px 18px; text-decoration: none; color: var(--ink); }
.pub-item:hover { border-color: var(--maroon); }
.pub-item .fa { font-size: 24px; color: var(--maroon); }
.pub-item span { flex: 1; font-weight: 600; }
.pub-item em { color: var(--maroon); font-style: normal; font-weight: 700; }
.pdf-frame { border: 1px solid var(--line); background: #fff; }
.pdf-frame iframe { width: 100%; height: 80vh; border: 0; display: block; }

/* footer */
.site-footer { background: #07182e; color: #b9c5d4; padding: 56px 0 0; margin-top: 0; border-top: 4px solid var(--gold); }
.site-footer h5 { color: var(--gold); font-size: 18px; margin-bottom: 14px; }
.site-footer a { color: #d7e0ea; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer li { padding: 3px 0; }
.motto-f { color: var(--gold); font-style: italic; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding: 16px 0; text-align: center; font-size: 14px; }

@media (max-width: 767.98px) {
  body { font-size: 16px; }
  .slider-wrapper { min-height: 460px; }
  .content-section, .courses-area, .choose-area, .activities-area { padding: 50px 0; }
  .campus-area { margin-top: -30px; }
  .campus-content { padding: 20px 16px; }
  .campus-tab .nav-link { padding: 12px 12px; }
  .timeline { position: static; }
}

/* lightbox */
.g-item { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(5,12,24,.94); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; }
.lightbox button:hover { background: var(--gold); color: var(--navy); }
.lb-close { top: 12px; right: 14px; } .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); } .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c6d2e1; font-size: 14px; }
body.lb-lock { overflow: hidden; }
@media (max-width: 600px) { .lightbox { padding: 60px 8px; } }

/* newsletter covers */
.nl-card { display: block; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); height: 100%; transition: transform .25s, box-shadow .25s; }
.nl-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(11,37,69,.15); color: var(--ink); }
.nl-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #eef1f5; border-bottom: 3px solid var(--gold); }
.nl-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.nl-tag { position: absolute; top: 10px; left: 10px; background: var(--maroon); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; }
.nl-body { padding: 12px 14px 14px; }
.nl-body h5 { margin: 0; font-size: 17px; }
.nl-sub { margin: 2px 0 0; color: var(--maroon); font-weight: 600; font-size: 14px; }
.nl-meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* magazine sections */
.mag-card { display: block; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); height: 100%; transition: transform .25s, box-shadow .25s; }
.mag-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(11,37,69,.15); color: var(--ink); }
.mag-cover { position: relative; aspect-ratio: 1386 / 954; overflow: hidden; background: #eef1f5; border-bottom: 3px solid var(--gold); }
.mag-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mag-no { position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; }
.mag-body { padding: 14px 16px 16px; }
.mag-body h5 { margin: 0; font-size: 18px; }
.mag-open { display: inline-block; margin-top: 8px; color: var(--maroon); font-weight: 700; font-size: 14px; }
