/* ==================== GLOBAL ==================== */
:root {
  --awqaf-gold: #c89530;
  --awqaf-ink: #0f3c4c;
  --awqaf-border: #e9ecef;
  --awqaf-muted: #6b7280;
  --awqaf-card-radius: 18px;
  --awqaf-card-padding: 16px;
  --awqaf-image-inset: 8px;
  --awqaf-image-height: 220px;
  --awqaf-grid-gap: 23px;
}

body, h1, h2, h3, h4, h5, h6, p, a, span, li, div {
  font-family: 'Cairo', sans-serif !important;
  margin: 0;
  padding: 0;
}

body {
  background: #f9f9f9 !important;
  color: #445A5F;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==================== TOP BAR ==================== */
.top-bar-wrapper {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  margin-bottom: 23px;
  height: 65px;
}

.top-bar {
  background: #c5962d;
  color: #dce6e6;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  border-radius: 40px;
  text-align: center;
  width: 93%;
  padding-bottom: 10px;
}

@media (max-width: 768px) {
  .top-bar {
    font-size: 14px;
    padding: 10px 0;
    width: 93%;
  }
}



/* =========================================================
   HERO SECTION + STICKY HEADER (BLENDED VERSION)
   Optimized for RTL/LTR + Responsive Harmony
========================================================= */

/* ==================== HERO BASE ==================== */
#hero {
  position: relative;
  height: 68vh;
  width: 95%;
  margin: 10px auto;
  border-radius: 40px;
  background: url("../images/frontpage-bg.png") center/cover no-repeat;
  overflow: hidden;
}

/* ==================== HERO BACKGROUND (MOBILE ONLY) ==================== */
@media (max-width: 767px) {
  #hero {
    background: url("../images/frontpage-bg-mobile.png") center/cover no-repeat;
    height: 60vh; /* optional: slightly reduced for better fit on small screens */
  }
}

#hero .hero-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(68, 89, 94, 0.3);
}

/* ==================== HERO HEADER ==================== */
#hero .hero-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: rgba(68, 89, 94, 0.3);
  border-radius: 40px 40px 0 0;
  z-index: 10;
}

/* Logo */
#hero .hero-logo img {
  max-height: 60px;
  width: auto;
  margin: 10px 20px 0 0;
}

/* Menu */
#hero .hero-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1 1 auto;
}

#hero .hero-menu ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#hero .hero-menu ul li a {
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

#hero .hero-menu ul li a:hover,
#hero .hero-menu ul li a.active,
#hero .hero-menu ul li a.is-active {
  color: var(--awqaf-gold);
}

/* Language Switcher */
#hero .lang-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

#hero .lang-switcher a {
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 4px 8px;
}

#hero .lang-switcher a.active,
#hero .lang-switcher a:hover {
  color: var(--awqaf-gold);
}

/* ==================== DIRECTION LOGIC ==================== */

/* RTL */
html[dir="rtl"] #hero .hero-header {
  flex-direction: row;
}

html[dir="rtl"] #hero .hero-header .hero-logo {
  order: 0;
  margin-right: 20px;
}

html[dir="rtl"] #hero .hero-header .hero-menu {
  order: 1;
  flex-direction: row-reverse;
  justify-content: flex-start;
  margin-left: auto;
}

html[dir="rtl"] #hero .hero-header .lang-switcher {
  order: 2;
  flex-direction: row-reverse;
  margin-right: 15px;
}

/* LTR */
html[dir="ltr"] #hero .hero-header {
  flex-direction: row;
}

html[dir="ltr"] #hero .hero-header .hero-logo {
  order: 0;
  margin-right: 20px;
}

html[dir="ltr"] #hero .hero-header .hero-menu {
  order: 1;
  justify-content: flex-end;
  margin-left: auto;
}

html[dir="ltr"] #hero .hero-header .lang-switcher {
  order: 2;
  margin-left: 20px;
}

/* ==================== BRANDING ROTATOR ==================== */
.branding-rotator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  height: 3.5rem;
  overflow: hidden;
  z-index: 5;
}

.branding-text {
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(100%);
  font-size: 2rem;
  font-weight: 700;
  line-height: 3.7rem;
  color: #fff;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.branding-text.active {
  opacity: 1;
  transform: translateY(0);
}

.branding-text.exit {
  opacity: 0;
  transform: translateY(100%);
}

.branding-text .highlight {
  color: var(--awqaf-gold);
}

/* ==============================
   RESPONSIVE BRANDING ROTATOR TEXT
   ============================== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .branding-rotator .branding-text {
    font-size: 2.2rem; /* slightly smaller than desktop */
    line-height: 1.3;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .branding-rotator .branding-text {
    white-space: normal;       /* allow wrapping to two lines */
    max-width: 65%;            /* prevent full-width stretching */
    margin-right: 15px;            /* center text */
    font-size: 2rem;         /* increase size again */
    line-height: 1.35;
  }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .branding-rotator .branding-text {
    font-size: 1.5rem;
    max-width: 90%;
  }
 }

/* ==================== HERO RESPONSIVE ==================== */
@media (max-width: 1024px) {
  #hero {
    height: 350px;
    width: 96%;
    border-radius: 20px;
  }
}

/* ==================== HERO HEADER (Mobile & Tablet ≤1024px) ==================== */
@media (max-width: 1024px) {
  #hero .hero-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(68, 90, 95, 0.4);
    border-radius: 20px;
    z-index: 2000;
  }

  /* Hide desktop menu + switcher */
  #hero .hero-menu,
  #hero .lang-switcher.desktop-switcher {
    display: none !important;
  }

  /* Show hamburger toggle */
  #hero .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #fff;
    z-index: 3000;
  }

  /* Hamburger lines */
  #hero .hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  #hero .hamburger span + span {
    margin-top: 6px;
  }

  /* Mobile Overlay Menu */
  #hero-mobile-menu {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
  }

  #hero-mobile-menu.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Overlay Header (close + logo) */
  #hero-mobile-menu .overlay-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
  }

  #hero-mobile-menu .overlay-logo img {
    height: 45px;
    width: auto;
  }

  #hero-mobile-menu .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #445A5F;
    cursor: pointer;
  }

  /* Navigation links */
  #hero-mobile-menu nav ul {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  #hero-mobile-menu nav a {
    color: #445A5F;
    font-size: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
  }

  #hero-mobile-menu nav a:hover {
    color: #c3922e;
  }

  /* Lang switcher in overlay (now black) */
  #hero-mobile-menu .lang-switcher {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    gap: 15px;
  }

  #hero-mobile-menu .lang-switcher a {
    color: #000 !important;
    font-weight: 600;
    text-decoration: none;
  }

  #hero-mobile-menu .lang-switcher a:hover {
    color: #c3922e;
  }
}

/* ==================== DESKTOP HERO ==================== */
@media (min-width: 1025px) {
  .branding-rotator {
    bottom: 22%;
  }

  .branding-text {
    font-size: 3rem;
    line-height: 3.5rem;
  }

  #hero .mobile-toggle,
  #hero .mobile-menu {
    display: none !important;
  }
}

/* ==================== FIX: Hide Switcher Only on HERO HEADER ==================== */
@media (max-width: 1024px) {
  /* Hide language switcher in hero header */
  .hero-header .lang-switcher {
    display: none;
  }

  /* Keep switcher visible inside overlays (both hero + sticky) */
  .mobile-menu .lang-switcher {
    display: block;
  }

  /* Keep switcher visible on sticky header */
  .sticky-header .lang-switcher {
    display: block;
  }
}


/* =========================================================
   FRONT PAGE STICKY HEADER (RTL + LTR Responsive)
========================================================= */
#site-header.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  background: #445A5F;
  color: #fff;
  border-radius: 0;
  margin: 0;
  padding: 0;
  z-index: 12000;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.26s ease, opacity 0.22s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* visible on scroll */
#site-header.sticky-header.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==================== Layout ==================== */
#site-header .header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 36px;
  box-sizing: border-box;
  gap: 20px;
}

/* default order (LTR): logo left, nav right */
#site-header .header-logo {
  order: 1;
  display: flex;
  align-items: center;
  margin-right: auto;
}

#site-header .nav-switcher-wrapper {
  order: 2;
  display: flex;
  align-items: center;
  gap: 30px;
}

#site-header .mobile-toggle {
  order: 0;
  display: none;
}

/* RTL adjustments */
html[dir="rtl"] #site-header .header-wrapper {
  flex-direction: row;
}

html[dir="rtl"] #site-header .header-logo {
  margin-left: auto;
  margin-right: 0;
}

/* Logo */
#site-header .header-logo img {
  height: 54px;
  width: auto;
  display: block;
}

/* Nav + Lang links */
#site-header .header-nav a,
#site-header .lang-switcher a {
  color: #fff;
  text-decoration: none;
  background: none !important;
  font-weight: 600;
}

#site-header .header-nav a:hover,
#site-header .lang-switcher a:hover {
  color: #c3922e;
}

/* Layout cleanup */
#site-header .header-nav,
#site-header .nav-switcher-wrapper,
#site-header .header-nav ul {
  background: transparent !important;
}

/* ==================== MOBILE ==================== */
@media (max-width: 1024px) {
  #site-header .nav-switcher-wrapper {
    display: none !important;
  }

  #site-header .mobile-toggle {
    display: flex !important;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    gap: 6px;
    cursor: pointer;
  }

  #site-header .hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  #site-header .header-wrapper {
    height: 58px;
    padding: 8px 18px;
  }

  #site-header .header-logo img {
    height: 42px;
  }

 @media (max-width: 1024px) {
  /* LTR: normal order (logo left, hamburger right) */
  html[dir="ltr"] #hero .hero-header {
    flex-direction: row-reverse;
  }

  /* RTL: reversed order (logo right, hamburger left) */
  html[dir="rtl"] #hero .hero-header {
    flex-direction: row-reverse;
  }
}
}

@media (max-width: 1024px) {
  html[dir="ltr"] #site-header .header-wrapper {
    flex-direction: row-reverse;
  }

  html[dir="rtl"] #site-header .header-wrapper {
    flex-direction: row-reverse;
  }
}

/* ==================== MOBILE FULLSCREEN MENU ==================== */
#mobileMenu {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 12100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

#mobileMenu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Overlay header (close btn + logo area) */
#mobileMenu .overlay-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
}

#mobileMenu .overlay-logo img {
  height: 45px;
  width: auto;
}

#mobileMenu .close-btn {
  font-size: 28px;
  background: none;
  border: none;
  color: #445A5F;
  cursor: pointer;
}

/* Mobile nav */
#mobileMenu nav ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

#mobileMenu nav a {
  color: #445A5F;
  font-size: 20px;
  text-decoration: none;
  font-weight: 600;
}

#mobileMenu nav a:hover {
  color: #c3922e;
}

/* Lang switcher inside overlay - black color */
#mobileMenu .lang-switcher {
  margin-top: 2rem;
  color: #000;
}

#mobileMenu .lang-switcher a {
  color: #000 !important;
  font-weight: 600;
  text-decoration: none;
}

#mobileMenu .lang-switcher a:hover {
  color: #c3922e;
}

/* === FIX: Remove dot bullets on header lists === */
#site-header .lang-switcher ul,
#site-header .header-nav ul {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

/* =======================
   MOBILE MENU OVERLAY FIX
   ======================= */
@media (max-width: 1024px) {
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;              /* full screen height */
    background: #fff;           /* or your preferred overlay color */
    z-index: 9999;              /* appear above header and content */
    overflow-y: auto;           /* allow scroll inside if content too long */
    display: none;              /* hidden by default */
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  .mobile-menu.open {
    display: flex;              /* show when toggled */
  }

  body.menu-open {
    overflow: hidden;           /* lock body scroll */
    height: 100vh;
    touch-action: none;
  }

  /* optional: dim background effect */
  .mobile-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: -1;
  }
}

/* ====================
   MOBILE: hide language switcher only in the HERO header
   Keep sticky header + overlay switchers visible
   (Place this at the end of your main CSS file)
   ==================== */
@media (max-width: 1024px) {

  /* Hide the lang-switcher that is the direct child of the hero header
     (does NOT affect the overlay .lang-switcher that lives outside .hero-header) */
  #hero .hero-header > .lang-switcher {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  /* Ensure overlay switcher remains visible (mobile menu) */
  .mobile-menu .lang-switcher {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    color: #000 !important;           /* keep overlay switcher black */
  }

  /* Ensure sticky header switcher remains visible */
  #site-header .lang-switcher {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }
}

/* ==================== ABOUT-US DIRECTION ==================== */

/* Base */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 50px;
  padding-top: 30px;
}

.about-text, 
.about-image {
  flex: 1;
}

.about-text h2 .highlight {
  color: #c89530; /* gold */
}

.about-text {
  flex: 1;
  font-family: 'Cairo', sans-serif;
  color: #333;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 700;  /* bold */
  line-height: 2.1;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif; /* matches Arabic style */
}

.about-text p {
  line-height: 1.8;
}

/* ---------- LTR (English) ---------- */
html[dir="ltr"] .about-content {
  flex-direction: row; /* image left, text right */
}

html[dir="ltr"] .about-image {
  order: 0;
}

html[dir="ltr"] .about-text {
  order: 1;
  text-align: left;
  direction: ltr;
  padding-left: 20px;
}

/* ---------- RTL (Arabic) ---------- */
html[dir="rtl"] .about-content {
  flex-direction: row-reverse; /* flips so text left, image right */
}

html[dir="rtl"] .about-text {
  text-align: right;
  direction: rtl;
  padding-right: 20px;
}

html[dir="rtl"] .about-image {
  justify-content: flex-end;
}

/* ---------- Responsive (stacked on mobile) ---------- */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column !important;
    gap: 20px;
    text-align: justify;
  }

  .about-text h2 {
    line-height: 1.5;
  }

  .about-text, 
  .about-image {
    order: initial !important;
    width: 100%;
    padding: 0;
    margin: 0 auto;
  }
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  height: auto;
  transform: scale(1.05); /* slight zoom for desktop */
  object-fit: cover;
}

/* ==================== ABOUT-US ANIMATIONS ==================== */

/* Base animation styles */
.about-text, 
.about-image {
  opacity: 0;                /* hidden initially */
  transform: translateX(0);  /* reset for safety */
  animation-duration: 1s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

/* ---------- LTR (English) ---------- */
html[dir="ltr"] .about-image {
  animation-name: slideInLeft;
}

html[dir="ltr"] .about-text {
  animation-name: slideInRight;
}

/* ---------- RTL (Arabic) ---------- */
html[dir="rtl"] .about-text {
  animation-name: slideInLeft;
}

html[dir="rtl"] .about-image {
  animation-name: slideInRight;
}

/* ---------- Keyframes ---------- */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Image size adjustments ---------- */

/* Mobile */
@media (max-width: 768px) {
  .about-image img {
    width: 100%;
    height: 320px;        /* taller for mobile */
    object-fit: cover;
    transform: scale(1.1); /* stronger zoom */
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .about-image img {
    height: 400px;        /* bigger than desktop */
    object-fit: cover;
    transform: scale(1.08);
  }
}

/* ==================== OPPORTUNITIES (updated to match target design) ==================== */
:root {
  --awqaf-gold:           goldenrod;   /* brighter gold for headings */
  --awqaf-ink:            #0f3c4c;
  --awqaf-border:         #e9ecef;
  --awqaf-muted:          #6b7280;
  --awqaf-card-radius:    18px;
  --awqaf-card-padding:   18px;   /* slightly more breathing space */
  --awqaf-image-inset:    8px;
  --awqaf-image-height:   220px;
  --awqaf-grid-gap:       24px;
}

/* section wrapper */
.awqaf-opps {
  background: #f9f9f9;
  padding: 48px 0 56px;
}

/* container */
.awqaf-container {
  width: min(1140px, 94%);
  margin-inline: auto;
}

/* title */
.awqaf-title {
  text-align: center;
  font-weight: 700;       /* bolder like target */
  font-size: 42px;        /* slightly reduced for better balance */
  margin: 0 0 28px;
  color: var(--awqaf-gold);
}
.awqaf-title span { color: #222; }

@media (max-width: 676px) {
  .awqaf-title {
    font-size: 25px;   /* further reduced for phones */
    line-height: 1.4;
  }
}

/* grid layout */
.awqaf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--awqaf-grid-gap);
}

/* card base */
.awqaf-grid .op-card {
  background: #f7f7f7;
  border: 1px solid var(--awqaf-border);
  border-radius: var(--awqaf-card-radius);
  overflow: hidden; 
  box-shadow: 0 6px 16px rgba(0,0,0,.08);  /* darker shadow */
  transition: transform .22s ease, box-shadow .22s ease;
  direction: rtl;
  text-align: right;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: var(--awqaf-card-padding);
}

.awqaf-grid .op-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
}

/* image container */
.awqaf-grid .op-card .op-media {
  height: var(--awqaf-image-height);
  padding: var(--awqaf-image-inset);
  margin: 0 0 14px 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
}

.awqaf-grid .op-card .op-media > a > img,
.awqaf-grid .op-card .op-media > img {
  width: 100% !important;
  height: auto !important;
  max-height: calc(var(--awqaf-image-height) - (var(--awqaf-image-inset) * 2)) !important;
  object-fit: contain !important;
  border-radius: calc(var(--awqaf-card-radius) - var(--awqaf-image-inset)) !important;
  transition: transform .35s ease !important;
}

.awqaf-grid .op-card:hover .op-media > img {
  transform: scale(1.03) !important;
}

/* body/content */
.awqaf-grid .op-card .op-body {
  padding: 8px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;   /* tighter spacing like target */
}

/* meta / badge */
.awqaf-grid .op-card .op-meta {
  margin-bottom: 6px;
  font-size: 15px;        /* slightly smaller */
  color: #68707a;
}
.awqaf-grid .op-card .badge {
  background: #eef0f1;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 14px;        /* smaller badge */
}

/* title / excerpt / read-more */
.awqaf-grid .op-card .op-title {
  font-weight: 700;       /* bolder */
  font-size: 20px;        /* slightly smaller than current */
  margin: 0 0 6px;
  line-height: 1.3;
}
.awqaf-grid .op-card .op-excerpt {
  font-size: 15px;
  color: var(--awqaf-muted);
  margin: 0 0 8px;
  line-height: 1.45;      /* more compact */
}
.awqaf-grid .op-card .op-more {
  color: var(--awqaf-ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  transition: color .15s ease;
}
.awqaf-grid .op-card .op-more:hover {
  color: var(--awqaf-gold);
}

/* watermark decoration */
.awqaf-grid .op-card .op-card-deco {
  position: absolute;
  left: 10px;
  bottom: 10px;
  pointer-events: none;
}
.awqaf-grid .op-card .op-card-deco img {
  max-width: 70px;
  opacity: 0.72;
  filter: brightness(0.4) contrast(1.1);
}

/* actions button */
.op-actions { text-align:center; margin-top: 20px; }
.btn-view-all {
  display:inline-block;
  background:#29373A;
  color:#fff;
  padding:10px 28px;
  border-radius: 28px;   /* pill-shaped */
  font-weight:700;
  font-size: 17px;
  text-decoration:none;
  transition: background .22s ease;
}
.btn-view-all:hover { background:var(--awqaf-gold); color:#222; }

/* responsive tweaks */
@media (max-width: 1024px) {
  :root { --awqaf-image-height: 190px; }
  .awqaf-grid { gap: 16px; }
  .awqaf-grid .op-card .op-card-deco img { max-width: 62px; opacity: 0.7; }
}

@media (max-width: 768px) {
  :root { --awqaf-image-height: 200px; }
  .awqaf-grid { grid-template-columns: 1fr; gap: 14px; }
  .awqaf-grid .op-card { padding: 14px; }
}

@media (max-width: 480px) {
  :root { --awqaf-image-height: 160px; --awqaf-card-radius: 12px; }
  .awqaf-grid .op-card { border-radius: 12px; padding: 8px; }
  .awqaf-grid .op-card .op-card-deco img { max-width: 50px; opacity: 0.66; }
}

/* 🌐 Desktop (default: 3 per row) */
.awqaf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 2rem;
}

/* 📱 Tablet (2 per row) */
@media (max-width: 1024px) {
  .awqaf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 📱 Mobile (1 per row) */
@media (max-width: 768px) {
  .awqaf-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet and Mobile Heading Fix */
@media (max-width: 1024px) {
  .your-heading-class {
    font-size: 1.2rem;   /* smaller, balanced size */
    font-weight: 500;    /* not too bold */
    white-space: nowrap; /* keep on one line */
  }

  .your-heading-class span.orange {
    color: goldenrod;
    font-weight: 500; /* slight emphasis */
  }

  .your-heading-class span.black {
    color: black;
    font-weight: 500; /* lighter than desktop */
  }
}
/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  :root { --awqaf-image-height: 240px; }  /* was 200px */
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  :root { --awqaf-image-height: 220px; }  /* was 200px */
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  :root { --awqaf-image-height: 200px; }  /* was 160px */
}


/* ==================== OPPORTUNITIES MOBILE ==================== */
@media (max-width: 767px) {
  .awqaf-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .awqaf-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ==================== BRANCHES ==================== */
.branches-section {
  text-align: center;
  padding: 50px 80px 80px 80px;
  color: #222;
  position: relative;
  background: url("../images/map-world.png") no-repeat center;
  background-size: cover;
  margin-bottom: 120px;
}

.branches-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}
.branches-title .gold { color: #c89d28; }

.branches-description {
  font-size: 15px;
  color: #666;
  margin-bottom: 40px;
  max-width: 700px;
  margin-inline: auto;
  line-height: 1.8;
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.map-container img.map {
  width: 100%;
  height: auto;
  display: block;
}

/* Branch Marker */
.branch-marker {
  position: absolute;
  width: 25px;
  height: 25px;
  background: #fff;               /* solid white center */
  border: 4px solid #c89d28;      /* solid gold ring */
  border-radius: 50%;
  z-index: 1;
  cursor: pointer;
}

/* Tooltip */
.branch-marker::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.branch-marker:hover::after { opacity: 1; }

/* Outer glowing animated ring */
.branch-marker::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: goldenrod; /* soft gold halo */
  animation: pulse 1.5s infinite ease-in-out;
  z-index: -1;
}

/* Glow pulse */
@keyframes pulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  50%  { transform: scale(1.3); opacity: 0.2; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

/* === Desktop positions === */
.medina { top: 46%; left: 20%; }
.qassim { top: 39%; left: 40%; }
.riyadh { top: 49%; left: 47%; }
.alahsa { top: 56%; left: 71%; }
.eastern { top: 49%; left: 77%; }
.jeddah { top: 68%; left: 20%; }
.makkah { top: 68%; left: 28%; }
.taif { top: 64%; left: 33%; }
.albaha { top: 75.3%; left: 30%; }
.asir { top: 79%; left: 34.5%; }
.jazan { top: 85%; left: 31%; }

.branch-marker.branch-clicked {
  transform: scale(1.35);
  transition: transform 180ms ease;
}

/* === Tablet Fix (≤ 991px) === */
@media (max-width: 991px) {
  .map-container { max-width: 700px; }

  .branch-marker {
    width: 18px;
    height: 18px;
    border: 3px solid #c89d28;
  }
  .branch-marker::before {
    width: 28px;
    height: 28px;
    top: -5px;
    left: -5px;
  }

  .medina { top: 43%; left: 19%; }
  .qassim { top: 41%; left: 39%; }
  .riyadh { top: 48%; left: 47%; }
  .alahsa { top: 45%; left: 62%; }
  .eastern { top: 45%; left: 74%; }
  .jeddah { top: 68%; left: 19%; }
  .makkah { top: 66%; left: 28%; }
  .taif { top: 63%; left: 34%; }
  .albaha { top: 74%; left: 30%; }
  .asir { top: 80%; left: 33%; }
  .jazan { top: 86%; left: 30%; }
}
/* === Mobile Fix (≤ 576px) === */
@media (max-width: 576px) {
  .branches-section { padding: 30px 20px; }

  .branch-marker {
    width: 12px;  /* smaller dot */
    height: 12px;
    border: 2px solid #c89d28;
  }
  .branch-marker::before {
    width: 20px;   /* tighter halo */
    height: 20px;
    top: -4px;
    left: -4px;
  }

  .medina { top: 43%; left: 19%; }
  .qassim { top: 41%; left: 39%; }
  .riyadh { top: 48%; left: 47%; }
  .alahsa { top: 45%; left: 62%; }
  .eastern { top: 45%; left: 74%; }
  .jeddah { top: 68%; left: 19%; }
  .makkah { top: 66%; left: 28%; }
  .taif { top: 63%; left: 34%; }
  .albaha { top: 74%; left: 30%; }
  .asir { top: 80%; left: 33%; }
  .jazan { top: 86%; left: 30%; }
}


/* ==================== STATS ==================== */
.stats-section {
  background: #f9fafb;
  padding: 60px 20px;
  text-align: center;
  margin-top: 60px;
  margin-left: 10px;
  margin-right: 10px;
}

.section-header {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.section-header span {
  color: #c69c2b;
}

/* First row (2 items) */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Second row (3 items) */
.stats-row-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 25px;
  max-width: 1100px;
  margin-inline: auto;
}

.stat-box {
  background: #E9EBEC;
  border-radius: 12px;
  text-align: center;
  padding: 35px 20px;
  transition: 0.3s ease-in-out;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0px 5px 15px rgba(0,0,0,0.15);
}

.stat-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
}

.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stat-box h3 {
  font-size:35px;
  font-weight: 700;
  margin: 10px 0;
  color: #465D60;
}

.stat-box p {
  font-size: 20px;
  font-weight: 600;
  color: #465D60;
}

.prefix,
.counter {
  display: inline-block;
}

/* ============ Mobile Responsive ============ */
@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
  .stats-row-2 {
    grid-template-columns: 1fr;
  }
  .stat-box {
    padding: 25px 15px;
  }
  .stat-icon {
    width: 50px;
    height: 50px;
  }
  .stat-box h3 {
    font-size: 22px;
  }
  .stat-box p {
    font-size: 14px;
  }
}

/* ==================== STATS MOBILE ONLY ==================== */
@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: 1fr; /* stack first row */
    gap: 20px;
    margin-bottom: 20px;
  }

  .stats-row-2 {
    grid-template-columns: repeat(2, 1fr); /* 2 per row instead of 3 */
    gap: 20px;
  }

  .section-header {
    font-size: 24px;
  }

  .stat-box {
    padding: 25px;
  }

  .stat-box h3 {
    font-size: 22px;
  }

  .stat-box p {
    font-size: 14px;
  }

  .stat-box i {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .stats-row-2 {
    grid-template-columns: 1fr; /* fully stacked on very small screens */
  }
}



/* ==================== HOMEPAGE FOOTER ==================== */
#homepage-footer {
  background: url("../images/footer-background.png") no-repeat center;
  background-size: cover;
  color: #d5c8c8;
  padding: 40px 20px 20px;
  border-radius: 30px;
  margin: 30px;
  overflow: hidden;
  width: 95%;
  max-width: 100%;
  height: 430px; /* fixed height to prevent jumping */
  position: relative; /* ensures child positioning works */
}

#homepage-footer .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  direction: ltr;
}

/* Footer columns */
#homepage-footer .footer-contact {
  flex: 1;
  min-width: 250px;
  text-align: right;
  margin-left: -470px;
  margin-top: 70px;
}

#homepage-footer .footer-links {
  flex: 1;
  min-width: 250px;
  text-align: right;
  margin-right: 60px;
}

#homepage-footer .footer-logo {
  flex: 1;
  min-width: 250px;
  text-align: right;
  margin-right: -550px;
  margin-top: 80px;
}

#homepage-footer .footer-logo img {
  max-width: 80px;
  margin-bottom: 10px;
}

/* Headings and text */
#homepage-footer .footer-contact h4,
#homepage-footer .footer-links h4 {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

#homepage-footer .footer-contact p,
#homepage-footer .footer-links li,
#homepage-footer .footer-logo p {
  margin-bottom: 10px;
  font-size: 14px;
  color: #d5c8c8;
}

#homepage-footer .footer-contact a,
#homepage-footer .footer-links a {
  color: #d5c8c8;
  text-decoration: none;
  transition: color 0.3s;
}

#homepage-footer .footer-contact a:hover,
#homepage-footer .footer-links a:hover {
  color: #c89d28;
}

/* Link lists */
#homepage-footer .footer-links ul {
  list-style: none;
  margin-top: 10px;
  margin-right: 220px;
  padding: 0;
}

#homepage-footer .footer-links li {
  margin-bottom: 8px;
}

#homepage-footer .footer-links li a {
  font-size: 14px;
}

#homepage-footer .footer-links h4 {
  margin-top: 70px;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  margin-right: 220px;
}

/* ==================== FIXED SOCIAL ICONS ==================== */
#homepage-footer .footer-social {
  display: flex;
  flex-direction: row;
  justify-content: flex-end; /* aligns icons to the right */
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  position: relative;
  z-index: 10; /* makes sure they stay visible */
}

#homepage-footer .footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 16px;
  color: #d5c8c8;
  transition: background 0.3s, color 0.3s;
  text-decoration: none; /* keep links clickable */
}

#homepage-footer .footer-social a:hover {
  background: #c89d28;
  color: #fff;
}

/* Bottom note */
#homepage-footer .footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #d5c8c8;
}


/* ==================== FOOTER MOBILE ==================== */
@media (max-width: 768px) {
  /* container */
  #homepage-footer {
    margin: 0 auto;
    padding: 30px 16px 20px;
    width: calc(100% - 32px);
    border-radius: 20px;
    box-sizing: border-box;
    text-align: center;

    /* 🔹 Background image with fallback color */
    background: #2f3d3d url('/drupal-11/themes/awqaf/images/mobile-footer.png') no-repeat center center;
    background-size: cover;
  }


  /* reset heights */
  #homepage-footer,
  #homepage-footer .footer-container {
    height: auto !important;
    min-height: 0 !important;
  }

  /* stack vertically */
  #homepage-footer .footer-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 37px !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
    text-align: center !important;
  }
  /* center section titles */
#homepage-footer .footer-links h4 {
  width: 100% !important;
  text-align: center !important;
  display: block !important;
  margin: 0 auto 10px auto !important;
}


  /* sections */
  #homepage-footer .footer-logo,
  #homepage-footer .footer-links,
  #homepage-footer .footer-contact,
  #homepage-footer .footer-social,
  #homepage-footer .footer-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto !important;
    padding: 0;
  }

  /* make footer links centered */
  #homepage-footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
  }

  #homepage-footer .footer-links li {
    font-size: 13px;
    margin: 6px 0;
  }

  /* fix social icons side by side */
  #homepage-footer .footer-social {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 12px; /* space between icons */
    margin-top: 10px;
  }

  #homepage-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
  }

  /* spacing between contact and bottom */
  #homepage-footer .footer-bottom {
    margin-top: 20px !important;
  }

  /* order */
  #homepage-footer .footer-logo { order: 1; }
  #homepage-footer .footer-links { order: 2; }
  #homepage-footer .footer-contact { order: 3; }
  #homepage-footer .footer-social { order: 4; }
  #homepage-footer .footer-bottom { order: 5; }
}
  

/* ==================== SCROLL TO TOP BUTTON ==================== */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background-color: #c18b2c; /* gold color like your screenshot */
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 9999;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}
