/* ==========================================================================
   CSVTU QuestionBank - Modern Design System & CSS Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

/* --- CSS Custom Properties / Tokens --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Theme Palette */
  --bg-gradient-start: #0f172a;
  --bg-gradient-mid: #1e1b4b;
  --bg-gradient-end: #090d16;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-orange: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
  --accent-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --accent-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);

  /* Glassmorphism Surface Tokens */
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-bg-hover: rgba(30, 41, 59, 0.75);
  --glass-card-bg: rgba(255, 255, 255, 0.05);
  --glass-card-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(168, 85, 247, 0.45);
  --glass-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 20px 0 rgba(99, 102, 241, 0.1);
  --glass-shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 30px 5px rgba(168, 85, 247, 0.25);
  --backdrop-blur: blur(16px);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-heading: #ffffff;

  /* Spacing & Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Base & Reset --- */
*, *::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-gradient-start);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(217, 70, 239, 0.2) 0%, transparent 40%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 27, 75, 0.92)),
    url('../vecteezy_abstract-gradient-pastel-blue-and-purple-background-neon_8617161-1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
}

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

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

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-orange {
  background: var(--accent-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Card Component */
.glass-card, .glass-effect {
  background: var(--glass-card-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before, .glass-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: 0.6s ease;
  pointer-events: none;
}

.glass-card:hover::before, .glass-effect:hover::before {
  left: 100%;
}

.glass-card:hover, .glass-effect:hover {
  background: var(--glass-card-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}

/* --- Sticky Navigation Bar --- */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.85rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.brand-logo i {
  font-size: 1.8rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.4));
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

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

.nav-link {
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  white-space: nowrap;
}

.nav-link i {
  font-size: 1.1rem;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 10px;
}

/* --- Main Content Structure --- */
main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  padding: 3.5rem 1.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c084fc;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item i {
  font-size: 1.5rem;
  color: #818cf8;
}

.stat-text {
  text-align: left;
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Course Cards Grid Section --- */
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
  margin: 0.75rem auto 0;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.course-card {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.card-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: var(--transition-bounce);
}

.course-card:hover .card-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.card-icon-wrapper i {
  font-size: 2rem;
  color: #a5b4fc;
}

.course-card:hover .card-icon-wrapper i {
  color: #f0abfc;
}

.course-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.course-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Button Components & Legacy Classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  text-decoration: none;
  width: 100%;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

.btn-orange {
  background: var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* --- Legacy / Subpage Button Compatibility --- */
.branch-button, .title-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main) !important;
  text-align: center;
  min-height: 44px;
}

.branch-button:hover, .title-button:hover {
  background: var(--primary-gradient) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}

.subject-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-smooth);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7 !important;
  margin: 0.35rem;
  min-height: 44px;
}

.subject-button:hover {
  background: var(--accent-emerald) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* --- Branch Grid (B.Tech Selection) --- */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 0;
}

.branch-card {
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.05rem;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  min-height: 90px;
  justify-content: center;
}

.branch-card i {
  font-size: 1.6rem;
  color: #818cf8;
  transition: var(--transition-bounce);
}

.branch-card:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.branch-card:hover i {
  transform: scale(1.2);
  color: #f0abfc;
}

.branch-card.disabled {
  opacity: 0.6;
  border-style: dashed;
}

/* --- About & Info Section Styling --- */
.info-card {
  padding: 2.5rem;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.info-card h2 {
  font-size: 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.info-card h2:first-of-type {
  margin-top: 0;
}

.info-card h2 i {
  color: #818cf8;
}

.info-card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- Contact & Map Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-item i {
  font-size: 1.5rem;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-content strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-item-content a, .contact-item-content span {
  color: #cbd5e1;
  font-size: 1.05rem;
  word-break: break-word;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 380px;
  filter: contrast(1.05) saturate(1.1);
}

/* --- Footer --- */
.site-footer {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

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

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-credits {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-credits strong {
  color: #cbd5e1;
}

/* --- Helper Utility Classes --- */
.pulse-icon {
  font-size: 4.5rem;
  background: var(--accent-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.3)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 25px rgba(249, 115, 22, 0.7)); }
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.text-2xl { font-size: 1.5rem; font-weight: 700; }
.text-4xl { font-size: 2.25rem; font-weight: 800; }
.text-6xl { font-size: 3.5rem; font-weight: 800; }
.text-blue-900, .text-blue-800, .text-gray-700 { color: var(--text-main) !important; }

/* ==========================================================================
   Comprehensive Mobile & Desktop Media Queries
   ========================================================================== */

/* Tablet & Mobile Layout (Width <= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header-nav {
    padding: 0.65rem 0;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.6rem;
  }

  .brand-logo {
    font-size: 1.25rem;
  }

  .brand-logo i {
    font-size: 1.5rem;
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.5rem 0 3rem;
  }

  .hero-section {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }

  .hero-pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
  }

  .hero-subtitle {
    margin-bottom: 1.75rem;
  }

  .hero-stats {
    gap: 0.75rem;
    margin-top: 1.25rem;
  }

  .stat-item {
    padding: 0.6rem 0.9rem;
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 130px;
  }

  .info-card {
    padding: 1.5rem 1.25rem;
    margin-bottom: 2rem;
  }

  .info-card h2 {
    font-size: 1.4rem;
  }

  .branch-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
    padding: 1rem 0;
  }

  .branch-card {
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    min-height: 80px;
  }

  .branch-card i {
    font-size: 1.4rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .map-container iframe {
    height: 300px;
  }

  .site-footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* Small Mobile Screens (Width <= 480px) */
@media (max-width: 480px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .stat-item {
    flex: 1 1 100%;
  }

  .branch-button, .subject-button, .title-button {
    font-size: 0.875rem;
    padding: 0.75rem 0.85rem;
    word-break: break-word;
    width: 100%;
  }

  .subject-button {
    margin: 0.25rem 0;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    padding: 1.5rem 1rem;
  }
}
