/* ==========================================================================
   Flixora — Components CSS (Header, Footer, Cards, Buttons, Sections)
   ========================================================================== */

/* ─── HEADER ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo span {
  color: var(--gold);
}

.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 4px;
  position: relative;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--gold);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--text-primary);
  padding: 4px 8px;
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background:
    radial-gradient(ellipse at top, rgba(232, 184, 75, 0.08), transparent 70%),
    radial-gradient(ellipse at bottom right, rgba(194, 65, 12, 0.06), transparent 60%),
    var(--bg-primary);
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-block;
  background: rgba(232, 184, 75, 0.12);
  color: var(--gold);
  border: 1px solid rgba(232, 184, 75, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-family: 'Cairo', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Film strip — التوقيع البصري */
.film-strip {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px,
    var(--gold) 8px,
    transparent 8px,
    transparent 20px
  );
  opacity: 0.15;
}

.film-strip-mini {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px,
    var(--gold) 4px,
    transparent 4px,
    transparent 10px
  );
  margin-top: 12px;
  border-radius: 2px;
  opacity: 0.6;
}

/* ─── SECTIONS ──────────────────────────────────────────────────────────── */
.section {
  padding: 64px 0;
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 32px;
  padding-bottom: 12px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 50px;
}

/* ─── REVIEW CARDS GRID ─────────────────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.review-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-hover);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.card-image {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.review-card:hover .card-image img {
  transform: scale(1.06);
}

.card-rating {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: #0D0F14;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
}

.badge-movie  { background: #1e40af; color: white; }
.badge-series { background: #166534; color: white; }
.badge-anime  { background: var(--orange); color: white; }

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.card-year {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: #0D0F14;
}

.btn-primary:hover {
  background: var(--gold-soft);
  transform: translateY(-2px);
  color: #0D0F14;
}

.btn-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: var(--gold);
  color: #0D0F14;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 400px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
  transform: translateX(-4px);
}

.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── STATIC PAGES (about / contact) ────────────────────────────────────── */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(232, 184, 75, 0.06), transparent 70%);
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.page-content {
  padding: 40px 0 80px;
}

.page-content .prose {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.prose h2 {
  color: var(--gold);
  margin: 28px 0 14px;
  font-size: 1.4rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

.prose ul {
  list-style: none;
  padding-right: 0;
  margin-bottom: 20px;
}

.prose ul li {
  padding: 8px 24px 8px 0;
  position: relative;
  color: var(--text-primary);
}

.prose ul li::before {
  content: '◆';
  position: absolute;
  right: 0;
  top: 8px;
  color: var(--gold);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 184, 75, 0.15);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-msg {
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: var(--radius-sm);
  display: none;
}

.form-msg.visible {
  display: block;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 64px);
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 20px;
    transition: right 0.35s ease;
    border-left: 1px solid var(--border);
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav a {
    font-size: 1.1rem;
    width: 100%;
  }

  .hero {
    padding: 50px 0 70px;
  }

  .hero-stats {
    gap: 24px;
  }

  .section {
    padding: 40px 0;
  }

  .reviews-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .site-footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }

  .page-content .prose {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-rating, .card-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
}
