/* Modern Root Variables */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #7c3aed;
  --accent: #2563eb;
  
  --bg-light: #ffffff;
  --bg-gray: #f9fafb;
  --bg-dark: #0f172a;
  
  --text-dark: #111827;
  --text-muted: #4b5563;
  --text-light: #f8fafc;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  background-color: var(--bg-gray);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar Tuning */
.custom-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.nav-menu {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.navbar-nav .nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
  background: #f3f4f6;
  color: var(--text-dark);
}

.navbar-nav .nav-link.active {
  background: #e0e7ff; /* light indigo */
  color: var(--primary) !important;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: transparent;
  color: var(--text-muted);
  transition: 0.2s;
}

.theme-btn:hover {
  background: #f3f4f6;
  color: var(--text-dark);
}

.btn-light-login {
  background: #f3f4f6;
  color: var(--text-dark);
  border-radius: 8px;
  border: none;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-light-login:hover {
  background: #e5e7eb;
}

.btn-gradient-signup {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.2);
  color: #fff;
}

/* Hero Section Updates */
.hero-section {
  background: transparent;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-background {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  background-color: var(--bg-light);
  background-image: 
    radial-gradient(ellipse at 10% 20%, rgba(199, 210, 254, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 80%, rgba(221, 214, 254, 0.6) 0%, transparent 60%);
}

.badge-pill {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 9999px;
  background: #e0e7ff;
  color: var(--primary);
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.main-title {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.purple-title {
  color: #8b5cf6;
}

.dark-title {
  color: var(--text-dark);
}

.hero-text {
  max-width: 800px;
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.6;
}


/* Explore Cards Section */
.explore-section {
  background: var(--bg-gray);
}

.explore-card {
  display: flex;
  background: var(--bg-light);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  height: 100%;
  color: inherit;
}

.explore-card:hover {
  transform: translateY(-4px);
  border-color: #c7d2fe;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  color: inherit;
}

.explore-card .icon-box {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 20px;
}

.explore-card h5 {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 18px;
}

.explore-card p {
  font-size: 15px;
  line-height: 1.5;
}


/* Footer Updated to match Dark Navy design */
.footer-section {
  background-color: var(--bg-dark);
  color: #f1f5f9;
  border-top: 1px solid #1e293b;
}

.footer-desc {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.6;
  max-width: 400px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #1e293b;
  color: #94a3b8;
  border-radius: 8px;
  font-size: 18px;
  transition: all 0.2s;
  text-decoration: none;
}

.social-btn:hover {
  background: #334155;
  color: #fff;
}

.footer-heading {
  font-weight: 600;
  font-size: 18px;
  color: #fff;
}

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

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

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid #1e293b;
}

.footer-copyright {
  color: #64748b;
  font-size: 14px;
}

.footer-bottom-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #f1f5f9;
}


/* Dark Mode Overrides (Optional / To Be Wired) */
body.dark-mode {
  --bg-light: #0f172a;
  --bg-gray: #020617;
  --text-dark: #f8fafc;
  --text-muted: #94a3b8;
  background-color: var(--bg-gray);
  color: var(--text-dark);
}

body.dark-mode .custom-navbar {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid #1e293b;
}

body.dark-mode .explore-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .explore-card:hover {
  border-color: var(--primary);
}

body.dark-mode .theme-btn {
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .theme-btn:hover {
  background: #1e293b;
}

body.dark-mode .btn-light-login {
  background: #1e293b;
  color: #f8fafc;
}

body.dark-mode .btn-light-login:hover {
  background: #334155;
}

body.dark-mode .hero-background {
  background-image: 
    radial-gradient(ellipse at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
}

/* --- Additional Global Components from NextJS --- */

/* Page Headers */
.page-hero {
  padding: 80px 20px;
  text-align: center;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.badge-green {
  background: #d1fae5;
  color: #059669;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1);
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.badge-blue {
  background: #dbeafe;
  color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Pricing Grids */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.pricing-card {
  background: var(--bg-light);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  border-color: #c7d2fe;
}

.pricing-card.popular {
  border: 2px solid var(--primary);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15);
}

.pricing-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 800;
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  flex-grow: 1;
}

.pricing-card ul li {
  padding: 8px 0;
  color: var(--text-dark);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-card ul li::before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
}

.btn-block {
  width: 100%;
  padding: 12px;
  text-align: center;
  display: block;
}

/* Feature Flip Cards */
.flip-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.flip-card {
  background-color: transparent;
  height: 380px;
  perspective: 1000px;
  border-radius: 16px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.05);
  border-radius: 16px;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: var(--bg-light);
  overflow: hidden;
}

.flip-card-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-card-back {
  background: var(--primary);
  color: white;
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

/* Generic Layout */
.content-section {
  padding: 80px 0;
}

body.dark-mode .page-hero {
  background: var(--bg-dark);
  border-bottom: 1px solid #1e293b;
}

body.dark-mode .pricing-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .pricing-card:hover {
  border-color: var(--primary);
}