/* service-ai: styles that belong to this page only (the shared components stay in service-ea-site.css) */

/* AI hero picture: its own artwork, never mirrored; the scene sits on the right, the text on the left */
.pg-ai .hero__sky::before,
html[dir="rtl"] .pg-ai .hero__sky::before {
  background-image: url('/askwebsite/static/site/assets/src/opt/ai-hero-bg.webp');
  transform: none;
  background-size: cover;
  background-position: 67% 20%;
}

@media (max-width: 991.98px) {
  .pg-ai .hero__sky::before,
  html[dir="rtl"] .pg-ai .hero__sky::before {
    background-image: url('/askwebsite/static/site/assets/src/opt/ai-hero-bg-sm.webp');
    background-size: cover;
    background-position: 72% 100%;
  }
}

.pg-ai .hero__content > .container {
  direction: ltr;
}

html[dir="rtl"] .pg-ai .hero__content .row > div {
  direction: rtl;
  text-align: start;
}

/* hero on tablets and phones, same as the DMO page: text on top, the full picture as a band along the bottom (fading into the page colour), smaller text */
@media (max-width: 991.98px) {
  .pg-ea.pg-ai .hero {
    min-height: 0;
  }

  .pg-ea.pg-ai .hero__sky::before,
  html[dir="rtl"] .pg-ea.pg-ai .hero__sky::before {
    inset: auto 0 0 0;
    height: 38vw;
    background-size: auto 125%;
    background-position: 70% 60%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%);
    mask-image: linear-gradient(180deg, transparent, #000 24%);
  }

  .pg-ea.pg-ai .hero__content {
    min-height: 0;
    padding-top: calc(2rem + 17vw);
    padding-bottom: calc(38vw + 1rem);
  }

  html .pg-ea.pg-ai .hero__shade {
    background: none;
  }

  html[data-lang] .pg-ai .hero .ea-giant {
    font-size: 28vw;
  }

  .pg-ai .hero__giant {
    padding-top: 4.5rem;
  }

  .pg-ai .hero-title {
    font-size: 2.1rem;
  }

  .pg-ai .hero-lead {
    font-size: .95rem;
    line-height: 1.7;
  }
}

@media (max-width: 575.98px) {
  html[data-lang] .pg-ai .hero .ea-giant {
    font-size: 38vw;
  }

  .pg-ai .hero__giant {
    padding-top: 4.6rem;
  }

  .pg-ea.pg-ai .hero__sky::before,
  html[dir="rtl"] .pg-ea.pg-ai .hero__sky::before {
    height: 54vw;
    background-size: auto 125%;
    background-position: 68% 60%;
  }

  .pg-ea.pg-ai .hero__content {
    padding-top: calc(.8rem + 30vw);
    padding-bottom: calc(54vw + .25rem);
  }

  .pg-ai .hero-title {
    font-size: 1.5rem;
    margin-bottom: .6rem;
  }

  .pg-ai .hero-lead {
    font-size: .84rem;
    line-height: 1.6;
    margin-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  .pg-ai .hero-lead {
    margin-bottom: .9rem;
  }
}

/* overview cards: label with a short sub-line */
.pg-ai .ea-acc {
  align-items: flex-start;
}

.pg-ai .ea-acc h3 {
  padding-top: .1rem;
}

.pg-ai .ea-acc-t {
  flex: 1;
  min-width: 0;
}

.pg-ai .ab-intro .ea-acc-t p {
  margin: 0 0 .3rem;
}

.pg-ai .ea-acc-t small {
  display: block;
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ab-text);
}

@media (max-width: 575.98px) {
  .pg-ai .ea-acc-t small {
    font-size: .8rem;
    line-height: 1.6;
  }
}

/* Arabic: the numbers are written out in words */
html[data-lang="ar"] .pg-ai .ea-acc h3 {
  min-width: 5.2ch;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

/* icon cards (AI page): left-aligned, icon on top, title and text below, white / mint / dark variants */
.pg-ai .ab-vis-card {
  min-height: 280px;
  gap: 1.4rem;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: 18px;
  border: 1px solid #e3e8ee;
  background: #fff;
  color: var(--ab-navy);
  --muted: var(--ab-text);
  box-shadow: 0 10px 26px -20px rgba(10,37,64,.45);
  justify-content: space-between;
}

.pg-ai .ab-vis-card::before {
  display: none;
}

.pg-ai .ab-vis-top {
  flex-direction: row-reverse;
  align-items: flex-start;
}

.pg-ai .ab-vis-icon {
  width: 38px;
  height: 38px;
  stroke-width: 1.5;
  opacity: 1;
  color: #00b89c;
  stroke: #00b89c;
}

.pg-ai .ab-vis-num {
  font-size: .85rem;
  opacity: .5;
}

.pg-ai .ab-vis-body {
  margin-top: 0;
}

.pg-ai .ab-vis-card h3 {
  text-align: start;
  margin-bottom: .6rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.35;
}

.pg-ai .ab-vis-text {
  text-align: start;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--muted);
}

.pg-ai .ab-vis .row > div:nth-child(3n+2) .ab-vis-card {
  border-color: transparent;
  background: linear-gradient(160deg, #b6f5dd, #8ef2a0);
}

.pg-ai .ab-vis .row > div:nth-child(3n+2) .ab-vis-icon {
  stroke: var(--ab-navy);
  color: var(--ab-navy);
}

.pg-ai .ab-vis .row > div:nth-child(3n+3) .ab-vis-card {
  border-color: transparent;
  background: linear-gradient(150deg, #0a2540, #0b4a4a);
  color: #fff;
  --muted: rgba(255,255,255,.82);
}

.pg-ai .ab-vis .row > div:nth-child(3n+3) .ab-vis-icon {
  stroke: #6df2cc;
  color: #6df2cc;
}

.pg-ai .ab-vis-card:hover {
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -22px rgba(10,37,64,.55);
}

.pg-ai .ab-vis-card:hover .ab-vis-text {
  color: var(--muted);
}

.pg-ai .ab-vis .row > div:nth-child(3n+3) .ab-vis-card:hover {
  color: #fff;
}

.pg-ai .ab-vis .row > div:nth-child(3n+2) .ab-vis-card:hover .ab-vis-icon {
  stroke: var(--ab-navy);
}

@media (max-width: 767.98px) {
  .pg-ai .ab-vis-card {
    min-height: 0;
    gap: 1.8rem;
  }
}

/* AI strategy section: light bento, heading and four numbered cards next to a photo */
.ai-feats {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: #f2f8f3;
}

.ai-feats-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-areas: "head head" "cards photo";
  gap: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2.4vw, 1.8rem);
  align-items: start;
}

.ai-feats-head {
  grid-area: head;
}

.ai-feats-photo {
  grid-area: photo;
  align-self: stretch;
  min-height: 320px;
  border-radius: 22px;
  background: #cfe8dc url('/askwebsite/static/site/assets/src/opt/ai-photo.webp') 66% center / cover no-repeat;
  box-shadow: 0 18px 36px -24px rgba(10,37,64,.5);
}

.ai-feats-cards {
  grid-area: cards;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ai-feats-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--ab-text);
}

.ai-feat {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 190px;
  padding: 1.2rem 1.3rem 1.4rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px -20px rgba(10,37,64,.45);
  transition: transform .35s var(--ab-ease), box-shadow .3s;
}

.ai-feat:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px -20px rgba(10,37,64,.55);
}

.ai-feat:nth-child(2) {
  background: #d4f5e3;
}

.ai-feat:nth-child(3) {
  background: #e4f7d6;
}

.ai-feat-no {
  align-self: flex-start;
  margin-bottom: .5rem;
  padding: .15rem .6rem;
  border-radius: 999px;
  background: rgba(0,184,156,.14);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #0a7f78;
}

.ai-feat h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ab-navy);
}

.ai-feat p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--ab-text);
}

@media (max-width: 991.98px) {
  .ai-feats-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "cards" "photo";
  }

  .ai-feats-photo {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 575.98px) {
  .ai-feats-cards {
    grid-template-columns: 1fr;
  }

  .ai-feat {
    min-height: 0;
  }
}

.ai-feats .sec-head {
  --sec-bg: #f2f8f3;
  display: inline-block;
  margin: 1rem 0 1.4rem;
}

.ai-feats-head {
  text-align: center;
}

.ai-feats-head .sec-head {
  margin-inline: auto;
}

.ai-feats-lead {
  margin-inline: auto;
  max-width: 42rem;
}

.ai-feat:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* strategy section: tighter cards, the wide last card is a slim banner */
.ai-feat {
  min-height: 150px;
}

.ai-feat:last-child:nth-child(odd) {
  min-height: 0;
  background: #d4f5e3;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
}

.ai-feat:last-child:nth-child(odd) .ai-feat-no {
  margin-bottom: 0;
  flex: none;
}

@media (max-width: 575.98px) {
  .ai-feat {
    min-height: 0;
  }

  .ai-feat:last-child:nth-child(odd) {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
}

/* data readiness (4 cards): all in one row on wide screens */
#s3 .ea-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1rem;
}

/* shared rule centres a lone last card (7-card layout): not wanted with 4 equal cards */
#s3 .ea-grid .svc-c:last-child:nth-child(3n + 1) {
  grid-column: auto;
  justify-self: stretch;
  width: auto;
}

#s3 .ea-grid .svc-c-body {
  padding: 2.2rem 1.2rem 1.6rem;
}

@media (max-width: 1199.98px) {
  #s3 .ea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  #s3 .ea-grid {
    grid-template-columns: 1fr;
  }
}

/* icon cards: titles start at the same height in every card of a row */
.pg-ai .ab-vis-card {
  justify-content: flex-start;
  gap: 2rem;
}

.pg-ai .ab-vis-card:hover {
  transform: none;
}

@media (max-width: 767.98px) {
  .pg-ai .ab-vis-card {
    gap: 1.6rem;
  }
}

/* Arabic hero: the picture is not mirrored, so the giant word and the text sit on the left, away from the scene */
@media (min-width: 992px) {
  html[dir="rtl"] .pg-ai .hero__giant {
    direction: ltr;
  }

  html[dir="rtl"] .pg-ai .hero__content .row > div {
    flex: 0 0 auto;
    width: min(100%, 36rem);
    max-width: 36rem;
    margin-inline: 0;
  }
}

/* human capabilities (#s5): title and text centred in the card */
#s5 .ab-vis-card h3,
#s5 .ab-vis-card .ab-vis-text {
  text-align: center;
}

/* impact (#s7): title and text centred in the card */
#s7 .ab-story-top h3,
#s7 .ab-story-card p {
  text-align: center;
}

/* end-to-end steps (#journey): the title sits beside the icon, not under it */
.pg-ai #journey .ea-steps li {
  flex-direction: row;
  align-items: center;
  gap: .8rem;
}
