@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors - White Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f2f5;

  --accent-emerald: #006d44;
  --accent-emerald-light: #008f5d;
  --accent-emerald-dark: #004d30;
  --accent-emerald-faint: #f0f9f4;

  --accent-gold: #b8860b;
  --accent-gold-light: #daa520;
  --accent-gold-faint: #fdf9f0;

  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #717171;
  --text-on-dark: #ffffff;

  --border-light: rgba(0, 0, 0, 0.08);
  --border-gold: rgba(184, 134, 11, 0.2);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);

  /* Typography */
  --font-heading: 'Marcellus', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

  /* Spacing & Transitions */
  --section-padding: 4rem 2rem;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Responsive Root Overrides */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 1.2rem;
  }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

body.content-protected {
  -webkit-touch-callout: none;
}

body.content-protected * {
  -webkit-user-select: none;
  user-select: none;
}

body.content-protected input,
body.content-protected textarea,
body.content-protected select,
body.content-protected option,
body.content-protected button,
body.content-protected a,
body.content-protected label {
  -webkit-user-select: auto;
  user-select: auto;
}

body.content-protected img {
  -webkit-user-drag: none;
  user-drag: none;
}

body.privacy-obscured > :not(.security-toast):not(.security-shield):not(.security-print-message):not(script):not(style) {
  filter: blur(18px);
}

h1,
h2,
h3,
h4,
.font-heading {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

.security-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 120%);
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: rgba(4, 20, 12, 0.92);
  color: white;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  z-index: 11001;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

.security-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.security-shield {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 10, 5, 0.88);
  backdrop-filter: blur(10px);
  color: white;
  opacity: 0;
  pointer-events: none;
  z-index: 11000;
  transition: opacity 0.2s ease;
}

.security-shield.active {
  opacity: 1;
}

.security-shield p {
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  letter-spacing: 0;
}

.security-print-message {
  display: none;
}

@media print {
  body.print-protected > * {
    display: none !important;
  }

  body.print-protected .security-print-message {
    position: fixed;
    inset: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    color: #111;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
  }
}

/* Layout Containers */
.section-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: var(--section-padding);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.responsive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 992px) {
  .responsive-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Header & Navigation */
header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1400px;
  z-index: 1000;
  padding: 0.8rem 2rem;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: var(--transition);
}

header.scrolled {
  top: 1rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 2rem;
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

header.scrolled .nav-links a {
  color: var(--text-primary);
  text-shadow: none;
}

header.scrolled .mobile-menu-btn {
  color: var(--text-primary);
}

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

.logo-container img {
  height: 60px;
  width: auto;
  transition: var(--transition);
}

header.scrolled .logo-container img {
  height: 50px;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  position: relative;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-gold-light);
  background: none;
}

header.scrolled .nav-links a:hover,
header.scrolled .nav-links a.active {
  color: var(--accent-emerald);
  background: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--accent-emerald);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
  /* Push to right */
}

header.scrolled .mobile-menu-btn {
  color: var(--text-primary);
}

/* Full Screen Mobile Menu */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--accent-emerald-dark) 0%, #050505 100%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.mobile-nav-overlay.active {
  transform: translateY(0);
}

.mobile-nav-links {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.mobile-nav-links a {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.8rem;
  transition: var(--transition);
  font-weight: 400;
}

.mobile-nav-links a.active {
  color: var(--accent-gold-light);
  position: relative;
}

.mobile-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -20%;
  width: 140%;
  height: 2px;
  background: linear-gradient(to right, var(--accent-emerald), var(--accent-gold));
  box-shadow: 0 0 15px rgba(0, 109, 68, 0.8);
}

.close-menu-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 2001;
}

/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-on-dark);
  overflow: hidden;
  background-color: #000;
}

/* Subpage Hero Height Override */
.hero[style*="min-height: 500px"] {
  height: 50vh !important;
  min-height: 450px !important;
  padding-top: 80px !important;
}

.hero-slider,
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.9));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 1.5rem;
  margin-top: 5rem;
}

@media (max-width: 768px) {
  .hero-content {
    margin-top: 6rem;
  }
}

.subtitle {
  display: block;
  font-size: 1.1rem;
  color: var(--accent-gold-light);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: clamp(1rem, 4vw, 1.25rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
  font-weight: 300;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-btns {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-btns .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Components */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title-wrapper .subtitle {
  color: var(--accent-emerald);
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--text-primary);
  margin-top: 1rem;
}

.card {
  background: var(--accent-emerald-faint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 3rem;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-emerald);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: var(--accent-emerald);
  font-size: 1.8rem;
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--accent-emerald);
  color: var(--text-on-dark);
}

.card-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent-emerald);
  color: var(--text-on-dark);
}

.btn-primary:hover {
  background: var(--accent-emerald-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 77, 48, 0.2);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-outline:hover {
  background: var(--accent-emerald);
  color: var(--text-on-dark);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 6rem 2rem 2rem;
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-section h3 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--accent-emerald);
}

.footer-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 1rem;
}

.footer-links a:hover {
  color: var(--accent-emerald);
  padding-left: 8px;
}

.footer-contact i {
  color: var(--accent-emerald);
  margin-right: 12px;
  width: 20px;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 1.5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .card {
    padding: 2rem;
  }
}

/* Utils */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

/* Marksheet Specific Styles */
.student-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.print-header,
.print-signatures,
.print-date {
  display: none;
}

/* Print Styles */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm;
  }

  body {
    background: white !important;
    color: black !important;
  }

  /* Hide non-essential UI */
  header,
  footer,
  .hero,
  .result-search-card,
  .btn,
  .subtitle,
  .mobile-menu-btn {
    display: none !important;
  }

  /* Show print elements */
  .print-header,
  .print-signatures,
  .print-date {
    display: block;
  }

  .result-display-card {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 2px solid #eee !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: none !important;
    animation: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .result-header {
    background-color: var(--accent-emerald) !important;
    color: white !important;
    padding: 2rem !important;
    border-bottom: 5px solid var(--accent-gold) !important;
  }

  .result-content {
    padding: 2rem !important;
  }

  .print-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
  }

  .print-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .print-logo {
    height: 80px;
    width: auto;
  }

  .print-institute-details h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    color: var(--accent-emerald) !important;
  }

  .print-document-title {
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 2px;
    color: var(--accent-gold) !important;
  }

  .marks-table {
    margin-bottom: 2rem !important;
  }

  .marks-table th {
    background: #f8f9fa !important;
    color: black !important;
    border-bottom: 2px solid #333 !important;
  }

  .marks-table td {
    border-bottom: 1px solid #eee !important;
  }

  .summary-grid {
    border-top: 2px solid #eee !important;
    margin-bottom: 3rem !important;
  }

  .summary-value {
    color: var(--accent-emerald) !important;
  }

  .print-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    text-align: center;
  }

  .signature-box {
    width: 200px;
  }

  .signature-line {
    border-top: 1px solid #333;
    margin-bottom: 0.5rem;
  }

  .print-date {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #666;
    text-align: right;
  }
}

/* Alumni Filters */
.alumni-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 15px rgba(0, 109, 68, 0.2);
}

@media (max-width: 768px) {
  .alumni-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .alumni-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
}

/* New Syllabus Ribbon - Premium Look */
.new-syllabus-badge {
  position: absolute;
  top: 15px;
  left: -48px;
  width: 150px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: white;
  font-size: 0.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
