/* ==========================================================
   AHAMA ACADEMY - MODERN MINIMALIST DESIGN SYSTEM (V2)
   Bespoke, zero-dependency, ultra-crisp aesthetics for Web & Mobile
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f8fafc;
  --soft-hover: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  /* Primary & Brand accents */
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-light: rgba(225, 29, 72, 0.08);
  --accent: #6366f1;
  --accent-light: rgba(99, 102, 241, 0.08);
  
  /* Local payment gateways */
  --bkash: #e2136e;
  --nagad: #f7921e;
  --rocket: #8c3494;
  
  /* Statuses */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode theme */
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #090d16;
    --surface: #0f172a;
    --soft: #141e33;
    --soft-hover: #1c2b48;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --border-subtle: #172033;
    --primary-light: rgba(225, 29, 72, 0.18);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  }
}

html[data-theme="dark"] {
  --bg: #090d16;
  --surface: #0f172a;
  --soft: #141e33;
  --soft-hover: #1c2b48;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-subtle: #172033;
  --primary-light: rgba(225, 29, 72, 0.18);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
  font-weight: 750;
  margin-top: 0;
  color: var(--text);
}

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

button, input, select, textarea {
  font: inherit;
}

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

/* Announcement Marquee */
.announcement-bar {
  background: linear-gradient(90deg, #1e1b4b, #312e81);
  color: #e0e7ff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.announcement-bar b {
  color: #fbbf24;
  margin: 0 4px;
}
.announcement-close {
  position: absolute;
  right: 14px;
  background: transparent;
  border: 0;
  color: #c7d2fe;
  cursor: pointer;
  font-size: 14px;
}

/* Header */
.site-header {
  height: 72px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #fb7185);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.desktop-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 2px;
  position: relative;
}
.desktop-nav a:hover, .desktop-nav a.active {
  color: var(--text);
}
.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.4);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--soft);
  border-color: var(--text-muted);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}
.btn-full {
  width: 100%;
}

.theme-btn, .lang-btn, .menu-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.theme-btn:hover, .lang-btn:hover, .menu-btn:hover {
  background: var(--soft);
}
.menu-btn {
  display: none;
}

/* Hero */
.hero {
  padding: 85px 0 65px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 65px;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(42px, 5.5vw, 70px);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.04em;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 32px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.trust-badges {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.trust-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hero Showcase Card */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.live-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.hero-mini-course {
  background: var(--soft);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.hero-mini-course small {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-mini-course h4 {
  margin: 6px 0 14px;
  font-size: 16px;
}
.progress-bar {
  height: 7px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.stat-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-pill {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.stat-pill strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}
.stat-pill span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Section Structure */
.section {
  padding: 85px 0;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 20px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0;
}
.section-header p {
  color: var(--text-muted);
  margin: 8px 0 0;
  font-size: 16px;
}

/* Grids */
.course-grid, .template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
}

.course-card, .template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card:hover, .template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--text-muted);
}

.course-cover {
  height: 180px;
  position: relative;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #ffffff;
}
.course-cover.free {
  background: linear-gradient(135deg, #047857, #065f46);
}
.course-cover.premium {
  background: linear-gradient(135deg, #be123c, #881337);
}
.cover-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.cover-icon {
  font-size: 44px;
  font-weight: 900;
  opacity: 0.95;
  letter-spacing: -0.05em;
  font-family: 'Outfit', sans-serif;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-weight: 700;
}

.card-body h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 8px;
}
.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-tag {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}
.price-tag.free {
  color: var(--success);
}
.price-tag small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 30px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--soft);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover {
  color: var(--text);
}

/* Payment Selector */
.payment-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.payment-btn {
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 750;
}
.payment-btn.bkash.active {
  border-color: var(--bkash);
  background: rgba(226, 19, 110, 0.08);
  color: var(--bkash);
}
.payment-btn.nagad.active {
  border-color: var(--nagad);
  background: rgba(247, 146, 30, 0.08);
  color: var(--nagad);
}
.payment-btn.rocket.active {
  border-color: var(--rocket);
  background: rgba(140, 52, 148, 0.08);
  color: var(--rocket);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #1e293b;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.site-footer {
  background: var(--soft);
  border-top: 1px solid var(--border);
  padding: 65px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-col a:hover {
  color: var(--primary);
}
.copyright {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0;
  }
  .desktop-nav {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 38px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .payment-selector {
    grid-template-columns: 1fr;
  }
}
