/* ==========================================================================
   A2Z Learning Solutions - Unified Design System & Components
   ========================================================================== */

:root {
  --navy: #14213D;
  --navy-soft: #1F2E52;
  --teal: #21B0A6;
  --teal-hover: #1B968D;
  --amber: #FFB238;
  --coral: #FF6B57;
  --coral-hover: #E5573F;
  --paper: #F6F5F0;
  --paper-card: #FFFFFF;
  --ink: #14213D;
  --ink-soft: #5B6478;
  --line: #E3E1D8;
  --success: #10B981;
  --shadow: 0 10px 30px -12px rgba(20, 33, 61, 0.15);
  --shadow-lg: 0 20px 40px -15px rgba(20, 33, 61, 0.25);
  --radius: 18px;
  --radius-sm: 10px;

  --font-display: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; max-width: 100%; }

/* Container & Layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--coral);
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(255, 107, 87, 0.6);
}
.btn-primary:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(255, 107, 87, 0.75);
}
.btn-secondary {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(33, 176, 166, 0.5);
}
.btn-secondary:hover {
  background: var(--teal-hover);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: #ffffff;
}

/* ==========================================================================
   AI Science Doubt Solver Floating Widget
   ========================================================================== */

.ai-widget-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--teal);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulse-glow 3s infinite;
}
.ai-widget-trigger:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 15px 35px rgba(33, 176, 166, 0.4);
}
.ai-widget-icon {
  width: 28px; height: 28px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
}
.ai-badge {
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 10px 25px rgba(33, 176, 166, 0.2); }
  50% { box-shadow: 0 15px 35px rgba(33, 176, 166, 0.45); }
}

/* AI Doubt Modal Drawer */
.ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--paper-card);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(20, 33, 61, 0.3);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-chat-window.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  background: var(--navy);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--teal);
}
.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}
.ai-close-btn {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
  padding: 2px 8px;
  border-radius: 6px;
}
.ai-close-btn:hover { color: #ffffff; background: rgba(255,255,255,0.1); }

.ai-chat-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F9F8F4;
}

.chat-bubble {
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-bubble.bot {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: var(--navy);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-chat-input-area {
  padding: 14px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
}
.ai-chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  outline: none;
}
.ai-chat-input-area input:focus { border-color: var(--teal); }

.ai-limit-bar {
  padding: 6px 16px;
  background: rgba(255, 178, 56, 0.15);
  font-size: 0.75rem;
  color: var(--navy);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   3-Tier Subscription Pricing Component
   ========================================================================== */

.pricing-section {
  padding: 60px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.pricing-card {
  background: var(--paper-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--coral);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
}
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coral);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-title {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.pricing-subtitle {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
  min-height: 42px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
}
.currency { font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.val { font-size: 2.8rem; font-weight: 800; color: var(--navy); font-family: var(--font-display); line-height: 1; }
.period { font-size: 0.88rem; color: var(--ink-soft); }
.strikethrough { text-decoration: line-through; color: var(--ink-soft); font-size: 1rem; margin-left: 6px; }

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
}
.pricing-features li {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 900;
  font-size: 1rem;
}
.pricing-features li.disabled {
  color: #A0AEC0;
  text-decoration: line-through;
}
.pricing-features li.disabled::before {
  content: "✕";
  color: #CBD5E0;
}

/* ==========================================================================
   Simulated Payment Modal (Razorpay / UPI Sheet)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 61, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.checkout-modal {
  background: #ffffff;
  width: 480px;
  max-width: calc(100vw - 32px);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-backdrop.active .checkout-modal {
  transform: translateY(0);
}

.checkout-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.checkout-header h3 { font-size: 1.4rem; color: var(--navy); }

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.pay-opt {
  border: 1.5px solid var(--line);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.pay-opt.active, .pay-opt:hover {
  border-color: var(--coral);
  background: rgba(255, 107, 87, 0.06);
  color: var(--coral);
}

/* Lead Magnet Banner */
.lead-banner {
  background: linear-gradient(135deg, var(--navy-soft), var(--navy));
  color: #ffffff;
  border-radius: var(--radius);
  padding: 36px 32px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.lead-content h3 { font-size: 1.5rem; color: var(--amber); margin-bottom: 8px; }
.lead-content p { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

/* Responsive Adjustments */
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .lead-banner { flex-direction: column; text-align: center; }
  .ai-chat-window { bottom: 16px; right: 16px; left: 16px; width: auto; }
}