/* Shared section typography. Hero, navigation, cards and footer are not targets. */
.section-heading {
  color: var(--section-heading-color, #1c4587);
  font-family: 'Nimbus Sans L', Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-align: inherit;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-inline-size: min(100%, 26ch);
  margin-block: 0 clamp(1rem, .8rem + .6vw, 1.5rem);
  margin-inline: 0;
}

@media (min-width: 1200px) {
  .section-heading { font-size: clamp(3rem, 3.6vw, 3.25rem); }
}

/* Background context supplies the color, including titles inside tab panels. */
:where(.about-tabs, .video-scroll-track, .seatrust-politiques) {
  --section-heading-color: #fff;
}

.section-heading--subsection {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  line-height: 1.2;
  text-transform: none;
}

.section-eyebrow {
  display: block;
  color: #f68b2c;
  font-family: 'Nimbus Sans L', Arial, Helvetica, sans-serif;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0 0 .75rem;
}

/* Layouts keep their own section padding; title groups share the content gap. */
.section-heading-group {
  margin-block: 0 clamp(1.75rem, 1.25rem + 2vw, 3rem);
}

.section-heading-group--start {
  text-align: left;
  justify-content: flex-start;
}

:where(header).section-heading-group--start,
.section-heading-group--start > .section-heading,
.section-heading-group--start > p {
  margin-inline: 0;
}

.section-heading-group--start::before { margin-left: 0; }

.section-heading-group > .section-heading:last-child {
  margin-bottom: 0;
}

.section-heading + p { margin-top: 0; }

/* A stacked image needs a title gap; side-by-side story layouts do not. */
@media (max-width: 991.98px) {
  .section-heading--after-media { margin-top: 1.5rem; }
}

/* Retain the existing orange accent on the contact section titles. */
.section-heading--accent::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: .5rem;
  background: #f68b2c;
}

/* Existing Hero rules retained unchanged from the pre-audit stylesheet. */
.slider-title, .contact-header .header-title {
  text-align: center;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}
.slider-title { max-width: min(100%, 1000px); }
.contact-header .header-title { max-width: min(100%, 22ch); margin-inline: auto; }
.contact-header .lead { max-width: 62ch; margin-inline: auto; }

@media (max-width: 768px) {
  .slider-title, .contact-header h1, .news-item h3 { overflow-wrap: normal; word-break: normal; }
}

/* Shared left edge for the seven complete homepage heading blocks. */
.key-figures__header.homepage-heading-parent {
  max-width: none;
}

.homepage-heading:not(.about-tabs__header) {
  width: min(calc(100vw - 48px), 1320px);
  max-width: none;
  margin-left: calc(50% - min(calc(50vw - 24px), 660px));
  margin-right: 0;
  text-align: left;
  justify-content: flex-start;
}

.homepage-heading:not(.about-tabs__header) > .section-eyebrow {
  width: 100%;
  margin: 0 0 8px;
  color: #f68b2c;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-align: left;
}

.homepage-heading:not(.about-tabs__header) > .section-heading {
  margin: 0;
  text-align: left;
}

.key-figures__header .homepage-heading > .key-figures__introduction {
  margin-top: 24px;
}

.homepage-contact-heading > .homepage-heading {
  margin-bottom: 0;
}

/* Keep the form close to its heading and leave a small finish below the button. */
.cta-2.homepage-contact .section-heading {
  margin-bottom: 8px;
}

.cta-2.homepage-contact .col-lg-6.p-5 {
  padding-bottom: 24px !important;
}

.cta-2.homepage-contact .contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.cta-2.homepage-contact .contact-grid > .col-lg-6 {
  width: 100%;
  min-width: 0;
}

.cta-2.homepage-contact .img-side {
  position: relative;
  height: auto;
  background: none;
}

.cta-2.homepage-contact .homepage-contact-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 991.98px) {
  .cta-2.homepage-contact .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-2.homepage-contact .homepage-contact-image {
    position: static;
    height: auto;
  }
}

/* Static Morocco map shared by the English and French homepages. */
.morocco-map-heading .section-heading-group {
  margin-bottom: 0;
}

.morocco-map-section {
  margin-top: -18px;
  margin-bottom: -8px;
  padding: 0;
  background: #fff;
}

.morocco-map {
  position: relative;
  width: min(805px, 69vw);
  margin-inline: auto;
  container-type: inline-size;
}

@media (max-width: 767px) {
  .morocco-map-section {
    margin-top: 8px;
    margin-bottom: 0;
  }

  .morocco-map {
    width: min(92vw, 700px);
  }
}

.morocco-map::before {
  position: absolute;
  inset: 0;
  background: #2A4F8F;
  content: '';
  -webkit-mask: url('/images/maps/carte-plate-simple-du-maroc-vecteur-gris_768932-4363.svg') center / 100% 100% no-repeat;
  mask: url('/images/maps/carte-plate-simple-du-maroc-vecteur-gris_768932-4363.svg') center / 100% 100% no-repeat;
}

.morocco-map__image {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
}

.morocco-map__locations {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.morocco-map__marker {
  --badge-size: clamp(15px, 3.2cqw, 50px);
  --connector-size: clamp(12px, 3cqw, 46px);
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  color: #2A4F8F;
  font-family: 'Nimbus Sans L', Arial, Helvetica, sans-serif;
  font-size: clamp(9px, 1.45cqw, 23px);
  font-weight: 600;
  line-height: 1.15;
}

.morocco-map__badge {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--badge-size);
  height: var(--badge-size);
  border-radius: 50%;
  background: #F68B2C;
  color: #FFFFFF;
  font-size: clamp(8px, 1.25cqw, 20px);
  font-weight: 700;
  transform: translate(-50%, -50%);
  isolation: isolate;
}

.morocco-map__badge::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid #F68B2C;
  border-radius: 50%;
  content: '';
  animation: morocco-marker-pulse 2.2s ease-out infinite;
}

.morocco-map__marker:nth-child(2) .morocco-map__badge::before { animation-delay: .25s; }
.morocco-map__marker:nth-child(3) .morocco-map__badge::before { animation-delay: .5s; }
.morocco-map__marker:nth-child(4) .morocco-map__badge::before { animation-delay: .75s; }
.morocco-map__marker:nth-child(5) .morocco-map__badge::before { animation-delay: 1s; }
.morocco-map__marker:nth-child(6) .morocco-map__badge::before { animation-delay: 1.25s; }
.morocco-map__marker:nth-child(7) .morocco-map__badge::before { animation-delay: 1.5s; }
.morocco-map__marker:nth-child(8) .morocco-map__badge::before { animation-delay: 1.75s; }
.morocco-map__marker:nth-child(9) .morocco-map__badge::before { animation-delay: 2s; }

@keyframes morocco-marker-pulse {
  from { transform: scale(1); opacity: .45; }
  to { transform: scale(1.7); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .morocco-map__badge::before { animation: none; opacity: 0; }
}

.morocco-map__badge svg {
  width: 65%;
  height: 65%;
}

.morocco-map__label {
  position: absolute;
  top: 0;
  white-space: nowrap;
  transform: translateY(-50%);
}

.morocco-map__city-name {
  display: inline-block;
  transform: scale(1);
  transition: transform 0.25s ease;
}

.morocco-map__marker--left .morocco-map__city-name {
  transform-origin: right center;
}

.morocco-map__marker--right .morocco-map__city-name {
  transform-origin: left center;
}

.morocco-map__badge:hover ~ .morocco-map__label .morocco-map__city-name {
  transform: scale(1.35);
}

@media (prefers-reduced-motion: reduce) {
  .morocco-map__city-name { transition: none; }
}

.morocco-map__marker:nth-child(8) .morocco-map__label,
.morocco-map__marker:nth-child(9) .morocco-map__label {
  background: transparent;
}

.morocco-map__label::before {
  position: absolute;
  top: 50%;
  width: var(--connector-size);
  height: 1px;
  background: #2A4F8F;
  content: '';
}

.morocco-map__marker--left .morocco-map__label {
  right: calc(var(--badge-size) / 2 + var(--connector-size) + 8px);
}

.morocco-map__marker--left .morocco-map__label::before {
  left: calc(100% + 4px);
}

.morocco-map__marker--right .morocco-map__label {
  left: calc(var(--badge-size) / 2 + var(--connector-size) + 8px);
}

.morocco-map__marker--right .morocco-map__label::before {
  right: calc(100% + 4px);
}

.about-tabs__header.homepage-heading {
  margin-inline: auto;
}

.about-tabs__header.homepage-heading > .section-eyebrow {
  width: 100%;
  margin: 0 0 8px;
  color: #f68b2c;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-align: center;
}

.about-tabs__header.homepage-heading > .section-heading {
  margin-inline: auto;
  text-align: center;
}
