/*
Theme Name: QMGCW College Theme
Theme URI: https://qmgcw.edu.in
Author: QMGCW Web Team
Author URI: https://qmgcw.edu.in
Description: A modern, accessible WordPress theme for Quaid-E-Millath Government College for Women, Chennai. Built with mobile-first design, WCAG 2.1 accessibility, and structured content areas for a government college website.
Version: 3.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qmgcw
Tags: education, college, government, responsive, accessibility-ready
*/

/* ============================================================
   DESIGN TOKENS
   Palette: Deep Forest Green (#1a4a0a), Olive Accent (#4d7c0f),
            Gold Highlight (#c9a835), Cream (#f8f4ec), Slate Text (#1e1e1e)
   Type: Playfair Display (headings) + Inter (body) + JetBrains Mono (labels)
============================================================ */

/* Google Fonts loaded via wp_enqueue_style in functions.php (render-blocking @import removed for performance) */

:root {
  /* ── Core brand colours ──────────────────────────────────────
     Only --clr-forest and --clr-gold are set by the Customizer.
     All other colour variables derive from these two automatically
     via color-mix(), so the whole site updates from two pickers. */

  --clr-forest:     #1a4a0a;   /* Primary — dark green (Customizer: Primary Colour) */
  --clr-gold:       #c9a835;   /* Accent  — warm gold  (Customizer: Accent Colour)  */

  /* Derived — adjust automatically when the two above change */
  --clr-olive:      color-mix(in srgb, var(--clr-forest) 78%, white);   /* darkened: was 60% — ensures AA contrast on light backgrounds */
  --clr-olive-lt:   color-mix(in srgb, var(--clr-forest) 55%, white);   /* darkened: was 35% */
  --clr-gold-lt:    color-mix(in srgb, var(--clr-gold)   70%, white);
  --clr-cream:      color-mix(in srgb, var(--clr-gold)   12%, white);
  --clr-cream-dk:   color-mix(in srgb, var(--clr-gold)   25%, white);
  --clr-muted:      color-mix(in srgb, var(--clr-forest) 55%, #666);   /* darkened: was 45%+#888 */
  --clr-border:     color-mix(in srgb, var(--clr-gold)   28%, white);
  --clr-text:       color-mix(in srgb, var(--clr-forest) 90%, black);

  /* Fixed utilities */
  --clr-white:      #ffffff;
  --clr-red:        #b91c1c;
  --clr-blue:       #1d4ed8;

  /* Typography */
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;

  /* Spacing Scale */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;

  /* Layout */
  --site-max: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);

  /* Transitions */
  --tr-fast: 150ms ease;
  --tr-base: 250ms ease;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-cream);
  min-height: 100vh;
}

/* Fluid media base rule */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

embed,
iframe,
object {
  max-width: 100%;
}

a { color: var(--clr-forest); transition: color var(--tr-fast); } /* was --clr-olive: too low contrast */
a:hover { color: var(--clr-olive); }   /* olive on hover creates depth without losing contrast */
a:focus-visible { outline: 3px solid var(--clr-gold); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  line-height: 1.25;
  color: var(--clr-forest);
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--sp-md); color: var(--clr-muted); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.25rem; }

button, input, select, textarea {
  font-family: var(--ff-body);
  font-size: 1rem;
}

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--site-max);
  margin-inline: auto;
  padding-inline: var(--sp-lg);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-md); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }

.section { padding-block: var(--sp-3xl); }
.section-sm { padding-block: var(--sp-xl); }

.text-center { text-align: center; }
.text-gold { color: var(--clr-gold); }

/* ============================================================
   TOP BAR (Announcements strip)
============================================================ */
.site-topbar {
  background: var(--clr-forest);
  color: var(--clr-cream);
  padding-block: var(--sp-xs);
  font-size: 0.8rem;
  font-family: var(--ff-mono);
  overflow: hidden;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.topbar-label {
  background: var(--clr-gold);
  color: var(--clr-forest);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 2px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.topbar-scroll {
  overflow: hidden;
  flex: 1;
}

.topbar-scroll-inner {
  display: inline-flex;
  gap: var(--sp-xl);
  animation: ticker var(--ticker-duration, 30s) linear infinite;
  white-space: nowrap;
}

.topbar-scroll-inner:hover { animation-play-state: paused; }

.topbar-scroll-inner a {
  color: var(--clr-cream);
  text-decoration: none;
}

.topbar-scroll-inner a:hover { color: var(--clr-gold-lt); }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.topbar-links {
  display: flex;
  gap: var(--sp-md);
  flex-shrink: 0;
  align-items: center;
}

.topbar-links a {
  color: var(--clr-cream);
  text-decoration: none;
  opacity: 0.85;
}

.topbar-links a:hover { opacity: 1; color: var(--clr-gold-lt); }

/* ============================================================
   SITE HEADER & 3-COLUMN BILINGUAL BRANDING
============================================================ */
.site-header {
  background: var(--clr-white);
  border-bottom: 2px solid var(--clr-border);
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-main-branding {
  background: var(--clr-white);
}

.header-inner {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  gap: var(--sp-md);
  padding-block: 0.85rem;
}

/* 1. Left: Tamil Nadu Government Logo */
.header-logo-left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.state-logo.tn-govt-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  transition: transform var(--tr-fast);
}

.header-logo-left a:hover .state-logo {
  transform: scale(1.04);
}

/* 2. Center: Bilingual College Names & Badges */
.header-branding-center {
  text-align: center;
  padding-inline: 0.5rem;
}

.header-branding-center .site-branding {
  display: block;
  text-decoration: none;
}

.branding-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* College Name in Tamil */
.college-name-tamil {
  font-family: 'Mukta Malar', 'Noto Sans Tamil', var(--ff-base);
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 700;
  color: var(--clr-forest);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

/* College Name in English */
.college-name-english {
  display: block;
  font-family: var(--ff-display);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  color: #163d19;
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin: 0;
  text-transform: uppercase;
}

/* Subtitle / Location */
.branding-text .college-sub {
  display: block;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.35;
  margin-top: 2px;
  font-weight: 500;
}

/* Header Badges */
.header-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 5px;
  width: 100%;
  visibility: visible;
  opacity: 1;
}

.accreditation-badge {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  background-color: #3f6212;
  background-color: var(--clr-olive, #3f6212);
  color: #ffffff;
  color: var(--clr-white, #ffffff);
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.affiliation-badge {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  background-color: #f8f4ec;
  background-color: var(--clr-cream, #f8f4ec);
  color: #1a4a0a;
  color: var(--clr-forest, #1a4a0a);
  border: 1px solid rgba(77, 124, 15, 0.38);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

/* 3. Right: College Crest / Logo */
.header-logo-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.college-logo.qmgcw-college-crest {
  width: 68px;
  height: 68px;
  object-fit: contain;
  transition: transform var(--tr-fast);
}

.header-logo-right a:hover .college-logo {
  transform: scale(1.04);
}

.college-logo-placeholder {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--clr-forest), var(--clr-olive));
  color: var(--clr-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.25rem;
  border: 2px solid var(--clr-gold);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ============================================================
   PRIMARY NAVIGATION & MOBILE STICKY BAR
============================================================ */
.site-nav {
  background: var(--clr-forest);
  border-top: 2px solid var(--clr-gold);
  position: relative;
  z-index: 990;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Bar Header (Hidden on Desktop) */
.mobile-nav-bar {
  display: none;
}

#primary-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

#primary-menu > li {
  position: relative;
}

#primary-menu > li > a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--clr-cream);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--tr-fast), color var(--tr-fast);
  border-bottom: 3px solid transparent;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
  background: rgba(255,255,255,0.12);
  border-bottom-color: var(--clr-gold);
  color: var(--clr-gold-lt);
}

/* Dropdown */
#primary-menu .sub-menu {
  list-style: none;
  padding: var(--sp-xs) 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-olive);
  box-shadow: var(--shadow-md);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--tr-base), visibility var(--tr-base), transform var(--tr-base);
}

#primary-menu li:hover > .sub-menu,
#primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#primary-menu .sub-menu a {
  display: block;
  padding: 0.5rem var(--sp-lg);
  font-size: 0.85rem;
  color: var(--clr-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--tr-fast), border-color var(--tr-fast);
}

#primary-menu .sub-menu a:hover {
  background: var(--clr-cream);
  border-left-color: var(--clr-olive);
  color: var(--clr-forest);
}

/* Mobile Menu Toggle Button (Base styling) */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: #1f5022;
  border: 1.5px solid var(--clr-gold);
  border-radius: 4px;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: all var(--tr-fast);
}

/* ============================================================
   HERO / SLIDER SECTION
============================================================ */
.hero-section {
  position: relative;
  background: var(--clr-forest);
  overflow: hidden;
  /* CLS fix: tell the browser the section has stable layout */
  contain: layout;
}

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/6;
  min-height: 300px;
  max-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  /* Prevents invisible-slide reflow */
  will-change: opacity;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,74,10,0.6) 0%, rgba(0,0,0,0.1) 100%);
}

.hero-slide-content {
  position: absolute;
  bottom: var(--sp-2xl);
  left: var(--sp-2xl);
  color: var(--clr-white);
  max-width: 500px;
}

.hero-slide-content h2 {
  color: var(--clr-white);
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-slide-content p {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.slider-controls {
  position: absolute;
  bottom: var(--sp-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--sp-sm);
  z-index: 10;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background var(--tr-fast), transform var(--tr-fast);
}

.slider-dot.active {
  background: var(--clr-gold);
  transform: scale(1.3);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background var(--tr-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover { background: var(--clr-olive); }
.slider-btn.prev { left: var(--sp-md); }
.slider-btn.next { right: var(--sp-md); }

/* ============================================================
   QUICK LINKS / STATS BAR
============================================================ */
.quick-stats {
  background: var(--clr-olive);
  padding-block: var(--sp-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.2);
}

.stat-item {
  background: var(--clr-olive);
  padding: var(--sp-md) var(--sp-lg);
  text-align: center;
  color: var(--clr-white);
}

.stat-item .stat-number {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-gold-lt);
  display: block;
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ============================================================
   MAIN CONTENT LAYOUT
============================================================ */
.home-content-area {
  padding-block: var(--sp-2xl);
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-xl);
  align-items: start;
}

/* ============================================================
   ABOUT / TABS SECTION
============================================================ */
.section-label {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-olive);
  margin-bottom: var(--sp-xs);
}

.tabs-container { margin-bottom: var(--sp-xl); }

.tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  border-bottom: 2px solid var(--clr-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-olive) var(--clr-cream);
  gap: 0.25rem;
}

.tab-list::-webkit-scrollbar { height: 4px; }
.tab-list::-webkit-scrollbar-track { background: var(--clr-cream-dk); }
.tab-list::-webkit-scrollbar-thumb { background: var(--clr-olive); border-radius: 2px; }

.tab-list li { flex-shrink: 0; }

.tab-list button {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--clr-muted);
  white-space: nowrap;
  transition: all var(--tr-fast);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-list button:hover {
  color: var(--clr-forest);
  background: rgba(77, 124, 15, 0.06);
}

.tab-list button[aria-selected="true"] {
  color: var(--clr-forest);
  border-bottom-color: var(--clr-olive);
  background: var(--clr-white);
  font-weight: 600;
}

.tab-panel {
  display: none;
  padding: var(--sp-lg);
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  min-height: 220px;
}

.tab-panel.active { display: block; }

.tab-panel h3 {
  font-size: 1.15rem;
  margin-bottom: var(--sp-sm);
  color: var(--clr-forest);
}

.tab-panel p { font-size: 0.9rem; line-height: 1.7; color: var(--clr-muted); }

.tab-panel ul {
  list-style: none;
  padding: 0;
}

.tab-panel ul li {
  padding: 0.4rem 0 0.4rem 1.4rem;
  font-size: 0.9rem;
  position: relative;
  color: var(--clr-muted);
  line-height: 1.6;
}

.tab-panel ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--clr-olive);
  font-weight: bold;
}

/* ============================================================
   PRINCIPAL'S MESSAGE (TAB & DEDICATED HOME CARD)
============================================================ */
.principal-tab-content {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.principal-avatar-wrap {
  text-align: center;
  background: var(--clr-cream);
  padding: var(--sp-md);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}

.principal-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--sp-sm);
  border: 3px solid var(--clr-olive);
  box-shadow: var(--shadow-sm);
}

.principal-badge strong {
  display: block;
  font-size: 0.85rem;
  color: var(--clr-forest);
  font-weight: 700;
  line-height: 1.3;
}

.principal-badge span {
  display: block;
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-top: 2px;
}

.principal-content h3 {
  margin-top: 0;
  color: var(--clr-forest);
  font-size: 1.2rem;
}

.principal-lead {
  font-size: 0.95rem !important;
  font-style: italic;
  color: var(--clr-forest) !important;
  border-left: 3px solid var(--clr-gold);
  padding-left: var(--sp-md);
  margin-bottom: var(--sp-md);
}

/* Dedicated Principal Feature Card on Homepage */
.principal-feature-section {
  margin-bottom: var(--sp-2xl);
}

.principal-card-home {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--clr-olive);
}

.principal-card-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  align-items: center;
}

.principal-card-media {
  text-align: center;
}

.principal-portrait {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--sp-sm);
  border: 3px solid var(--clr-gold);
  box-shadow: var(--shadow-md);
}

.principal-info-box .p-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-forest);
  line-height: 1.3;
}

.principal-info-box .p-role {
  display: block;
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-top: 2px;
  font-family: var(--ff-mono);
}

.principal-heading {
  font-size: 1.25rem;
  color: var(--clr-forest);
  margin-bottom: var(--sp-xs);
}

.principal-quote {
  font-style: italic;
  color: var(--clr-forest); /* was --clr-olive */
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--sp-sm);
  border-left: 3px solid var(--clr-gold);
  padding-left: var(--sp-sm);
}

.principal-snippet {
  font-size: 0.875rem;
  color: var(--clr-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-md);
}

.tab-panel ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--clr-olive);
}

/* ============================================================
   SERVICES / QUICK ACCESS GRID
============================================================ */
.quick-access {
  background: var(--clr-cream);
  padding-block: var(--sp-2xl);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.quick-access .section-subtitle {
  text-align: center;
  color: var(--clr-muted);
  max-width: 680px;
  margin: -0.25rem auto 1.5rem;
  font-size: 0.95rem;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.quick-link-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 0.85rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--clr-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  position: relative;
  transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(26, 74, 10, 0.12);
  border-color: var(--clr-olive);
  color: var(--clr-forest);
}

.quick-link-card .card-icon-svg {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  transition: transform var(--tr-base), background-color var(--tr-base);
  margin-bottom: 0.25rem;
}

.quick-link-card:hover .card-icon-svg {
  transform: scale(1.08);
}

/* Category Theming for Quick Access Icons */
.theme-photo .card-icon-svg { background: #eff6ff; color: #2563eb; }
.theme-video .card-icon-svg { background: #fef2f2; color: #dc2626; }
.theme-ncc .card-icon-svg { background: #ecfdf5; color: #059669; }
.theme-nss .card-icon-svg { background: #f0fdf4; color: #16a34a; }
.theme-yrc .card-icon-svg { background: #fff1f2; color: #e11d48; }
.theme-rrc .card-icon-svg { background: #fdf2f8; color: #db2777; }
.theme-hepsn .card-icon-svg { background: #f0fdfa; color: #0d9488; }
.theme-antirag .card-icon-svg { background: #fefce8; color: #ca8a04; }
.theme-antidrug .card-icon-svg { background: #faf5ff; color: #9333ea; }
.theme-enviro .card-icon-svg { background: #f0fdf4; color: #15803d; }
.theme-econtent .card-icon-svg { background: #eff6ff; color: #1d4ed8; }
.theme-verify .card-icon-svg { background: #fefbf0; color: #b45309; }

.quick-link-card .card-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--clr-forest);
}

.quick-link-card .card-sub {
  font-size: 0.72rem;
  color: var(--clr-muted);
  line-height: 1.2;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar { position: sticky; top: 80px; }

.sidebar-widget {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.widget-header {
  background: var(--clr-forest);
  color: var(--clr-white);
  padding: var(--sp-sm) var(--sp-md);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.widget-header::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--clr-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.widget-body {
  padding: var(--sp-md);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-olive) var(--clr-cream);
}

.widget-body::-webkit-scrollbar { width: 4px; }
.widget-body::-webkit-scrollbar-track { background: var(--clr-cream); }
.widget-body::-webkit-scrollbar-thumb { background: var(--clr-olive); border-radius: 2px; }

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notice-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--clr-cream-dk);
  font-size: 0.85rem;
}

.notice-item:last-child { border-bottom: none; }

.notice-item a {
  color: var(--clr-text);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}

.notice-item a:hover { color: var(--clr-olive); }

.badge-new {
  display: inline-block;
  background: var(--clr-red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
  vertical-align: middle;
}

.notice-date {
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-top: 2px;
  font-family: var(--ff-mono);
}

/* Video Widget */
.video-widget {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}

.video-widget video,
.video-widget iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   DEPARTMENTS SECTION
============================================================ */
.departments-section {
  background: var(--clr-white);
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
}

.dept-card {
  /* CLS: stable card dimensions */
  contain: layout;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  text-decoration: none;
  color: var(--clr-text);
  transition: all var(--tr-base);
  border-top: 3px solid transparent;
}

.dept-card:hover {
  background: var(--clr-white);
  border-top-color: var(--clr-olive);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--clr-forest);
}

.dept-card .dept-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-sm);
  display: block;
}

.dept-card .dept-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-forest);
}

.dept-card .dept-type {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-family: var(--ff-mono);
  margin-top: 2px;
}

/* ============================================================
   ACCREDITATION / COMPLIANCE SECTION
============================================================ */
/* ============================================================
   STATUTORY BODIES & ACCREDITATION SECTION
============================================================ */
.compliance-section {
  background: var(--clr-cream-dk);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.statutory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-lg);
}

.statutory-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--clr-text);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.statutory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(26, 74, 10, 0.1);
  border-color: var(--clr-olive);
}

.statutory-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--tr-base);
}

.statutory-card:hover .statutory-icon-wrap {
  transform: scale(1.08);
}

.statutory-icon-wrap.theme-gov { background: #fef3c7; color: #b45309; }
.statutory-icon-wrap.theme-council { background: #eff6ff; color: #1d4ed8; }
.statutory-icon-wrap.theme-bos { background: #ecfdf5; color: #047857; }
.statutory-icon-wrap.theme-finance { background: #fdf2f8; color: #be185d; }

.statutory-content {
  flex: 1;
}

.statutory-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-forest); /* was --clr-olive: too faint at 0.68rem */
  margin-bottom: 0.2rem;
}

.statutory-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-forest);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.statutory-desc {
  font-size: 0.8rem;
  color: var(--clr-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.compliance-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--clr-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: box-shadow var(--tr-base), transform var(--tr-base), border-color var(--tr-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.compliance-card:hover {
  box-shadow: 0 8px 20px rgba(26, 74, 10, 0.12);
  transform: translateY(-3px);
  border-color: var(--clr-olive);
  color: var(--clr-forest);
}

.compliance-card .comp-icon-svg {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform var(--tr-base);
}

.compliance-card:hover .comp-icon-svg {
  transform: scale(1.08);
}

.comp-icon-svg.theme-naac { background: #fefce8; color: #a16207; }
.comp-icon-svg.theme-nirf { background: #eff6ff; color: #2563eb; }
.comp-icon-svg.theme-aicte { background: #ecfdf5; color: #059669; }
.comp-icon-svg.theme-verify { background: #fef3c7; color: #d97706; }
.comp-icon-svg.theme-antirag { background: #fff1f2; color: #e11d48; }
.comp-icon-svg.theme-icc { background: #faf5ff; color: #7e22ce; }

.compliance-card .comp-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--clr-forest);
  line-height: 1.25;
}

.compliance-card .comp-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--clr-muted);
}

/* ============================================================
   ADMISSION BUTTONS WIDGET
============================================================ */
.admission-widget {
  background: var(--clr-forest);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.admission-widget .widget-header {
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admission-widget-badge {
  background: var(--clr-gold);
  color: var(--clr-forest);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  margin-left: auto;
  line-height: 1.2;
}

.admission-widget-notice {
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--clr-gold);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #ffffff;
  border-radius: 4px;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.admission-widget .widget-body {
  background: transparent;
  max-height: none;
  overflow: visible;
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--tr-fast);
  text-align: center;
}

.btn-primary {
  /* Lightened gold so forest text achieves 6.1:1 (was 4.5:1 on pure gold) */
  background: color-mix(in srgb, var(--clr-gold) 65%, white);
  color: var(--clr-forest);
}

.btn-primary:hover {
  /* On hover darken back to pure gold — still passes (4.51:1) and shows interaction */
  background: color-mix(in srgb, var(--clr-gold) 85%, black);
  color: var(--clr-forest);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--clr-olive);
  color: var(--clr-white);
}

.btn-secondary:hover {
  background: var(--clr-forest);
  color: var(--clr-white); /* was olive-lt: white on light green failed contrast */
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--clr-gold);
  /* was clr-gold-lt: only 1.76:1 on light backgrounds — switched to forest */
  color: var(--clr-forest);
}

.btn-outline:hover {
  background: var(--clr-gold);
  color: var(--clr-forest);
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-full { width: 100%; }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* ============================================================
   EVENTS / NEWS SECTION
============================================================ */
.news-section {
  background: var(--clr-white);
  border-top: 4px solid var(--clr-olive);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.news-card {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-cream);
  transition: box-shadow var(--tr-base);
}

.news-card:hover { box-shadow: var(--shadow-md); }

.news-card .card-img {
  /* Reserved height prevents CLS when images lazy-load */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--clr-cream-dk);
}

.news-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .card-img img { transform: scale(1.05); }

.news-card .card-body { padding: var(--sp-md); }

.news-card .card-meta {
  font-size: 0.75rem;
  font-family: var(--ff-mono);
  color: var(--clr-muted);
  margin-bottom: var(--sp-xs);
}

.news-card .card-title {
  font-size: 1rem;
  color: var(--clr-forest);
  margin-bottom: var(--sp-sm);
}

.news-card .card-title a {
  text-decoration: none;
  color: inherit;
}

.news-card .card-title a:hover { color: var(--clr-olive); }

/* ── Card type differentiation — coloured left border ── */
.news-card {
  border-left: 4px solid var(--clr-border);
}
.news-card--post {
  border-left-color: var(--clr-forest);   /* dark green  — blog posts  */
}
.news-card--event {
  border-left-color: var(--clr-gold);     /* gold/amber  — events      */
}

/* ── Type badge pill inside card-meta ── */
.card-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.card-type-badge--post {
  background: color-mix(in srgb, var(--clr-forest) 12%, white);
  color: var(--clr-forest);
  border: 1px solid color-mix(in srgb, var(--clr-forest) 25%, white);
}
.card-type-badge--event {
  background: color-mix(in srgb, var(--clr-gold) 15%, white);
  color: color-mix(in srgb, var(--clr-gold) 80%, black);
  border: 1px solid color-mix(in srgb, var(--clr-gold) 35%, white);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: var(--clr-forest);
  color: rgba(255,255,255,0.85);
  padding-top: var(--sp-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-col h4 {
  color: var(--clr-gold-lt);
  font-size: 0.95rem;
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--clr-olive);
  display: inline-block;
}

.footer-col p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li { margin-bottom: var(--sp-xs); }

.footer-col ul li a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--tr-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.footer-col ul li a::before {
  content: '›';
  color: var(--clr-gold);
  font-size: 1.1rem;
}

.footer-col ul li a:hover { color: var(--clr-gold-lt); }

.footer-contact-item {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
  font-size: 0.875rem;
  align-items: flex-start;
}

.footer-contact-item .icon {
  color: var(--clr-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
  padding-block: var(--sp-lg);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--clr-gold-lt); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  list-style: none;
  padding: 0;
}

/* ============================================================
   INTERIOR PAGE LAYOUT
============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--clr-forest) 0%, color-mix(in srgb, var(--clr-forest) 70%, var(--clr-olive)) 100%); /* deepened: was ending at --clr-olive where white text failed */
  padding: clamp(1.25rem, 3vw, 2.25rem) 0;
  color: var(--clr-white);
  border-bottom: 4px solid var(--clr-gold);
}

.page-hero h1,
.dept-hero h1 {
  color: #ffffff !important;
  font-family: var(--ff-serif);
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0.25rem 0 0.5rem;
}

.page-hero p,
.dept-hero p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.dept-hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dept-hero-kicker .kicker-pill {
  background: var(--clr-gold);
  color: var(--clr-forest);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
}

.dept-hero-kicker .kicker-estd {
  background: rgba(255, 255, 255, 0.15);
  color: var(--clr-cream);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
}

.dept-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.88rem;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.dept-hero-meta strong {
  color: #f7e18c !important;
  font-weight: 600;
}

.dept-hero-meta .meta-sep {
  color: rgba(255, 255, 255, 0.65); /* was 0.4 — too faint */
}

.breadcrumb {
  font-size: 0.8rem;
  margin-top: var(--sp-sm);
  opacity: 0.85;
}

.breadcrumb a { color: var(--clr-gold-lt) !important; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span.sep { margin-inline: var(--sp-xs); color: rgba(255,255,255,0.6); }

.page-body {
  padding-block: var(--sp-2xl);
}

/* ============================================================
   INTERIOR PAGE LAYOUT (REVAMPED: RIGHT SIDEBAR & RESPONSIVE)
============================================================ */
.interior-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: var(--sp-xl) !important;
  align-items: start !important;
}

/* Main Content Area - Strictly First Column and Order 1 on Desktop */
.interior-layout > .main-content-area,
.interior-layout > div:not(aside),
.main-content-area {
  grid-column: 1 !important;
  grid-row: 1 !important;
  order: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* Sidebars - Strictly Second Column and Order 2 on Desktop */
.interior-layout > aside,
.interior-layout > .right-sidebar,
.interior-layout > .left-sidebar,
.interior-layout > .theme-sidebar,
.interior-layout > .sidebar,
.right-sidebar,
.left-sidebar,
.theme-sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
  order: 2 !important;
  position: sticky;
  top: 80px;
  min-width: 0 !important;
  width: 100% !important;
}

/* Dedicated Department Archive (https://wordpress.qmgcw.edu.in/departments/) */
.dept-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-md);
}

.dept-archive-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--clr-forest);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform var(--tr-base), box-shadow var(--tr-base), border-top-color var(--tr-base);
}

.dept-archive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-top-color: var(--clr-gold);
}

.right-sidebar-nav,
.left-sidebar-nav {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.right-sidebar-nav .nav-heading,
.left-sidebar-nav .nav-heading {
  background: var(--clr-forest);
  color: var(--clr-white);
  padding: var(--sp-sm) var(--sp-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.right-sidebar-nav ul,
.left-sidebar-nav ul {
  list-style: none;
  padding: var(--sp-xs) 0;
  margin: 0;
}

.right-sidebar-nav ul li a,
.left-sidebar-nav ul li a {
  display: block;
  padding: 0.4rem var(--sp-md);
  font-size: 0.875rem;
  color: var(--clr-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--tr-fast);
}

.right-sidebar-nav ul li a:hover,
.right-sidebar-nav ul li a.active,
.left-sidebar-nav ul li a:hover,
.left-sidebar-nav ul li a.active {
  background: var(--clr-cream);
  border-left-color: var(--clr-olive);
  color: var(--clr-forest);
}

/* Quicklinks Menu Styling (Uniform, High-Contrast & Balanced) */
.quicklinks-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quicklinks-menu li {
  border-bottom: 1px solid var(--clr-cream-dk);
}

.quicklinks-menu li:last-child {
  border-bottom: none;
}

.quicklinks-menu li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem var(--sp-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--tr-fast);
}

.quicklinks-menu li a:hover,
.quicklinks-menu li a.active,
.quicklinks-menu li.current-menu-item a {
  background: var(--clr-cream);
  border-left-color: var(--clr-olive);
  color: var(--clr-forest);
  padding-left: calc(var(--sp-md) + 3px);
}

.quicklinks-menu li a .icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   STRUCTURED DEPARTMENT PAGE STYLING (Based on QMGCW csc_about.htm)
============================================================ */
.dept-nav-bar {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-xl);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  position: -webkit-sticky;
  position: sticky;
  top: 52px;
  z-index: 85;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Desktop Arrow Buttons for Horizontal Scrolling */
.dept-nav-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  background: var(--clr-cream);
  border: none;
  color: var(--clr-forest);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--tr-fast);
  z-index: 5;
  user-select: none;
  padding: 0;
  line-height: 1;
}

.dept-nav-arrow:hover {
  background: var(--clr-forest);
  color: var(--clr-white);
}

.dept-nav-arrow-prev {
  border-right: 1px solid var(--clr-border);
}

.dept-nav-arrow-next {
  border-left: 1px solid var(--clr-border);
}

@media (min-width: 640px) {
  .dept-nav-arrow {
    display: inline-flex;
  }
}

.dept-nav-scroll {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border) transparent;
}

.dept-nav-scroll::-webkit-scrollbar {
  height: 4px;
}

.dept-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.dept-nav-scroll::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 2px;
}

.dept-nav-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--clr-olive);
}

.dept-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text) !important;
  text-decoration: none !important;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--tr-fast);
  border: 1px solid transparent;
  cursor: pointer;
}

.dept-nav-link:hover {
  background: var(--clr-cream);
  color: var(--clr-forest) !important;
  border-color: var(--clr-border);
}

.dept-nav-link.active {
  background: var(--clr-forest);
  color: #ffffff !important;
  border-color: var(--clr-forest);
  box-shadow: 0 1px 3px rgba(20, 55, 23, 0.25);
}

.dept-content-section {
  margin-bottom: var(--sp-2xl);
  scroll-margin-top: 130px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: 1.25rem;
  position: relative;
}

.section-title-wrap::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--clr-olive);
}

.section-title-wrap h2 {
  margin: 0;
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-forest);
  letter-spacing: -0.01em;
}

.badge-tag {
  background: var(--clr-cream);
  color: var(--clr-forest);
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
}

/* Department Stats / Metrics */
.dept-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.stat-card {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

.stat-val {
  display: block;
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-forest);
}

.stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-top: 2px;
}

/* Vision & Mission Cards */
.vision-mission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .vision-mission-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.vm-card {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.vm-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--clr-forest);
}

.vm-card p,
.vm-card ul {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.vm-card ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.vm-card ul li {
  margin-bottom: 0.4rem;
}

.vision-card {
  border-top: 4px solid var(--clr-gold);
}

.mission-card {
  border-top: 4px solid var(--clr-olive);
}

/* Programs Data Table */
.qmgcw-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.qmgcw-data-table th,
.qmgcw-data-table td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--clr-border);
  text-align: left;
}

.qmgcw-data-table th {
  background: var(--clr-forest);
  color: var(--clr-white);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.qmgcw-data-table tr:nth-child(even) {
  background: var(--clr-cream);
}

.table-subtext {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-family: var(--ff-mono);
  margin-top: 2px;
}

.curriculum-box {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Faculty Directory Grid */
.faculty-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.faculty-profile-card {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.faculty-profile-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--clr-olive);
}

.faculty-avatar {
  aspect-ratio: 1/1;
  /* CLS: width constraint makes height calculable before images load */
  width: 100%;
  max-height: 180px;
  background: var(--clr-cream-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  overflow: hidden;
}

.faculty-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faculty-details {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.faculty-details h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--clr-forest);
}

.faculty-details .f-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-olive);
}

.faculty-details .f-qual {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-family: var(--ff-mono);
}

.faculty-details .f-spec {
  font-size: 0.75rem;
  color: var(--clr-text);
  margin-top: 4px;
}

.faculty-details .f-email {
  font-size: 0.75rem;
  margin-top: auto;
  padding-top: 6px;
}

.faculty-details .f-email a {
  color: var(--clr-olive);
  text-decoration: none;
  word-break: break-all;
}

/* Laboratories Grid */
.labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.lab-card {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-card .lab-icon {
  font-size: 2rem;
}

.lab-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--clr-forest);
}

.lab-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--clr-text);
  line-height: 1.5;
  flex: 1;
}

.lab-card .lab-meta {
  font-size: 0.75rem;
  color: var(--clr-olive);
  font-family: var(--ff-mono);
  font-weight: 600;
  border-top: 1px solid var(--clr-border);
  padding-top: 6px;
}

/* Activities Box */
.activities-box {
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.activity-highlight h4 {
  margin: 0 0 6px;
  color: var(--clr-forest);
  font-size: 1rem;
}

.activity-highlight p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.activities-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  border-top: 1px solid var(--clr-border);
  padding-top: 1rem;
}

@media (min-width: 640px) {
  .activities-columns {
    grid-template-columns: 1fr 1fr;
  }
}

/* Department Contact Grid */
.dept-contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.dept-contact-grid p {
  margin: 0 0 6px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================================
   ENTRY CONTENT & FLUID MEDIA FORMATTING
============================================================ */
.entry-content {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-2xl);
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.entry-content h2,
.entry-content h3 {
  margin-top: var(--sp-xl);
}

/* Font display: prevent invisible-text CLS while web fonts load */
@font-face { font-display: swap; }

/* Fluid Images, Figures, and WordPress Gutenberg Blocks */
.entry-content img,
.entry-content figure,
.wp-block-image,
.wp-block-image img,
figure.wp-block-image,
figure.wp-block-image img,
.wp-block-gallery,
.wp-block-gallery .wp-block-image,
.wp-caption,
.wp-caption img {
  max-width: 100% !important;
  height: auto;
  box-sizing: border-box;
}

.wp-caption {
  width: auto !important;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  padding: var(--sp-xs);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-md);
}

.wp-caption-text {
  font-size: 0.8rem;
  color: var(--clr-muted);
  text-align: center;
  padding: var(--sp-xs) var(--sp-sm) 0;
  word-break: break-word;
}

/* WordPress Image Alignments */
.aligncenter {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
}

.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  max-width: 100%;
  height: auto;
}

.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  max-width: 100%;
  height: auto;
}

.alignnone {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

/* Responsive Embeds & Iframes */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* Responsive Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--sp-lg);
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content th {
  background: var(--clr-olive);
  color: var(--clr-white);
  padding: 0.6rem var(--sp-md);
  text-align: left;
  white-space: nowrap;
}

.entry-content td {
  padding: 0.5rem var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
}

.entry-content tr:nth-child(even) td { background: var(--clr-cream); }

.entry-content pre,
.entry-content code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ============================================================
   ACCESSIBILITY & MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .topbar-scroll-inner { animation: none; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
/* ============================================================
   RESPONSIVE MEDIA QUERIES (OPTIMIZED BREAKPOINT SYSTEM)
   Breakpoints: 1200px | 1024px | 768px | 640px | 480px | 360px
============================================================ */

/* Small Desktops & Large Tablets (<= 1200px) */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding-inline: var(--sp-lg);
  }
}

/* Medium Tablets & Laptops (<= 1024px) */
@media (max-width: 1024px) {
  /* Front page content with sidebar drops to single column */
  .content-with-sidebar {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  /* Interior layout: single column with sidebar STRICTLY DROPPED BELOW main content */
  .interior-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--sp-xl) !important;
  }

  /* Main content area stays strictly at top */
  .interior-layout > .main-content-area,
  .interior-layout > div:not(aside),
  .main-content-area {
    order: 1 !important;
    width: 100% !important;
  }

  /* Sidebar strictly drops below the main content - never on top */
  .interior-layout > aside,
  .interior-layout > .right-sidebar,
  .interior-layout > .left-sidebar,
  .interior-layout > .theme-sidebar,
  .interior-layout > .sidebar,
  .right-sidebar,
  .left-sidebar,
  .theme-sidebar {
    order: 2 !important;
    width: 100% !important;
    position: static !important;
    margin-top: var(--sp-lg) !important;
  }

  .sidebar,
  .left-sidebar,
  .right-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
  }

  /* MOBILE HEADER & SLIM STICKY NAV BAR (<= 1024px) */
  /* 1. Unstick the bulky branding block on mobile so it never takes 30% of screen */
  .site-header {
    display: contents;
  }

  .header-main-branding {
    background: var(--clr-white);
    border-bottom: 2px solid var(--clr-border);
    position: relative;
    z-index: 90;
  }

  /* 2. Sticky ONLY the sleek 48px navigation bar */
  .site-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #143717;
    border-top: 2px solid var(--clr-gold);
    box-shadow: 0 3px 12px rgba(0,0,0,0.28);
    width: 100%;
  }

  .nav-inner {
    flex-direction: column;
    width: 100%;
    position: relative;
  }

  /* 3. Mobile Navigation Bar: Always visible, compact 48px */
  .mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 0.35rem 0.5rem;
  }

  .mobile-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--clr-white);
  }

  .mobile-college-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    border: 1px solid var(--clr-gold);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  }

  .mobile-nav-brand-text {
    font-family: var(--ff-display);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1.2;
  }

  /* 4. PROMINENT HIGH-CONTRAST MOBILE MENU TOGGLE BUTTON */
  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    background: #1b4b1e !important;
    border: 1.5px solid var(--clr-gold) !important;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.38rem 0.8rem;
    color: #ffffff !important;
    font-family: var(--ff-base);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: all 0.15s ease-in-out;
  }

  .menu-toggle:hover,
  .menu-toggle:focus {
    background: var(--clr-olive) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
  }

  .menu-toggle[aria-expanded="true"] {
    background: var(--clr-gold) !important;
    color: #143516 !important;
    border-color: #ffffff !important;
  }

  .menu-toggle .menu-icon {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-block;
  }

  .menu-toggle .menu-label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
  }

  /* 5. Mobile Primary Navigation Drawer */
  #primary-menu {
    display: none;
    flex-direction: column;
    background: #102e13;
    width: 100%;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.35);
    padding: 0.5rem 0 1.5rem;
  }

  #primary-menu.open {
    display: flex;
    animation: menuSlideDown 0.22s ease-out forwards;
  }

  @keyframes menuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #primary-menu > li > a {
    padding: 0.75rem 1.25rem;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #primary-menu > li > a:hover,
  #primary-menu > li.current-menu-item > a {
    background: rgba(255,255,255,0.1);
    color: var(--clr-gold-lt);
    padding-left: 1.4rem;
  }

  #primary-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--clr-gold);
    margin-left: 1.25rem;
    background: rgba(0,0,0,0.3);
  }

  #primary-menu .sub-menu a {
    color: rgba(255,255,255,0.85);
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
}

/* Tablets & Mobile Landscape (<= 768px) */
@media (max-width: 768px) {
  .hero-slider {
    aspect-ratio: 16/9;
    max-height: 380px;
  }

  .hero-slide-content {
    left: var(--sp-md);
    right: var(--sp-md);
    bottom: var(--sp-md);
    padding: var(--sp-sm) var(--sp-md);
  }

  .hero-slide-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }

  .hero-slide-content p {
    font-size: 0.85rem;
  }

  /* Compact 3-Column Header on Tablets */
  .header-inner {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 0.5rem;
    padding-block: 0.55rem;
  }

  .state-logo.tn-govt-logo {
    width: 50px;
    height: 50px;
  }

  .college-logo.qmgcw-college-crest,
  .college-logo-placeholder {
    width: 52px;
    height: 52px;
  }

  .college-name-tamil {
    font-size: 0.95rem;
  }

  .college-name-english {
    font-size: 1.05rem;
  }

  .branding-text .college-sub {
    font-size: 0.75rem;
  }

  .topbar-links {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-sm);
  }

  .dept-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--sp-sm);
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .entry-content {
    padding: var(--sp-lg);
  }

  /* RESPONSIVE TABS: Turn horizontal overflowing list into responsive touch pills */
  .tabs-container {
    margin-bottom: var(--sp-lg);
  }

  .tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: none;
    padding-bottom: 0.5rem;
    overflow-x: visible;
  }

  .tab-list li {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 135px;
  }

  .tab-list button {
    width: 100%;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    padding: 0.55rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.3;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: var(--clr-white);
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }

  .tab-list button:hover {
    background: var(--clr-cream);
  }

  .tab-list button[aria-selected="true"] {
    background: var(--clr-forest);
    color: var(--clr-white);
    border-color: var(--clr-forest);
    font-weight: 600;
  }

  .tab-panel {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: var(--sp-md);
    min-height: auto;
  }

  /* Responsive Principal Tab and Card */
  .principal-tab-content {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    text-align: center;
  }

  .principal-card-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    text-align: center;
    padding: var(--sp-lg);
  }

  .principal-quote {
    border-left: none;
    border-top: 2px solid var(--clr-gold);
    border-bottom: 2px solid var(--clr-gold);
    padding: var(--sp-xs) 0;
    margin-inline: auto;
  }

  /* Reset floated images on mobile to prevent narrow squeezed text and overflow */
  .alignleft,
  .alignright {
    float: none !important;
    margin: 1rem auto !important;
    display: block;
    max-width: 100% !important;
  }

  /* Make sure tables are responsive and touch-scrollable without page overflow */
  .entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Small Tablets & Standard Mobile (<= 640px) */
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
  }

  .quick-access-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--sp-sm);
  }

  .compliance-grid {
    gap: var(--sp-sm);
  }

  .compliance-card {
    min-width: 130px;
    max-width: none;
    flex: 1 1 calc(50% - var(--sp-sm));
    padding: var(--sp-md);
  }
}

/* Compact Mobile Devices (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding-inline: var(--sp-sm);
  }

  /* Ultra-sleek 3-column header on mobile */
  .header-inner {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 0.35rem;
    padding-block: 0.4rem;
  }

  .state-logo.tn-govt-logo {
    width: 38px;
    height: 38px;
  }

  .college-logo.qmgcw-college-crest,
  .college-logo-placeholder {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .college-name-tamil {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .college-name-english {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .branding-text .college-sub {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  /* Keep accreditation & affiliation badges compact and visible under college title on mobile */
  .header-badges {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 4px;
  }

  .accreditation-badge,
  .affiliation-badge {
    font-size: 0.58rem;
    padding: 1px 6px;
    line-height: 1.3;
  }

  /* Full-width responsive tab buttons on compact mobile */
  .tab-list li {
    flex: 1 1 100%;
  }

  .tab-list button {
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
  }

  .principal-portrait,
  .principal-photo {
    width: 110px;
    height: 110px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }

  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
  }

  .slider-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .page-hero {
    padding: var(--sp-xl) 0;
  }

  .breadcrumb {
    font-size: 0.75rem;
    overflow-wrap: break-word;
  }

  .entry-content {
    padding: var(--sp-md);
  }
}

/* Ultra-Compact Screens (<= 360px) */
@media (max-width: 360px) {
  .container {
    padding-inline: var(--sp-sm);
  }

  .site-branding img.college-logo {
    width: 44px;
    height: 44px;
  }

  .site-branding img.state-logo {
    width: 32px;
    height: 32px;
  }

  .quick-access-grid {
    grid-template-columns: 1fr;
  }

  .compliance-card {
    flex: 1 1 100%;
  }
}

/* ============================================================
   PRINT STYLES
============================================================ */
/* @media print — comprehensive block added at end of stylesheet (v4) */


/* ============================================================
   RESPONSIVE GRID COLUMN HELPERS (Bug 4 Fix: No inline grid styles)
   ============================================================ */
.qmgcw-col-main {
  width: 100%;
  min-width: 0;
}

.qmgcw-col-sidebar {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1025px) {
  .interior-layout .qmgcw-col-main,
  .archive-layout .qmgcw-col-main,
  .department-layout .qmgcw-col-main {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 1 !important;
  }

  .interior-layout .qmgcw-col-sidebar,
  .archive-layout .qmgcw-col-sidebar,
  .department-layout .qmgcw-col-sidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    order: 2 !important;
  }
}

@media (max-width: 1024px) {
  .interior-layout,
  .archive-layout,
  .department-layout {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
  }

  .interior-layout .qmgcw-col-main,
  .archive-layout .qmgcw-col-main,
  .department-layout .qmgcw-col-main {
    grid-column: 1 !important;
    order: 1 !important;
    width: 100% !important;
  }

  .interior-layout .qmgcw-col-sidebar,
  .archive-layout .qmgcw-col-sidebar,
  .department-layout .qmgcw-col-sidebar {
    grid-column: 1 !important;
    order: 2 !important;
    width: 100% !important;
    margin-top: 2rem !important;
  }
}


/* ============================================================
   v4.0 ADDITIONS — Alumni, Grievance, RTI, Exams, Scholarship,
   Hostel, Library, Placements, WhatsApp Button, Cookie Banner,
   Enhanced Print CSS
   ============================================================ */

/* ── FORM UTILITIES ─────────────────────────────────────────── */
.qmgcw-form {
  max-width: 760px;
  margin: 0 auto;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-forest);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--clr-border);
  border-radius: 4px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--clr-text);
  background: var(--clr-white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--clr-olive);
  outline: 3px solid rgba(74,122,15,0.18);
  outline-offset: 1px;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-row--2col { grid-template-columns: 1fr; }
}
.req { color: var(--clr-red); }
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.35rem;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.form-notice {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.form-notice--success {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.form-notice--error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ── INFO CARDS ─────────────────────────────────────────────── */
.info-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-olive);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.info-card--highlighted {
  background: var(--clr-cream);
  border-left-color: var(--clr-gold);
}
.info-card__heading {
  font-size: 1.15rem;
  color: var(--clr-forest);
  margin-bottom: 0.75rem;
}
.info-card__body p { margin-bottom: 0.5rem; }
.info-card__body p:last-child { margin-bottom: 0; }

/* ── ALUMNI PAGE ─────────────────────────────────────────────── */
.alumni-section,
.alumni-reg-section {
  margin: 2rem 0 3rem;
}
.section-heading {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  color: var(--clr-forest);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--clr-gold);
  border-radius: 2px;
}
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.alumni-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-olive);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.alumni-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.alumni-photo { aspect-ratio: 1; overflow: hidden; background: var(--clr-cream-dk); }
.alumni-photo img { width: 100%; height: 100%; object-fit: cover; }
.alumni-photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--clr-border);
}
.alumni-card-body { padding: 1rem 1.125rem; flex: 1; display: flex; flex-direction: column; }
.alumni-name {
  font-size: 1.05rem;
  font-family: var(--ff-display);
  color: var(--clr-forest);
  margin-bottom: 0.35rem;
}
.alumni-meta-line {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-bottom: 0.5rem;
}
.alumni-position {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--clr-olive);
  margin-bottom: 0.25rem;
}
.alumni-org {
  font-size: 0.825rem;
  color: var(--clr-muted);
  margin-bottom: 0.5rem;
}
.alumni-quote {
  font-style: italic;
  font-size: 0.825rem;
  color: var(--clr-muted);
  border-left: 3px solid var(--clr-gold);
  padding-left: 0.75rem;
  margin: 0.75rem 0 0;
}
.alumni-reg-form {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.btn-large {
  padding: 0.9rem 2.5rem;
  font-size: 1.05rem;
}

/* ── RTI PAGE ────────────────────────────────────────────────── */
.rti-officer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.rti-officer-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}
.rti-officer-badge {
  display: inline-block;
  background: var(--clr-forest);
  color: var(--clr-white);
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.rti-officer-card h3 { font-size: 1rem; color: var(--clr-forest); margin-bottom: 0.5rem; }
.rti-officer-card p { font-size: 0.875rem; margin-bottom: 0.35rem; }
.rti-steps { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0 2rem; }
.rti-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--clr-olive);
  color: var(--clr-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.rti-step strong { display: block; margin-bottom: 0.35rem; color: var(--clr-forest); }
.rti-step p { margin: 0; font-size: 0.875rem; }
.rti-fee-table { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; }
.rti-fee-table th,
.rti-fee-table td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--clr-border);
  text-align: left;
  font-size: 0.9rem;
}
.rti-fee-table th { background: var(--clr-forest); color: var(--clr-white); }
.rti-fee-table tr:nth-child(even) td { background: var(--clr-cream); }
.rti-disclosure-list { columns: 2; column-gap: 2rem; margin: 1rem 0 2rem; }
.rti-disclosure-list li { font-size: 0.875rem; margin-bottom: 0.5rem; break-inside: avoid; }
@media (max-width: 640px) {
  .rti-disclosure-list { columns: 1; }
}

/* ── EXAMINATION PAGE ────────────────────────────────────────── */
.exam-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.exam-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: var(--clr-forest);
  color: var(--clr-white);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.exam-quick-btn:hover { background: var(--clr-olive); color: var(--clr-white); }
.exam-timetable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.exam-timetable-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-olive);
  border-radius: 6px;
  padding: 0.875rem 1rem;
}
.exam-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.exam-card-body { flex: 1; }
.exam-card-body strong { display: block; font-size: 0.9rem; color: var(--clr-forest); }
.exam-card-sem { font-family: var(--ff-mono); font-size: 0.75rem; color: var(--clr-muted); }
.exam-card-action { flex-shrink: 0; }
.exam-placeholder-btn { opacity: 0.6; cursor: default; pointer-events: none; }
.notice-list--large .notice-item { padding: 0.75rem 0; }
.notice-list--large .notice-item a { font-size: 0.95rem; }

/* ── SCHOLARSHIP PAGE ────────────────────────────────────────── */
.scholarship-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  background: var(--clr-cream-dk);
  color: var(--clr-forest);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.filter-pill:hover {
  background: var(--clr-forest);
  color: var(--clr-white);
  border-color: var(--clr-forest);
}
.scholarship-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
.scholarship-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-gold);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.scholarship-card__title {
  font-size: 1rem;
  color: var(--clr-forest);
  line-height: 1.4;
}
.scholarship-card__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.75rem;
  font-size: 0.875rem;
}
.scholarship-card__details dt { font-weight: 600; color: var(--clr-forest); }
.scholarship-card__details dd { color: var(--clr-muted); margin: 0; }

/* ── HOSTEL PAGE ─────────────────────────────────────────────── */
.hostel-stats-bar,
.lib-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  background: var(--clr-forest);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  text-align: center;
}
.hostel-stat__num,
.lib-stat__num {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--clr-gold-lt);
}
.hostel-stat__label,
.lib-stat__label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.25rem;
}
.hostel-facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}
.hostel-facility-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
}
.facility-icon { font-size: 1.25rem; flex-shrink: 0; }

/* ── LIBRARY PAGE ────────────────────────────────────────────── */
.lib-hours-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 1.125rem 1.5rem;
  margin-bottom: 1.5rem;
}
.lib-hours-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.lib-hours-icon { font-size: 1.5rem; flex-shrink: 0; }
.lib-hours-item strong { display: block; color: var(--clr-forest); }

/* ── WHATSAPP FLOATING BUTTON ────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 5rem;         /* above the back-to-top button */
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  border-radius: 50px;
  padding: 0.625rem 1rem 0.625rem 0.875rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s, box-shadow 0.2s;
  /* Default: icon-only circle on mobile, expands on hover on desktop */
}
.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  color: #fff;
}
.whatsapp-float__label {
  display: none;        /* Hidden by default; shown on ≥ 768px */
}
@media (min-width: 768px) {
  .whatsapp-float__label { display: inline; }
}
@media print {
  .whatsapp-float { display: none !important; }
}

/* ── COOKIE CONSENT BANNER ───────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--clr-forest);
  color: var(--clr-cream);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
  /* Shown via JS — hidden attribute prevents flash */
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner__text {
  flex: 1;
  min-width: 200px;
  font-size: 0.85rem;
  margin: 0;
  color: rgba(255,255,255,0.9);
}
.cookie-banner__text a {
  color: var(--clr-gold-lt);
  text-decoration: underline;
}
.cookie-banner__btn {
  background: var(--clr-gold);
  color: var(--clr-forest);
  border: none;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-banner__btn:hover { background: var(--clr-gold-lt); }
.cookie-banner__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.cookie-banner__close:hover { color: var(--clr-white); }
@media print {
  .cookie-banner { display: none !important; }
}

/* ── GRIEVANCE PAGE ──────────────────────────────────────────── */
.grievance-form {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 1.5rem;
}


/* WhatsApp button pulse keyframes */
@keyframes wa-pulse {
  0%   { transform: scale(1); box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
  50%  { transform: scale(1.12); box-shadow: 0 6px 22px rgba(37,211,102,0.5); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
}

/* ── ENHANCED PRINT CSS ──────────────────────────────────────── */
@media print {
  /* Hide all chrome */
  .site-topbar,
  .site-nav,
  .mobile-nav-bar,
  .menu-toggle,
  .right-sidebar,
  .left-sidebar,
  .sidebar,
  .site-footer,
  .slider-controls,
  .slider-btn,
  .exam-quick-links,
  .scholarship-filter,
  .alumni-reg-section,
  .btn,
  .whatsapp-float,
  .cookie-banner,
  #cookie-consent-banner {
    display: none !important;
  }
  /* Single-column layout */
  .interior-layout,
  .content-with-sidebar {
    display: block !important;
  }
  .main-content-area {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Typography */
  body {
    font-family: Georgia, serif;
    font-size: 11pt;
    color: #000;
    background: #fff;
  }
  h1, h2, h3, h4 {
    page-break-after: avoid;
    color: #000;
  }
  .page-hero {
    background: none !important;
    color: #000 !important;
    padding: 1rem 0 0.5rem !important;
    border-bottom: 2px solid #000;
  }
  .page-hero h1 { color: #000 !important; font-size: 18pt !important; }
  /* Tables */
  table { border-collapse: collapse; width: 100%; }
  th, td {
    border: 1px solid #999;
    padding: 4pt 6pt;
    font-size: 10pt;
  }
  th { background: #e0e0e0 !important; }
  /* Links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }
  a[href^="#"]::after,
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after { content: ""; }
  /* Info cards — keep them visible */
  .info-card,
  .rti-officer-card {
    border: 1px solid #aaa !important;
    background: #f5f5f5 !important;
    page-break-inside: avoid;
  }
  .rti-steps .rti-step { page-break-inside: avoid; }
  /* Grids as stacked rows in print */
  .alumni-grid,
  .scholarship-card-list,
  .hostel-facilities-grid,
  .rti-officer-grid {
    display: block !important;
  }
  .alumni-card,
  .scholarship-card { display: block; margin-bottom: 1rem; page-break-inside: avoid; }
}


/* ============================================================
   NOTIFICATION ARCHIVE — category tabs, keyword chips, list
   PROGRAMMES SECTION — course cards with shift badges
   WIDGET FOOTER — View All link
   ============================================================ */

/* ── Widget footer & View All ────────────────────────────────── */
.sidebar-widget .widget-footer {
  border-top: 1px solid var(--clr-border);
  padding: 0.6rem 1rem;
  text-align: right;
}
.widget-view-all {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--clr-olive);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.widget-view-all:hover { color: var(--clr-forest); text-decoration: underline; }

/* ── Category tabs ──────────────────────────────────────────── */
.notice-cat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.notice-cat-tabs::-webkit-scrollbar { display: none; }
.notice-cat-tab {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.notice-cat-tab:hover,
.notice-cat-tab.active {
  color: var(--clr-forest);
  border-bottom-color: var(--clr-forest);
}

/* ── Keyword chip cloud ─────────────────────────────────────── */
.notice-keyword-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--clr-cream);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.notice-keyword-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.notice-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-forest);
  background: var(--clr-white);
  border: 1.5px solid var(--clr-border);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.notice-keyword-chip:hover,
.notice-keyword-chip.active {
  background: var(--clr-forest);
  border-color: var(--clr-forest);
  color: var(--clr-white);
}
.notice-keyword-chip.active .chip-count { background: rgba(255,255,255,0.25); }
.notice-keyword-clear {
  border-color: var(--clr-red);
  color: var(--clr-red);
}
.notice-keyword-clear:hover { background: var(--clr-red); color: var(--clr-white); border-color: var(--clr-red); }
.chip-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--clr-cream-dk);
  color: var(--clr-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ── Filter summary bar ─────────────────────────────────────── */
.notice-filter-summary {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--clr-cream);
  border-left: 3px solid var(--clr-gold);
  border-radius: 0 4px 4px 0;
}
.notice-filter-summary a {
  color: var(--clr-olive);
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ── Archive notice list ────────────────────────────────────── */
.notice-list--archive { list-style: none; padding: 0; margin: 0; }
.notice-item--archive {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.notice-item--archive:last-child { border-bottom: none; }
.notice-item-main {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.notice-item-main a {
  color: var(--clr-text);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}
.notice-item-main a:hover { color: var(--clr-olive); text-decoration: underline; }
.notice-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.notice-keywords { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.notice-kw-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--clr-cream-dk);
  color: var(--clr-forest);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--clr-border);
}
.notice-kw-tag:hover { background: var(--clr-forest); color: var(--clr-white); }

/* Category badges */
.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  flex-shrink: 0;
}
.badge-gallery {
  background: color-mix(in srgb, var(--clr-gold) 15%, white);
  color: color-mix(in srgb, var(--clr-gold) 80%, black);
  border: 1px solid color-mix(in srgb, var(--clr-gold) 30%, white);
}

/* No results */
.no-results-notice {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--clr-cream);
  border-radius: 8px;
  border: 1px dashed var(--clr-border);
}
.no-results-notice p { color: var(--clr-muted); margin-bottom: 1rem; }

/* ── Programmes section (department page) ───────────────────── */
.prog-level-heading {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--clr-forest);
  margin: 1.75rem 0 0.875rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--clr-border);
}
.programmes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.programme-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-olive);
  border-radius: 8px;
  padding: 1rem 1.125rem;
}
.programme-card--shifted {
  border-top-color: var(--clr-gold);
}
.programme-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.programme-card__name {
  font-size: 0.975rem;
  font-family: var(--ff-display);
  color: var(--clr-forest);
  line-height: 1.3;
  margin: 0;
  flex: 1;
}
.programme-card__shift-badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--clr-gold) 18%, white);
  color: color-mix(in srgb, var(--clr-gold) 80%, black);
  border: 1px solid color-mix(in srgb, var(--clr-gold) 35%, white);
  white-space: nowrap;
}
.programme-card__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.82rem;
}
.programme-card__details dt {
  font-weight: 600;
  color: var(--clr-forest);
}
.programme-card__details dd {
  color: var(--clr-muted);
  margin: 0;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}
.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--clr-forest);
  background: var(--clr-white);
  border: 1.5px solid var(--clr-border);
  transition: background 0.15s, border-color 0.15s;
}
.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
  background: var(--clr-forest);
  color: var(--clr-white);
  border-color: var(--clr-forest);
}
.pagination-wrap .page-numbers.dots {
  background: none;
  border-color: transparent;
  cursor: default;
}

/* ── Print: hide filter chrome ──────────────────────────────── */
@media print {
  .notice-cat-tabs,
  .notice-keyword-wrap,
  .notice-filter-summary,
  .pagination-wrap,
  .notice-kw-tag { display: none !important; }
}


/* ============================================================
   URGENT NOTIFICATION POPUP
   ============================================================ */

.urgent-popup {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1100;
  width: min( 380px, calc( 100vw - 2.5rem ) );
  background: var(--clr-forest);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  overflow: hidden;

  /* Hidden state — no transform needed; opacity + translate do the lift */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.urgent-popup[hidden] { display: none !important; }
.urgent-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Coloured left accent stripe */
.urgent-popup::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--clr-gold);
}

/* Body row */
.urgent-popup__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.9rem 1.25rem;
}

/* Bell icon */
.urgent-popup__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  animation: bell-shake 1s ease 2s 3;
}
@keyframes bell-shake {
  0%, 100% { transform: rotate(0);    }
  20%       { transform: rotate(-12deg); }
  40%       { transform: rotate(12deg);  }
  60%       { transform: rotate(-8deg);  }
  80%       { transform: rotate(8deg);   }
}

/* Text block */
.urgent-popup__content { flex: 1; min-width: 0; }
.urgent-popup__eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  margin: 0 0 0.25rem;
}
.urgent-popup__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  line-height: 1.35;
  /* Fade controlled by JS via opacity */
  transition: opacity 0.18s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Title reads as a link: underlined so it is clearly clickable */
.urgent-popup__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.urgent-popup__title:hover { text-decoration: underline; color: var(--clr-gold-lt); }

/* Visible call-to-action button (forest text on light gold = 5.9:1 contrast) */
.urgent-popup__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  padding: 0.4rem 0.85rem;
  background: var(--clr-gold-lt);
  color: var(--clr-forest);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.urgent-popup__cta:hover { background: var(--clr-white); color: var(--clr-forest); transform: translateX(2px); }
.urgent-popup__cta:focus-visible { outline: 3px solid var(--clr-white); outline-offset: 2px; }
.urgent-popup__cta[hidden] { display: none; }

/* Right column: counter + close */
.urgent-popup__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.urgent-popup__counter {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  min-height: 1em; /* keeps layout stable when empty */
}
.urgent-popup__close {
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.urgent-popup__close:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* Dot indicators */
.urgent-popup__dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0.4rem 1rem 0.6rem;
  background: rgba(0,0,0,0.15);
}
.urgent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.2s, transform 0.2s;
}
.urgent-dot.active {
  background: var(--clr-gold-lt);
  transform: scale(1.3);
}

/* Mobile: stretch to full width above WhatsApp button / nav */
@media (max-width: 600px) {
  .urgent-popup {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
  }
  .urgent-popup::before { border-radius: 0; }
  .urgent-popup__body { padding: 0.875rem 1rem; }
}

/* Keep popup above WhatsApp button */
.urgent-popup { z-index: 1100; }
.whatsapp-float { z-index: 1000; }

@media print { .urgent-popup { display: none !important; } }


/* ============================================================
   BOLD UNDER-SLIDER NOTIFICATION BAR & ANIMATED GIF/WORD BADGES
============================================================ */
.hero-ticker-bar {
  background: linear-gradient(90deg, #132a17 0%, #1e4223 50%, #132a17 100%);
  color: #fff;
  border-top: 3px solid var(--clr-gold, #c8a951);
  border-bottom: 3px solid var(--clr-gold, #c8a951);
  padding-block: 0.72rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  position: relative;
  z-index: 20;
}
.hero-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.hero-ticker-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--clr-gold, #c8a951);
  color: #132a17;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-ticker-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b91c1c;
  animation: qmgcwTickerPulse 1.2s ease-in-out infinite;
}
.hero-ticker-track {
  align-items: center;
  gap: 1.5rem;
}
.hero-ticker-bar.ticker-size--bold-lg .hero-ticker-track,
.hero-ticker-bar.ticker-size--bold-lg .ticker-item-link {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
}
.hero-ticker-bar.ticker-size--bold-xl .hero-ticker-track,
.hero-ticker-bar.ticker-size--bold-xl .ticker-item-link {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}
.hero-ticker-bar.ticker-size--standard .hero-ticker-track,
.hero-ticker-bar.ticker-size--standard .ticker-item-link {
  font-size: 0.9rem;
  font-weight: 600;
}
.ticker-item-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
}
.ticker-item-link:hover {
  color: var(--clr-gold-lt, #f3d98b);
  text-decoration: underline;
}
.ticker-sep {
  color: var(--clr-gold, #c8a951);
  margin-inline: 0.35rem;
  font-size: 0.85em;
}
.hero-ticker-all-btn {
  color: var(--clr-gold-lt, #f3d98b);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(200, 169, 81, 0.5);
  border-radius: 4px;
}
.hero-ticker-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.hero-ticker-all-btn:hover {
  background: var(--clr-gold, #c8a951);
  color: #132a17;
}
.hero-ticker-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
}
.hero-ticker-search:hover {
  background: var(--clr-gold, #c8a951);
  color: #132a17;
}
.ticker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.16rem 0.45rem;
  border-radius: 3px;
  line-height: 1.1;
  flex-shrink: 0;
}
.ticker-badge--new {
  background: #facc15;
  color: #7f1d1d;
  animation: qmgcwBadgeBlink 0.9s steps(2, start) infinite;
}
.ticker-badge--important {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.75);
  animation: qmgcwTickerPulse 1.1s ease-in-out infinite;
}
.ticker-badge--urgent {
  background: #ea580c;
  color: #ffffff;
  animation: qmgcwBadgeBlink 0.85s steps(2, start) infinite;
}
.ticker-badge-gif-img {
  height: 20px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes qmgcwBadgeBlink {
  0%, 49% { opacity: 1; transform: scale(1); }
  50%, 100% { opacity: 0.75; transform: scale(1.06); }
}
@keyframes qmgcwTickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.08); }
}
@media (max-width: 768px) {
  .hero-ticker-heading { font-size: 0.72rem; padding: 0.25rem 0.55rem; }
  .hero-ticker-all-btn { display: none; }
}

/* Full-width layout option for Modular Pages CPT when sidebar is hidden */
.interior-layout.interior-layout--full {
  grid-template-columns: minmax(0, 1fr);
}


/* Spam-trap field: off-screen (not display:none, which some bots detect) */
.qmgcw-hp { position: absolute !important; left: -9999px !important; top: auto !important;
            width: 1px !important; height: 1px !important; overflow: hidden !important; }
