/* ============================================================
   MOROCCO PUBLIC HOLIDAYS — style.css
   Aesthetic: Refined editorial · Warm terracotta / sand / ivory
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

/* ── CSS CUSTOM PROPERTIES ── */
:root {
  /* Light theme */
  --bg:          #faf7f2;
  --surface:     #ffffff;
  --surface2:    #f3ede3;
  --border:      rgba(0,0,0,0.08);
  --text:        #1a1612;
  --text-muted:  #7a6e61;
  --accent:      #c1440e;       /* terracotta */
  --accent2:     #e8a44a;       /* saffron */
  --accent-light:#fceee5;
  --national:    #c1440e;
  --religious:   #1a6b4a;
  --national-bg: #fceee5;
  --religious-bg:#e8f5ee;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.14);
  --radius:      14px;
  --nav-h:       70px;
}

[data-theme="dark"] {
  --bg:          #110e0b;
  --surface:     #1c1713;
  --surface2:    #251f18;
  --border:      rgba(255,255,255,0.08);
  --text:        #f0e9df;
  --text-muted:  #9e9084;
  --accent:      #e05a2a;
  --accent2:     #f0b95a;
  --accent-light:#2a1a10;
  --national-bg: #2a1208;
  --religious-bg:#0a2018;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.3);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.5);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
              transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── HEADER / NAV ── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.logo-icon {
  font-size: 28px; line-height: 1;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(193,68,14,0.3));
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-main { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 700; }
.logo-sub  { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 36px;
}
.nav-link {
  font-size: 14px; font-weight: 500; letter-spacing: 0.3px;
  color: var(--text-muted); position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* Nav controls */
.nav-controls { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  cursor: pointer; font-size: 16px;
  color: var(--text); transition: background 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface2); border-color: var(--accent); }

/* Hamburger */
.hamburger-btn { flex-direction: column; gap: 5px; display: none; }
.hamburger-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  max-height: 0; overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border);
  transition: max-height 0.35s ease;
}
.mobile-menu.open { max-height: 260px; }
.mobile-menu ul { padding: 16px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.mobile-menu .nav-link { font-size: 16px; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 60px) 24px 60px;
  position: relative; overflow: hidden;
  text-align: center;
}

/* Geometric zellige-inspired background */
.hero-pattern {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 39px, var(--border) 39px, var(--border) 40px),
    repeating-linear-gradient(90deg,  transparent, transparent 39px, var(--border) 39px, var(--border) 40px);
  opacity: 0.5;
}
.hero-pattern::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 30%, var(--bg) 85%);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--accent-light); color: var(--accent);
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 28px;
  border: 1px solid rgba(193,68,14,0.2);
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 9vw, 96px);
  font-weight: 700; line-height: 1.0;
  letter-spacing: -2px; margin-bottom: 18px;
}
.hero-title em { color: var(--accent); font-style: italic; }

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-muted); margin-bottom: 20px;
  font-style: italic; letter-spacing: 0.5px;
}

.hero-desc {
  font-size: 16px; color: var(--text-muted);
  max-width: 520px; margin: 0 auto 36px;
  line-height: 1.8;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: 100px;
  background: var(--accent); color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  letter-spacing: 0.3px; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(193,68,14,0.35);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(193,68,14,0.45);
  background: #a8360a;
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 100px;
  background: transparent; color: var(--accent);
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  border: 1.5px solid var(--accent); cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Today indicator */
.today-indicator {
  position: relative; z-index: 1;
  margin-top: 40px; padding: 14px 28px;
  border-radius: 12px; font-size: 15px; font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.today-indicator.holiday {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 40px; gap: 4px;
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px; font-weight: 700; line-height: 1;
  color: var(--accent);
}
.stat-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.stat-divider { width: 1px; height: 48px; background: var(--border); }

/* ── HOLIDAYS SECTION ── */
.holidays-section {
  max-width: 1200px; margin: 0 auto;
  padding: 80px 24px 60px;
}

.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 60px); font-weight: 700;
  letter-spacing: -1px; margin-bottom: 10px;
}
.section-subtitle { font-size: 14px; color: var(--text-muted); letter-spacing: 0.5px; }

/* ── CONTROLS BAR ── */
.controls-bar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px; margin-bottom: 40px;
}

/* Year tabs */
.year-tabs { display: flex; gap: 6px; }
.year-tab {
  padding: 9px 22px; border-radius: 100px;
  background: var(--surface2); border: 1.5px solid transparent;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s;
}
.year-tab:hover { border-color: var(--accent); color: var(--accent); }
.year-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}

/* Type filter */
.type-filter select {
  padding: 9px 16px; border-radius: 100px;
  background: var(--surface2); border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--text); cursor: pointer; outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237a6e61' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.type-filter select:focus { border-color: var(--accent); }

/* Search */
.search-wrap {
  flex: 1; min-width: 180px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 100px; padding: 0 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(193,68,14,0.12);
}
.search-icon { font-size: 14px; }
#search-input {
  flex: 1; border: none; background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--text); outline: none; padding: 10px 0;
}
#search-input::placeholder { color: var(--text-muted); }

/* No results */
.no-results {
  text-align: center; color: var(--text-muted);
  font-size: 15px; padding: 60px 0;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── INDIVIDUAL CARD ── */
.holiday-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.25s ease,
              border-color 0.2s;
  /* staggered reveal */
  opacity: 0; transform: translateY(24px);
}
.holiday-card.visible {
  opacity: 1; transform: none;
}
.holiday-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

/* Accent strip on left edge */
.holiday-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
}
.holiday-card.national::before  { background: var(--national); }
.holiday-card.religious::before { background: var(--religious); }

/* Past card dimmed */
.holiday-card.past { opacity: 0.55; }
.holiday-card.past:hover { opacity: 1; }

/* Today highlight */
.holiday-card.today {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px var(--accent2), var(--shadow-md);
}
.holiday-card.today::after {
  content: 'TODAY';
  position: absolute; top: 14px; right: 14px;
  background: var(--accent2); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  padding: 3px 8px; border-radius: 100px;
}

/* Card top row */
.card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.card-icon {
  font-size: 36px; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  flex-shrink: 0;
}
.card-type-badge {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
  flex-shrink: 0;
}
.card-type-badge.national  { background: var(--national-bg);  color: var(--national); }
.card-type-badge.religious { background: var(--religious-bg); color: var(--religious); }

/* Card body */
.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 700; line-height: 1.2;
}
.card-arabic {
  font-size: 16px; color: var(--text-muted);
  font-style: italic; line-height: 1.4;
  direction: rtl; text-align: right;
}
.card-french {
  font-size: 13px; color: var(--text-muted); letter-spacing: 0.3px;
}

/* Card date row */
.card-date-row {
  display: flex; align-items: center; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.card-date {
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--text);
}
.card-day-name {
  font-size: 13px; color: var(--text-muted);
}
.card-countdown {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-light);
  padding: 2px 10px; border-radius: 100px;
}

/* ── ABOUT SECTION ── */
.about-section {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: 80px 24px;
}
.about-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
.about-text h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px); font-weight: 700;
  margin-bottom: 20px; letter-spacing: -1px;
}
.about-text p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.about-text .btn-outline { margin-top: 12px; }

/* Geometric decorative art */
.about-pattern { display: flex; align-items: center; justify-content: center; }
.geometric-art {
  width: 260px; height: 260px;
  background:
    conic-gradient(from 45deg at 50% 50%,
      var(--accent) 0deg, var(--accent) 45deg,
      transparent 45deg, transparent 90deg,
      var(--accent2) 90deg, var(--accent2) 135deg,
      transparent 135deg, transparent 180deg,
      var(--accent) 180deg, var(--accent) 225deg,
      transparent 225deg, transparent 270deg,
      var(--accent2) 270deg, var(--accent2) 315deg,
      transparent 315deg, transparent 360deg
    );
  border-radius: 50%;
  opacity: 0.18;
  animation: spinSlow 30s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* ── CONTACT SECTION ── */
.contact-section { padding: 80px 24px; }
.contact-inner {
  max-width: 700px; margin: 0 auto; text-align: center;
}
.contact-inner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px); font-weight: 700;
  margin-bottom: 12px; letter-spacing: -1px;
}
.contact-inner > p { color: var(--text-muted); margin-bottom: 36px; }
.contact-grid { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 14px; font-weight: 500;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.contact-icon { font-size: 20px; }

/* ── FOOTER ── */
.site-footer {
  background: var(--text); color: var(--bg);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 14px;
}
.footer-brand .logo-icon { color: var(--accent2); font-size: 32px; }
.footer-brand strong { font-family: 'Cormorant Garamond', serif; font-size: 20px; }
.footer-brand small { font-size: 11px; opacity: 0.6; }
.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
}
.footer-links a {
  font-size: 13px; opacity: 0.6;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; }
.footer-copy { font-size: 12px; opacity: 0.4; max-width: 500px; line-height: 1.6; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface); border-radius: 20px;
  padding: 40px; max-width: 480px; width: 100%;
  position: relative; box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 16px; cursor: pointer; color: var(--text-muted);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--border); }
.modal-icon { font-size: 52px; margin-bottom: 16px; }
.modal-box h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; font-weight: 700; margin-bottom: 6px;
}
.modal-arabic { font-size: 18px; color: var(--text-muted); font-style: italic; margin-bottom: 16px; }
.modal-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.modal-meta span:first-child { font-size: 14px; font-weight: 600; }
.modal-desc { color: var(--text-muted); font-size: 15px; line-height: 1.8; margin-bottom: 24px; }
.modal-btn { width: 100%; justify-content: center; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger-btn { display: flex; }

  .hero-title { letter-spacing: -1px; }

  .stats-bar { gap: 4px; }
  .stat-item { padding: 0 20px; }
  .stat-divider { display: none; }

  .about-inner { grid-template-columns: 1fr; }
  .about-pattern { display: none; }

  .controls-bar { flex-direction: column; align-items: stretch; }
  .year-tabs { justify-content: center; }
  .search-wrap { width: 100%; }

  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stat-item { padding: 0 12px; }
  .stat-num { font-size: 32px; }
  .modal-box { padding: 28px 24px; }
}
