:root {
  /* Core Traditional Institutional Palette (Sanskrit.nic.in style) */
  --brand-maroon: #800000;
  --header-bg: #4A0E0E;
  --accent-gold: #FFCC00;
  --accent-blue: #00AEEF;
  
  /* Text & Backgrounds */
  --bg-color: #FFFFFF;
  --bg-alt: #F8F9FA;
  --bg-dark: #2D2D2D;
  --text-dark: #333333;
  --text-light: #F2F2F2;
  --text-maroon: #800000;
  
  /* Borders and UI */
  --border-light: #E0E0E0;
  --border-dark: #CCCCCC;
  --shadow-flat: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  
  /* Dimensions & Typography */
  --container: min(1140px, 92vw);
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition-fast: 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Removed smooth scrolling for a more formal feel */
}

body {
  margin: 0;
  font-family: Arial, Helvetica, "Open Sans", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 15px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-maroon);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #5A0000;
  text-decoration: underline;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

/* Typography Overrides */
h1, h2, h3, h4, .font-serif {
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--brand-maroon);
  line-height: 1.2;
}

h1 { font-size: 2.2rem; }
h2 { border-bottom: 2px solid var(--accent-gold); padding-bottom: 8px; display: inline-block; font-size: 1.8rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.4rem; }

p, .body-copy {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Institutional Header */
.site-header {
  position: relative;
  z-index: 100;
  background-color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* TOP STRIP */
.top-strip {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.82rem;
  padding: 0;
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  gap: 10px;
}

.top-strip-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
}

.top-strip-left .helpdesk-icon {
  font-size: 1.1rem;
  color: var(--accent-gold);
}

.top-strip-left strong {
  color: #eee;
  font-size: 0.82rem;
}

.top-strip-left a,
.top-strip-right a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.top-strip-left a:hover,
.top-strip-right a:hover { color: #fff; }

.top-strip-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.info-for {
  color: #aaa;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

.top-strip-right a {
  padding: 0 8px;
  border-right: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
}
.top-strip-right a:last-child { border-right: none; }

/* MAIN NAV STRUCTURE: Split into brand row + nav bar */

/* Brand Row (white) */
.brand-row {
  background-color: #fff;
}

.brand-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 20px;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-dark);
  flex-shrink: 0;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  height: 65px;
  width: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-copy strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-maroon);
  line-height: 1;
}

.brand-copy span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Right controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-search-btn:hover {
  background-color: var(--brand-maroon);
  color: #fff;
  border-color: var(--brand-maroon);
  text-decoration: none;
}

/* NAV BAR (maroon strip, full-width) */
.nav-bar {
  background-color: var(--brand-maroon);
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-bar-inner::-webkit-scrollbar { display: none; }

.nav-item {
  color: #fff;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.12);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-item:first-child { border-left: 1px solid rgba(255,255,255,0.12); }

.nav-item:hover,
.nav-item.active {
  background-color: rgba(0,0,0,0.2);
  color: var(--accent-gold);
  text-decoration: none;
}

/* Google Translate Overrides */
.goog-te-gadget {
  font-family: inherit !important;
  font-size: 0.85rem !important;
  margin: 0 !important;
  padding: 0 !important;
}
.goog-te-gadget .goog-te-combo {
  background: #fff;
  color: var(--text-dark);
  border: 1.5px solid #ddd;
  padding: 5px 8px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.goog-te-gadget span {
  display: none !important;
}
.goog-logo-link {
  display: none !important;
}
body {
  top: 0 !important; 
}
.skiptranslate.goog-te-banner-frame {
  display: none !important;
}


/* Mobile Toggles */
.menu-toggle {
  display: none;
  background: var(--accent-gold);
  color: var(--brand-maroon);
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  background-color: var(--header-bg);
  border-top: 2px solid var(--accent-gold);
}

.mobile-panel.open {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  padding: 12px 20px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav a:hover { background-color: var(--brand-maroon); color: var(--accent-gold); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 24px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background-color: var(--brand-maroon);
  color: #ffffff;
  border-color: #600000;
}
.btn-primary:hover {
  background-color: #600000;
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--accent-gold);
  color: var(--text-dark);
  border-color: #DAA520;
}
.btn-secondary:hover {
  background-color: #DAA520;
  color: #000;
}

.btn-ghost {
  background-color: #fff;
  color: var(--brand-maroon);
  border-color: var(--brand-maroon);
}
.btn-ghost:hover {
  background-color: var(--bg-alt);
}

/* Hero */
.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  overflow: hidden;
}

.hero-bg {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: url("assets/hero.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-card-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
}

.hero-intro-card {
  color: #fff;
  padding: 34px;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(38, 16, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.home-content {
  position: relative;
  z-index: 2;
  background: transparent;
  box-shadow: 0 -18px 45px rgba(0, 0, 0, 0.18);
}

.home-content .section {
  background: var(--bg-color);
}

.home-content .section-alt {
  background: var(--bg-alt);
}

.hero-welcome {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.hero-intro-card h1 {
  font-size: 3.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 28px;
  border: none;
  padding: 0;
  text-shadow: 1px 2px 8px rgba(0,0,0,0.35);
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 28px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.btn-outline-white {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid rgba(255,255,255,0.85);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-outline-white:hover {
  background-color: #fff;
  color: var(--brand-maroon);
  text-decoration: none;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 24px;
  justify-content: center;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 150px;
}

.hero-stat strong {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.hero-stat span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.hero-copy {
  background-color: var(--bg-color);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-copy h1 { color: var(--text-dark); font-size: 2.4rem; margin-bottom: 1rem;}
.hero-copy p { font-size: 1.15rem; max-width: 800px; margin: 0 auto; color: var(--text-dark); }

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.hero-meta-item {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-light);
  padding: 20px 40px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.hero-meta-item strong {
  display: block;
  font-size: 2.2rem;
  color: var(--brand-maroon);
}

/* Sections and Grid */
.section {
  padding: 60px 0;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading p { color: #666; font-size: 1.05rem; }

.grid {
  display: grid;
  gap: 24px;
}
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

/* Flat Institutional Cards */
.card, .content-card, .admin-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-flat);
  transition: transform 0.2s;
}

.card:hover, .content-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--border-dark);
}

.content-card {
  padding: 30px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  text-align: center;
  background-color: var(--brand-maroon);
  color: #fff;
  padding: 30px;
  border-radius: var(--radius-sm);
  border-bottom: 4px solid var(--accent-gold);
}
.stat-card strong { font-size: 2.5rem; display: block; margin-bottom: 5px; }

.feature-card,
.values-grid .card,
.achievement-card,
.staff-card {
  padding: 24px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.section-action {
  margin-top: 28px;
  text-align: center;
}

.home-gallery {
  margin-top: 8px;
}

.staff-card {
  text-align: center;
}

.staff-card .portrait {
  width: 150px;
  height: 150px;
  margin: 0 auto 18px;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--border-light);
}

.staff-card .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Split Layouts */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.split.reverse { grid-template-columns: 1fr 1fr; }

.media-panel {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  padding: 5px;
  background-color: #fff;
}
.media-panel img { width: 100%; border-radius: 2px; }

/* Department Cards */
.dept-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  text-align: center; 
}
.dept-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 15px; border-radius: 2px;}
.dept-card .utility-links {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

/* Faculty / Directory Cards */
.faculty-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  align-items: center; /* Ensures center alignment of all flex children */
}
.faculty-card .portrait {
  width: 140px; /* Slightly larger portrait */
  height: 140px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-light);
}
.faculty-card .portrait img { width: 100%; height: 100%; object-fit: cover; }
.faculty-card h3 { color: var(--brand-maroon); margin-bottom: 5px; font-size: 1.2rem; border-bottom: none; }
.faculty-card .meta-pill { background: var(--bg-alt); color: #555; border: 1px solid var(--border-light); padding: 4px 10px; font-size: 0.8rem; border-radius: 20px; display: inline-block; margin-bottom: 5px;}
.faculty-card .utility-links { margin-top: auto; display: flex; justify-content: center; gap: 8px; }
.faculty-card .utility-links .btn { padding: 6px 12px; font-size: 0.85rem; }

/* Notice / Circular Lists */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.notice-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: center;
  border-left: 4px solid var(--brand-maroon);
}

.notice-date {
  text-align: center;
  background-color: var(--bg-alt);
  padding: 10px 20px;
  border: 1px solid var(--border-light);
  min-width: 100px;
}
.notice-date strong { display: block; font-size: 1.8rem; color: var(--brand-maroon); line-height: 1; }
.notice-date span { text-transform: uppercase; font-size: 0.85rem; font-weight: bold; color: #666; }

.notice-card h3 { border-bottom: none; font-size: 1.3rem; margin-bottom: 8px; }
.notice-card p { margin-bottom: 8px; color: #444; }

/* Timelines / Events */
.timeline {
  border-left: 2px solid var(--border-light);
  padding-left: 25px;
  margin-left: 10px;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 5px;
  width: 14px;
  height: 14px;
  background-color: var(--accent-gold);
  border: 2px solid var(--brand-maroon);
  border-radius: 50%;
}
.timeline-item h3 { border-bottom: none; font-size: 1.2rem; }

/* Subpage Hero */
.page-hero {
  background-color: var(--brand-maroon);
  color: #fff;
  padding: 40px 0;
  border-bottom: 4px solid var(--accent-gold);
}
.page-hero h1 { color: #fff; border-bottom: none; margin-bottom: 10px; }
.breadcrumbs { font-size: 0.9rem; color: #FFDAB9; }
.breadcrumbs a { color: #fff; }

/* Utilities */
.tag, .meta-pill {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #555;
  border-radius: 2px;
}

.utility-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* CTA Band */
.cta-band {
  background-color: var(--bg-dark);
  color: #fff;
  padding: 50px;
  text-align: center;
  border-top: 4px solid var(--accent-gold);
}
.cta-band h2 { color: #fff; border-bottom-color: var(--brand-maroon); }
.cta-band .eyebrow { color: var(--accent-gold); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; display: block; }

/* Forms & UI */
.search-bar, .filter-bar {
  background-color: var(--bg-alt);
  padding: 20px;
  border: 1px solid var(--border-light);
  display: flex;
  gap: 15px;
}

.search-inline { flex: 1; }

input, select, textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-maroon);
  box-shadow: 0 0 0 2px rgba(128,0,0,0.2);
}

.admin-form { display: grid; gap: 15px; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.gallery-card {
  padding: 5px;
  border: 1px solid var(--border-light);
  text-align: center;
  cursor: pointer;
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 10px;
}
.gallery-card h3 { border-bottom: none; font-size: 1rem; margin-bottom: 5px; }

.lightbox {
  position: fixed; inset: 0; background-color: rgba(0,0,0,0.85);
  z-index: 1000; display: none; justify-content: center; align-items: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border: 4px solid #fff; }

/* Admin Base Styles */
.admin-shell { display: flex; min-height: 100vh; background-color: var(--bg-alt); }
.admin-sidebar { width: 260px; background-color: var(--brand-maroon); color: #fff; padding: 20px 0; }
.admin-sidebar nav { display: flex; flex-direction: column; }
.admin-nav-btn {
  background: none; border: none; color: #fff; text-align: left; padding: 15px 25px;
  font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer;
}
.admin-nav-btn:hover, .admin-nav-btn.active { background-color: var(--header-bg); border-left: 4px solid var(--accent-gold); }
.admin-main { flex: 1; padding: 40px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid var(--border-light); padding-bottom: 20px;}
.admin-list-item { background: #fff; border: 1px solid var(--border-light); padding: 15px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;}

/* Footer */
.site-footer {
  background-color: var(--bg-dark);
  color: #fff;
  padding: 60px 0 20px;
  border-top: 4px solid var(--brand-maroon);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h3 { color: var(--accent-gold); border-bottom-color: #555; }
.footer-grid p { color: #ccc; font-size: 0.95rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #ccc; }
.footer-links a:hover { color: #fff; }
.footer-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}

/* Visibility classes */
.reveal { opacity: 0; transform: translateY(15px); transition: all 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive Adjustments */
@media (max-width: 1080px) {
  .nav-desktop,
  .nav-bar { display: none; }
  .menu-toggle { display: block; margin: 15px auto; }
  .header-actions { justify-content: center; }
  .split, .split.reverse, .admin-shell { flex-direction: column; }
  .grid.four, .grid.three { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { display: block; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .admin-sidebar nav { flex-direction: row; }
  .admin-nav-btn { white-space: nowrap; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); }
}

@media (max-width: 768px) {
  .section { padding: 40px 0; }
  .hero-bg { min-height: 100vh; }
  .hero-card-section {
    padding: 56px 0;
  }
  .hero-intro-card {
    padding: 24px 18px;
    max-width: 92vw;
  }
  .hero-intro-card h1 {
    font-size: 2.1rem;
  }
  .brand { flex-direction: column; gap: 10px; }
  .brand-copy strong { font-size: 1.6rem; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .notice-card { flex-direction: column; align-items: flex-start; }
  .notice-date { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 5px; }
  .notice-date strong { font-size: 1.4rem; }
  .hero-meta { flex-direction: column; }
}
