/* ============================================================
   Saffa.ae — Structural CSS
   To restyle the entire site, edit assets/css/theme.css only.
   All design tokens (colours, fonts, spacing) live there.
   ============================================================ */

/* @imports must precede all other CSS rules */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('./theme.css');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--green-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-gold:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline {
  border: 2px solid var(--green);
  color: var(--green);
  background: transparent;
}
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--white);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.2); border-color: var(--white); }
.btn-wa {
  background: #25D366;
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-wa:hover { background: #1ebe5d; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* WhatsApp icon inline */
.wa-icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img { height: 2.5rem; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--gray-700);
  transition: all 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--green);
  background: var(--gray-50);
}
.nav-link.active { color: var(--green); font-weight: 600; }
.nav-cta { margin-left: 0.5rem; }
.nav-mobile-btn {
  display: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--gray-700);
}
.nav-mobile-btn svg { width: 1.5rem; height: 1.5rem; }
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  padding: 1rem 1.5rem;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}
.mobile-menu-links { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--gray-700);
  transition: all 0.15s;
}
.mobile-menu-link:hover { background: var(--gray-50); color: var(--green); }
.mobile-menu-footer { padding-top: 1rem; border-top: 1px solid var(--gray-200); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: flex; align-items: center; justify-content: center; }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #1e7a3a 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: var(--gold-light); }
.hero-sub {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* ---- Search Bar ---- */
.search-wrap {
  max-width: 680px;
  margin: 0 auto 2rem;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--gold-light); }
.search-icon {
  padding: 0 1rem 0 1.25rem;
  color: var(--gray-500);
  flex-shrink: 0;
}
.search-icon svg { width: 1.25rem; height: 1.25rem; }
#hero-search {
  flex: 1;
  padding: 1rem 0;
  font-size: 1.0625rem;
  color: var(--black);
  font-family: var(--font-sans);
  outline: none;
  border: none;
  background: transparent;
  min-width: 0;
}
#hero-search::placeholder { color: var(--gray-500); }
.search-btn {
  background: var(--green);
  color: var(--white);
  padding: 0 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  height: 100%;
  min-height: 3.25rem;
  transition: background 0.2s;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.search-btn:hover { background: var(--green-light); }

.search-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.search-pill {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.search-pill:hover { background: rgba(255,255,255,0.25); }

/* Search results dropdown */
#search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0; right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 50;
  border: 1px solid var(--gray-200);
}
#search-results.open { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--gray-100);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--gray-50); }
.search-result-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.result-type-directory { background: #d1fae5; color: #065f46; }
.result-type-guide { background: #dbeafe; color: #1e40af; }
.result-type-group { background: #fef3c7; color: #92400e; }
.result-type-event { background: #fce7f3; color: #9d174d; }
.search-result-title { font-weight: 500; font-size: 0.9375rem; color: var(--gray-900); }
.search-result-sub { font-size: 0.8125rem; color: var(--gray-500); margin-top: 0.1rem; }

/* ---- Section ---- */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 6rem 0; }
.section-alt { background: var(--gray-50); }
.section-green { background: var(--green-dark); color: var(--white); }
.section-green h2, .section-green h3 { color: var(--white); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.section-sub { font-size: 1.0625rem; color: var(--gray-600); max-width: 560px; margin: 0.75rem auto 0; }

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }

/* Category cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.cat-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.cat-icon-green { background: #d1fae5; }
.cat-icon-gold { background: #fef3c7; }
.cat-icon-blue { background: #dbeafe; }
.cat-icon-red { background: #fee2e2; }
.cat-icon-purple { background: #ede9fe; }
.cat-title { font-weight: 600; font-size: 1rem; color: var(--gray-900); margin-bottom: 0.25rem; }
.cat-count { font-size: 0.8125rem; color: var(--gray-500); }
.cat-arrow { margin-top: auto; padding-top: 0.75rem; color: var(--green); font-size: 0.875rem; font-weight: 600; }

/* Guide cards */
.guide-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.guide-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.guide-title { font-family: var(--font-serif); font-size: 1.125rem; color: var(--gray-900); margin-bottom: 0.5rem; font-weight: 600; }
.guide-desc { font-size: 0.9rem; color: var(--gray-600); flex: 1; }
.guide-arrow { margin-top: 1rem; color: var(--blue); font-size: 0.875rem; font-weight: 600; }

/* Directory listing card */
.listing-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.listing-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.listing-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.listing-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.listing-name { font-weight: 600; font-size: 1rem; color: var(--gray-900); }
.listing-cat { font-size: 0.8125rem; color: var(--gray-500); }
.listing-desc { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0.75rem; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.listing-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
}
.listing-tag-sa { background: #d1fae5; color: #065f46; }
.listing-verified { background: #fef3c7; color: #92400e; }

/* WhatsApp group cards */
.wa-group-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.wa-group-card:hover { border-color: #25D366; box-shadow: var(--shadow-md); }
.wa-group-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--gray-100);
}
.wa-group-icon img { width: 100%; height: 100%; object-fit: cover; }
.wa-group-name { font-weight: 600; font-size: 0.9375rem; color: var(--gray-900); }
.wa-group-desc { font-size: 0.8125rem; color: var(--gray-500); }
.wa-group-join { margin-left: auto; flex-shrink: 0; }

/* Event cards */
.event-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.event-card:hover { border-color: var(--red); box-shadow: var(--shadow-md); }
.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  flex-shrink: 0;
  text-align: center;
}
.event-month {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
}
.event-day { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.event-body { flex: 1; min-width: 0; }
.event-title { font-weight: 600; font-size: 1rem; color: var(--gray-900); margin-bottom: 0.25rem; }
.event-meta { font-size: 0.8125rem; color: var(--gray-500); }

/* ---- Community CTA banner ---- */
.wa-banner {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--white);
}
.wa-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.wa-banner p { color: rgba(255,255,255,0.85); max-width: 500px; margin: 0 auto 2rem; }

/* ---- Stats bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-item {
  background: var(--white);
  padding: 1.5rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
}
.stat-label { font-size: 0.875rem; color: var(--gray-600); margin-top: 0.25rem; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-400); }

/* ---- Page header ---- */
.page-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 3rem 0 2.5rem;
}
.page-header h1 { color: var(--white); }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.0625rem; margin-top: 0.75rem; }

/* ---- Guide page ---- */
.guide-content { max-width: 760px; }
.guide-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.guide-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #d1fae5;
  color: #065f46;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}
.guide-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-pale);
}
.guide-content h3 { font-size: 1.2rem; margin-top: 1.75rem; margin-bottom: 0.75rem; }
.guide-content ul, .guide-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.guide-content ul { list-style: disc; }
.guide-content ol { list-style: decimal; }
.guide-content li { margin-bottom: 0.5rem; }
.guide-content a { color: var(--green); text-decoration: underline; }
.guide-content a:hover { color: var(--green-light); }

.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.success-box {
  background: #f0fdf4;
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.info-box strong, .warning-box strong, .success-box strong { display: block; margin-bottom: 0.5rem; }

/* Steps */
.steps { counter-reset: step; margin: 1.5rem 0; }
.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.step-num {
  counter-increment: step;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.step-body h4 { margin-bottom: 0.375rem; color: var(--gray-900); }
.step-body p { font-size: 0.9375rem; color: var(--gray-600); margin: 0; }

/* ---- Directory filter bar ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
}
.filter-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--black);
  background: transparent;
}
.filter-select {
  appearance: none;
  background: var(--white) 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='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  padding: 0.5rem 2.25rem 0.5rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--gray-700);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--green); }

/* ---- Footer ---- */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand img { height: 2.75rem; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-family: var(--font-sans); font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-link { font-size: 0.9rem; transition: color 0.15s; }
.footer-link:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom a { color: var(--gold-light); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.footer-social a:hover { background: rgba(255,255,255,0.2); }
.footer-social svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3rem 0; }
  .wa-banner { padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: unset; }
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.875rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---- Page-specific: Submit form ---- */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 500; font-size: 0.9375rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20,89,49,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8125rem; color: var(--gray-500); margin-top: 0.375rem; }

/* ---- Tag chips ---- */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-green { background: #d1fae5; color: #065f46; }
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-gold { background: #fef3c7; color: #92400e; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-gray { background: var(--gray-100); color: var(--gray-600); }

/* ---- No results state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}
.empty-state svg { width: 3rem; height: 3rem; margin: 0 auto 1rem; opacity: 0.4; }

/* ============================================================
   Saffa.ae v0.2 — Visual System, Motion and Layout Upgrades
   Appended below v0.1 structural CSS.
   ============================================================ */

/* ---- Canvas & body upgrade ---- */
body { background: var(--canvas, #FAFAF8); }
.section { background: var(--canvas, #FAFAF8); }
.bg-light, section.bg-light { background: var(--canvas-warm, #F5F2EC); }

/* ---- Hero v0.2 — layered composition ---- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--hero-gradient);
}

/* Hero background image layer */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Directional gradient overlay — text legibility on left, image on right */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay, linear-gradient(to right, rgba(12,34,20,0.82) 0%, rgba(12,34,20,0.55) 55%, rgba(12,34,20,0.15) 100%));
}

/* Gold arcs decorative layer */
.hero-gold-arcs {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 55%;
  max-width: 680px;
  pointer-events: none;
  opacity: 0.7;
  transition: transform 8s ease-in-out;
}

/* Content sits above all layers */
.hero .hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--max-w, 1200px);
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  gap: 0;
}
@media (max-width: 768px) {
  .hero .hero-inner {
    padding: 5rem 1.25rem 3rem;
  }
  .hero {
    min-height: 90svh;
    min-height: 90vh;
  }
}

/* ---- Guide two-column layout (responsive) ---- */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .guide-layout > aside {
    display: none;
  }
}

/* Hero entrance animations — only hide when motion.js confirmed running */
.js-motion [data-hero-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal, 700ms) var(--ease-out, ease),
              transform var(--dur-reveal, 700ms) var(--ease-out, ease);
}
[data-hero-reveal].hero-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero-badge[data-hero-reveal] { transition-duration: 500ms; }
h1[data-hero-reveal] { transition-duration: 700ms; }
.hero-sub[data-hero-reveal] { transition-duration: 650ms; }
.search-wrap[data-hero-reveal] { transition-duration: 750ms; }
.search-pills[data-hero-reveal] { transition-duration: 600ms; }
.hero-cta[data-hero-reveal] { transition-duration: 550ms; }

/* ---- Scroll reveal system ---- */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal, 700ms) var(--ease-out, ease),
              transform var(--dur-reveal, 700ms) var(--ease-out, ease);
}
.reveal-fade {
  opacity: 0;
  transition: opacity var(--dur-reveal, 700ms) var(--ease-out, ease);
}
.reveal-up.revealed,
.reveal-fade.revealed { opacity: 1; transform: none; }

/* Stagger children */
[data-stagger] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease-out, ease), transform 500ms var(--ease-out, ease);
}
[data-stagger].revealed { opacity: 1; transform: none; }

/* ---- Community group visuals (v0.2 with WebP icons) ---- */
.wa-group-card-v2 {
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
  box-shadow: var(--shadow, 0 1px 3px rgb(0 0 0 / 0.1));
  transition: transform var(--dur-base, 260ms) var(--ease-out, ease),
              box-shadow var(--dur-base, 260ms) var(--ease-out, ease),
              outline-color var(--dur-base, 260ms);
  outline: 2px solid transparent;
}
.wa-group-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg, 0 10px 15px rgb(0 0 0 / 0.1));
  outline-color: var(--gold, #B48434);
}
.wa-group-card-v2 .wa-icon-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.wa-group-card-v2 .wa-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.wa-group-card-v2 h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green-dark, #0C2214);
  font-family: var(--font-serif);
}
.wa-group-card-v2 p {
  font-size: 0.8125rem;
  color: var(--gray-500, #6B7280);
  flex: 1;
}
.wa-groups-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .wa-groups-grid-v2 { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* Horizontal swipe rail for mobile community groups */
.wa-swipe-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.wa-swipe-rail::-webkit-scrollbar { display: none; }
.wa-swipe-rail .wa-group-card-v2 {
  flex: 0 0 180px;
  scroll-snap-align: start;
}

/* ---- Homepage hero v0.2 specifics ---- */
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.1;
  color: var(--white, #fff);
  margin: 0.75rem 0;
  font-weight: 700;
}
.hero h1 span {
  color: var(--gold-light, #DA9966);
  display: inline;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-light, #DA9966);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-bottom: 2rem;
}

/* ---- SA ribbon divider ---- */
.sa-ribbon {
  height: 5px;
  background: linear-gradient(to right, #007A4D 33.3%, #000 33.3% 36.6%, #FFB612 36.6% 50%, #DE3831 50% 63.4%, #002395 63.4% 66.6%, #007A4D 66.6%);
  border: none;
  margin: 0;
  opacity: 0.7;
}

/* ---- Gold rule accent ---- */
.gold-rule {
  width: 48px;
  height: 2px;
  background: var(--gold, #B48434);
  margin: 0.75rem 0 1.5rem;
  border-radius: 1px;
}

/* ---- Directory category cards v0.2 ---- */
.cat-card {
  background: var(--surface, #fff);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              outline-color var(--dur-base);
  box-shadow: var(--shadow);
  outline: 2px solid transparent;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  outline-color: var(--gold);
}
.cat-card:hover .cat-icon { transform: translateY(-3px); }
.cat-icon {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform var(--dur-base) var(--ease-spring);
  display: block;
}

/* ---- Task shortcuts row ---- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 860px) { .task-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .task-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; } }

.task-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-out);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-dark);
}
.task-card:hover {
  background: var(--gold-pale, #F5E8CC);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.task-card .task-icon { font-size: 1.375rem; flex-shrink: 0; }

/* ---- Search pills v0.2 (now links) ---- */
.search-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
  backdrop-filter: blur(4px);
}
.search-pill:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}

/* ---- Mobile nav v0.2 refinements ---- */
.mobile-menu {
  transition: transform var(--dur-slow, 500ms) var(--ease-out, ease),
              opacity var(--dur-slow, 500ms) var(--ease-out, ease);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-link {
  transition: color var(--dur-fast), transform var(--dur-fast);
  transform: translateX(12px);
  opacity: 0;
}
.mobile-menu.is-open .mobile-menu-link {
  transform: translateX(0);
  opacity: 1;
}
.mobile-menu.is-open .mobile-menu-link:nth-child(1) { transition-delay: 80ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(2) { transition-delay: 140ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(3) { transition-delay: 200ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(4) { transition-delay: 260ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(5) { transition-delay: 320ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(6) { transition-delay: 380ms; }
.mobile-menu.is-open .mobile-menu-link:nth-child(7) { transition-delay: 440ms; }

/* Body scroll lock when mobile menu open */
body.nav-open { overflow: hidden; }

/* Backdrop when mobile nav open */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 89;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out);
  backdrop-filter: blur(2px);
}
.nav-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ---- Feature card v0.2 hover ---- */
.feature-card {
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base);
  border: 2px solid transparent;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

/* ---- Section label ---- */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ---- About/lifestyle image compositions ---- */
.hero-concept-img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
}

/* ── Reduced-motion override ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-hero-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .reveal-up, .reveal-fade, [data-stagger] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-gold-arcs { transition: none !important; }
  .mobile-menu { transition: none !important; }
  .wa-group-card-v2, .cat-card, .feature-card, .task-card { transition: none !important; }
}

/* ── Site credit footer ──────────────────────────────────────────────────── */
.site-credit {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.5rem;
}
.site-credit a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-credit a:hover { color: rgba(255,255,255,0.85); }

/* ── Affiliated badge ────────────────────────────────────────────────────── */
.badge-affiliated {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.55rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  cursor: help;
}

/* ── Where to get help component ─────────────────────────────────────────── */
.help-box {
  background: var(--canvas-warm);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.help-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.help-providers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.help-provider {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.help-provider-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--gray-100);
}
.help-provider-body { flex: 1; min-width: 0; }
.help-provider-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.help-provider-body p {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 0.6rem;
}
.help-provider-body .btn { font-size: 0.8rem; padding: 0.35rem 0.85rem; }
.help-provider-tag {
  font-size: 0.7rem;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.45rem;
  font-weight: 500;
}
