/**
 * @file
 * Saudi National Day theme (Figma "GAMI template"). Only loaded while the
 * "Saudi National Day" block is placed.
 */

/* Hero ------------------------------------------------------------------ */

/*
 * Same 550px band (430px on small mobile) as the video hero it replaces,
 * see video-header.scss. Solid flag green under the text side, fading out
 * to show the Sadu pattern on the other side.
 */
.national-day-hero {
  display: flex;
  align-items: center;
  height: 550px;
  background:
    linear-gradient(-90deg, #074d31 37.572%, rgba(7, 77, 49, 0) 99.991%),
    url(../images/hero-pattern.svg) 0 0 / 671.479px 110.314px,
    #074d31;
}

[dir="ltr"] .national-day-hero {
  background:
    linear-gradient(90deg, #074d31 37.572%, rgba(7, 77, 49, 0) 99.991%),
    url(../images/hero-pattern.svg) 100% 0 / 671.479px 110.314px,
    #074d31;
}

.national-day-hero .national-day-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Same type as the video hero's title and text ("same font and size"). */
.national-day-hero .national-day-hero__title {
  width: 50%;
  margin: 0;
  font-size: 60px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -1.2px;
  color: #fff;
}

.national-day-hero .national-day-hero__subtitle {
  width: 50%;
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
}

@media screen and (max-width: 1200px) {
  .national-day-hero .national-day-hero__content {
    gap: 16px;
  }

  .national-day-hero .national-day-hero__title {
    width: 100%;
    font-size: 38px;
    line-height: 1.3;
  }

  .national-day-hero .national-day-hero__subtitle {
    width: 100%;
    font-size: 18px;
  }
}

@media screen and (max-width: 767px) {
  .national-day-hero {
    height: 430px;
  }

  .national-day-hero .national-day-hero__title {
    font-size: 30px;
  }
}

/* Homepage section titles ------------------------------------------------ */

/* Classes added by national-day.js, cycling through the four patterns. */
.national-day-title::before {
  content: "";
  display: inline-block;
  /* 38px next to the 30px section titles, scaling with smaller ones. */
  width: 1.2667em;
  height: 1.2667em;
  margin-inline-end: 8px;
  vertical-align: middle;
  background: center / contain no-repeat;
}

.national-day-title--1::before {
  background-image: url(../images/title-icon-1.svg);
}

.national-day-title--2::before {
  background-image: url(../images/title-icon-2.svg);
}

.national-day-title--3::before {
  background-image: url(../images/title-icon-3.svg);
}

.national-day-title--4::before {
  background-image: url(../images/title-icon-4.svg);
}

/* News section: heritage icons background ------------------------------- */

/* Fades out under a white layer towards the side the title starts on. */
.path-frontpage .vlb-section:has(.view-id-news) {
  background:
    linear-gradient(249.674deg, #fff 43.574%, rgba(255, 255, 255, 0.4) 95.423%),
    url(../images/icons-pattern.svg) 23px 24px / 188.491px 649.465px,
    #fff;
}

[dir="ltr"] .path-frontpage .vlb-section:has(.view-id-news) {
  background:
    linear-gradient(110.326deg, #fff 43.574%, rgba(255, 255, 255, 0.4) 95.423%),
    url(../images/icons-pattern.svg) right 23px top 24px / 188.491px 649.465px,
    #fff;
}

/* Footer ----------------------------------------------------------------- */

/* The theme's 100px bottom padding, plus room for the pattern strip. */
footer[role="contentinfo"] {
  position: relative;
  padding-bottom: 186px;
}

footer[role="contentinfo"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 86px;
  background: url(../images/footer-pattern.svg) 0 0 / auto 86px repeat-x;
  pointer-events: none;
}

/*
 * With a fifth logo in the row, slightly smaller boxes (logos 104px wide
 * instead of 118px) keep the row at its usual 4 x 150px, rather than pushing
 * it into the copyright text next to it.
 */
footer .field--name-field-our-partners > .field__item {
  width: 120px;
  height: 120px;
  padding: 8px;
}

/* Added first among the footer logos by national-day.js. */
footer .national-day-logo img {
  display: block;
  width: 100%;
  height: auto;
}
