/*

Theme Name: Custom-Saral

*/

html, body {
  font-family: sans-serif;
  margin: 0;
}

main {
  margin: 0 40px;
}

header {
  margin: 40px;
  font-family: "Inter", sans-serif;
  padding: 40px 0;
  position: relative;
  text-align: center;

  .header-logo {
    display: inline-block;
  }

  .header-cta {
    position: absolute;
    right: 0;
    top: 0;
  }
}

button, a.button {
  all: unset;
  cursor: pointer;
  font-family: "inter";
  font-weight: 600;
  color: #fff;
  font-size: 18px;
  text-align: center;
  line-height: 40px;
  height: 40px;
  display: inline-block;
  padding: 0 20px;
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(0deg,rgba(193, 17, 22, 1) 0%, rgba(217, 19, 24, 1) 100%);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  border-bottom: 0.5px rgba(255,255,255,0.3) solid;
  transition: box-shadow 0.2s ease, background 0.2s ease;


  &:hover {
    background: linear-gradient(0deg,rgba(193, 17, 22, 1) 50%, rgba(217, 19, 24, 1) 100%);
  }

  &:active {
    background: linear-gradient(0deg,#C11116 50%, #C11116 100%);
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
  }
}

.center {
  text-align: center;
}

.divider {
  width: 100%;
  margin: 100px 0;
  height: 14px;
  text-align: center;
  background-image: url("images/dots.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 46px;
}

.header-cta {
  min-width: 340px;
  display: inline-flex;
  align-items: center;
}

.header-cta img {
  margin-left: 30px;
  margin-top: -14px;
}

.tagline {
  font-family: "Magreb", serif;
  font-size: 70px;
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
  padding: 40px;
  text-wrap: balance;
  font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
}

.experience-methods-text {
  text-wrap: balance;
}

h2.small-tagline {
  font-family: "inter";
  font-size: 26px;
}

.small-tagline {
  font-family: "Magreb", serif;
  font-size: 50px;
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
  padding: 40px;
  font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
}

.menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px 20px;
  justify-content: space-evenly;
  margin: 0 auto;
  padding: 40px;
  padding-bottom: 80px;
  list-style: none;
  max-width: 1060px;
}

.menu-item {
  width: 100%;
}

.menu-item a {
  display: inline-block;
  text-decoration: none;
  color: #000;
  font-family: "Inter";
  font-weight: 600;
  font-size: 20px;
  position: relative;
  text-wrap: balance;
  max-width: 115px;

  &:hover {
    text-decoration: underline;
  }
}

.menu-item a::after {
  content: url("images/dots.svg");
  display: block;
  position: absolute;
  width: 40px;
  left: 0;
  bottom: -26px;
}

.big-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  height: 600px;

  &::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 25%, rgba(223, 225, 230, 1) 75%);
    display: block;
    top: 70px;
    bottom: 0px;
    border-radius: 100px 100px 0 0;
    z-index: -1;
  }

  .big-image {
    margin: 0px 40px;
    background-color: #DFE1E6;
    background-size: cover;
    background-position: 50%;
    max-width: 1340px;
    width: 100%;
    display: block;
    height: 600px;
    border-radius: 55px;
    position: relative;

    &:before {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      background: linear-gradient(0deg,rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 50%);
      content: "";
    }
  }
}

.footer-contact-details {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

.footer-image {
  max-height: 350px;
  position: absolute;
  bottom: 10px;
  right: -40px;
}

.small-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: -350px;
  z-index: -4;

  .small-image {
    margin: 0px 140px;
    background-color: #DFE1E6;
    background-size: cover;
    background-position: 50%;
    max-width: 1200px;
    width: 100%;
    display: block;
    height: 400px;
    border-radius: 55px 55px 0 0;
    position: relative;

    &:before {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      background: linear-gradient(0deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.65) 100%);
      content: "";
    }
  }
}

.two-column-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.column-heading {
  text-wrap: balance;
  max-width: 80%;
}

.four-column-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 40px;
  margin: 40px auto;
  padding: 0 40px;
  max-width: 1060px;
}

h3 {
  font-size: 16px;
  font-weight: 400;
  font-family: "inter";
}

h2 {
  font-size: 26px;
  font-weight: 600;
  font-family: "inter";
}

.article-title {

}

.article-content {

}

.challenges {
  margin: 100px 0 170px;
  text-align: center;
}

.challenge-item {
  text-align: left;
  display: flex;
  font-family: "inter";
  font-weight: 500;
  font-size: 18px;
  align-items: center;
}

.challenge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 20px;
  background: #DFE1E6;
  border-radius: 10px;
  padding: 15px;
}

.challenge-icon svg path {
  fill: #DE1118;
}

.header-experience {
  max-width: 1340px;
}

.header-experience::before {
  position: absolute;
  border: 2px #fff solid;
  left: -1px;
  right: -1px;
  top: -1px;
  bottom: 0;
  z-index: 2;
  content: "";
  background-image: url("images/motor.png");
  background-color: #DFE1E6;
  filter: grayscale(100%);
  mix-blend-mode: overlay;
  background-size: cover;
  background-position: 50%;
  border-radius: 100px 100px 0 0;
}

.article-container {
  margin: 0 54px;
}

.section-header {
  isolation: isolate;
  text-align: center;
  padding: 70px 40px 170px;
  background-color: #DFE1E6;
  border-radius: 100px 100px 0 0;
  position: relative;
  z-index : 1;
  margin: 0 auto;

  &::after{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 0) 90%);
    content: "";
    z-index: 3;
  }
}

.section-header-content {
  position: relative;
  z-index: 4;
}

.magreb {
  font-family: "magreb";
}

/* === Front Page Post Carousel === */
.post-carousel {
  --gap: 50px;
  --cards-visible: 3;
  padding: 2rem 1rem;
  position: relative;
  z-index: 4;
}

/* Header */
.post-carousel__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 1rem;
}

.post-carousel__title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.post-carousel__subtitle {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

/* Viewport & track */
.post-carousel__viewport {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.post-carousel__track-outer {
  overflow: hidden;
  outline: none;
}

.post-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(
    (100% - (var(--gap) * (var(--cards-visible) - 1)))
    / var(--cards-visible)
  );
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 280ms ease;
  will-change: transform;
}

/* Post cards */
.post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.post-card__thumb img,
.post-card__thumb--placeholder {
  width: 100%;
  height: 270px;
  object-fit: cover;
  display: block;
  background: #DFE1E6;
  border-radius: 10px;
}

.post-card__body {
  display: flex;
  flex-direction: column;
}

.post-card__title {
  margin: 0;
  font-size: 20px;
}

/* Navigation buttons */
.post-carousel__nav {
  position: absolute;
  top: 115px;
  z-index: 5;


}

.post-carousel__nav--prev {
  left: -70px;
}

.post-carousel__nav--next {
  right: -70px;
}

footer {
  background: #DFE1E6;
  margin: 100px 40px 0;
  padding: 100px 40px;
  border-radius: 100px 100px 0 0;
  position: relative;

  &:before {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 50%);
    content: "";
    z-index: 0;
  }
}

.footer-items-heading {
  font-size: 18px;
  margin: 0px 0px 15px;
}

.footer-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.footer-icon {
  height: 30px;
  width: 30px;

  svg path {
    fill: #DE1118;
  }
}

/* (Continious improvement) time line */

.time-line {
  max-width: 1200px;
  margin: 0 auto;
}

.time-line-row {
  --line: 4px;
  display: grid;
  grid-template-columns: 1fr var(--line) 1fr;
  grid-template-areas: 'left timeline right';
  align-items: center;
  position: relative;
  font-family: "inter";
  font-weight: 600;
  font-size: 18px;
}

.time-line-center {
  background: #DE1118;
  grid-area: timeline;
  width: var(--line);
  height: 100%;
  text-align: center;
  position: absolute;
  align-items: center;


  &:before {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #DE1118;
    border-radius: 5px;
    content: "";
    left: -3px;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
  }
}

.time-line-item-left,
.time-line-item-right {
  padding-top: 25px;
  padding-bottom: 25px;
}

.time-line-item-left {
  padding-left: 250px;
  padding-right: 25px;
  grid-area: left;
  text-align: right;
}

.time-line-item-right {
  padding-right: 250px;
  padding-left: 25px;
  grid-area: right;
  text-align: left;
}

.time-line-shift {
  text-align: center;
  font-family: "inter";
  font-size: 18px;
  padding: 25px;
}
/* EXPERIENCES */

.experiences-section {
  position: relative;
  z-index: 5;
}

.experiences-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1200px;
  gap: 50px;
  margin: 0 auto;
  z-index: 5;
  position: relative;
  margin: 0 auto 70px;
}

.experience-card {
  flex: 0 0 calc((100% - 2 * 50px) / 3);
  box-sizing: border-box;
  height: 220px;
  max-height: 220px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #DFE1E6;
  border-radius: 10px;
}

.experience-card:hover .experience-card-background {
  opacity: 1;
  filter: grayscale(0%);
  mix-blend-mode: normal;
}

.experience-card:hover .experience-card-logo {
  opacity: 0;
}

.experience-card:hover .experience-card-logo.bg-is-empty {
  opacity: 0.3;
}

.experience-card-background {
  position: absolute;
  opacity: 1;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 1s;
  filter: grayscale(100%);
  mix-blend-mode: overlay;
  opacity: 0.5;
  padding: 70px;
  background-color: #DFE1E6;
  border-radius: 10px;
  background-size: cover;
}

.experience-card-content {
  position: relative;
  z-index: 5;


}

.experience-card-logo {
  transition: 0.8s;
  padding: 70px;
}

.experience-card-logo img {
  width: 100%;
  height: auto;
}

/* ARTICLE STYLING */

.article {
  padding: 140px;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    display: block;
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 25%, rgba(223, 225, 230, 1) 75%);
    height: 500px;
    z-index: -1;
    left: 0;
    right: 0;
    top: 0;
    border-radius: 100px 100px 0 0;
  }
}

.article-heading {
  max-width: 1340px;
  margin: 0 auto;
}

.article-title {
  font-family: "Magreb", serif;
  font-size: 48px;
  text-wrap: balance;
  margin: 0 0 70px;

}

.article-content {
  max-width: 1340px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 140px;
  line-height: 30px;

  .content-container {
    font-family: "Inter", sans-sans-serif;
    font-size: 18px;
    font-weight: 400;

    p:first-child {
      margin-top: 0;
    }

    h1 {
      font-size: 24px;
      font-weight: 600;
      scroll-margin-top: 40px;
      margin-top: 40px;

      strong {
        font-weight: 600;
      }
    }

    a {
      color: #DE1118;
      text-decoration: underline;
    }
  }
}

.table-of-contents {
  font-family: "Inter", sans-serif;
  position: sticky;
  top: 70px;
  bottom: 0;
  font-size: 16px;

  ul {
    margin: 0;
    padding: 0;
    list-style: none;

    li {
      margin: 15px 0;
      padding: 0;

      &:first-child {
        margin-top: 5;
      }

      a {
        color: #000;
        text-decoration: none;
        text-wrap: balance;
        display: block;
        line-height: 24px;


        &:hover {
          color: #DE1118;
          text-decoration: underline;
        }
      }
    }
  }
}

.challenge-name {
  text-wrap: balance;
}

.article-label {
  color: #6A7286;
  font-weight: 400;
}

.table-of-contents {
  display: grid;
  font-weight: 600;
  grid-template-columns: 1fr;
  gap: 40px;
  align-self: start;
}

.article-cta {
  font-weight: 400;
  font-size: 18px;
}

.article-image img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 70px 70px 0 0;
}

/* Responsive */
@media (max-width: 1200px) {
  header {
    text-align: left;
  }

  .four-column-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .post-carousel {
    --cards-visible: 2;
  }

  .menu {
    flex-direction: column;
  }

  header {
    margin: 40px 20px;
  }

  main {
    margin: 0 20px;
  }

  footer {
    margin: 80px 20px 0;
  }

  .footer-image {
    right: -20px;
  }

  .four-column-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-contact-details {
    margin: 0;
    max-width: 300px;
  }

  .footer-image {
    max-height: 300px;
  }
}

@media (max-width: 700px) {
  header {
    text-align: center;
    margin-bottom: 0px;
  }

  .header-cta {
    display: none;
  }

  .tagline {
    font-size: 40px;
  }

  .menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .big-image-container {
    height: 400px;

    .big-image {
      height: 400px;
    }
  }

  .two-column-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .four-column-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .footer-contact-details {
    margin: 0;
    max-width: 300px;
  }

  .footer-image {
    display: none;
  }
}

@media (max-width: 600px) {
  .post-carousel {
    --cards-visible: 1;
  }
}

@media (max-width: 400px) {
  .tagline {
    font-size: 30px;
  }
}

/* Accessibility & reduced motion */
.post-card__link:focus-visible,
.post-carousel__nav:focus-visible {
  outline: 3px solid #4a90e2;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .post-carousel__track {
    transition: none;
  }
}
