/*
Theme Name:   Astra Child — Al-Waqf
Theme URI:    https://al-waqf.org
Description:  Astra child theme for جمعية الوقف الخيرية — RTL Arabic bilingual (AR/EN)
Author:       Al-Waqf
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
*/

/* =============================================
   ARABIC TYPOGRAPHY — Cairo + Amiri (self-hosted)
   ============================================= */

/* Cairo — variable font, three subsets; single file covers weights 400–700 each */
@font-face {
  font-family: 'Cairo';
  src: url('fonts/Cairo-arabic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Cairo';
  src: url('fonts/Cairo-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02FF, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cairo';
  src: url('fonts/Cairo-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Amiri';
  src: url('fonts/Amiri-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   BRAND COLORS
   ============================================= */
:root {
  /* Real brand colors from official logo (Wayback Machine, Aug 2025) */
  --waqf-green:      #2D2D5F;   /* navy-indigo — wordmark colour */
  --waqf-green-dark: #1e1e42;   /* darker navy for hover/active */
  --waqf-teal:       #2ABFAD;   /* teal — emblem mark start */
  --waqf-teal-dark:  #1d9e8e;
  --waqf-gold:       #C4A44A;   /* amber-gold — diacritic dots */
  --waqf-gold-light: #d9bc6e;
  --waqf-navy:       #2D2D5F;   /* same as primary */
  --waqf-white:      #ffffff;
  --waqf-bg:         #f5f6fa;
  --waqf-text:       #1a1a2e;
  --waqf-muted:      #5a5a7a;
  --waqf-border:     #dde0f0;
}

/* =============================================
   RTL GLOBAL RESET
   ============================================= */
html[lang="ar"],
html[lang="ar"] body {
  direction: rtl;
  text-align: right;
}
html[lang="en"],
html[lang="en"] body {
  direction: ltr;
  text-align: left;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--waqf-text);
  background-color: var(--waqf-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cairo', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.4;
  color: var(--waqf-navy);
}

/* Formal text (annual reports, legal text) */
.formal-text,
.annual-report-body {
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.05rem;
  line-height: 2;
}

/* =============================================
   BILINGUAL TOGGLE
   ============================================= */
.en-content { display: none; }
.ar-content { display: block; }

html.lang-en .ar-content { display: none; }
html.lang-en .en-content { display: block; }
html.lang-ar .ar-content { display: block; }
html.lang-ar .en-content { display: none; }

/* Language switcher button */
#lang-switcher {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  background: var(--waqf-teal);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 8px 20px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.03em;
}
#lang-switcher:hover {
  background: var(--waqf-teal-dark);
  transform: translateY(-1px);
}
html[lang="en"] #lang-switcher {
  left: auto;
  right: 20px;
}

/* =============================================
   HEADER & NAV
   ============================================= */
.site-header,
.ast-primary-header-bar {
  background: var(--waqf-green) !important;          /* navy-indigo header */
  border-bottom: 3px solid var(--waqf-teal);         /* teal accent line */
}
.ast-primary-header-bar .main-header-bar {
  background: var(--waqf-green);
}
.main-navigation a,
.ast-header-break-point .main-navigation a,
#ast-mobile-header .main-navigation a {
  color: #fff !important;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}
.main-navigation a:hover {
  color: var(--waqf-gold-light) !important;
}
.site-title a,
.ast-site-identity a {
  color: #fff !important;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.site-description {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.85rem;
}

/* Logo */
.custom-logo-link img,
.site-logo img {
  max-height: 50px;
  width: auto;
}

/* ---- Two-row header: logo row + full-width nav row ---- */

/* Stack header internals vertically */
.ast-primary-header-bar .main-header-bar-wrap {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 0 !important;
}

/* Logo row */
.ast-primary-header-bar .ast-site-identity-wrap,
.ast-primary-header-bar .site-identity {
  padding: 10px 24px;
  display: flex;
  justify-content: flex-end;   /* RTL: logo on the right */
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Nav row — full width */
.ast-primary-header-bar .ast-primary-header-bar-navigation,
.ast-primary-header-bar .main-navigation {
  width: 100% !important;
  max-width: 100% !important;
}

/* Nav <ul>: one line, spread across full width */
.ast-nav-menu.ast-flex {
  flex-wrap: nowrap !important;
  justify-content: center;
  width: 100%;
  padding: 0 16px !important;
  margin: 0 !important;
}

/* Nav links: readable size */
.ast-nav-menu .menu-item > .menu-link,
#ast-hf-menu-1 .menu-item > a {
  font-size: 0.95rem !important;
  padding: 12px 10px !important;
  white-space: nowrap;
  letter-spacing: 0 !important;
}

/* =============================================
   HERO SECTION
   ============================================= */
.waqf-hero {
  background: linear-gradient(135deg, var(--waqf-green) 0%, var(--waqf-green-dark) 50%, #1a1a3a 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.waqf-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.04'%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");
}
.waqf-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.waqf-hero .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,0.9);
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.9;
}
.waqf-hero .hero-cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-primary {
  background: var(--waqf-teal);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover {
  background: var(--waqf-teal-dark);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: inline-block;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* =============================================
   STATS BAR
   ============================================= */
.waqf-stats {
  background: var(--waqf-navy);
  color: #fff;
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
  padding: 16px 24px;
  border-inline-end: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-inline-end: none; }
.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--waqf-gold);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
  display: block;
}

/* =============================================
   SECTION STYLES
   ============================================= */
.waqf-section {
  padding: 64px 24px;
  max-width: 1140px;
  margin: 0 auto;
}
.waqf-section-alt {
  background: #fff;
  padding: 64px 24px;
}
.waqf-section-alt > .waqf-section-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--waqf-green);
  margin-bottom: 12px;
}
.section-header .section-subtitle {
  color: var(--waqf-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--waqf-gold);
  margin: 16px auto;
  border-radius: 2px;
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.project-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 4px solid var(--waqf-teal);
}
.project-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.project-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--waqf-border);
}
.project-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--waqf-green) 0%, var(--waqf-green-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.project-card-body {
  padding: 20px;
}
.project-card-category {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--waqf-teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--waqf-navy);
}
.project-card p {
  font-size: 0.95rem;
  color: var(--waqf-muted);
  line-height: 1.7;
}
.project-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 12px;
}
.status-active   { background: #e8f5e9; color: #2e7d32; }
.status-complete { background: #e3f2fd; color: #1565c0; }

/* =============================================
   DONATE SECTION
   ============================================= */
.donate-section {
  background: linear-gradient(135deg, var(--waqf-green) 0%, #1a1a3a 100%);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}
.donate-section h2 { color: #fff; }
.donate-section .subtitle { color: rgba(255,255,255,0.85); margin-bottom: 32px; }
.donate-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
}
.donate-method {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.2);
}
.donate-method h4 { color: var(--waqf-gold); margin-bottom: 8px; font-size: 1rem; }
.donate-method p  { color: rgba(255,255,255,0.85); font-size: 0.92rem; margin: 0; }

/* =============================================
   ANNUAL REPORTS
   ============================================= */
.reports-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.report-item {
  background: #fff;
  border: 1px solid var(--waqf-border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--waqf-navy);
}
.report-item:hover {
  border-color: var(--waqf-teal);
  box-shadow: 0 4px 16px rgba(42,191,173,0.15);
}
.report-icon { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.report-year { font-size: 1.2rem; font-weight: 700; }
.report-download { font-size: 0.8rem; color: var(--waqf-teal); margin-top: 6px; display: block; }

/* =============================================
   JOBS SECTION
   ============================================= */
.jobs-list {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
.job-item {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  border-inline-start: 4px solid var(--waqf-teal);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.job-info h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--waqf-navy); }
.job-meta { font-size: 0.88rem; color: var(--waqf-muted); }
.job-meta span { margin-inline-end: 16px; }
.job-apply {
  background: var(--waqf-teal);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.job-apply:hover { background: var(--waqf-teal-dark); }
.jobs-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--waqf-muted);
  background: #fff;
  border-radius: 8px;
  border: 2px dashed var(--waqf-border);
}

/* =============================================
   CONTACT
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--waqf-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-info-item h4 { font-size: 0.9rem; color: var(--waqf-muted); margin-bottom: 4px; }
.contact-info-item p  { font-size: 1rem; color: var(--waqf-navy); margin: 0; }
.contact-map {
  border-radius: 10px;
  overflow: hidden;
  height: 350px;
  background: var(--waqf-border);
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer,
.ast-footer-widgets {
  background: var(--waqf-navy) !important;
  color: rgba(255,255,255,0.8) !important;
}
.ast-footer-widgets a { color: rgba(255,255,255,0.7) !important; }
.ast-footer-widgets a:hover { color: var(--waqf-gold) !important; }
.ast-footer-copyright {
  background: rgba(0,0,0,0.2) !important;
  color: rgba(255,255,255,0.6) !important;
  padding: 12px 24px;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  .waqf-hero    { padding: 48px 16px; }
  .waqf-section { padding: 40px 16px; }
  .waqf-stats   { gap: 0; }
  .stat-item    { border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,0.1); flex: 1 1 50%; }
  #lang-switcher { top: 12px; left: 12px; padding: 6px 14px; font-size: 0.82rem; }
}

/* =============================================
   ENGLISH-MODE OVERRIDES (LTR adjustments)
   ============================================= */
html.lang-en body {
  font-size: 1rem;
  line-height: 1.7;
}
html.lang-en .contact-info-item { flex-direction: row; }
