/* ============================================================
   MUSTAFA SHARMIT THEME — MAIN STYLESHEET
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --navy:        #0c1836;
  --navy-mid:    #111d36;
  --navy-light:  #1a2a4a;
  --gold:        #c9a020;
  --gold-light:  #d4af37;
  --gold-pale:   rgba(201,160,32,.15);
  --cream:       #faf8f5;
  --cream-dark:  #ede9e1;
  --white:       #ffffff;
  --text:        #0c1836;
  --text-muted:  #6b7094;
  --border:      #e2dcd0;
  --card-bg:     #ffffff;
  --radius:      0.5rem;
  --shadow-sm:   0 1px 3px rgba(12,24,54,.08);
  --shadow-md:   0 4px 20px rgba(12,24,54,.12);
  --shadow-lg:   0 12px 40px rgba(12,24,54,.18);
}

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

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

html[dir="rtl"] { font-family: 'Cairo', sans-serif; }
html[dir="ltr"] { font-family: 'Montserrat', sans-serif; }

body {
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Scroll-reveal base */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* Gold gradient text */
.text-gold {
  background: linear-gradient(135deg, #d4af37 0%, #c5a017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section title decoration */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-label .line {
  width: 3rem; height: 2px;
  background: var(--gold);
  flex-shrink: 0;
}
.section-label span {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============================================================
   NAVBAR
   ============================================================ */

/* ── WordPress Admin Bar compatibility ── */
.admin-bar #ms-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar #ms-nav { top: 46px; }
}

#ms-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background .3s, padding .3s, box-shadow .3s;
}
#ms-nav.scrolled {
  background: rgba(250,248,245,.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  transition: color .3s;
}
#ms-nav.scrolled .nav-logo { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  transition: color .2s;
}
.nav-links a:hover { color: var(--gold); }
#ms-nav.scrolled .nav-links a { color: rgba(12,24,54,.75); }
#ms-nav.scrolled .nav-links a:hover { color: var(--gold); }

.nav-divider { width: 1px; height: 1.5rem; background: rgba(255,255,255,.25); }
#ms-nav.scrolled .nav-divider { background: rgba(12,24,54,.15); }

.nav-lang-btn {
  display: flex; align-items: center; gap: .4rem;
  font-size: .875rem; font-weight: 500;
  color: rgba(255,255,255,.88);
  transition: color .2s;
}
.nav-lang-btn:hover { color: var(--gold); }
#ms-nav.scrolled .nav-lang-btn { color: rgba(12,24,54,.75); }
.nav-lang-btn svg { width: 1rem; height: 1rem; }

.nav-mobile-toggle {
  display: none;
  color: #fff;
  transition: color .3s;
}
#ms-nav.scrolled .nav-mobile-toggle { color: var(--text); }

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: .5rem;
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow-md);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  padding: .6rem 1rem;
  border-radius: .375rem;
  font-weight: 500;
  color: rgba(12,24,54,.75);
  transition: background .2s;
}
.nav-mobile-menu a:hover { background: var(--cream-dark); color: var(--gold); }

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #08101e 0%, #111d36 100%);
  overflow: hidden;
  position: relative;
  padding-top: 5rem;
}
.hero-glow-1 {
  position: absolute; top: -10%; right: -5%;
  width: 50vw; height: 50vw;
  border-radius: 50%;
  background: rgba(201,160,32,.05);
  filter: blur(120px);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute; bottom: -10%; left: -5%;
  width: 40vw; height: 40vw;
  border-radius: 50%;
  background: rgba(12,24,54,.5);
  filter: blur(100px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 3rem;
  align-items: center;
  position: relative; z-index: 1;
}
html[dir="rtl"] .hero-grid { direction: rtl; }
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem 1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero-tag-dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.4); }
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.hero-title span { display: block; margin-top: .4rem; }
.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,.78);
  max-width: 38rem;
  margin-bottom: 2rem;
  font-weight: 300;
  line-height: 1.6;
}
.hero-quote {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}
html[dir="rtl"] .hero-quote {
  border-left: none;
  border-right: 2px solid var(--gold);
  padding-left: 0;
  padding-right: 1.5rem;
}
.hero-quote p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.88);
  font-style: italic;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-gold {
  padding: .9rem 2rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 4px 20px rgba(201,160,32,.25);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,160,32,.35); }
.btn-ghost {
  padding: .9rem 2rem;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.2); }

.hero-photo-wrap {
  position: relative;
}
.hero-photo-inner {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.hero-photo-inner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
  border-radius: 1rem;
  z-index: 1;
}
.hero-photo-inner img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: contrast(1.05) saturate(1.05);
}
/* Hero placeholder when no portrait is set */
.hero-photo-placeholder {
  background: linear-gradient(145deg, rgba(201,160,32,.12) 0%, rgba(12,24,54,.6) 100%);
  border: 1px solid rgba(201,160,32,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-initials {
  display: flex;
  gap: .75rem;
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-upload-hint {
  position: absolute;
  bottom: 6rem;
  left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  z-index: 3;
}

.hero-stats {
  position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem;
  z-index: 2;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-stat .label { font-size: .7rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .1em; }
.hero-stat .value { font-size: 1.2rem; font-weight: 700; color: #fff; }
.hero-stat-divider { width: 1px; height: 2rem; background: rgba(255,255,255,.2); }

@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { max-width: 24rem; margin: 0 auto; }
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 6rem 0;
  background: var(--cream);
  overflow: hidden;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
html[dir="rtl"] .about-grid { direction: rtl; }
.about-photo-wrap { position: relative; }
.about-photo-bg1 {
  position: absolute; inset: -1rem;
  background: var(--cream-dark);
  border-radius: 1.5rem;
  transform: rotate(2deg);
  z-index: 0;
}
.about-photo-bg2 {
  position: absolute; inset: -1rem;
  background: var(--gold-pale);
  border-radius: 1.5rem;
  transform: rotate(-2deg);
  z-index: 0;
}
.about-photo-wrap img {
  position: relative; z-index: 1;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}
.about-content h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2rem;
  color: var(--text);
}
.about-content h3 span { color: var(--text-muted); }
.about-content p {
  font-size: 1.05rem;
  color: rgba(12,24,54,.75);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: 1.25rem;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.about-stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: .4rem;
}
.about-stat-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { order: 2; }
}

/* ============================================================
   CAREER TIMELINE
   ============================================================ */
#career {
  padding: 6rem 0;
  background: rgba(237,233,225,.4);
}
#career .section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-top: .75rem;
  margin-bottom: 4rem;
}
.timeline {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
}
html[dir="rtl"] .timeline::before {
  left: auto; right: 50%;
  transform: translateX(50%);
}
.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 2.5rem);
  margin-bottom: 3rem;
  position: relative;
}
html[dir="rtl"] .timeline-item {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
  flex-direction: row-reverse;
}
.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
}
html[dir="rtl"] .timeline-item:nth-child(even) {
  justify-content: flex-end;
  padding-left: 0;
  padding-right: calc(50% + 2.5rem);
}
.timeline-node {
  position: absolute;
  left: 50%; top: 1.25rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--gold);
  border: 4px solid var(--cream);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--gold-pale);
  z-index: 1;
}
html[dir="rtl"] .timeline-node {
  left: auto; right: 50%;
  transform: translate(50%, -50%);
}
.timeline-node svg { width: 1rem; height: 1rem; color: var(--navy); }
.timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
  width: 100%;
}
.timeline-card:hover { box-shadow: var(--shadow-md); }
.timeline-year {
  display: inline-block;
  padding: .2rem .75rem;
  background: rgba(12,24,54,.05);
  color: var(--navy);
  font-size: .75rem;
  font-weight: 700;
  border-radius: 9999px;
  margin-bottom: .75rem;
}
.timeline-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}
.timeline-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; }

@media (max-width: 767px) {
  .timeline::before { left: 1.25rem; transform: none; }
  html[dir="rtl"] .timeline::before { left: auto; right: 1.25rem; transform: none; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    padding-right: 0; padding-left: 3.5rem;
    justify-content: flex-start;
  }
  html[dir="rtl"] .timeline-item,
  html[dir="rtl"] .timeline-item:nth-child(even) {
    padding-left: 0; padding-right: 3.5rem;
    justify-content: flex-end;
    flex-direction: row;
  }
  .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    left: 1.25rem; right: auto;
    transform: translate(-50%, -50%);
  }
  html[dir="rtl"] .timeline-node,
  html[dir="rtl"] .timeline-item:nth-child(even) .timeline-node {
    left: auto; right: 1.25rem;
    transform: translate(50%, -50%);
  }
}

/* ============================================================
   FOCUS AREAS
   ============================================================ */
#focus {
  padding: 6rem 0;
  background: var(--navy);
  color: #fff;
}
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}
html[dir="rtl"] .focus-grid { direction: rtl; }
.focus-intro .section-label .line { background: var(--gold); }
#focus .section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-top: .5rem;
  margin-bottom: 1.25rem;
}
#focus .section-title span { color: rgba(255,255,255,.4); display: block; }
.focus-intro p {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  line-height: 1.8;
  font-weight: 300;
}
.focus-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.focus-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem;
  padding: 2rem;
  transition: background .25s, transform .25s;
  backdrop-filter: blur(4px);
}
.focus-card:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); }
.focus-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - .625rem); }
html[dir="rtl"] .focus-card:last-child:nth-child(odd) { margin-right: auto; }
html[dir="ltr"] .focus-card:last-child:nth-child(odd) { margin-left: auto; }
.focus-icon {
  width: 3.5rem; height: 3.5rem;
  background: rgba(201,160,32,.2);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--gold);
  transition: transform .25s;
}
.focus-card:hover .focus-icon { transform: scale(1.1); }
.focus-icon svg { width: 2rem; height: 2rem; }
.focus-card h4 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: .6rem; }
.focus-card p { font-size: .875rem; color: rgba(255,255,255,.55); line-height: 1.7; }

@media (max-width: 991px) { .focus-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .focus-cards { grid-template-columns: 1fr; }
  .focus-card:last-child:nth-child(odd) { grid-column: auto; max-width: 100%; margin: 0; }
}

/* ============================================================
   NEWS
   ============================================================ */
#news { padding: 6rem 0; background: var(--cream); }
.news-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 4rem; gap: 1.5rem;
  flex-wrap: wrap;
}
.news-title-block .section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-top: .5rem;
}
.news-all-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  transition: color .2s;
}
.news-all-link:hover { color: var(--gold); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s, transform .3s;
  display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream-dark);
  position: relative;
}
.news-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s;
}
.news-card:hover .news-card-thumb img { transform: scale(1.06); }
.news-card-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(12,24,54,.1) 0%, rgba(201,160,32,.1) 100%);
}
.news-card-no-img svg { width: 3rem; height: 3rem; color: rgba(12,24,54,.2); }
.news-card-category {
  position: absolute; top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  font-size: .7rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 9999px;
  color: var(--navy);
  display: flex; align-items: center; gap: .35rem;
}
html[dir="rtl"] .news-card-category { right: auto; left: 1rem; }
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card-date {
  display: flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.news-card-date svg { width: 1rem; height: 1rem; }
.news-card h4 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.news-card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.news-card-footer a {
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex; align-items: center; gap: .4rem;
  transition: color .2s;
}
.news-card-footer a:hover { color: var(--gold); }
.news-card-footer svg { width: 1rem; height: 1rem; }

@media (max-width: 991px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* ============================================================
   GALLERY
   ============================================================ */
#gallery { padding: 6rem 0; background: rgba(237,233,225,.35); }
#gallery .section-center { text-align: center; margin-bottom: 4rem; }
#gallery .section-label { justify-content: center; }
#gallery .section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-top: .5rem;
}
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  border-radius: .75rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--cream-dark);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform .7s;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .35s;
  display: flex; align-items: flex-end;
  padding: 1.25rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-inner {
  display: flex; align-items: flex-end; justify-content: space-between;
  width: 100%;
}
.gallery-caption { font-size: .85rem; font-weight: 600; color: #fff; }
.gallery-expand {
  width: 2rem; height: 2rem;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.gallery-expand svg { width: 1rem; height: 1rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.93);
  align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 90vh;
  object-fit: contain;
  border-radius: .5rem;
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 2.5rem; height: 2.5rem;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-close svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 767px) { .gallery-masonry { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-masonry { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  padding: 6rem 0;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
#contact::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: rgba(237,233,225,.6);
  transform: skewY(-2deg);
  transform-origin: top left;
  z-index: 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem 6rem;
  position: relative; z-index: 1;
  align-items: start;
}
html[dir="rtl"] .contact-grid { direction: rtl; }
.contact-info .section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: .75rem 0 1rem;
  line-height: 1.2;
}
.contact-info .section-title span { color: var(--navy); }
.contact-info > p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.contact-detail {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 2rem;
}
.contact-detail-icon {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: rgba(12,24,54,.05);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-detail-icon svg { width: 1.25rem; height: 1.25rem; }
.contact-detail-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.contact-detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.contact-detail-value a { transition: color .2s; }
.contact-detail-value a:hover { color: var(--gold); }

.contact-form-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,160,32,.15);
}
.form-group textarea { min-height: 9rem; resize: vertical; }
.form-error { font-size: .75rem; color: #dc2626; margin-top: .35rem; display: none; }
.form-group.has-error input,
.form-group.has-error textarea { border-color: #dc2626; }
.form-group.has-error .form-error { display: block; }
.btn-submit {
  width: 100%;
  padding: .9rem;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background .2s, transform .2s;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
}
.btn-submit:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-submit svg { width: 1.1rem; height: 1.1rem; }
.btn-submit.loading .btn-submit-text { display: none; }
.form-msg {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  display: none;
}
.form-msg.success { display: block; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.form-msg.error   { display: block; background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

@media (max-width: 767px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
#ms-footer {
  background: var(--navy);
  color: #fff;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
html[dir="rtl"] .footer-grid { direction: rtl; }
.footer-brand h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.footer-brand p { font-size: .875rem; color: rgba(255,255,255,.6); line-height: 1.7; margin-bottom: 1.25rem; max-width: 24rem; }
.footer-link-ext { color: var(--gold); font-weight: 600; font-size: .9rem; transition: color .2s; }
.footer-link-ext:hover { color: #fff; }
.footer-col h3 { font-size: 1rem; font-weight: 700; color: rgba(255,255,255,.88); margin-bottom: 1.25rem; }
.footer-col ul li { margin-bottom: .75rem; }
.footer-col ul a, .footer-col ul span {
  font-size: .875rem;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-top-btn {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.footer-top-btn:hover { background: var(--gold); color: var(--navy); }
.footer-top-btn svg { width: 1.1rem; height: 1.1rem; }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-hero {
  background: var(--navy);
  padding: 8rem 0 4rem;
  color: #fff;
}
.single-post-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 1rem; }
.single-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.single-meta span { font-size: .8rem; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: .35rem; }
.single-meta svg { width: .9rem; height: .9rem; }
.single-cat-badge {
  padding: .25rem .75rem;
  background: var(--gold-pale);
  color: var(--gold-light);
  border-radius: 9999px;
  font-size: .75rem; font-weight: 700;
}
.single-content { padding: 4rem 0; }
.single-content-inner { max-width: 52rem; margin: 0 auto; }
.single-feat-img { border-radius: 1rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-md); }
.single-body { font-size: 1.05rem; color: rgba(12,24,54,.82); line-height: 1.9; }
.single-body p { margin-bottom: 1.4rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--navy); font-weight: 600; font-size: .875rem;
  padding: .6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  transition: background .2s;
}
.back-link:hover { background: var(--cream-dark); }

/* ============================================================
   ADMIN NOTICE (Arabic meta boxes reminder)
   ============================================================ */
.ms-meta-box { padding: 1rem; }
.ms-meta-box label { display: block; font-weight: 600; margin-bottom: .4rem; }
.ms-meta-box input,
.ms-meta-box textarea {
  width: 100%;
  margin-bottom: 1rem;
  direction: rtl;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
}

/* ============================================================
   CUSTOM SECTIONS (ms_section CPT)
   ============================================================ */
.custom-section {
  padding: 6rem 0;
  background: var(--cream);
}
.custom-section:nth-child(even) { background: var(--cream-dark); }
.custom-section--image-text { background: var(--white); }

/* Text block */
.custom-text-block {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}
.custom-text-block .section-title { margin-bottom: 2rem; }
.custom-content { font-size: 1.05rem; line-height: 1.9; color: rgba(12,24,54,.8); }
html[dir="rtl"] .custom-content { text-align: right; }
html[dir="ltr"] .custom-content { text-align: left; }

/* Image + Text block */
.custom-image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
html[dir="rtl"] .custom-image-text { direction: rtl; }
.custom-img-wrap { border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow-md); }
.custom-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.custom-text-wrap .section-title { margin-bottom: 1.5rem; }

/* Stats block */
.custom-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.custom-stat { text-align: center; }
.stat-val {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-lbl { font-size: .875rem; color: var(--text-muted); margin-top: .5rem; font-weight: 600; }

/* Cards grid in custom section */
.custom-cards-block .section-title { margin-bottom: .5rem; }

/* News archive pagination */
.page-numbers {
  display: flex; gap: .5rem; list-style: none; justify-content: center; flex-wrap: wrap;
}
.page-numbers li a,
.page-numbers li span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .875rem; font-weight: 500;
  color: var(--text);
  transition: background .2s, color .2s;
}
.page-numbers li .current { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.page-numbers li a:hover { background: var(--cream-dark); }

/* News archive page hero padding */
#news-archive { background: var(--cream); }

@media (max-width: 767px) {
  .custom-image-text { grid-template-columns: 1fr; gap: 2rem; }
  .custom-text-block { text-align: right; }
}
