#news-carousel .item img {
  width: 320px;
  height: 240px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
#partners-carousel .item img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@font-face {
  font-family: 'SFProAR';
  src: url('../fonts/SFProAR_regular.ttf') format('truetype'),
       url('../fonts/SFProAR_semibold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* خطوط إضافية مضمّنة لاختيار المسؤول من الإعدادات (EXPO Arabic / Mirsal) */
@font-face {
  font-family: 'EXPO Arabic';
  src: url('../fonts/EXPO-ARABIC-BOOK.TTF') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EXPO Arabic';
  src: url('../fonts/EXPOARABIC-MEDIUM.OTF') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EXPO Arabic';
  src: url('../fonts/EXPO-ARABIC-SEMIBOLD.TTF') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EXPO Arabic';
  src: url('../fonts/EXPOARABIC-BOLD.OTF') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mirsal';
  src: url('../fonts/itfMirsalC-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mirsal';
  src: url('../fonts/itfMirsalC-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mirsal';
  src: url('../fonts/itfMirsalC-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}

html, body, main {
  height: 100%;
}

body {
  font-family: var(--font-body);
  padding: 11px;
}

main {
  background-color: var(--bg-page, #9ddae517);
}

/* ===== تطبيق متغيّرات المظهر (خطوط العناوين + الأزرار) ===== */
h1, h2, h3, h4, h5, h6,
.title, .subtitle, .section-title {
  font-family: var(--font-heading);
}
.button.is-info {
  background-color: var(--button-bg);
  border-color: var(--button-bg);
  color: var(--button-text);
}
.button.is-info:hover,
.button.is-info:focus {
  filter: brightness(0.92);
  color: var(--button-text);
}

.SFProAR-regular {
  font-family: "SFProAR", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.SFProAR-medium {
  font-family: "SFProAR", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.tajawal-bold {
  font-family: "Tajawal", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.tajawal-extrabold {
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.tajawal-black {
  font-family: "Tajawal", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.header {
  border-bottom: 1px solid #e0e0e0;
  padding-top: 12px;
  padding-bottom: 6px;
}

.header .logo {
  max-height: 120px;
}

.header .navbar-item.logo:hover {
  max-height: 120px;
  background: none !important;
  background-color: none !important;
}

.vertical-tabs .cos-tabs ul {
  display: block;
  border-bottom: none;
}
.vertical-tabs .cos-tabs li {
  margin-bottom: 5px;
  display: block;
  padding: 8px 4px 8px 0px;
  transition: background-color 0.5s ease-in-out;
}

.vertical-tabs .cos-tabs li:hover {
  background-color: #ececec;
}

.vertical-tabs .cos-tabs a {
  justify-content: flex-start;
  border-bottom: none !important;
  border-right: 5px solid transparent;
  padding: 0.5em 1em;
}
.vertical-tabs .cos-tabs li.is-active a {
  border-right-color: var(--primary);
  border-bottom-color: transparent !important;
}
.anchor-section {
  padding: 50px 20px;
  min-height: 482px;
}

html {
  scroll-behavior: smooth;
  /* تثبيت المظهر النهاري دائماً: يمنع متصفحات الجوال من قلب ألوان الموقع
     تلقائياً عند تفعيل الوضع الليلي في النظام (Chrome Auto Dark / Samsung Internet) */
  color-scheme: only light;
  background-color: #ffffff;
  forced-color-adjust: none;
}

/* حزام أمان إضافي: حتى لو حاول المتصفح فرض مخطط داكن، تبقى الأرضية والنص كما صُمّما */
@media (prefers-color-scheme: dark) {
  html, body {
    color-scheme: only light;
    background-color: #ffffff;
  }
  main {
    background-color: var(--bg-page, #9ddae517);
  }
}

:root {
  /* ===== لوحة مظهر الموقع — يتحكم بها المسؤول من الإعدادات (الافتراضيات = المظهر الحالي) ===== */
  --primary: #007497;
  --secondary: #005f7a;
  --accent-cyan: #9DDAE5;
  --cream: #ECE6DD;
  --tan: #e0b49c;
  --white: #ffffff;
  --button-bg: #007497;
  --button-text: #ffffff;
  --footer-bg: #9DDAE5;
  --font-body: "EXPO Arabic", "SFProAR", Helvetica, sans-serif;
  --font-heading: "Mirsal", "SFProAR", Helvetica, sans-serif;
  /* ============================================================================ */
  --dark-green: var(--primary);
  --light-green: rgb(48, 101, 141);
  --text-color: #ffffff;
  --hr-color: rgb(68, 126, 170);
  --primary-green: #008069;
  --light-green: #e9f5f3;
  --text-dark: #333;
  --text-light: #555;
  --border-radius-base: 12px;
  --spacing-lg: 32px;
  --spacing-md: 20px;

  --pantone: var(--cream);
  --pantone-light: #ece6dd3d;
}

.custom-footer {
  background-color: var(--footer-bg) !important;
  color: var(--text-color);
  padding: 3rem 1.5rem 2rem 1.5rem;
  direction: rtl;
  text-align: right;
}

.custom-footer .title,
.custom-footer a,
.custom-footer p,
.custom-footer span,
.custom-footer li {
  color: var(--text-color) !important;
}

.custom-title-spacing {
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem !important;
  font-size: 1.2rem !important;
  font-weight: 600;
}

.custom-list {
  list-style: none;
  margin-left: 0;
  margin-right: 0;
}

.custom-list li {
  margin-bottom: 0.5rem;
}

.custom-link:hover {
  text-decoration: underline;
}

.custom-icon-top {
  color: #0196c4;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  font-size: .9rem;
  border: 1px solid #9ddae559;
  border-radius: 50%;
}

.custom-social-links {
  display: flex;
  gap: 10px;
}

.custom-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--text-color);
  border-radius: 5px;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.custom-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.custom-hr {
  background-color: var(--hr-color);
  height: 1px;
  margin: 2rem 0 0 0;
  border: none;
}

.custom-bottom-row {
  margin-top: 1rem;
  align-items: flex-end;
}

.custom-logo-container {
  display: flex;
  align-items: center;
}

.custom-accessibility-icon {
  background-color: var(--light-green);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
}

.custom-logo-text {
  font-weight: bold;
  font-size: 0.9rem;
}

.custom-rega-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: right;
  border-right: 1px solid var(--text-color);
  padding-right: 20px;
}

.custom-rega-logo .custom-logo-subtext {
  font-size: 0.65rem;
  font-weight: 300;
  margin-top: 3px;
}

.custom-vision-logo {
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

.custom-scroll-top-button {
  position: absolute;
  right: 0;
  bottom: 0;
  background-color: var(--light-green);
  border: none;
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  font-size: 1rem;
  margin-right: -1.5rem;
}

.custom-bottom-row .column:last-child {
  position: relative;
}

@media screen and (max-width: 768px) {
  .custom-scroll-top-button {
    display: none;
  }
  .custom-logo-container {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}

.is-size-cos {
  font-size: 12px !important;
}

.title.is-cos-4 {
  font-size: 16px !important;
}

.services-grid-section {
  padding: var(--spacing-lg) 0;
  font-family: 'SFProAR', sans-serif;
}

.services-grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.service-card {
  background-color: #ffffff;
  border-radius: var(--border-radius-base);
  padding: var(--spacing-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #eee;

  text-align: right;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--light-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.card-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--dark-green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-title {
  color: var(--dark-green);
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.card-description {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}

.about-us-title {
  padding-right: 108px;
}

@media (max-width: 768px) {
  .services-grid-container {
    grid-template-columns: 1fr;
  }
  .service-card {
    padding: 25px 20px;
  }

  .about-us-title {
    padding-right: 24px;
  }
}

#scrollToTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 6px;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#scrollToTopBtn:hover {
  background-color: var(--secondary); 
}


#main-carousel .owl-item img,
#main-carousel .owl-item video,
#main-carousel .main-carousel-media {
  width: 100%;
  height: 491px;
  object-fit: cover;
  max-width: initial;
  display: block;
}

#main-carousel .owl-caption {
  position: absolute;
  top: 30%;
  right: 10%;
  color: #ffffff !important;
  z-index: 1000;
}

@media (max-width: 768px) {
  #main-carousel .owl-item { height: auto; }
  #main-carousel .owl-item img,
  #main-carousel .owl-item video,
  #main-carousel .main-carousel-media { height: 56vh; min-height: 300px; }
}

.is-white {
  color: #ffffff !important;
}

.owl-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #333333a2;
  z-index: 10;
}

.saudi-real-estate-metrics {
  direction: rtl;
  text-align: center;
  padding: 30px 20px 42px 20px;
  font-family: "SFProAR", Helvetica, sans-serif;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 40px;
}

.info-icon {
  font-size: 1rem;
  color: #999;
  margin-right: 5px;
  cursor: pointer;
}

.metrics-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap; 
  justify-content: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 180px; 
  max-width: 200px;
}

.metric-icon-box {
  width: 50px;
  height: 50px;
  /* بلا خلفية: أيقونات الإحصائيات صور مفرّغة، وأي لون خلفها يظهر كمربّع دخيل */
  background-color: transparent;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* الأيقونة المرفوعة تملأ المربّع دون تشويه نسبتها */
.metric-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
  white-space: nowrap;
}

.metric-label {
  font-size: 0.85rem;
  color: #0b220f;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .metrics-list, .prize-list {
    gap: 15px;
  }
  .metric-item, .prize-item {
    flex: 1 1 120px; 
  }
}

.prize-box {
  /* بلا خلفية: شعارات الجوائز صور مفرّغة */
  background-color: transparent;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prize-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap; 
  justify-content: space-evenly;
}

.prize-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 180px; 
  max-width: 200px;
  border: 2px solid #ececec;
}

.prize-sec {
  direction: rtl;
  text-align: right;
  padding: 30px 20px;
  font-family: "SFProAR", Helvetica, sans-serif;
}

.owl-carousel .item {
  position: relative;
  border-radius: 6px;
  border: 1px solid #f9f8f8;
}


.text-overlay {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, transparent, transparent,transparent, rgb(48, 101, 141));
  color: white;
  text-align: center;
  padding-top: 8px;
  font-size: 18px;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border-radius: 6px;
}

.text-overlay h2 {
  margin: 0 0 10px 0;
}

.main-carousel .item {
  position: relative;
}


.main-carousel-text-overlay {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1414143d;
  color: white;
  padding-top: 8px;
  font-size: 12px;
  height: 100%;
  cursor: pointer;
}

.main-carousel-text-overlay h2 {
  margin: 0 0 10px 0;
  font-size: 3rem;
  padding-right: 36px;
  font-weight: 600;
  padding: 12px 86px;
  margin-bottom: 0px;
}

.main-carousel-text-overlay p {
  font-size: 1rem;
  padding-right: 36px;
  padding-bottom: 3px;
  font-weight: 600;
  padding: 12px 86px;
}

.main-carousel-text-overlay p:nth-of-type(1) {
  padding: 12px 86px;
}

.main-carousel-text-overlay p:nth-of-type(2) {
  padding: 0px 86px;
}


.carousel-wrapper,
.owl-carousel.owl-theme {
  position: relative;
}

.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: #333;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.owl-carousel .owl-nav button.owl-prev {
  left: -30px;
}

.owl-carousel .owl-nav button.owl-next {
  right: -30px;
}

.owl-carousel .owl-nav button:hover {
  background: none !important;
  color: var(--primary) !important;
}


.chart-container {
  width: 80%;
  margin: 20px auto;
}
canvas {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #ebebeb;
}


.controls {
  text-align: center;
  margin-bottom: 20px;
  font-family: sans-serif;
}
input[type="range"] {
  width: 100%;
  margin: 8px 0px;
  border: 1px solid #d1c6b5;
}

.styled-range {

  -webkit-appearance: none;
  width: 100%;
  background: var(--pantone);
  box-sizing: border-box;
  cursor: crosshair;
}

.range-track-style {
  height: 1.5em;
  cursor: pointer;
  background: linear-gradient(to right, #e0f2f1 0%, #e0f2f1 100%);
  box-shadow: inset 0 0 0 1px #00796B, 
              inset 0 0 0 2px #4db6ac; 
  border-radius: 4px;
}

.styled-range::-webkit-slider-runnable-track {
  height: 1.5em;
  cursor: pointer;
  background: linear-gradient(to right, #e0f2f1 0%, #e0f2f1 100%);
  box-shadow: inset 0 0 0 1px #00796B, 
              inset 0 0 0 2px #4db6ac; 
  border-radius: 4px;
}

.styled-range::-moz-range-track {
  height: 1.5em;
  cursor: pointer;
  background: linear-gradient(to right, #e0f2f1 0%, #e0f2f1 100%);
  box-shadow: inset 0 0 0 1px #00796B, 
              inset 0 0 0 2px #4db6ac; 
  border-radius: 4px;
  border: none; 
}

.styled-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 1.8em;
  width: 0.5em;
  background: #004d40;
  border-radius: 2px;
  margin-top: -0.15em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.styled-range::-moz-range-thumb {
  height: 1.8em;
  width: 0.5em;
  background: #004d40; 
  border-radius: 2px;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.bg-pantone {
  background-color: var(--pantone);
}

.bg-pantone-light {
  background-color: var(--pantone-light);
}

.owl-carousel .owl-dots {
  text-align: center !important;
  padding: 10px 0 !important;
}

.owl-carousel .owl-dot span {
  display: block !important;
  width: 30px !important;
  height: 5px !important;
  margin: 0 4px !important;
  
  background: #e6e6fa !important;
  
  border-radius: 2px !important;
  transition: background-color 0.3s ease;
}

.owl-carousel .owl-dot.active span {
  background: var(--dark-green) !important;
}

.owl-carousel .owl-dot:hover span {
  background: #ccc !important;
}

a.navbar-item.active {
  color: var(--dark-green);
  font-weight: 600;
}


.breadcrumb {
    font-size: .9rem; /* Base font size */
    color: #4a4a4a; /* Text color */
}

.breadcrumb ul {
    display: flex; /* Use flexbox for horizontal alignment */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Prevent items from breaking */
}

.breadcrumb a {
    color: var(--dark-green); /* Bulma's primary blue for links */
    text-decoration: none;
    padding: 0 0.75em; /* Horizontal padding for touch targets */
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #363636; /* Darker on hover */
}

.breadcrumb li:first-child a {
    padding-left: 0; /* Remove padding from the first item's left side */
}

/* * -----------------------------------------------------
 * Arrow Separator Styling (The core trick!)
 * -----------------------------------------------------
 */

/* Target the separator of every list item EXCEPT the first one */
.breadcrumb li:not(:first-child)::before {
    content: ""; /* Required for pseudo-element */
    display: block;
    width: 0;
    height: 0;
    
    /* Create the triangular shape using borders */
    border-top: 0.35em solid transparent;
    border-bottom: 0.35em solid transparent;
    
    /* This border creates the visible arrow pointing right */
    border-right: 0.35em solid #b5b5b5; /* Light gray color for the separator */
    
    margin: 0 0.5em; /* Spacing around the arrow */
}

/* * -----------------------------------------------------
 * Active State Styling
 * -----------------------------------------------------
 */
.breadcrumb li.is-active a {
    color: #363636; /* Darker color for the active link */
    pointer-events: none; /* Make the active link unclickable */
    cursor: default;
}

/* Remove the separator for the active (last) item */
.breadcrumb li.is-active::before {
    margin-left: 0.5em; /* Keep space for consistency */
}

/* * -----------------------------------------------------
 * RTL (Right-to-Left) Implementation
 * -----------------------------------------------------
 */
.breadcrumb-container.rtl .breadcrumb ul {
    flex-direction: row-reverse; /* Reverse the order of list items */
}

.breadcrumb-container.rtl .breadcrumb li:not(:last-child)::after {
    /* Instead of using ::before on every item except the first, 
       we use ::after on every item except the last (the active one)
       to place the separator on the left side. */
    content: "";
    display: block;
    width: 0;
    height: 0;
    
    border-top: 0.35em solid transparent;
    border-bottom: 0.35em solid transparent;
    
    /* Reverse the arrow direction: Border-right makes it point left */
    border-right: 0.35em solid #b5b5b5;
    
    margin: 0 0.5em;
}

/* Hide the default ::before separators in RTL context */
.breadcrumb-container.rtl .breadcrumb li::before {
    display: none;
}

.breadcrumb-container.rtl .breadcrumb li a {
    padding: 0 0.75em;
}

.breadcrumb-container.rtl .breadcrumb li:last-child a {
    padding-right: 0; /* Remove padding from the last (now visually first) item */
}

/* Remove the custom ::after separator on the last/active item in LTR */
.breadcrumb li.is-active::after {
    display: none;
}


.title-section-container {
  margin-bottom: 0px !important;
  background-color: #9ddae51f;
  height: 170px;
  justify-content: center;
  padding-right: 100px;
}


.service-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-align: right;
    height: 100%; /* Ensure all cards have the sam
    e height */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* This aligns elements like the title and icon to the right side of the card */
    text-align: right;
}

/* Header/Icon Section */
.card-header {
    margin-bottom: 15px;
}

.icon-placeholder {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eef4f8; /* احتياطي للمتصفحات القديمة */
    background-color: color-mix(in srgb, var(--primary) 10%, transparent); /* مشتق من لون الهوية */
    color: var(--dark-green); /* Green icon color */
    border-radius: 6px;
    padding: 5px;
}

.icon-placeholder svg {
    width: 20px;
    height: 20px;
}

/* Title */
.card-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Description */
.card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    /* Ensure the description takes up available space before the rating/button */
    flex-grow: 1; 
    margin-bottom: 15px;
}

/* Category Tag */
.card-tag {
    font-size: 0.75rem;
    color: var(--primary);
    background-color: #eef4f8; /* احتياطي */
    background-color: color-mix(in srgb, var(--primary) 10%, transparent);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    align-self: flex-start; /* Align tag to the right (visually, left in RTL) */
}

/* Rating Section */
.card-rating-section {
    display: flex;
    align-items: center;
    /* Use a spacer to push the button to the bottom */
    margin-top: auto; 
    padding-top: 10px; /* Separator from content above */
    width: 100%;
    /* Align rating count to the right and stars to the left */
    justify-content: space-between; 
    
}

.rating-count {
    font-size: 0.8rem;
    color: #999;
}

/* Star Rating Styling - The core trick! */
.stars {
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
    color: #e0e0e0; /* Default color for unrated stars */
    white-space: nowrap;
}

.stars .star {
    /* Create a subtle outline for unrated stars */
    text-shadow: 0 0 1px #999; 
    margin-left: 2px;
}

/* Styles for different rating levels */
/* Full Stars (for example: card 2) */
.stars.full {
    color: #FFC107; /* Gold color for full stars */
}
.stars.full .star {
    text-shadow: none;
}

/* Partial/Empty Stars (for example: card 1) */
.stars.empty {
    color: #e0e0e0; 
}
.stars.empty .star {
    color: #e0e0e0;
}

/* Rating with 3 stars (for example: card 3) */
.stars.partial-3 {
    /* Target the first three stars to be gold */
    color: #FFC107; 
}
.stars.partial-3 .star:nth-child(n+4) {
    /* Target stars 4 and 5 to be grey/outline only */
    color: #e0e0e0;
    text-shadow: 0 0 1px #999;
}

/* Rating with 4 stars (for example: card 4) */
.stars.partial-4 {
    /* Target the first four stars to be gold */
    color: #FFC107; 
}
.stars.partial-4 .star:nth-child(n+5) {
    /* Target star 5 to be grey/outline only */
    color: #e0e0e0;
    text-shadow: 0 0 1px #999;
}


/* Details Button */
.details-button {
    padding: 10px;
    background-color: var(--dark-green); /* Green background color */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 400;
    cursor: pointer;
    margin-top: 15px; /* Separate button from rating section */
    transition: background-color 0.3s ease;
}

/* بديل بصري للأخبار بدون صورة */
.news-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: rgba(255, 255, 255, 0.85);
    font-size: 3.5rem;
}

/* شارة ونافذة ترخيص الجمعية */
.license-badge-wrap { margin-top: 12px; }
.license-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    color: #024a5f;
    border-radius: 12px;
    padding: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.license-badge:hover { transform: translateY(-2px); opacity: 0.85; }
.license-badge-logo { height: 72px; width: auto; display: block; }
.license-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.license-modal.is-open { display: flex; }
.license-modal-inner { position: relative; max-width: 600px; width: 100%; }
.license-modal-inner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #fff;
}
.license-modal-close {
    position: absolute;
    top: -16px;
    left: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* عارض المستندات داخل الموقع (PDF / صور) */
.doc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.82);
    padding: 24px;
    align-items: center;
    justify-content: center;
}
.doc-modal.is-open { display: flex; }
.doc-modal-box {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.doc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f4f6f8;
    border-bottom: 1px solid #e3e8ee;
}
.doc-modal-title {
    font-weight: bold;
    color: #072C49;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-modal-actions { display: flex; gap: 8px; flex-shrink: 0; }
.doc-modal-body {
    flex: 1;
    background: #525659;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}
.doc-modal-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.doc-modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* شريط التنبيهات العلوي */
.top-alert-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 48px;
    position: relative;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}
.top-alert-content { flex: 1; }
.top-alert-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
}
.top-alert-close:hover { opacity: 1; }

/* شعار البرامج العائم (يمين الصفحة الرئيسية) */
.program-badge-float {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 900;
    display: block;
    transition: transform 0.25s ease;
}
.program-badge-float:hover { transform: translateY(-50%) scale(1.05); }
.program-badge-float img {
    max-width: 130px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}
@media (max-width: 768px) {
    .program-badge-float img { max-width: 90px; }
}

/* عرض الصفحات المخصّصة */
.page-content { line-height: 1.9; font-size: 16px; color: #333; margin-bottom: 24px; }
.page-content img { max-width: 100%; height: auto; border-radius: 8px; }
.page-block-heading { color: var(--primary); font-size: 1.4rem; font-weight: bold; margin: 28px 0 14px; border-right: 4px solid var(--accent-cyan); padding-right: 12px; }
.page-block-image { margin: 20px 0; text-align: center; }
.page-block-image img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.page-block-image figcaption { color: #6b7c8e; font-size: 13px; margin-top: 8px; }
.page-block-video { position: relative; max-width: 800px; margin: 24px auto; aspect-ratio: 16/9; }
.page-block-video iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.page-block-pdf { margin: 20px 0; }
.page-block-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 24px 0; }
.page-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.page-card h3 { color: var(--primary); font-weight: bold; margin-bottom: 8px; border-right: 3px solid var(--accent-cyan); padding-right: 10px; }
.page-card p { color: #555; font-size: 14px; line-height: 1.7; }

/* قسم "المزيد من الأخبار" (صفحة تفاصيل الخبر) */
.more-news-title {
    color: #0c3a49;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 10px 0 26px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3e8ee;
    position: relative;
}
.more-news-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 70px;
    height: 2px;
    background: var(--primary);
}
.more-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.more-news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.more-news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
.more-news-thumb {
    height: 190px;
    overflow: hidden;
    background: #f4f6f8;
}
.more-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.more-news-card:hover .more-news-thumb img { transform: scale(1.06); }
.more-news-thumb .news-img-placeholder { min-height: 190px; }
.more-news-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.more-news-date { color: #6b7c8e; font-size: 12px; margin-bottom: 8px; }
.more-news-heading {
    color: #0c3a49;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.more-news-excerpt {
    color: #6b7c8e;
    font-size: 13px;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.more-news-link { color: var(--primary); font-weight: bold; font-size: 13px; margin-top: 14px; }
.more-news-card:hover .more-news-link { color: var(--secondary); }

/* أزرار مشاركة الخبر */
.news-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e3e8ee;
}
.news-share-label { color: #0c3a49; font-weight: bold; font-size: 14px; }
.news-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.share-btn:hover { transform: translateY(-3px); opacity: 0.92; color: #fff; }
.share-wa { background: #25D366; }
.share-x { background: #000; }
.share-fb { background: #1877F2; }
.share-tg { background: #229ED9; }
.share-copy { background: var(--primary); }
.share-copy.is-copied { background: #1aa779; }

/* خط فاصل متدرّج بألوان هوية الجمعية */
.brand-divider {
    height: 5px;
    width: 100%;
    border: none;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #1aa79a 28%, var(--accent-cyan) 52%, var(--cream) 76%, var(--tan) 100%);
    margin: 0 0 12px;
}
/* نفس الخط أسفل مربع عنوان الصفحات الفرعية */
.title-section-container {
    border-bottom: 5px solid transparent;
    border-image: linear-gradient(90deg, var(--primary) 0%, #1aa79a 28%, var(--accent-cyan) 52%, var(--cream) 76%, var(--tan) 100%) 1;
}

/* ============================================================
   تحسينات العرض على الجوال — شاملة لكل الصفحات العامة (2026-07-21)
   ============================================================ */

/* أمان عام: أي وسائط لا تتجاوز عرض الحاوية */
img, video, iframe { max-width: 100%; }

@media (max-width: 768px) {
    /* منع أي تمرير أفقي عرضي على الجوال */
    html, body { overflow-x: hidden; max-width: 100%; }

    /* تقليل الحشوات الكبيرة المضمّنة داخل الصفحات (تُعرّض المحتوى بلا اكتظاظ) */
    [style*="padding: 48px"] { padding: 22px 14px !important; }
    [style*="padding: 64px"] { padding: 26px 14px !important; }
    [style*="padding: 40px"] { padding: 20px 14px !important; }
    [style*="padding: 32px"] { padding: 18px 14px !important; }

    /* أقسام Bulma والحاويات */
    .section { padding: 1.75rem 1rem; }
    .container { padding-left: 12px; padding-right: 12px; }

    /* رأس الصفحات: شريط المسار والعنوان */
    .title-section-container { padding-right: 14px; padding-left: 14px; }
    .title.is-3 { font-size: 1.4rem; }
    .title.is-4 { font-size: 1.15rem; }

    /* الجداول تُمرَّر أفقياً بأمان بدل أن تكسر التخطيط */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* شعار الترويسة أصغر قليلاً حتى لا يطغى على الشريط */
    .navbar-brand .logo { max-height: 84px !important; }

    /* صور تفاصيل الأخبار: ارتفاع مناسب للجوال بدل 400px */
    [style*="height: 400px"] { height: 240px !important; }

    /* التبويبات العمودية (الشفافية/الجوائز): تصبح كتلة فوق المحتوى بلا التصاق */
    .vertical-tabs, .vertical-tabs > div { position: static !important; }

    /* شبكات البطاقات المخصّصة (grid) عمود واحد على الجوال */
    .grid { grid-template-columns: 1fr !important; }

    /* شعار المركز الوطني في الفوتر: توسيط أنيق على الجوال */
    .license-badge-wrap { display: flex; justify-content: center; }
}

/* شاشات صغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .title.is-3 { font-size: 1.25rem; }
    .breadcrumb { font-size: 0.8rem; }
    .license-badge-logo { height: 60px; }
}
