:root {
  /* Color Palette */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-soft: #f1f5f9;

  --primary: #4F46E5;       /* Indigo Blue */
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;

  --secondary: #2563eb;     /* Royal Blue */
  --accent: #f59e0b;        /* Amber */
  --danger: #dc2626;        /* Red */
  --purple: #7c3aed;
  --teal: #0d9488;

  /* Typography Colors */
  --text-main: #0f172a;     /* Slate 900 */
  --text-muted: #64748b;    /* Slate 500 */
  --border-color: #e2e8f0;  /* Slate 200 */

  /* Shadows & Effects */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --glass-bg: rgba(255, 255, 255, 0.85);

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-soft);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* =========================================
   3. NAVIGATION BAR
   ========================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 24px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.brand img {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 18px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 15px;
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
  position: relative;
  padding: 80px 0 70px;
  text-align: center;
  background: radial-gradient(circle at top right, #EEF2FF, transparent 40%),
              radial-gradient(circle at bottom left, #eff6ff, transparent 40%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

/* Grid Pattern Background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  min-height: 80px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-main);
}

.rotating-text {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.rotating-text.is-changing {
  opacity: 0;
  transform: translateY(15px);
}

/* Theme Colors for Rotating Text */
.theme-blue { color: var(--secondary); }
.theme-indigo { color: #4F46E5; }
.theme-green { color: #059669; }
.theme-red { color: var(--danger); }
.theme-gold { color: var(--accent); }

.hero-sub {
  max-width: 700px;
  margin: 0 auto 35px;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 500;
}

/* =========================================
   5. SEARCH BOX
   ========================================= */
.search-box {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 20px;
  color: var(--text-main);
  font-size: 16px;
  background: transparent;
  font-weight: 500;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #4F46E5, #4338CA);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Search Dropdown Results */
.search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  text-align: left;
}

.search-result-item {
  display: block;
  padding: 14px 20px;
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--bg-soft);
  transition: background var(--transition-fast);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding-left: 24px; /* subtle indent effect */
}

.search-empty {
  padding: 16px 20px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* =========================================
   6. SECTION HEADINGS & UTILS
   ========================================= */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.section-heading h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

/* Live Pulse Pill */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 20px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pulse-icon {
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Tags */
.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag.new { background: #E0E7FF; color: #4338CA; }
.tag.updated { background: #fef3c7; color: #b45309; }

/* =========================================
   7. LATEST RESULTS GRID
   ========================================= */
.latest-results {
  padding: 60px 0;
  background: var(--bg-surface);
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.latest-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.latest-item:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.latest-item h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
}

.latest-item span:last-child {
  margin-top: auto;
  font-size: 14px;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.latest-item:hover span:last-child {
  color: var(--primary);
}

/* =========================================
   8. RESULTS HUB (CATEGORIES)
   ========================================= */
.results-hub {
  padding: 80px 0;
  background: var(--bg-soft);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  overflow: hidden;
}

/* Gradient Top Border */
.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-weight: 900;
  font-size: 14px;
  color: var(--primary-dark);
}

.category-card .tag {
  position: absolute;
  top: 30px;
  right: 30px;
}

.category-card h3 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.card-meta {
  margin: 0 0 12px 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.card-desc {
  margin: 0 0 24px 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  flex-grow: 1;
}

.trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.trust-signals span {
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--bg-soft);
  color: var(--text-main);
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  transition: all var(--transition-fast);
  margin-top: auto;
}

.category-card:hover .card-cta {
  background: var(--primary);
  color: white;
}

/* =========================================
   9. TIPS SECTION (GUIDES)
   ========================================= */
.tips-section {
  padding: 80px 0;
  background: var(--bg-surface);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.tip-card {
  padding: 28px;
  background: #fdfdfd;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  transition: all var(--transition-smooth);
}

.tip-card:hover {
  background: #f8fafc;
  border-color: var(--primary);
  border-style: solid;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tip-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}

.tip-card h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.tip-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
  padding: 60px 0 40px;
  background: #0f172a; /* Dark Slate */
  color: #94a3b8;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 30px;
}

.footer-content h3 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.footer-content p {
  margin: 0;
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: #f8fafc;
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
}

/* =========================================
   11. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================= */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
  .latest-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .categories-grid,
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 32px, 1200px);
  }
  .nav-inner {
    height: auto;
    flex-direction: column;
    padding: 16px 0;
    gap: 16px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero {
    padding: 50px 0 40px;
  }
  .hero-title {
    font-size: 2.2rem;
    min-height: 100px; /* space for rotating text */
  }
  .search-box {
    flex-direction: column;
    padding: 12px;
    border-radius: 20px;
  }
  .search-input {
    padding: 12px 16px;
  }
  .search-btn {
    width: 100%;
    padding: 14px;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .latest-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .category-card {
    padding: 24px;
  }
}
