/* ================================================================
   PSSS Degree College Sanghar — Complete Responsive Stylesheet
   Modern, professional, fully responsive — Navy + Gold + White
   ================================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Colors */
  --navy: #1e3a8a;
  --navy-light: #2563eb;
  --navy-dark: #0f1e3d;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #d97706;
  --cream: #fffbeb;
  --cream-dark: #fef3c7;
  --white: #ffffff;
  --text: #1e293b;
  --text-muted: #475569;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-subtle: #f8fafc;

  /* Fluid Type Scale — scales smoothly between mobile and desktop */
  --fs-xs: clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
  --fs-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --fs-base: clamp(0.9375rem, 0.9rem + 0.25vw, 1rem);
  --fs-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  --fs-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --fs-3xl: clamp(1.875rem, 1.5rem + 1.8vw, 2.5rem);
  --fs-4xl: clamp(2.25rem, 1.7rem + 2.8vw, 3.25rem);

  /* Fluid Spacing */
  --sp-1: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem);
  --sp-2: clamp(0.5rem, 0.45rem + 0.25vw, 0.625rem);
  --sp-3: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --sp-4: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --sp-5: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --sp-6: clamp(2rem, 1.6rem + 2vw, 3rem);
  --sp-7: clamp(3rem, 2.2rem + 4vw, 4.5rem);
  --sp-8: clamp(4rem, 3rem + 5vw, 6rem);

  /* Layout */
  --container-max: 1280px;
  --header-h: auto;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

a { color: var(--navy-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

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

p { margin-bottom: var(--sp-3); }
p:last-child { margin-bottom: 0; }

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  width: 100%;
}

/* ---- Announcement Bar ---- */
.announcement-bar {
  display: none;
}

/* ---- Contact Info Bar ---- */
.contact-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem var(--sp-4);
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.contact-bar a { color: var(--navy); display: inline-flex; align-items: center; gap: 0.375rem; }
.contact-bar a:hover { color: var(--gold); }
.contact-bar .left, .contact-bar .right { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }

/* ---- Header: Brand Bar (top) + Menu Bar (bottom) ---- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

/* === BRAND BAR (top — logo + name, highlighted) === */
.brand-bar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-bottom: 2px solid var(--gold);
  position: relative;
  overflow: hidden;
}
.brand-bar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 100%;
  background: radial-gradient(circle at top right, rgba(245,158,11,0.12), transparent 70%);
  pointer-events: none;
}
.brand-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.35rem var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--cream);
  width: 100%;
  justify-content: center;
}
.brand-logo {
  height: clamp(2rem, 1.6rem + 1vw, 2.6rem);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: white;
  padding: 0.15rem;
}
.brand-icon {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(245,158,11,0.3);
}
.brand-icon i, .brand-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--navy);
  font-size: 1.25rem;
}
.brand-name-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  min-width: 0;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(0.9rem, 0.75rem + 0.6vw, 1.35rem);
  line-height: 1.15;
  color: var(--cream);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  letter-spacing: -0.01em;
}
.brand-tagline {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-light);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* === MENU BAR (bottom — navigation) === */
.menu-bar {
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.menu-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}

/* Desktop Nav */
nav.main-nav {
  display: flex;
  gap: 0.125rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
nav.main-nav > .nav-item { position: relative; }
nav.main-nav a.nav-link {
  color: var(--cream);
  padding: 0.4rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
nav.main-nav a.nav-link:hover { background: rgba(255,255,255,0.1); color: var(--gold-light); }
nav.main-nav a.nav-link.active { background: var(--gold); color: var(--navy); }

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}
.nav-item:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: var(--fs-sm);
  color: var(--navy);
  border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--cream); color: var(--gold); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: var(--sp-2);
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Mobile nav */
nav.mobile-nav { display: none; background: var(--navy-dark); padding: var(--sp-3); max-height: 70vh; overflow-y: auto; border-top: 1px solid rgba(255,255,255,0.06); }
nav.mobile-nav.open { display: block; }
nav.mobile-nav a {
  display: block;
  color: var(--cream);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
nav.mobile-nav a:hover, nav.mobile-nav a.active { background: var(--gold); color: var(--navy); }

/* ---- Hero Slider ---- */
.hero-slider { position: relative; height: clamp(520px, 75vh, 850px); overflow: hidden; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,58,138,0.92) 0%, rgba(30,58,138,0.5) 50%, rgba(30,58,138,0.3) 100%);
}
.hero-content {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
}
.hero-content h1 {
  color: var(--cream);
  font-size: var(--fs-4xl);
  margin-bottom: var(--sp-4);
  max-width: 700px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero-content p {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-5);
  max-width: 550px;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--navy);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  align-self: flex-start;
}
.hero-btn:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-2px); }
.hero-controls {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}
.hero-dot.active { background: var(--gold); width: 32px; border-radius: 5px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,58,138,0.4);
  color: white;
  border: none;
  padding: var(--sp-3);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: var(--gold); color: var(--navy); }
.hero-arrow.prev { left: var(--sp-4); }
.hero-arrow.next { right: var(--sp-4); }

/* ---- Sections ---- */
section { padding: var(--sp-7) 0; }
section.bg-cream { background: var(--cream); }
section.bg-white { background: var(--white); }
section.bg-navy { background: var(--navy); color: var(--cream); }
section.bg-navy h2 { color: var(--cream); }
section.bg-subtle { background: var(--bg-subtle); }

/* ---- Section Header ---- */
.section-header { text-align: center; margin-bottom: var(--sp-6); max-width: 700px; margin-left: auto; margin-right: auto; }
.section-header .eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: var(--sp-3); }
.section-header .eyebrow::before, .section-header .eyebrow::after {
  content: '';
  height: 1px;
  width: clamp(1rem, 0.5rem + 1vw, 1.5rem);
  background: var(--gold);
}
.section-header .eyebrow span {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.section-header h2 { font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }
.section-header p { color: var(--text-muted); font-size: var(--fs-base); }

/* ---- Grid System (Auto-fit, no media queries needed) ---- */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---- Cards ---- */
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.card-body { padding: var(--sp-5); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.card-text { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.7; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
}
.card-icon i, .card-icon svg { color: var(--gold); font-size: 1.25rem; width: 1.5rem; height: 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-light); color: white; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--cream); color: var(--navy); }
.btn-sm { font-size: var(--fs-xs); padding: 0.375rem 0.75rem; }
.btn-lg { font-size: var(--fs-base); padding: 0.875rem 2rem; }

/* ---- Page Banner ---- */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--cream);
  padding: var(--sp-7) 0;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 24px 24px;
}
.page-banner h1 { color: var(--cream); font-size: var(--fs-3xl); position: relative; }
.page-banner p { color: rgba(255, 251, 235, 0.8); margin-top: var(--sp-2); position: relative; font-size: var(--fs-base); }
.breadcrumb { font-size: var(--fs-xs); margin-bottom: var(--sp-3); position: relative; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: var(--gold); }

/* ---- Footer ---- */
footer.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 251, 235, 0.8);
  padding: var(--sp-7) 0 var(--sp-5);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.footer-brand h3 { color: var(--cream); margin-bottom: var(--sp-2); font-size: var(--fs-lg); }
.footer-links h4 { color: var(--cream); font-size: var(--fs-sm); text-transform: uppercase; margin-bottom: var(--sp-3); letter-spacing: 0.05em; }
.footer-links a { display: block; color: rgba(255, 251, 235, 0.7); font-size: var(--fs-sm); padding: 0.25rem 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-5);
  text-align: center;
  font-size: var(--fs-xs);
}

/* ---- Forms ---- */
.form-group { margin-bottom: var(--sp-4); }
.form-label { display: block; font-weight: 500; margin-bottom: 0.375rem; font-size: var(--fs-sm); color: var(--text); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  background: white;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.form-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.form-input[type="file"] { padding: 0.375rem; }

/* ---- Tables (Responsive) ---- */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th {
  background: var(--navy);
  color: var(--cream);
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.badge-gold { background: var(--gold); color: var(--navy); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-gray { background: var(--bg-subtle); color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: var(--fs-sm); }
.alert.success { background: #d1fae5; color: #065f46; }
.alert.error { background: #fee2e2; color: #991b1b; }

/* ---- Admin Panel ---- */
.admin-wrapper { display: flex; min-height: 100vh; background: var(--bg-subtle); }
.admin-sidebar {
  width: 250px;
  background: var(--navy);
  color: var(--cream);
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s;
}
.admin-sidebar .brand { padding: var(--sp-5); border-bottom: 1px solid rgba(255,255,255,0.08); text-align: center; }
.admin-sidebar .brand h3 { color: var(--cream); font-size: var(--fs-base); }
.admin-sidebar .brand small { color: var(--gold-light); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem var(--sp-5);
  color: rgba(255, 251, 235, 0.8);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,0.05); color: var(--gold-light); border-left-color: var(--gold); }
.admin-sidebar nav a.active { background: var(--gold); color: var(--navy); font-weight: 600; border-left-color: var(--gold-dark); }
.admin-main { flex: 1; margin-left: 250px; padding: var(--sp-6); min-width: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-6); flex-wrap: wrap; gap: var(--sp-3); }
.admin-header h1 { font-size: var(--fs-2xl); }

/* Admin mobile toggle */
.admin-menu-toggle {
  display: none;
  position: fixed;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 60;
  background: var(--navy);
  color: white;
  border: none;
  padding: var(--sp-2);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--sp-3);
}
.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.97);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: var(--sp-4);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 80vh; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox-close:hover { background: var(--gold); color: var(--navy); }

/* ---- Faculty Card ---- */
.faculty-card { text-align: center; }
.faculty-photo, .faculty-initial {
  width: 6rem; height: 6rem;
  border-radius: 50%;
  margin: 0 auto var(--sp-4);
  object-fit: cover;
  border: 4px solid var(--cream-dark);
}
.faculty-initial {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-family: 'Playfair Display', serif;
}

/* ---- Stars ---- */
.stars { color: var(--gold); font-size: var(--fs-sm); letter-spacing: 0.1em; }
.stars .empty { color: rgba(245, 158, 11, 0.2); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: var(--sp-4);
  right: var(--sp-4);
  background: var(--navy);
  color: white;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  display: none;
  font-size: var(--fs-sm);
  max-width: 350px;
}
.toast.show { display: block; animation: slideUp 0.3s ease-out; }
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
@keyframes slideUp { from { transform: translateY(1rem); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; gap: 0.375rem; margin-top: var(--sp-5); flex-wrap: wrap; }
.pagination a {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--navy);
  transition: all 0.2s;
}
.pagination a:hover, .pagination a.active { background: var(--navy); color: white; border-color: var(--navy); }

/* ---- Stat Cards ---- */
.stat-card {
  text-align: center;
  padding: var(--sp-5);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.stat-card .value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--navy);
}
.stat-card .label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ---- Reveal Animation ---- */
.reveal { opacity: 0; transform: translateY(2rem); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Content (prose) ---- */
.prose-content h1 { font-size: var(--fs-xl); margin: var(--sp-5) 0 var(--sp-3); }
.prose-content h2 { font-size: var(--fs-lg); margin: var(--sp-5) 0 var(--sp-2); color: var(--navy); }
.prose-content p { color: var(--text-muted); margin-bottom: var(--sp-3); line-height: 1.8; }
.prose-content ul { margin: var(--sp-3) 0; padding-left: var(--sp-5); }
.prose-content li { margin-bottom: var(--sp-2); color: var(--text-muted); }

/* ---- Layout Helpers (responsive by default, collapse on mobile) ---- */
.welcome-grid,
.about-hero,
.acad-hero,
.dept-intro,
.dept-layout,
.contact-grid,
.backup-grid,
.settings-grid,
.dash-bottom,
.news-events-grid,
.principal-grid,
.principal-msg,
.hod-card,
.faculty-detail {
  display: grid;
  gap: var(--sp-5);
}
.welcome-grid, .about-hero, .acad-hero { grid-template-columns: 1fr 1fr; align-items: center; }
.dept-intro { grid-template-columns: 2fr 3fr; align-items: center; }
.dept-layout { grid-template-columns: 1fr 2fr; }
.hod-card { grid-template-columns: 1fr 2fr; }
.faculty-detail { grid-template-columns: 1fr 3fr; }
.principal-msg { grid-template-columns: 2fr 3fr; }
.news-events-grid { grid-template-columns: 1fr 1fr; }
.contact-grid { grid-template-columns: 1fr 1fr; }
.backup-grid { grid-template-columns: 1fr 1fr; }
.settings-grid { grid-template-columns: 1fr 1fr; }
.dash-bottom { grid-template-columns: 1fr 1fr; }
.principal-grid { grid-template-columns: 1fr 2fr; }

@media (max-width: 768px) {
  .welcome-grid, .about-hero, .acad-hero,
  .dept-intro, .dept-layout,
  .contact-grid, .backup-grid, .settings-grid,
  .dash-bottom, .news-events-grid,
  .principal-grid, .principal-msg,
  .hod-card, .faculty-detail {
    grid-template-columns: 1fr !important;
  }
  .dept-layout > aside { order: 2; }
  .dept-layout > div:last-child { order: 1; }
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* ---- Large tablets and below (≤1024px) ---- */
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: var(--sp-5); padding-top: var(--sp-7); }
  .admin-menu-toggle { display: flex; align-items: center; justify-content: center; }
  
  /* Brand name smaller on tablet */
  .brand-name { font-size: clamp(0.75rem, 0.6rem + 0.8vw, 1.125rem); }
  .brand-tagline { font-size: 0.5625rem; }
  
  /* Nav: smaller padding on tablets */
  nav.main-nav a.nav-link { padding: 0.5rem 0.5rem; font-size: var(--fs-xs); }
}

/* ---- Tablets and below (≤768px) ---- */
@media (max-width: 768px) {
  nav.main-nav { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .menu-bar-inner { justify-content: flex-end; padding: var(--sp-2) var(--sp-4); }
  .contact-bar { font-size: 0.6875rem; }
  .contact-bar .left, .contact-bar .right { gap: var(--sp-2); }
  
  /* Brand bar: allow text to wrap on smaller screens */
  .brand-name { white-space: normal; font-size: clamp(0.875rem, 0.7rem + 0.8vw, 1.125rem); }
  .brand-tagline { white-space: normal; }
  
  .hero-content h1 { font-size: var(--fs-2xl); }
  .hero-content p { font-size: var(--fs-base); }
  .hero-arrow { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
  
  section { padding: var(--sp-6) 0; }
  
  .page-banner { padding: var(--sp-6) 0; }
  
  .card-body { padding: var(--sp-4); }
  
  .admin-main { padding: var(--sp-4); padding-top: var(--sp-7); }
  .admin-header h1 { font-size: var(--fs-xl); }
  
  .lightbox img { max-width: 95%; max-height: 70vh; }
}

/* ---- Mobile phones (≤480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-3); }
  
  .announcement-bar { font-size: 0.625rem; padding: var(--sp-1) var(--sp-3); }
  .contact-bar { display: none; }
  
  /* Brand bar compact on phones */
  .brand-name { font-size: 0.8125rem; }
  .brand-tagline { font-size: 0.5625rem; }
  .brand-logo { height: 2.25rem; }
  .brand-icon { padding: 0.375rem; }
  .brand-icon i, .brand-icon svg { width: 1rem; height: 1rem; font-size: 1rem; }
  .brand-link { gap: var(--sp-2); }
  .brand-bar-inner { padding: 0.375rem var(--sp-3); }
  
  .hero-slider { height: 380px; min-height: 380px; }
  .hero-content { padding: 0 var(--sp-3); }
  .hero-content h1 { font-size: var(--fs-xl); }
  .hero-content p { font-size: var(--fs-sm); }
  .hero-btn { padding: 0.5rem 1rem; font-size: var(--fs-xs); }
  .hero-arrow { display: none; }
  .hero-controls { bottom: var(--sp-3); }
  
  section { padding: var(--sp-5) 0; }
  .section-header { margin-bottom: var(--sp-5); }
  .section-header h2 { font-size: var(--fs-xl); }
  
  .card-body { padding: var(--sp-3); }
  .card-title { font-size: var(--fs-base); }
  
  .btn { padding: 0.5rem 1rem; font-size: var(--fs-xs); width: 100%; justify-content: center; }
  .btn-lg { padding: 0.625rem 1.25rem; }
  
  .page-banner { padding: var(--sp-5) 0; }
  .page-banner h1 { font-size: var(--fs-xl); }
  .page-banner p { font-size: var(--fs-sm); }
  
  .grid { gap: var(--sp-3); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  footer.site-footer { padding: var(--sp-5) 0 var(--sp-4); }
  
  .admin-main { padding: var(--sp-3); padding-top: var(--sp-7); }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .admin-header h1 { font-size: var(--fs-lg); }
  
  .form-input, .form-textarea, .form-select { font-size: var(--fs-base); } /* Prevents iOS zoom */
  
  .lightbox-close { top: var(--sp-2); right: var(--sp-2); padding: 0.375rem 0.625rem; font-size: 1rem; }
  
  .toast { left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-3); max-width: none; }
  
  .hero-controls { gap: 0.375rem; }
  .hero-dot { width: 8px; height: 8px; }
  .hero-dot.active { width: 24px; }
  
  .filter-form { grid-template-columns: 1fr !important; }
  
  table { min-width: 400px; }
  th, td { padding: var(--sp-2); font-size: var(--fs-xs); }
}

/* ---- Extra small phones (≤360px) ---- */
@media (max-width: 360px) {
  .brand-name { font-size: 0.6875rem; }
  .brand-tagline { display: none; }
  .brand-logo { height: 1.75rem; }
  .brand-icon { padding: 0.25rem; }
  .brand-icon i, .brand-icon svg { width: 0.875rem; height: 0.875rem; font-size: 0.875rem; }
  .hero-content h1 { font-size: var(--fs-lg); }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---- Print styles ---- */
@media print {
  header.site-header, footer.site-footer, .hero-controls, .hero-arrow, .menu-toggle, .admin-sidebar, .admin-menu-toggle { display: none !important; }
  body { color: black; background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
