/* ============================================================
   HOUSSAM TRADER ACADEMY — style.css
   Dark theme with emerald green (#10b981) accent
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --bg: #09090b;
  --card: #18181b;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-fg: #022c22;
  --secondary: #27272a;
  --foreground: #fafafa;
  --muted-fg: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --container: 1200px;
  --radius: 12px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* RTL support */
[dir="rtl"] .arrow-icon { transform: rotate(180deg); }
[dir="rtl"] .nav-desktop { flex-direction: row-reverse; }
[dir="rtl"] .hero-buttons { flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher {
  border-left: none;
  border-right: 1px solid var(--border);
  padding-left: 0;
  padding-right: 1rem;
}
[dir="rtl"] .footer-top { flex-direction: row-reverse; }

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

/* ---- Utility ---- */
.text-primary { color: var(--primary); }
.text-glow { text-shadow: 0 0 30px rgba(16, 185, 129, 0.5), 0 0 60px rgba(16, 185, 129, 0.3); }
.hidden { display: none !important; }
.w-full { width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Animations ---- */
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.animate-fade-up  { animation: fadeUp 0.8s ease both; }
.animate-fade-in  { animation: fadeIn 1s ease both; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 1s; }

/* Scroll-triggered visibility */
.stat-item, .feature-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat-item.visible, .feature-card.visible { opacity: 1; transform: none; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.btn-primary.btn-lg { height: 3.5rem; padding: 0 2rem; font-size: 1.05rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid var(--border);
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-secondary.btn-lg { height: 3.5rem; padding: 0 2rem; font-size: 1.05rem; }

/* ---- NAVBAR ---- */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}
#navbar.scrolled { background: rgba(9, 9, 11, 0.95); }

.nav-container {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.8; }
.logo svg { color: var(--primary); flex-shrink: 0; }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) { .nav-desktop { display: flex; } }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--foreground); }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.lang-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-fg);
  transition: color 0.2s;
  padding: 0.25rem;
}
.lang-btn.active { color: var(--primary); }
.lang-btn:hover { color: var(--foreground); }

.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
  transition: all 0.2s;
}
.btn-instagram:hover {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  animation: none;
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--foreground);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-nav-cta:hover { background: rgba(255,255,255,0.1); }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: var(--foreground);
  border-radius: 8px;
  transition: background 0.2s;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.05); }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

/* Mobile Menu */
.mobile-menu {
  background: var(--card);
  border-top: 1px solid var(--border);
}
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}
.mobile-nav-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  text-align: left;
  transition: color 0.2s;
}
[dir="rtl"] .mobile-nav-link { text-align: right; }
.mobile-nav-link:hover { color: var(--primary); }
.mobile-lang-switcher {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
}

/* ---- HERO ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9,9,11,0.8) 0%, rgba(9,9,11,0.6) 50%, rgba(9,9,11,1) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 5rem 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  backdrop-filter: blur(4px);
}

.ping-container {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}
.ping-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--primary);
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
.ping-dot {
  position: relative;
  border-radius: 9999px;
  background: var(--primary);
  width: 8px;
  height: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Allow the inner span (primary) to override */
.hero-title .text-primary {
  -webkit-text-fill-color: var(--primary);
  color: var(--primary);
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted-fg);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
}
@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; justify-content: center; }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary { width: auto; }
}

.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  color: var(--muted-fg);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.trust-badge svg { color: var(--primary); }

/* ---- SOCIAL PROOF ---- */
.social-proof-section {
  padding: 5rem 0;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-item { padding: 1.5rem; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- FEATURES ---- */
.features-section {
  padding: 6rem 0;
  background: var(--bg);
  position: relative;
}
.section-line-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(16,185,129,0.2), transparent);
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-desc {
  color: var(--muted-fg);
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: rgba(24,24,27,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 20px rgba(16,185,129,0.1);
}
.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: rgba(16,185,129,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.2s;
  color: var(--primary);
}
.feature-card:hover .feature-icon { background: rgba(16,185,129,0.2); }
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}
.feature-card p { color: var(--muted-fg); line-height: 1.65; font-size: 0.95rem; }

/* ---- FOUNDER ---- */
.founder-section {
  padding: 6rem 0;
  background: var(--bg);
}
.founder-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .founder-grid {
    flex-direction: row;
    gap: 5rem;
  }
}
.founder-text { flex: 1; order: 2; }
@media (min-width: 1024px) { .founder-text { order: 1; } }

.founder-title { margin-bottom: 1.5rem; }
.founder-quote {
  color: var(--muted-fg);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.founder-sig { padding-top: 1.5rem; }
.founder-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.founder-role {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
}

.founder-image-container {
  flex: 1;
  order: 1;
  display: flex;
  justify-content: center;
  position: relative;
}
@media (min-width: 1024px) { .founder-image-container { order: 2; } }

.founder-glow {
  position: absolute;
  inset: -1rem;
  background: rgba(16,185,129,0.15);
  border-radius: 1rem;
  filter: blur(3rem);
  opacity: 0.5;
  transition: opacity 0.3s;
}
.founder-image-container:hover .founder-glow { opacity: 0.8; }

.founder-image-wrapper {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 3/4;
}
.founder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transform: scale(1.05);
  transition: filter 0.5s ease, transform 0.5s ease;
}
.founder-image-container:hover .founder-img {
  filter: grayscale(0);
  transform: scale(1.1);
}
.founder-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,9,11,0.8) 0%, transparent 60%);
}

/* ---- LEAD FORM ---- */
.form-section {
  padding: 6rem 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.form-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: rgba(16,185,129,0.05);
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
}
.form-container {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Form Success */
.form-success-card {
  width: 100%;
  max-width: 28rem;
  background: var(--card);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 50px rgba(16,185,129,0.1);
}
.success-icon-circle {
  width: 4rem;
  height: 4rem;
  background: rgba(16,185,129,0.2);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.form-success-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.form-success-card p { color: var(--muted-fg); }

/* Form Card */
.form-card {
  width: 100%;
  max-width: 32rem;
  background: rgba(24,24,27,0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.form-header {
  text-align: center;
  margin-bottom: 2rem;
}
.form-header h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}
.form-header p { color: var(--muted-fg); font-size: 0.95rem; line-height: 1.6; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}
.form-input,
.form-select {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  background: rgba(9,9,11,0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--muted-fg); }
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-select option { background: var(--card); color: var(--foreground); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 0.25rem;
}

.form-section .btn-primary {
  margin-top: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(16,185,129,0.2);
}
.form-section .btn-primary:hover { box-shadow: 0 0 30px rgba(16,185,129,0.4); }

.form-disclaimer {
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted-fg);
  margin-top: 1rem;
}

.form-error-banner {
  width: 100%;
  max-width: 32rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.form-error-banner svg { flex-shrink: 0; }

/* ---- FAQ ---- */
.faq-section {
  padding: 6rem 0;
  background: rgba(24,24,27,0.3);
}
.faq-container { max-width: 50rem; }

.accordion { width: 100%; }
.accordion-item {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--foreground);
  gap: 1rem;
  transition: color 0.2s;
}
[dir="rtl"] .accordion-trigger { text-align: right; }
.accordion-trigger:hover { color: var(--primary); }
.accordion-chevron { flex-shrink: 0; transition: transform 0.3s ease; color: var(--muted-fg); }
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.accordion-content p {
  padding-bottom: 1.5rem;
  color: var(--muted-fg);
  line-height: 1.7;
  font-size: 0.975rem;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}
.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.instagram-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-fg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.instagram-link:hover { color: var(--primary); }
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  font-size: 0.75rem;
  color: rgba(161,161,170,0.6);
  max-width: 48rem;
  line-height: 1.6;
}
.copyright {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted-fg);
}

/* ---- Responsive Tweaks ---- */
@media (max-width: 480px) {
  .form-card { padding: 1.75rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-trust-badges { gap: 1.25rem; }
  .stats-grid { gap: 1rem; }
}
