/* ==========================================================================
   SARSWATI INSTITUTE — GLOBAL STYLESHEET
   Premium Web Design System with Rich Dark Mode, Gold Accents, & Micro-animations
   ========================================================================== */

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

/* ── Design Tokens & Variables ── */
:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Premium Color Palette */
  --bg-primary: #080c14;
  --bg-secondary: #0f1626;
  --bg-tertiary: #172237;
  
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.15);
  --accent-blue: #3b82f6;
  --accent-orange: #f97316;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(212, 175, 55, 0.3);
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-lg: 18px;
  --radius-md: 12px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

/* ── Scrollbar customization ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ── Layout & Typography ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Header / Navigation ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(12px);
  border-b: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.header.scrolled {
  background: rgba(8, 12, 20, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.logo span {
  color: var(--accent-gold);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

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

.nav-cta {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8901c 100%);
  color: #000;
  font-weight: 700;
  font-size: 13.5px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 24px;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(8, 12, 20, 0.6) 0%, rgba(8, 12, 20, 0.9) 100%);
  z-index: 2;
}

/* ── Floating Sound Toggle Button ── */
.sound-toggle-btn {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sound-toggle-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.hero-content-center {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.hero-glass-card {
  padding: 60px 40px;
  max-width: 860px;
  text-align: center;
  animation: scaleUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 24px;
}

.hero-tag span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.hero h1 {
  font-size: 54px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.btn-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8901c 100%);
  color: #000;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--text-secondary);
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-light);
  padding-top: 32px;
}

.stat-item h3 {
  font-size: 28px;
  color: var(--text-primary);
}

.stat-item h3 span {
  color: var(--accent-gold);
}

.stat-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: floatAnim 6s ease-in-out infinite alternate;
}

@keyframes floatAnim {
  from { transform: translateY(0px) rotate(0.5deg); }
  to   { transform: translateY(-12px) rotate(-0.5deg); }
}

/* ── Section Header ── */
.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--bg-secondary);
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 38px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Grid/Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-gold-glow) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-gold);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

/* ── Course-Specific Styles ── */
.course-card {
  padding: 0;
}

.course-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  position: relative;
}

.course-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
}

.course-content {
  padding: 28px;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Call to Action ── */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212,175,55,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

/* ── Forms ── */
.form-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14.5px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Footer ── */
.footer {
  background: #04060a;
  border-top: 1px solid var(--border-light);
  padding: 80px 0 30px;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--accent-gold);
}

.footer-desc {
  font-size: 14px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 13.5px;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}

/* ── Sub-Hero Styles ── */
.sub-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(212,175,55,0.05) 0%, transparent 100%);
}

.sub-hero h1 {
  font-size: 46px;
  margin-bottom: 16px;
}

.sub-hero p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── responsive grid ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ── Course Details Card (Courses Page) ── */
.course-details-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
  transition: var(--transition-smooth);
}

.course-details-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.course-visual {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: block;
}

.details-list {
  list-style: none;
  margin: 24px 0;
}

.details-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.details-list li svg {
  color: var(--accent-gold);
}

/* ── Method Cards (About Page) ── */
.method-card {
  display: flex;
  gap: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
  transition: var(--transition-smooth);
}

.method-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.method-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gold-glow);
  border: 1.5px solid var(--border-glow);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.method-desc h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.method-desc p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Admissions & Calculator ── */
.calculator-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 40px;
  text-align: center;
}

.result-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--accent-gold-glow);
  border: 1.5px solid var(--border-glow);
  color: var(--accent-gold);
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
}

/* ── Contact Page Components ── */
.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 24px;
  text-align: left;
}

.info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
  font-size: 18px;
}

.info-text h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-text p {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.map-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

/* ── Toast Notifications ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  font-weight: 600;
  display: none;
  z-index: 1001;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Mobile adjustments ── */
@media (max-width: 991px) {
  .hero-glass-card {
    padding: 40px 30px;
    max-width: 100%;
  }
  .hero h1 {
    font-size: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  /* Mobile menu toggle */
  .nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(8, 12, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    padding: 40px 24px;
    gap: 24px;
    transition: var(--transition-smooth);
    z-index: 999;
  }
  
  .nav-menu.open {
    left: 0;
  }

  .nav-link {
    font-size: 18px;
    width: 100%;
    text-align: center;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }

  .menu-toggle {
    display: block;
    font-size: 28px;
  }

  /* Hero adjustments for mobile */
  .hero {
    padding-top: 80px;
  }

  .hero-video {
    object-fit: contain;
  }

  .sound-toggle-btn {
    top: 50%;
    bottom: auto;
    right: 16px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .hero-glass-card {
    padding: 32px 20px;
    margin: 0 16px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .hero p {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .hero-btns {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
  }

  .hero-btns a {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
  }

  .stat-item {
    text-align: center;
  }

  .stat-item h3 {
    font-size: 24px;
  }

  /* Grid layouts */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  /* Sub-hero page header adjustments */
  .sub-hero {
    padding: 100px 0 40px;
  }

  .sub-hero h1 {
    font-size: 30px;
  }

  .sub-hero p {
    font-size: 13.5px;
  }

  /* Card Grid adjustments */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Courses page details card */
  .course-details-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }

  /* Forms & calculators */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .calculator-card {
    padding: 20px;
  }

  /* Section headers */
  .section {
    padding: 60px 0;
  }

  .section-alt {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 28px;
  }

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

  .cta-banner {
    padding: 40px 20px;
  }

  .cta-banner h2 {
    font-size: 28px;
  }

  /* Footer adjustments */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }

  .sub-hero {
    padding: 90px 0 30px;
  }

  .sub-hero h1 {
    font-size: 24px;
  }

  .info-card {
    padding: 20px 16px;
  }

  .calculator-card {
    padding: 20px 16px;
  }

  .method-card {
    padding: 16px;
    gap: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
