/* ==========================================================================
   Global styles - loaded on every page (awqaf/global-styling).
   ========================================================================== */

/* ---------- One font for the whole site ----------
   Janna LT (brand font) is loaded once (awqaf/global-fonts). The base theme (Olivero) uses its
   own fonts (Metropolis / Lora) through CSS variables, and form controls do
   not inherit fonts by default; both made some pages look different. */
:root {
  /* Brand font (Awqaf brand guidelines): Janna LT Regular / Bold. */
  --awqaf-font: 'Janna LT', Tahoma, Arial, sans-serif;
  /* Brand colours (Awqaf brand guidelines). */
  --brand-green: #435a60;
  --brand-gold: #c99631;
  --brand-green-2: #687a7f;
  --brand-light: #d9dedf;
  --brand-dark: #283639;
  --font-sans: var(--awqaf-font);
  --font-serif: var(--awqaf-font);
  --awqaf-gold-main: #c99631;
  --awqaf-dark: #283639;
}

html,
body,
button,
input,
select,
textarea,
optgroup,
h1, h2, h3, h4, h5, h6,
p, a, li, label, legend, dt, dd,
table, th, td,
blockquote, figcaption,
.text-content,
.leaflet-container,
.ui-widget {
  font-family: var(--awqaf-font);
}

/* Rich text (editor) content inherits the same typography. */
.text-content,
.field--name-body {
  line-height: 1.9;
}

/* Remove the base theme's (Olivero) decorative drop-pattern background on
   every page. Existing pages did this one by one in their own CSS (about,
   contact, investment...), so new pages showed the pattern behind the header. */
body {
  background-image: none !important;
  background-color: #fcfcfc;
}

/* The HTML "hidden" attribute must always win over display rules. */
[hidden] {
  display: none !important;
}

/* ---------- Supplier portal link (header / mobile menu) ---------- */
.supplier-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  font-weight: 600;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}

/* Icon-only button in desktop headers. */
.supplier-link--icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--awqaf-gold-main) !important;
  border: 1.5px solid var(--awqaf-gold-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.supplier-link--icon i {
  font-size: 17px;
}
.supplier-link--icon .supplier-link__text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.supplier-link--icon:hover,
.supplier-link--icon:focus-visible {
  background: var(--awqaf-gold-main);
  color: #fff !important;
}

/* Full (icon + text) button in mobile menus. */
.supplier-link--full {
  margin: 18px auto 0;
  padding: 10px 22px;
  border-radius: 30px;
  background: var(--awqaf-gold-main);
  color: #fff !important;
  font-size: 16px;
  align-self: center;
}
.supplier-link--full:hover,
.supplier-link--full:focus-visible {
  background: var(--awqaf-dark);
}

/* Placement in the front page hero header (flex items use "order"). */
#hero .hero-header .supplier-link {
  order: 2;
}
html[dir="rtl"] #hero .hero-header .supplier-link {
  margin-right: 15px;
}
html[dir="ltr"] #hero .hero-header .supplier-link {
  margin-left: 20px;
}
#site-header .nav-switcher-wrapper .supplier-link,
.nav-switcher .supplier-link {
  margin-inline: 4px;
}

/* ---------- Branch links under the map (front page) ---------- */
.branch-marker {
  display: block;
}
.branch-marker:focus-visible {
  outline: 3px solid var(--awqaf-dark);
  outline-offset: 3px;
}

.branch-links {
  max-width: 1000px;
  margin: 30px auto 0;
  padding: 0 16px;
}
.branch-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.branch-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 30px;
  border: 1px solid #e3d3a7;
  background: #fff;
  color: #444 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .25s ease;
}
.branch-links a i {
  color: var(--awqaf-gold-main);
}
.branch-links a:hover,
.branch-links a:focus-visible {
  background: var(--awqaf-gold-main);
  border-color: var(--awqaf-gold-main);
  color: #fff !important;
}
.branch-links a:hover i,
.branch-links a:focus-visible i {
  color: #fff;
}

/* ---------- Shared building blocks for the new pages ---------- */
.awqaf-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.awqaf-page-container--narrow {
  max-width: 900px;
}

.section-heading {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--awqaf-dark);
  margin: 0 0 8px;
}
.section-heading .gold {
  color: var(--awqaf-gold-main);
}
.section-subheading {
  text-align: center;
  color: #6b7280;
  font-size: 17px;
  margin: 0 0 40px;
}

.btn-gold {
  display: inline-block;
  padding: 12px 34px;
  border-radius: 30px;
  background: var(--awqaf-gold-main);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .3s, transform .2s;
}
.btn-gold:hover {
  background: var(--awqaf-dark);
  transform: translateY(-2px);
}

.awqaf-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed #e0d3ad;
}
.awqaf-empty i {
  font-size: 42px;
  color: var(--awqaf-gold-main);
  margin-bottom: 12px;
  display: block;
}
.awqaf-empty p {
  font-size: 18px;
  margin: 0;
}

/* ---------- Footers ----------
   Both footers had a fixed height (430px, overflow hidden); keep it as a
   minimum so the footer can grow with the links. The links are split into two
   groups: "روابط مهمة" (original pages) and "روابط سريعة" (news, FAQ, join us,
   supplier portal). */
body #internal-footer,
body #homepage-footer {
  height: auto !important;
  min-height: 430px;
}

body #internal-footer .footer-links,
body #homepage-footer .footer-links {
  display: flex;
  align-items: flex-start;
  gap: 70px;
  /* Same offset the original single list had (margin-right: 220px). */
  padding-inline-start: 220px;
}
html[dir="rtl"] body #internal-footer .footer-links,
html[dir="rtl"] body #homepage-footer .footer-links {
  direction: rtl;
}
body #internal-footer .footer-links-group h4,
body #internal-footer .footer-links-group ul,
body #homepage-footer .footer-links-group h4,
body #homepage-footer .footer-links-group ul {
  margin-right: 0;
  margin-left: 0;
}
body #internal-footer .footer-links-group,
body #homepage-footer .footer-links-group {
  white-space: nowrap;
}

@media (max-width: 768px) {
  body #internal-footer .footer-links,
  body #homepage-footer .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-inline-start: 0;
  }
}
/* ---------- Vision & mission (home + about) ---------- */
.vision-mission {
  padding: 70px 20px;
}
.vision-mission__inner {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
@media (max-width: 767px) {
  .vision-mission__inner {
    grid-template-columns: 1fr;
  }
}
.vm-card {
  position: relative;
  overflow: hidden;
  padding: 40px 36px;
  border-radius: 22px;
  background: var(--brand-green, #435a60);
  color: #fff;
  box-shadow: 0 10px 30px rgba(40, 54, 57, .18);
}
/* Brand pattern hint: thin vertical gold lines (secondary pattern). */
.vm-card::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 120px;
  background: repeating-linear-gradient(90deg, rgba(201, 150, 49, .35) 0 2px, transparent 2px 18px);
  opacity: .5;
  pointer-events: none;
}
.vm-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand-gold, #c99631);
  color: #fff;
  font-size: 24px;
  margin-bottom: 18px;
}
.vm-card__title {
  color: #fff !important;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}
.vm-card__text {
  color: rgba(255, 255, 255, .9) !important;
  font-size: 18px;
  line-height: 2;
  margin: 0;
  position: relative;
  z-index: 1;
  max-width: 90%;
}

/* Head office address in the footers: wrap instead of running off the edge. */
#internal-footer .awqaf-address,
#homepage-footer .awqaf-address {
  display: inline-block;
  max-width: 230px;
  white-space: normal;
  line-height: 1.7;
  vertical-align: top;
}

/* ---------- Status / error messages (front end) ----------
   Olivero shows a dark scrolling box; use light, brand-coloured panels. */
.page-content [data-drupal-messages] .messages,
.page-content .messages-list .messages {
  color: var(--brand-dark, #283639);
  background: #f4f6f6;
  border: 1px solid #dfe4e5;
  border-inline-start: 5px solid var(--brand-green, #435a60);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: none;
}
.page-content .messages * {
  color: inherit;
}
.page-content .messages--error {
  background: #fdf1f0;
  border-color: #f3c9c4;
  border-inline-start-color: #c0392b;
}
.page-content .messages--warning {
  background: #fdf7e8;
  border-color: #efdcae;
  border-inline-start-color: var(--brand-gold, #c99631);
}
.page-content .messages--status {
  background: #eef6f0;
  border-color: #c9e3d0;
  border-inline-start-color: #2e7d32;
}
.page-content .messages__content {
  overflow: visible;
  line-height: 1.8;
  font-size: 15px;
}
.page-content .messages__icon svg {
  width: 26px;
  height: 26px;
}
.page-content .messages--error .messages__icon svg { fill: #c0392b; }
.page-content .messages--warning .messages__icon svg { fill: var(--brand-gold, #c99631); }
.page-content .messages--status .messages__icon svg { fill: #2e7d32; }
.page-content .messages__close::before,
.page-content .messages__close::after {
  background-color: #7a8a8e;
}
.page-content .messages ul.item-list__comma-list,
.page-content .messages .item-list ul {
  display: inline;
  margin: 0;
  padding: 0;
}
.page-content .messages a {
  color: #c0392b !important;
  font-weight: 700;
  text-decoration: underline;
}

/* Inline Form Errors: message under each field. */
/* display:block — flex split the message (e.g. with <em>) into columns. */
.awqaf-form .form-item--error-message,
.awqaf-form .form-item__error-message {
  display: block;
  line-height: 1.7;
  color: #c0392b !important;
  font-size: 13px;
  font-weight: 600;
  margin: -12px 0 14px !important;
  background: none;
}
.awqaf-form .form-item--error-message::before,
.awqaf-form .form-item__error-message::before {
  content: "\f06a";
  font: var(--fa-font-solid);
  margin-inline-end: 6px;
}
/* File fields and the consent box: message below, not overlapping. */
.awqaf-form .form-type-managed-file .form-item--error-message,
.awqaf-form .js-form-type-managed-file .form-item--error-message,
.awqaf-form .join-consent .form-item--error-message {
  margin: 8px 0 0 !important;
}
.awqaf-form .join-consent {
  flex-wrap: wrap;
}
.awqaf-form .join-consent .form-item--error-message {
  flex: 1 1 100%;
  order: 10;
}
.awqaf-form .form-item--error-message strong,
.awqaf-form .form-item__error-message strong {
  font-weight: 600;
}
.awqaf-form input.error,
.awqaf-form textarea.error,
.awqaf-form select.error,
.awqaf-form .error .awqaf-drop {
  border-color: #c0392b !important;
  background-color: #fffafa;
}

/* Inline Form Errors summary: links to the fields as chips. */
.page-content .messages--error .item-list,
.page-content .messages--error .item-list__comma-list {
  display: block !important;
}
.page-content .messages--error .item-list ul,
.page-content .messages--error ul.item-list__comma-list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}
.page-content .messages--error .item-list li,
.page-content .messages--error .item-list__comma-list li {
  display: inline-flex;
  margin: 0 !important;
}
.page-content .messages--error .item-list__comma-list li::after {
  content: none !important;
}
.page-content .messages--error .item-list li a {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #f0c4be;
  color: #c0392b !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}
.page-content .messages--error .item-list li a:hover {
  background: #c0392b;
  color: #fff !important;
}

/* Higher specificity than the generic panel rule above. */
.page-content [data-drupal-messages] .messages.messages--error {
  background: #fdf1f0;
  border-color: #f3c9c4;
  border-inline-start-color: #c0392b;
}
.page-content [data-drupal-messages] .messages.messages--warning {
  background: #fdf7e8;
  border-color: #efdcae;
  border-inline-start-color: var(--brand-gold, #c99631);
}
.page-content [data-drupal-messages] .messages.messages--status {
  background: #eef6f0;
  border-color: #c9e3d0;
  border-inline-start-color: #2e7d32;
}
.page-content [data-drupal-messages] .messages__content {
  font-weight: 700;
}
/* Summary links (ul.item-list__comma-list) as chips. */
.page-content [data-drupal-messages] .messages ul.item-list__comma-list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  list-style: none;
  font-weight: 400;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li {
  display: inline-flex;
  margin: 0 !important;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li::after {
  content: none !important;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li a {
  display: inline-block;
  max-width: 100%;
  padding: 3px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #f0c4be;
  color: #c0392b !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li a:hover {
  background: #c0392b;
  color: #fff !important;
}

/* Consent: checkbox and text on one row, error underneath. */
.awqaf-form .join-consent input[type="checkbox"] {
  order: 0;
}
.awqaf-form .join-consent label {
  flex: 1 1 0;
  min-width: 0;
  order: 1;
}

/* Summary panel: same width as the form; chips may wrap (long consent label). */
.join-section [data-drupal-messages],
.contact-section [data-drupal-messages],
.page-content [data-drupal-messages] {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 16px;
}
.page-content [data-drupal-messages] .messages__wrapper {
  padding: 0;
  max-width: none;
}
.page-content [data-drupal-messages] .messages__content {
  min-width: 0;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li {
  max-width: 100%;
}
.page-content [data-drupal-messages] .messages ul.item-list__comma-list li a {
  white-space: normal;
  text-align: start;
}

/* ---------- Suppliers section (home page) ---------- */
.suppliers-section {
  padding: 30px 20px 60px;
  scroll-margin-top: 110px;
}
.suppliers-section__inner {
  position: relative;
  overflow: hidden;
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding: 40px 44px;
  border-radius: 24px;
  background: var(--brand-green, #435a60);
  color: #fff;
  box-shadow: 0 10px 30px rgba(40, 54, 57, .18);
}
/* Secondary brand pattern: thin vertical gold lines. */
.suppliers-section__inner::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 160px;
  background: repeating-linear-gradient(90deg, rgba(201, 150, 49, .35) 0 2px, transparent 2px 18px);
  opacity: .45;
  pointer-events: none;
}
.suppliers-section__text {
  flex: 1 1 420px;
  position: relative;
  z-index: 1;
}
.suppliers-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-gold, #c99631);
  color: #fff;
  font-size: 22px;
  margin-bottom: 14px;
}
.suppliers-section__title {
  color: #fff !important;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 10px;
}
.suppliers-section__title span {
  color: var(--brand-gold, #c99631) !important;
}
.suppliers-section__text p {
  color: rgba(255, 255, 255, .88) !important;
  font-size: 17px;
  line-height: 1.9;
  margin: 0;
  max-width: 620px;
}
.suppliers-section__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.supplier-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  padding: 14px 26px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.supplier-btn:hover {
  transform: translateY(-2px);
}
.supplier-btn--primary {
  background: var(--brand-gold, #c99631);
  border: 2px solid var(--brand-gold, #c99631);
  color: #fff !important;
}
.supplier-btn--primary:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand-green, #435a60) !important;
}
.supplier-btn--outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .85);
  color: #fff !important;
}
.supplier-btn--outline:hover {
  background: #fff;
  color: var(--brand-green, #435a60) !important;
}
@media (max-width: 767px) {
  .suppliers-section__inner {
    padding: 30px 22px;
    text-align: center;
    justify-content: center;
  }
  .suppliers-section__actions {
    width: 100%;
    justify-content: center;
  }
  .supplier-btn {
    flex: 1 1 100%;
  }
}

/* Supplier portal link: plain text, same look as the other menu items. */
.supplier-link.supplier-link--icon,
.supplier-link.supplier-link--full {
  width: auto;
  height: auto;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none !important;
  box-shadow: none;
  white-space: nowrap;
  text-decoration: none !important;
}
.supplier-link.supplier-link--icon {
  color: #fff !important;
  font-size: 17px;
  font-weight: 500;
}
.supplier-link.supplier-link--icon:hover,
.supplier-link.supplier-link--icon:focus-visible {
  color: var(--brand-gold, #c99631) !important;
  background: none !important;
}
/* Mobile menus: a plain text item. */
.supplier-link.supplier-link--full {
  display: block;
  margin: 14px auto 0;
  color: var(--brand-green, #435a60) !important;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.supplier-link.supplier-link--full:hover {
  color: var(--brand-gold, #c99631) !important;
}

/* ---------- Header menus: one typography on every page ----------
   The home hero used weight 500 (Janna LT Regular), the home sticky header
   600 and inner pages Olivero's bold, at 17px / 18px. Janna LT only ships
   Regular and Bold, so these looked like different fonts. */
#hero .hero-menu ul li a,
#site-header .header-nav a,
#site-header .lang-switcher a,
#hero .lang-switcher a,
.header .nav a,
#sticky-header .nav a,
.nav-switcher .language-switcher-language-interface a,
.nav-switcher .language-switcher-language-url a,
.header .language-link,
#site-header .language-link,
#hero .language-link,
.supplier-link.supplier-link--icon {
  font-family: var(--awqaf-font) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 0;
}

/* ---------- Header menus: one spacing between every item ----------
   Menu links get Olivero margins + list gaps, while "بوابة الموردين" and the
   language link sit outside the list, so the gaps were uneven. Use one gap. */
:root {
  --awqaf-nav-gap: 44px;
}
/* Menu lists: the gap only, no Olivero item / list margins. */
#hero .hero-menu ul,
#site-header .header-nav ul,
.header .nav ul,
#sticky-header .nav ul {
  gap: var(--awqaf-nav-gap) !important;
  margin: 0 !important;
}
#hero .hero-menu ul li,
#site-header .header-nav ul li,
.header .nav ul li,
#sticky-header .nav ul li {
  margin: 0 !important;
  padding: 0 !important;
}
/* Rows that hold [menu] [بوابة الموردين] [EN]. */
.header .nav-switcher,
#sticky-header .nav-switcher,
#site-header .nav-switcher-wrapper {
  gap: var(--awqaf-nav-gap) !important;
}
.header .nav-switcher .supplier-link,
#site-header .nav-switcher-wrapper .supplier-link {
  margin: 0 !important;
}
/* Home hero header uses flex "order" + margins instead of a gap. */
#hero .hero-header .supplier-link,
#hero .hero-header .lang-switcher {
  margin-inline: var(--awqaf-nav-gap) 0 !important;
}
#hero .hero-header .supplier-link + .lang-switcher {
  margin-inline-start: var(--awqaf-nav-gap) !important;
}

/* Same line box for every header item, so the text sits on one line:
   Olivero menu links use line-height 27px (var(--sp1-5)); "بوابة الموردين"
   and the language link inherited the taller body line-height. */
#hero .hero-menu ul li a,
#site-header .header-nav a,
#site-header .lang-switcher a,
#hero .lang-switcher a,
.header .nav a,
#sticky-header .nav a,
.nav-switcher .language-switcher-language-url a,
.nav-switcher .language-switcher-language-interface a,
.header .language-link,
#site-header .language-link,
#hero .language-link,
.supplier-link.supplier-link--icon {
  line-height: 27px !important;
  vertical-align: middle;
}
.supplier-link.supplier-link--icon,
.nav-switcher .links,
.nav-switcher .links li {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}
