/* ============================
   Global Styles
   ============================ */

:root {
  --primary-color: #059669;
  --secondary-color: #047857;
  --bg-color: #f7fafc;
  --text-color: #1f2937;
  --accent-color: #10b981;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

/* ============================
   Header & Navigation
   ============================ */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

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

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.nav-links a:hover {
  color: #d1fae5;
  transform: translateY(-1px);
}

/* Desktop dropdown */

.dropdown {
  position: relative;
}

.dropdown > button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 230px;
  background: #ffffff;
  border-radius: 12px;
  margin-top: 0.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: none;
  z-index: 1001;
}

.dropdown-content a {
  display: block;
  padding: 10px 16px;
  color: #4b5563;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
  color: #059669;
  padding-left: 22px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile nav */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: #ffffff;
}

/* ============================
   Hero Section
   ============================ */

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.5), transparent 55%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.5), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9));
  z-index: -1;
}

.hero-content {
  max-width: 960px;
  padding: 4rem 1.5rem 3rem;
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.95;
}

/* Hero stats */

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

.hero-stat {
  min-width: 120px;
  text-align: center;
}

.hero-stat-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.98rem;
  opacity: 0.9;
}

/* CTA button */

.cta-button {
  border: none;
  cursor: pointer;
  padding: 0.9rem 2.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #1f2937;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.45);
  transition: all 0.25s ease;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 36px rgba(249, 115, 22, 0.6);
}

.cta-button:active {
  transform: scale(0.98);
}

/* ============================
   Calculator Slider
   ============================ */

.calculator-slider {
  background: #0f172a;
  padding: 0.75rem 0;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.5);
}

.slider-track {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  white-space: nowrap;
  animation: slider-marquee 35s linear infinite;
}

.slider-item {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.25);
  border: 1px solid rgba(45, 212, 191, 0.5);
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.slider-item:hover {
  background: rgba(16, 185, 129, 0.75);
  color: #0f172a;
  transform: translateY(-1px);
}

@keyframes slider-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ============================
   Category Section
   ============================ */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.category-card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  border-top: 4px solid rgba(15, 118, 110, 0.45);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card.math {
  border-top-color: #4f46e5;
}

.category-card.financial {
  border-top-color: #f97316;
}

.category-card.converter {
  border-top-color: #0ea5e9;
}

.category-card.health {
  border-top-color: #10b981;
}

.category-card.education {
  border-top-color: #6366f1;
}

.category-card.games {
  border-top-color: #ec4899;
}

.category-icon {
  font-size: 2.1rem;
  margin-bottom: 0.35rem;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Inner list */

.calculator-grid {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}

.calculator-item {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.78rem;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s ease;
}

.calculator-item:hover {
  background: #e0f2fe;
  color: #0369a1;
}

/* ============================
   Features & CTA
   ============================ */

.feature-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.2rem;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  border-left: 4px solid rgba(59, 130, 246, 0.55);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-description {
  font-size: 0.93rem;
  color: #4b5563;
}

.cta-section {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding: 2.25rem 1.5rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
  color: #e5e7eb;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.5);
}

.cta-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-section p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.cta-white-button {
  border: none;
  padding: 0.8rem 2.4rem;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.98rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  transition: all 0.25s ease;
}

.cta-white-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.55);
}

/* ============================
   FAQ Section
   ============================ */

.faq-section {
  margin-top: 3.5rem;
}

.faq-section h2 {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #059669 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-section p.faq-intro {
  text-align: center;
  color: #4b5563;
  margin-bottom: 1.75rem;
}

.faq-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.75rem;
}

.faq-item {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  border-left: 3px solid rgba(5, 150, 105, 0.7);
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.faq-item p {
  font-size: 0.9rem;
  color: #4b5563;
}

/* ============================
   Footer
   ============================ */

.footer {
  background: linear-gradient(135deg, #111827 0%, #020617 100%);
  color: #e5e7eb;
  padding: 3rem 0 1.5rem;
  margin-top: 3.5rem;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  color: #9ca3af;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.4rem;
}

.footer-column a {
  color: #9ca3af;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-column a:hover {
  color: #22c55e;
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .header-logo {
    height: 32px;
  }

  .site-title {
    font-size: 1.05rem;
  }

  .nav-links {
    display: none;
  }

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

  .hero-section {
    min-height: 0;
  }

  .hero-content {
    padding-top: 3.25rem;
    padding-bottom: 2.25rem;
  }

  .hero-title {
    font-size: 2.15rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stat-value {
    font-size: 2.2rem;
  }

  .hero-stat-label {
    font-size: 0.88rem;
  }

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

  .category-card {
    padding: 1.25rem 1.2rem 1.1rem;
  }

  .calculator-grid {
    max-height: 250px;
    overflow-y: auto;
  }

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

  .cta-section h2 {
    font-size: 1.5rem;
  }
}
