/* ==========================================================================
   NuriNur Design System
   Complete CSS for all pages — colors, typography, layout, components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section 1: CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-primary: #0D7377;
  --color-accent: #D4A843;
  --color-cta: #25D366;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FDF8F0;
  --color-text: #1A1A1A;

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', serif;

  /* Layout */
  --max-content: 768px;
  --max-site: 1200px;
}

/* --------------------------------------------------------------------------
   Section 2: @font-face — Noto Naskh Arabic
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Noto Naskh Arabic';
  src: url('../fonts/noto-naskh-subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+FE70-FEFF;
}

/* --------------------------------------------------------------------------
   Section 3: Reset and Base Styles
   -------------------------------------------------------------------------- */

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-system);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Section 4: Typography Scale
   -------------------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

p, li {
  font-size: 1rem;
  line-height: 1.6;
}

p {
  margin-bottom: 1rem;
}

.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: bidi-override;
  font-size: 1.4em;
  line-height: 1.8;
  display: inline;
}

.vocab-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.vocab-item .arabic-text {
  font-size: 1.5em;
  flex-shrink: 0;
}

.vocab-item .transliteration {
  font-style: italic;
  color: #666;
}

.vocab-item .translation {
  margin-left: auto;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Section 5: Layout Utilities
   -------------------------------------------------------------------------- */

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

.content {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section {
  padding: 3rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

/* --------------------------------------------------------------------------
   Section 6: Header Styles
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.header__logo:hover {
  text-decoration: none;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.header__nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.header__nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.header__cta {
  display: none;
  padding: 0.5rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.header__cta:hover {
  text-decoration: none;
  opacity: 0.9;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* --------------------------------------------------------------------------
   Section 7: Footer Styles
   -------------------------------------------------------------------------- */

.footer {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer__col h4 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  color: #fff;
  opacity: 0.85;
  font-size: 0.95rem;
}

.footer__links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Section 8: Button Components
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-whatsapp {
  background: var(--color-cta);
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1ebe57;
}

.btn-trial {
  background: var(--color-accent);
  color: #fff;
}

.btn-trial:hover {
  background: #c09a3a;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0a5c5f;
}

/* --------------------------------------------------------------------------
   Section 9: Card Components
   -------------------------------------------------------------------------- */

.lesson-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.article-card {
  display: flex;
  gap: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.article-card__thumb {
  flex-shrink: 0;
  width: 120px;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  padding: 1rem;
}

.article-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-card__excerpt {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.video-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #eee;
  overflow: hidden;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.video-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.video-card__body {
  padding: 1rem;
}

.video-card__title {
  font-size: 1rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Section 10: Content Components
   -------------------------------------------------------------------------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #888;
  padding: 1rem 0;
}

.breadcrumb a {
  color: #888;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb li + li::before {
  content: '>';
  margin-right: 0.5rem;
  color: #ccc;
}

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, #0D7377 0%, #095456 50%, #073d3f 100%);
  color: #fff;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.hero__subtitle {
  font-size: 1.3rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.hero__subtitle .arabic-text {
  font-size: 1.1em;
}

.hero__description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn {
  font-size: 1.1rem;
  padding: 0.85rem 2rem;
}

.hero .btn-trial {
  box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4);
}

.hero .btn-primary {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.hero .btn-primary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Trust Bar */
.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.5rem 0;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.trust-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-alt);
  border-radius: 50%;
  font-size: 1.1rem;
}

/* Course Grid */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.course-grid .lesson-card {
  border-top: 3px solid var(--color-primary);
  text-align: center;
}

.course-grid .lesson-card .arabic-text {
  display: block;
  color: var(--color-primary);
  margin: 0.5rem 0;
  font-size: 1.3em;
}

.course-grid .lesson-card p {
  font-size: 0.9rem;
  color: #555;
}

.lesson-card__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* Free Content Grid */
.free-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.free-content-grid > a {
  display: block;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  border-left: 4px solid var(--color-primary);
}

.free-content-grid > a:hover {
  text-decoration: none;
  border-left-color: var(--color-accent);
}

.free-content-grid h3 {
  color: var(--color-primary);
}

.free-content-grid p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0;
}

/* Teacher Profile */
.teacher-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  max-width: 700px;
  margin: 1.5rem auto 0;
}

.teacher-profile__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.teacher-profile__info h3 {
  font-size: 1.75rem;
  color: var(--color-primary);
}

.teacher-profile__info p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
}

.teacher-profile__quote {
  font-size: 1.5rem;
  color: var(--color-primary);
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
}

.testimonial-card blockquote {
  font-style: italic;
  color: #333;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial-card blockquote p {
  margin-bottom: 0;
}

.testimonial-card__author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.testimonial-card__author strong {
  color: var(--color-text);
}

/* Final CTA Section */
.cta-final {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, #0D7377, #095456);
  color: #fff;
}

.cta-final h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta-final p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.cta-final .btn-trial {
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
  box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4);
}

/* Section headings centered */
.section h2 {
  text-align: center;
}

.teacher-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--color-primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
}

.floating-wa {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: var(--color-cta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  animation: pulse 2s ease-in-out infinite;
  text-decoration: none;
}

.floating-wa:hover {
  text-decoration: none;
  transform: scale(1.05);
}

.floating-wa svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* --------------------------------------------------------------------------
   Section 10b: Lesson Navigation
   -------------------------------------------------------------------------- */

.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid #eee;
  font-size: 0.95rem;
}

.lesson-nav a {
  color: var(--color-primary);
  font-weight: 500;
}

.lesson-nav a:hover {
  text-decoration: underline;
}

.lesson-nav span {
  flex: 1;
}

@media (max-width: 767px) {
  .lesson-nav {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   Section 11: Mobile Responsive
   -------------------------------------------------------------------------- */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }

  .header__cta {
    display: inline-flex;
  }

  .hamburger {
    display: none;
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .article-card__thumb {
    width: 180px;
  }

  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .free-content-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    padding: 5rem 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .course-grid .lesson-card:nth-child(4),
  .course-grid .lesson-card:nth-child(5) {
    grid-column: span 1;
  }
}

/* --------------------------------------------------------------------------
   Section 12: Animations
   -------------------------------------------------------------------------- */

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* --------------------------------------------------------------------------
   Section 13: Mobile Nav Overlay
   -------------------------------------------------------------------------- */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--color-bg);
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-overlay.active nav {
  transform: translateX(0);
}

.nav-overlay nav a {
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.nav-overlay nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-overlay__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text);
}
