/**
 * Shri Damodar Maharaj Mahavidyalaya (SDMM) - Main Design System
 * Pixel-Perfect Responsive Layout, High-Contrast Typography & Royal Academic Aesthetic
 * Zero Horizontal Overflow Guarantee
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Noto+Serif+Devanagari:wght@400;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Royal Academic & Heritage Palette */
  --primary-950: #030a14;
  --primary-900: #071526;
  --primary-800: #0a1f38;
  --primary-700: #0f2b4c;
  --primary-600: #153966;
  --primary-500: #1d4d87;

  /* Saffron Ochre & Warm Gold */
  --accent-saffron: #d96312;
  --accent-saffron-hover: #b84e06;
  --accent-saffron-light: #fff2e8;
  --accent-gold: #fbbf24;
  --accent-gold-dark: #d97706;
  --accent-gold-light: #fef9e7;

  /* Status Colors */
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fecaca;
  --info-bg: #eff6ff;
  --info-text: #1e40af;
  --info-border: #bfdbfe;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fde68a;

  /* Neutral Slates */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-alt: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-heritage: 'Cinzel', 'Noto Serif Devanagari', Georgia, serif;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Base Spacing */
  --container-max: 1240px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* High Contrast & Font Resizing Mode (High-legibility Light Academic Standard) */
body.high-contrast {
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-alt: #f1f5f9;
  --text-main: #000000;
  --text-muted: #0f172a;
  --text-light: #1e293b;
  --border-light: #000000;
  --border-subtle: #000000;
  --primary-900: #000000;
  --primary-800: #071526;
  --primary-700: #0a1f38;
}

body.font-size-lg {
  font-size: 112.5%;
}

body.font-size-sm {
  font-size: 90%;
}

/* Reset & Global - Strict Overflow Prevention */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Base Headings - For Light Surfaces */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary-900);
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: break-word;
}

p,
span,
li,
a {
  overflow-wrap: break-word;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent-saffron);
  color: #ffffff;
  padding: 10px 16px;
  z-index: 99999;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 15px;
}

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding: 3.5rem 0;
  width: 100%;
  max-width: 100%;
}

.section-sm {
  padding: 2rem 0;
  width: 100%;
  max-width: 100%;
}

.section-lg {
  padding: 5rem 0;
  width: 100%;
  max-width: 100%;
}

.bg-white {
  background-color: var(--bg-surface);
}

.bg-light {
  background-color: var(--bg-alt);
}

.bg-dark {
  background-color: var(--primary-900);
  color: #ffffff;
}

/* ==========================================================================
   TOP ACCESSIBILITY & UTILITY BAR
   ========================================================================== */
.topbar {
  background-color: var(--primary-950);
  color: #e2e8f0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.45rem 0;
  width: 100%;
  max-width: 100%;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(217, 99, 18, 0.25);
  color: #ffaa6b;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid rgba(217, 99, 18, 0.4);
  white-space: nowrap;
}

.topbar-link {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.topbar-link:hover {
  color: var(--accent-gold);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: var(--accent-saffron);
  border-color: var(--accent-saffron);
}

/* ==========================================================================
   INSTITUTIONAL BRAND HEADER
   ========================================================================== */
.brand-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  width: 100%;
  max-width: 100%;
}

.brand-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}

.brand-logo-img {
  max-height: 70px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-quick-contacts {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.quick-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.qc-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-saffron-light);
  color: var(--accent-saffron);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qc-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-saffron, #d96312);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.qc-text strong {
  font-size: 0.875rem;
  color: #071526 !important;
  font-weight: 700;
  white-space: nowrap;
}

/* ==========================================================================
   MAIN NAVIGATION BAR (PIXEL-PERFECT, NO WRAPPING)
   ========================================================================== */
.main-nav-bar {
  background: var(--primary-900);
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.65rem;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-item.active>.nav-link {
  background-color: var(--primary-800);
  color: var(--accent-gold);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #ffffff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-xl);
  list-style: none;
  padding: 0.5rem 0;
  display: none;
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--accent-saffron);
  z-index: 1010;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  color: #071526 !important;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.nav-dropdown-link:hover {
  background-color: var(--accent-saffron-light);
  color: var(--accent-saffron-hover) !important;
  padding-left: 1.45rem;
}

.nav-item:hover>.nav-dropdown,
.nav-item:focus-within>.nav-dropdown {
  display: block;
}

.nav-cta-wrap {
  flex-shrink: 0;
}

.nav-cta-btn {
  background: linear-gradient(135deg, var(--accent-saffron), var(--accent-saffron-hover));
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.825rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(217, 99, 18, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 99, 18, 0.5);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--accent-saffron);
  border-color: var(--accent-saffron);
}

.menu-btn-label {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

/* ==========================================================================
   PAGE HERO & HEADINGS (HIGH CONTRAST GUARANTEE)
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, #071526 0%, #0f2b4c 100%);
  color: #ffffff !important;
  padding: 2.75rem 0;
  border-bottom: 4px solid var(--accent-saffron);
  position: relative;
  width: 100%;
  max-width: 100%;
}

.page-hero h1,
.page-hero .page-hero-title {
  font-family: var(--font-heading);
  color: #ffffff !important;
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-hero p,
.page-hero .page-hero-subtitle {
  color: #e2e8f0 !important;
  font-size: 1rem;
  max-width: 820px;
  opacity: 0.95;
  line-height: 1.5;
}

.breadcrumb-nav {
  margin-bottom: 0.65rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  font-size: 0.825rem;
  color: #94a3b8;
}

.breadcrumb-item a {
  color: #cbd5e1 !important;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--accent-gold) !important;
}

.breadcrumb-separator {
  color: #94a3b8 !important;
}

.breadcrumb-item.active {
  color: var(--accent-gold) !important;
  font-weight: 600;
}

/* Section Titles on White/Light */
.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #071526 !important;
  margin-bottom: 0.5rem;
  position: relative;
}

.section-title.centered {
  text-align: center;
}

.section-subtitle {
  color: #334155 !important;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.section-subtitle.centered {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   SITE FOOTER (HIGH CONTRAST & SLEEK TYPOGRAPHY)
   ========================================================================== */
.site-footer {
  background: #050e1a;
  color: #cbd5e1;
  border-top: 5px solid var(--accent-saffron);
  padding-top: 3.5rem;
  font-size: 0.875rem;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 2.25rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.footer-col h4 {
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-saffron);
}

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

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a,
.footer-links .external-link,
.footer-links .external-link .ext-text {
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover,
.footer-links .external-link:hover,
.footer-links .external-link:hover .ext-text {
  color: var(--accent-gold) !important;
  transform: translateX(3px);
}

.footer-links .ext-link-icon {
  color: #94a3b8;
  width: 12px;
  height: 12px;
}

.footer-trust-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.footer-bottom {
  background: #02070e;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.825rem;
  color: #94a3b8;
  width: 100%;
  text-align: center;
}

.footer-bottom strong {
  color: #ffffff;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  width: 100%;
}

.footer-bottom-info {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-review-line {
  color: #64748b;
  font-size: 0.775rem;
  margin-top: 0.25rem;
  text-align: center;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  text-align: center;
}

.footer-bottom-links a {
  color: #cbd5e1 !important;
  text-decoration: none;
  font-size: 0.825rem;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--accent-gold) !important;
}

/* External Link Elements on White/Light Surfaces */
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.external-link:hover {
  color: var(--accent-saffron);
}

.ext-link-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  vertical-align: middle;
}