/**
 * IMT Ambassadors — pixel-match visual system
 * Tokens from reference: navy #0B3D91, blue #1565C0, gold #D4AF37
 */

.amb-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.ambassadors-page .amb-page,
.amb-page {
  --imt-navy: #0B3D91;
  --imt-blue: #1565C0;
  --imt-blue-soft: #EAF2FB;
  --imt-gold: #D4AF37;
  --imt-gold-soft: #F7F3E8;
  --imt-white: #FFFFFF;
  --imt-text: #12213A;
  --imt-muted: #697386;
  --imt-border: #DFE5ED;
  --amb-radius: 18px;
  color: var(--imt-text);
  background: #F7F9FC;
  font-family: "Cairo", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

.amb-page a:focus-visible,
.amb-page button:focus-visible,
.amb-page input:focus-visible {
  outline: 2px solid var(--imt-gold);
  outline-offset: 2px;
}

/* ========== HERO ========== */
.amb-hero {
  position: relative;
  min-height: clamp(480px, 72vh, 680px);
  overflow: hidden;
  background: var(--imt-navy);
  color: #fff;
}

.amb-hero__media {
  position: absolute;
  inset: 0;
}

.amb-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  display: block;
}

.amb-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,61,145,0.18) 0%, rgba(11,61,145,0.55) 48%, rgba(11,61,145,0.82) 100%),
    linear-gradient(180deg, rgba(11,61,145,0.15) 0%, rgba(11,61,145,0.35) 100%);
}

.amb-hero__inner {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.amb-hero__copy {
  max-width: 34rem;
}

.amb-hero__eyebrow {
  margin: 0 0 0.85rem;
  color: var(--imt-gold);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.amb-hero__title {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--imt-gold);
  text-shadow: 0 2px 18px rgba(0,0,0,0.25);
}

.amb-hero__sub {
  margin: 0 0 0.75rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: #fff;
}

.amb-hero__lead {
  margin: 0 0 1.5rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.8;
  font-size: 1rem;
}

.amb-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.95rem 1.55rem;
  border-radius: 999px;
  background: var(--imt-gold);
  color: #12213A !important;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(212,175,55,0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}

.amb-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(212,175,55,0.45);
}


@media (max-width: 900px) {
  .amb-hero {
    min-height: 620px;
  }
  .amb-hero__bg-img {
    object-position: center 35%;
  }
  .amb-hero__veil {
    background:
      linear-gradient(180deg, rgba(11,61,145,0.42) 0%, rgba(11,61,145,0.58) 38%, rgba(11,61,145,0.22) 72%, rgba(11,61,145,0.55) 100%);
  }
  .amb-hero__inner {
    align-items: flex-start;
    padding-top: 3.25rem;
    padding-bottom: 11rem;
  }
  .amb-hero__title {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
  }
}

/* ========== STATS ========== */
.amb-stats {
  background: var(--imt-gold-soft);
  border-bottom: 1px solid rgba(212,175,55,0.35);
}

.amb-stats__inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.35rem 0;
}

.amb-stats__item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.amb-stats__icon {
  color: var(--imt-gold);
  font-size: 1.1rem;
}

.amb-stats__value {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--imt-navy);
}

.amb-stats__label {
  font-size: 0.86rem;
  color: var(--imt-muted);
  font-weight: 600;
}

@media (max-width: 767px) {
  .amb-stats__inner { grid-template-columns: 1fr; }
}

@media (min-width: 500px) and (max-width: 767px) {
  .amb-stats__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ========== DIRECTORY ========== */
.amb-directory {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.amb-directory__inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.amb-directory__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.amb-directory__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 900;
  color: var(--imt-navy);
  text-align: center;
}

.amb-directory__arc { opacity: 0.9; }
.amb-directory__arc--flip { transform: scaleX(-1); }

.amb-filters__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--imt-border);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(18,33,58,0.06);
  margin-bottom: 1.25rem;
}

.amb-filters__search { flex: 1 1 220px; }
.amb-filters__country { flex: 0 1 180px; }

.amb-filters__input,
.amb-filters__select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--imt-border);
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--imt-text);
}

.amb-filters__chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.amb-chip {
  flex: 0 0 auto;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--imt-border);
  background: #fff;
  color: var(--imt-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.amb-chip.is-active,
.amb-chip:hover {
  background: var(--imt-navy);
  border-color: var(--imt-navy);
  color: #fff;
}

.amb-filters__btn {
  padding: 0.75rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--imt-blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.amb-filters__reset {
  color: var(--imt-muted);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.amb-directory__meta {
  margin: 0 0 1rem;
  color: var(--imt-muted);
  font-weight: 600;
}

.amb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .amb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Prefer balanced 3-column desktop (e.g. 6 cards → 3×2) */
@media (min-width: 980px) {
  .amb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1080px;
    margin-inline: auto;
  }
}

.amb-card {
  background: #fff;
  border: 1px solid var(--imt-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(18,33,58,0.06);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.amb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(18,33,58,0.1);
}

.amb-card__media {
  position: relative;
  display: block;
  background: var(--imt-blue-soft);
  overflow: hidden;
}

.amb-card__img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  background: var(--imt-blue-soft);
}

.amb-card__body {
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.amb-card__country-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--imt-gold-soft);
  color: var(--imt-navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.amb-card__flag {
  font-size: 0.68rem;
  font-weight: 900;
  background: #fff;
  border-radius: 4px;
  padding: 0 0.25rem;
}

.amb-card__name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--imt-text);
  line-height: 1.4;
}

.amb-card__name a {
  color: inherit;
  text-decoration: none;
}

.amb-card__role {
  margin: 0;
  color: var(--imt-blue);
  font-weight: 700;
  font-size: 0.92rem;
}

.amb-card__bio {
  margin: 0;
  color: var(--imt-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.amb-card__cta {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--imt-navy);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
}

.amb-card__cta:hover { background: var(--imt-blue); }

.amb-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  border: 1px dashed var(--imt-border);
  border-radius: 16px;
  background: #fff;
  color: var(--imt-muted);
}

/* ========== FEATURED ========== */
.amb-presence {
  padding: clamp(1.75rem, 3.5vw, 2.75rem) 0 0;
  background: #fff;
}

.amb-presence__inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.amb-presence__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.amb-presence__header h2 {
  margin: 0 0 0.5rem;
  color: var(--imt-navy);
  font-weight: 900;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.amb-presence__header p {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--imt-muted);
  line-height: 1.85;
  font-size: 1.05rem;
}

.amb-presence__map {
  background: #0B3D91;
  overflow: hidden;
  line-height: 0;
  margin: 0;
}

.amb-presence__map img {
  width: 100%;
  height: auto;
  max-height: min(52vw, 420px);
  display: block;
  object-fit: cover;
  object-position: center 28%;
}

/* ========== THANKS ========== */
.amb-thanks {
  padding: clamp(1.35rem, 3vw, 2rem) 0;
  background:
    linear-gradient(135deg, rgba(11,61,145,0.96), rgba(21,101,192,0.94)),
    var(--imt-navy);
  color: #fff;
  text-align: center;
}


.amb-thanks__inner {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
}

.amb-thanks__inner h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  font-weight: 900;
  color: var(--imt-gold);
}

.amb-thanks__inner p {
  margin: 0;
  line-height: 1.85;
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
}

/* ========== PROGRAMS CTA ========== */
.amb-programs {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--imt-gold-soft);
}

.amb-programs__inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.amb-programs__copy h2 {
  margin: 0 0 0.65rem;
  color: var(--imt-navy);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.amb-programs__copy p {
  margin: 0 0 1.25rem;
  color: var(--imt-muted);
  line-height: 1.7;
}

.amb-programs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.amb-programs__cta {
  display: inline-flex;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.amb-programs__cta--gold {
  background: var(--imt-gold);
  color: #12213A !important;
}

.amb-programs__cta--blue {
  background: var(--imt-navy);
  color: #fff !important;
}

.amb-programs__visual img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
  box-shadow: 0 14px 34px rgba(18,33,58,0.12);
}

@media (max-width: 800px) {
  .amb-programs__inner { grid-template-columns: 1fr; }
}

/* ========== PROFILE ========== */
.amb-profile {
  padding: clamp(2rem, 4vw, 3rem) 0 3.5rem;
}

.amb-profile__inner {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

.amb-profile__hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--imt-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(18,33,58,0.07);
}

.amb-profile__photo img,
.amb-profile__img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  background: var(--imt-blue-soft);
}

.amb-profile__info {
  padding: 1.5rem 1.5rem 1.5rem 0.5rem;
}

.amb-profile__info h1 {
  margin: 0 0 0.4rem;
  color: var(--imt-navy);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.amb-profile__meta {
  margin: 0 0 1rem;
  color: var(--imt-blue);
  font-weight: 700;
}

.amb-profile__bio {
  margin: 0;
  color: var(--imt-muted);
  line-height: 1.8;
}

.amb-profile__back {
  display: inline-flex;
  margin-top: 1.25rem;
  color: var(--imt-navy);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .amb-profile__hero { grid-template-columns: 1fr; }
  .amb-profile__info { padding: 1.25rem; }
}

.amb-grid__item.is-collapsed { display: none; }

.amb-grid__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.amb-grid__more {
  padding: 0.9rem 1.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--imt-navy);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11,61,145,0.22);
  transition: transform .2s ease, background .2s ease;
}

.amb-grid__more:hover {
  background: var(--imt-blue);
  transform: translateY(-2px);
}
