/* ========================================================
   Jamia Quran Academy - Modern Cloudflare-Ready Stylesheet
   Color Palette: Deep Emerald Green, Radiant Gold, Warm Pearl
   Typography: Outfit (Headings), Inter (Body), Amiri (Arabic)
   ======================================================== */

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

:root {
  /* Color Tokens */
  --primary: #0a4d3c;
  --primary-light: #116853;
  --primary-dark: #052e24;
  --primary-subtle: #e8f5f1;
  --accent: #d4af37;
  --accent-light: #f3e5ab;
  --accent-dark: #aa8c2c;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d4af37 50%, #b45309 100%);
  --emerald-gradient: linear-gradient(135deg, #0a4d3c 0%, #063428 100%);
  --hero-gradient: linear-gradient(135deg, rgba(10, 77, 60, 0.95) 0%, rgba(5, 46, 36, 0.98) 100%);
  
  --dark: #0f172a;
  --dark-light: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -3px rgba(10, 77, 60, 0.12), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 35px -5px rgba(10, 77, 60, 0.16);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-arabic: 'Amiri', serif;
}

/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

.text-gold {
  color: var(--accent);
}

.text-emerald {
  color: var(--primary);
}

.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #1e1b04;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #fbbf24 0%, #d4af37 50%, #92400e 100%);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-emerald {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(10, 77, 60, 0.3);
}

.btn-emerald:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

/* ========================================================
   Top Notification / Announcement Bar
   ======================================================== */
.top-bar {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar a:hover {
  color: var(--accent);
}

/* ========================================================
   Header & Navigation
   ======================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--dark-light);
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* ========================================================
   Hero Section
   ======================================================== */
.hero {
  position: relative;
  background: var(--hero-gradient);
  color: var(--white);
  padding: 90px 0 110px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.18) 0%, transparent 40%),
                    radial-gradient(circle at 10% 80%, rgba(18, 104, 83, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--accent-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-bismillah {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.hero h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-card-wrapper {
  position: relative;
}

.hero-register-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  color: var(--dark);
}

.hero-register-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.hero-register-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(10, 77, 60, 0.15);
}

.hero-stats-banner {
  margin-top: 60px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 16px;
}

.stat-item h4 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================================
   Section Standards
   ======================================================== */
.section {
  padding: 90px 0;
}

.section-light {
  background-color: var(--white);
}

.section-muted {
  background-color: #f1f5f9;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-badge {
  display: inline-block;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ========================================================
   Courses Grid
   ======================================================== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(10, 77, 60, 0.3);
}

.course-img-wrapper {
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.course-img-wrapper img {
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.course-card:hover .course-img-wrapper img {
  transform: scale(1.08);
}

.course-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-badge {
  align-self: flex-start;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.course-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.course-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.course-meta {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ========================================================
   Why Choose Us Section
   ======================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-box:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-box h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========================================================
   Pricing / Fee Structure
   ======================================================== */
.currency-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.currency-btn {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.currency-btn.active, .currency-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 15px 30px rgba(212, 175, 55, 0.15);
  transform: scale(1.03);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #1e1b04;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-plan-name {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.pricing-days {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.pricing-price {
  font-size: 2.8rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.pricing-period {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 32px;
  flex: 1;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--dark-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

/* ========================================================
   Teachers Section
   ======================================================== */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.teacher-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}

.teacher-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(10, 77, 60, 0.3);
  transform: translateY(-5px);
}

.teacher-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 18px;
  border: 4px solid var(--primary-subtle);
  overflow: hidden;
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-card h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.teacher-title {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.teacher-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================================
   FAQ Accordion
   ======================================================== */
.faq-container {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--dark);
}

.faq-header:hover {
  color: var(--primary);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-body {
  max-height: 400px;
  padding: 0 24px 20px;
  transition: max-height 0.35s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

/* ========================================================
   Footer
   ======================================================== */
.footer {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 70px 0 24px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 22px;
}

.footer-logo img {
  height: 82px;
  width: auto;
  background: #ffffff;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: block;
  object-fit: contain;
  transition: all 0.3s ease;
}

.footer-logo img:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}

.footer h4 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 20px;
}

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

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--accent-light);
  opacity: 0.9;
}

/* ========================================================
   Floating WhatsApp Button (Right Side)
   ======================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: transparent;
}

.floating-whatsapp:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.65);
}

.floating-whatsapp img,
.floating-whatsapp svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========================================================
   Back to Top Button (Left Side)
   ======================================================== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--accent);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  outline: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-light);
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(10, 77, 60, 0.5);
}

.back-to-top svg {
  transition: transform 0.2s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ========================================================
   Responsive Breakpoints
   ======================================================== */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
  .hero-desc {
    margin: 0 auto 32px;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open {
    left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .back-to-top {
    bottom: 20px;
    left: 16px;
    width: 44px;
    height: 44px;
  }
}
