/* ==========================================================================
   NPS - HANCHINMANI INSTITUTES ACADEMIC ALLIANCE
   Master Design System & Component Framework
   ========================================================================== */

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

:root {
  /* Default Design System Tokens (Overridden by theme engine) */
  --bg-primary: #0a1322;
  --bg-secondary: #111e36;
  --bg-card: rgba(23, 37, 66, 0.65);
  --bg-card-hover: rgba(30, 48, 85, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(212, 175, 55, 0.4);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-crimson: #ef4444;
  
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Cinzel', serif;
  
  --backdrop-blur: 16px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.3);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Canvas particle layer */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.app-wrapper {
  position: relative;
  z-index: 1;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

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

ul {
  list-style: none;
}

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

/* Common Layout Helpers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin: 0.75rem 0 1rem 0;
}

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

/* ==========================================================================
   TOP ENGINE TOOLBAR (20+ DESIGN THEME SWITCHER)
   ========================================================================== */
.theme-studio-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(10, 19, 34, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.theme-studio-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-gold);
}

.theme-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-select-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.theme-select-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent-gold);
}

.theme-dropdown {
  position: absolute;
  top: 56px;
  right: 1.25rem;
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  display: none;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  z-index: 10000;
}

.theme-dropdown.active {
  display: grid;
}

.theme-option-item {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.theme-option-item:hover, .theme-option-item.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
}

.theme-option-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.theme-option-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: var(--accent-gold);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-proposal-modal {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.btn-proposal-modal:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.main-header {
  position: sticky;
  top: 52px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(var(--backdrop-blur));
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition-normal);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-crest {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #06b6d4 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.4rem;
  color: #000;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

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

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

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-cta {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #050b14;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 5rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

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

.hero-content h1 {
  font-size: 3.4rem;
  margin: 1.2rem 0;
  line-height: 1.15;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.highlight-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-chip svg {
  color: var(--accent-gold);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

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

/* Hero Visual / Bento Card */
.hero-visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(var(--backdrop-blur));
  box-shadow: var(--shadow-lg);
  position: relative;
}

.alliance-badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.inst-pill {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.stat-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform var(--transition-fast);
}

.stat-box:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   BENTO GRID SYNERGY SECTION
   ========================================================================== */
.bento-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  backdrop-filter: blur(var(--backdrop-blur));
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.bento-span-2 {
  grid-column: span 2;
}

.bento-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-gold);
  margin-bottom: 1.25rem;
}

.bento-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.bento-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================================================
   ACADEMIC PROGRAMMES CARDS
   ========================================================================== */
.programme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.programme-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
}

.programme-card.featured {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

.card-tag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.prog-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.programme-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.prog-sub {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.feature-list {
  margin: 1.25rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.feature-list li::before {
  content: '✓';
  color: var(--accent-gold);
  font-weight: 800;
}

/* ==========================================================================
   INTERACTIVE FEE & SCHOLARSHIP CALCULATOR
   ========================================================================== */
.calculator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 3rem;
  backdrop-filter: blur(var(--backdrop-blur));
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-gold);
}

.calc-results-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.calc-row.total {
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  padding-top: 1rem;
}

/* ==========================================================================
   HALL OF FAME & TOPPERS MATRIX
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  font-weight: 700;
}

.toppers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.topper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.topper-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
}

.topper-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #06b6d4 100%);
  padding: 3px;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent-gold);
}

.topper-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.topper-rank {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin: 0.25rem 0;
}

.topper-exam {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   FACILITIES 360° & VIRTUAL TOUR SHOWCASE
   ========================================================================== */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.facility-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.facility-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
}

.facility-img-wrapper {
  height: 200px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--accent-gold);
  font-size: 3rem;
}

.facility-info {
  padding: 1.5rem;
}

.facility-info h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   MODAL WINDOWS (PROPOSAL & ADMISSION ENQUIRY)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: #0b1329;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  color: #e2e8f0;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--accent-crimson);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background: rgba(5, 10, 20, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
}

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

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  color: var(--accent-gold);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition: transform var(--transition-fast);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .bento-container, .programme-grid, .toppers-grid, .facilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.3rem;
  }
  .bento-container, .programme-grid, .toppers-grid, .facilities-grid, .calc-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}
