/* Keep the recorded black-and-gold design; repair narrow-screen card overflow. */
.values {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.values article,
.competency-grid article,
.sector-card {
  min-width: 0;
}

.values h3,
.competency-grid h3,
.sector-card h3 {
  overflow-wrap: anywhere;
}

.contact .form-consent {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.7;
  cursor: pointer;
}

.contact .form-consent span {
  flex: 1;
}

.contact input[type=email] {
  direction: ltr;
  text-align: left;
}

.contact .form-consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #d3b476;
}

.contact .form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.contact button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.contact #form-status[data-state=error] {
  color: #ffd0b8;
}

@media (max-width: 1050px) {
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Shared responsive sizing: content can shrink within every grid track. */
main,
main section,
main section > *,
:where(.direction-grid, .perspective-grid, .sector-grid, .competency-grid,
  .region-cards, .topic-steps, .english-gallery, .downloads-grid, .values) > *,
.contact form > * {
  min-width: 0;
}

main :where(h1, h2, h3, p, li),
footer p {
  overflow-wrap: anywhere;
}

main img,
main video {
  max-width: 100%;
}

/* Long headings must wrap inside the image frame, not be clipped. */
.page-title h1,
.english-catalog-hero h1,
.section h2 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* Restore the overlay suppressed by the exported .section::after rule. */
.partnership-banner::after {
  content: '';
  background: linear-gradient(90deg, #090d11f2 0%, #0e1419e6 35%, #10161980 65%, #1016191a 100%);
}

.partnership-banner h2 {
  text-shadow: 0 2px 12px #0008;
}

@media (max-width: 900px) {
  .contact input:not([type=checkbox]),
  .contact select,
  .contact textarea {
    min-width: 0;
    font-size: 16px;
  }

  .contact label:not(.form-consent) {
    font-size: 13px;
  }

  main .button {
    max-width: 100%;
    min-height: 44px;
    gap: 20px;
    font-size: 13px;
  }

  .underlink,
  .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .regions button,
  .viewer-bar button,
  .viewer-controls button {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .hero {
    height: auto;
    min-height: 830px;
    max-height: none;
  }

  .hero-content {
    padding-bottom: 260px;
  }

  .page-hero {
    height: auto;
    min-height: 730px;
  }

  .page-title {
    padding: 52px 6% 140px;
  }

  .page-title h1,
  .english-catalog-hero h1 {
    font-size: clamp(30px, 8.5vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.6px;
  }

  .page-title h1 br {
    display: initial;
  }

  .section h2 {
    font-size: clamp(30px, 8.8vw, 37px);
    line-height: 1.16;
  }

  .page-veil {
    background: linear-gradient(180deg, #090d11f5 0%, #11171deb 35%, #141a1eb8 60%, #171b1a33 85%, transparent 100%);
  }

  .partnership-banner::after {
    background: linear-gradient(180deg, #0a1015f2 0%, #0a1015d9 42%, #0a1015a6 72%, #0a101533 100%);
  }
}

/* Compact glass header; keep text opaque while content shows through the bar. */
header {
  height: 80px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: 0 4%;
  background: linear-gradient(115deg, #101417d6, #252724c2 48%, #30291dc9);
  border-bottom: 1px solid #c5a46566;
  box-shadow: inset 0 1px 0 #ffffff08, 0 4px 16px #0003;
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  transition: transform 200ms ease;
}

header .brand {
  gap: 4px;
}

header .brand b {
  font-size: 32px;
  line-height: 1.05;
}

header .brand b span {
  margin-left: 5px;
  font-size: 18px;
}

header .brand b::after {
  width: 30px;
  top: 21px;
}

header.is-scroll-hidden {
  transform: translateY(calc(-100% - 12px));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  header {
    transition: none;
  }
}

header nav,
html[lang=ar] header nav {
  align-items: center;
  gap: clamp(12px, 1.2vw, 22px);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
}

header .brand small,
html[lang=ar] header .brand small {
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 1.1px;
}

header .language-switch {
  padding: 2px;
  gap: 2px;
  background: #10141726;
  border-color: #c5a46566;
  box-shadow: none;
}

header .language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.4;
}

header .language-switch a[aria-current=true] {
  background: linear-gradient(120deg, #e7ce98, #c4a365);
  box-shadow: inset 0 1px 0 #fff3;
}

header .header-cta {
  display: none;
  min-height: 40px;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
}

footer .footer-pages > a,
html[lang=ar] footer .footer-pages > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 16px;
  line-height: 1.5;
}

footer .footer-pages > span,
html[lang=ar] footer .footer-pages > span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.2px;
}

html[lang=ar] footer .footer-pages > span {
  letter-spacing: 0;
}

footer .footer-emails > span,
html[lang=ar] footer .footer-emails > span {
  font-size: 14px;
  font-weight: 600;
}

footer .footer-emails > a {
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

footer p {
  font-size: 15px;
  line-height: 1.7;
}

footer > a:not(.brand) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

footer .brand small {
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 1.2px;
}

footer > small {
  color: #c5c2b8;
  font-size: 12px;
  line-height: 1.7;
}

@media (min-width: 1440px) {
  header {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  header .header-cta {
    display: inline-flex;
  }
}

/* A clear current-page marker without shifting the navigation baseline. */
header nav a {
  gap: 4px;
}

header nav a[aria-current=page] {
  padding-block: 0;
  border-bottom: 0;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: #d3b476;
  text-underline-offset: 8px;
}

/* Three scannable footer columns, with downloads beside the contact details. */
.footer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 1fr));
  gap: 48px;
  width: 100%;
  padding-bottom: 32px;
  border-bottom: 1px solid #b5975b55;
}

.footer-columns .footer-emails,
.footer-columns .footer-pages,
html[lang=ar] .footer-columns .footer-pages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  min-width: 0;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
}

.footer-columns .footer-emails > span,
.footer-columns .footer-pages > span {
  min-height: 28px;
  margin-bottom: 8px;
}

.footer-columns .footer-pages > a,
html[lang=ar] .footer-columns .footer-pages > a {
  min-height: 44px;
  gap: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.footer-resources {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #b5975b33;
}

footer .footer-resources > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.6;
  color: #ead19c;
  overflow-wrap: anywhere;
}

footer .footer-resources > a:hover {
  color: #fff0c8;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}

.footer-brand-row > a:not(.brand) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #dfc38c;
  font-size: 16px;
}

/* Native file downloads: visible format, language, page count and file size. */
.downloads-section .downloads-intro {
  max-width: 680px;
  margin-bottom: 32px;
  font-size: 16px;
  line-height: 1.8;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.download-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid #b5975b66;
  background: linear-gradient(135deg, #ffffff06, #0a0d1080);
}

.download-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.download-format {
  padding: 8px 10px;
  border: 1px solid #b5975b80;
  color: #ead19c;
  font: 600 13px/1.2 Arial, sans-serif;
  letter-spacing: 1px;
}

.download-edition {
  color: #c9c5b9;
  font: 12px/1.4 Arial, sans-serif;
  letter-spacing: 1px;
}

.downloads-section .download-card h3 {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.downloads-section .download-card p {
  flex: 1;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.8;
}

.download-meta {
  display: block;
  margin-bottom: 16px;
  color: #c9c5b9;
  font-size: 13px;
  line-height: 1.7;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #b5975b;
  color: #ead19c;
  background: #b5975b0a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.download-link:hover {
  border-color: #e6c484;
  background: #b5975b1a;
  color: #fff0c8;
}

@media (max-width: 1100px) {
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .footer-columns .footer-emails {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-columns .footer-emails > span,
  .footer-resources {
    grid-column: 1 / -1;
  }

  .footer-resources {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 24px;
  }

  .downloads-grid {
    gap: 16px;
  }

  .download-card {
    padding: 22px;
  }
}

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

  .download-card {
    padding: 24px;
  }
}

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

  .footer-columns .footer-emails {
    display: flex;
  }

  .footer-resources {
    flex-direction: column;
    gap: 4px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  header {
    height: 108px;
    grid-template-columns: 1fr auto;
    padding-bottom: 40px;
  }

  header nav,
  html[lang=ar] header nav {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 4%;
    right: 4%;
    height: 40px;
  }
}

@media (max-width: 900px) {
  header {
    height: 64px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 0 4%;
  }

  header .brand b {
    font-size: 28px;
  }

  header .brand b::after {
    top: 18px;
  }

  header .brand small,
  html[lang=ar] header .brand small {
    font-size: 6px;
    letter-spacing: 0.7px;
  }

  header .menu,
  html[lang=ar] header .menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 40px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 22px;
  }

  header .language-switch,
  html[lang=ar] header .language-switch {
    position: static;
    grid-column: 2;
    grid-row: 1;
    height: auto;
    padding: 2px;
  }

  header .language-switch a {
    min-height: 36px;
    min-width: 40px;
    padding: 6px 7px;
    font-size: 11px;
  }

  header nav,
  html[lang=ar] header nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100svh - 64px);
    overflow-y: auto;
    padding: 16px 5%;
    gap: 4px;
    border-bottom: 1px solid #c5a46566;
    background: linear-gradient(120deg, #11171bf5, #312d24f5);
    font-size: 16px;
  }

  header nav a {
    min-height: 44px;
  }

  header nav.open,
  html[lang=ar] header nav.open {
    display: flex;
  }

  footer .footer-pages > a,
  html[lang=ar] footer .footer-pages > a {
    min-height: 44px;
  }

  footer .footer-emails > a {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  header .brand b {
    font-size: 24px;
    letter-spacing: -1.2px;
  }

  header .brand b span {
    font-size: 15px;
    margin-left: 3px;
  }

  header .brand b::after {
    width: 24px;
    top: 16px;
  }
}

@media (max-width: 359px) {
  header {
    height: 88px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 44px 36px;
    gap: 0 8px;
    padding: 4px 5%;
  }

  header .menu,
  html[lang=ar] header .menu {
    grid-column: 2;
  }

  header .language-switch,
  html[lang=ar] header .language-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
  }

  header .language-switch a {
    min-height: 30px;
    padding-block: 4px;
  }

  header nav,
  html[lang=ar] header nav {
    max-height: calc(100svh - 88px);
  }
}
