/* [[ BLOCKS / COMPONENTS ]] 
   This file contains reusable BEM blocks that map to Sanity Schemas.
*/


/* ============================== */
/* [[[ BLOCK: PAGE HEADER ]]] */
/* ============================== */

.page-layout__grid>.page-header,
.page-layout__content-wrapper>.page-header {
  margin-top: 3rem;
}

.page-header h1 {
  margin-bottom: 1.5rem;
}


/* ============================== */
/* [[[ BLOCK: TEXT BLOCK ]]] */
/* ============================== */

.text-block {
  padding: 0;
}


/* ============================== */
/* [[[ BLOCK: SECTION LIST ]]] */
/* ============================== */

.section-list {
  display: contents;
}


/* ============================== */
/* [[[ BLOCK: TEXT WITH IMAGE ]]] */
/* ============================== */


.text-with-image {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  margin-top: 0.5rem;
  margin-bottom: var(--spacing-image-flow);
}

.text-with-image__text {
  grid-column: 7 / -1;
  padding-left: 2rem;
}

.text-with-image__image {
  grid-column: 1 / 7;
}

.text-with-image__image img {
  border-radius: 3px;
}


/* ============================== */
/* [[[ BLOCK: IMAGE GALLERY ]]] */
/* ============================== */

.image-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  gap: 2rem;
}

.image-gallery__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  grid-column: span 4;
}

.image-gallery__item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 3px;
}

.image-gallery__item figcaption {
  font-size: 0.9rem;
  color: var(--color-primary-dark);
}


/* ============================ */
/* [[[ BLOCK: CENTER WIDTH IMAGE ]]] */
/* ============================ */

.center-width-image {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  align-items: center;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: var(--spacing-image-flow);
}

.center-width-image__image {
  grid-row: 1;
  grid-column: 1 / -1;
  z-index: 1;
  width: 100%;
  height: auto;
  position: relative;
}

.center-width-image__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* Utility: Image Border */
.image-border {
  border: 1px solid var(--color-accent-light);
}

/* ============================ */
/* [[[ BLOCK: FULL WIDTH IMAGE ]]] */
/* ============================ */

.full-width-image {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  align-items: center;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: var(--spacing-image-flow);
}

.full-width-image__image {
  grid-row: 1;
  grid-column: 1 / -1;
  z-index: 1;
  width: 100%;
  height: auto;
  position: relative;
}

.full-width-image__image video,
.full-width-image__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* =========================== */
/* [[[ BLOCK: SCROLL IMAGE ]]] */
/* =========================== */

.scroll-image {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.scroll-image__background {
  border: 1px solid var(--color-accent-light);
  border-radius: 3px;
  padding: 1.5rem;
}

.scroll-image__instruction {
  color: var(--color-accent-dark);
  text-align: center;
  margin-bottom: 0.5rem;
  display: block;
}

.scroll-image__viewport {
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
}


/* --- Custom scrollbar styling (Webkit) --- */

.scroll-image__viewport::-webkit-scrollbar {
  height: 12px;

}

.scroll-image__viewport::-webkit-scrollbar-track {
  background-color: var(--color-accent-lightest);
  border: 1px solid var(--color-accent-light);
  border-radius: 10px;
}

.scroll-image__viewport::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: 10px;
  border: 2px solid var(--color-white);
}

.scroll-image__img {
  display: block;
  max-width: none;
  height: 450px;
  width: auto;
}

/* ====================== */
/* [[[ BLOCK: TOOLTIP ]]] */
/* ====================== */

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  vertical-align: middle;
}

.tooltip__icon {
  background: none;
  border: none;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  padding: 0;
}

.tooltip__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.tooltip__popup {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.8rem;
  width: 200px;
  padding: 0.8rem;
  border-radius: 4px;
  color: var(--color-white);
  background-color: var(--color-accent-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

.tooltip__popup::after {
  content: "";
  position: absolute;
  /* Arrow pointing DOWN */
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-accent-dark) transparent transparent transparent;
}

.tooltip:hover .tooltip__popup,
.tooltip:focus-within .tooltip__popup {
  visibility: visible;
  opacity: 1;
}

/* Mobile Tooltip Adjustment - Removed as global style is now responsive/safe */



/* ========================== */
/* [[[ BLOCK: METHODOLOGY ]]] */
/* ========================== */

.methodology {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.method {
  border: 1px solid var(--color-accent);
  padding: 1.5rem;
  border-radius: 3px;
}

.method h4 {
  margin-top: 0;
}


/* ====================== */
/* [[[ BLOCK: QUOTE BANNER ]]] */
/* ====================== */

.quote-banner {
  position: relative;
  padding: 1rem 2rem;
  background-color: var(--color-accent-lightest);
  margin-bottom: 1rem;
}

.quote-banner::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background-color: var(--color-white);
  z-index: var(--z-negative);
}

.quote-banner__text {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--color-accent-dark);

}

.quote-banner__credit {
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

/* ============================ */
/* [[[ BLOCK: VISUAL BANNER ]]] */
/* ============================ */

.visual-banner {
  grid-column: 1 / -1;
  position: relative;
  min-height: 500px;
  max-height: 60vh;
  display: grid;
  grid-template-columns: subgrid;
  align-items: end;
  margin-bottom: 0;
}

.visual-banner__video {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: 0;
}

.visual-banner__video video,
.visual-banner__video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.visual-banner__overlay {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 40px;
  background: linear-gradient(to right, #3600d9, #8492fe);
  z-index: 1;
}

.visual-banner__caption-text {
  grid-column: 2 / -1;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-white);
  position: relative;
  z-index: var(--z-overlay);
  margin-bottom: 0.6rem;
}


/* ======================= */
/* [[[ BLOCK: NAV CARDS ]]] */
/* ======================= */

.nav-cards {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--spacing-grid-row);
}

.nav-cards__header {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.nav-cards__item {
  grid-column: span 5;
}

.nav-cards__link {
  display: block;
  box-sizing: border-box;
  height: 100%;
  background-color: var(--color-white);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: var(--color-accent);
}

.nav-cards__link:hover,
.nav-cards__link:focus {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.nav-cards__link h3 {
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.nav-cards__link:hover h3 {
  text-decoration: underline;
}

.nav-cards__link p {
  color: var(--color-accent);
  line-height: 1.6;
}


/* ============================ */
/* [[[ BLOCK: FEATURE PREVIEW ]]] */
/* ============================ */

.feature-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.feature-preview__image {
  grid-column: 6 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 16/9;
  background-color: #f0f0f0;
}

.feature-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  /* Anchor to bottom */
  transition: transform 0.5s ease;
}

.feature-preview__text {
  grid-column: 1 / 6;
  display: flex;
  flex-direction: column;
}

.feature-preview__label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
  display: block;
}

.feature-preview:hover .feature-preview__image img {
  transform: scale(1.03);
}

.feature-preview:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}


/* =========================== */
/* [[[[ RESPONSIVE STYLES ]]]] */
/* =========================== */


/* ==== TABLET (Breakpoint: 1200px) ==== */

@media (max-width: 1200px) {

  .page-layout__grid>.page-header,
  .page-layout__content-wrapper>.page-header {
    margin-top: 2rem;
  }

  .visual-banner__caption-text {
    grid-column: 2 / -1;
  }

  .image-gallery {
    grid-template-columns: subgrid;
  }

  .image-gallery__item {
    grid-column: span 6;
    /* 2 items per row on 12-col grid */
  }

  .text-with-image {
    display: flex;
    flex-direction: column;
    column-gap: 2rem;
  }

  .text-with-image__text,
  .text-with-image__image {
    width: 100%;
  }

  .nav-cards {
    /* grid-template-columns: subgrid; -- Inherited already */
    column-gap: 1.5rem;
  }

  .nav-cards__item {
    grid-column: span 4;
  }

  /* Feature Preview Tablet */
  .feature-preview__image {
    grid-column: 7 / -1;
    /* Image right */
  }

  .feature-preview__text {
    grid-column: 1 / 7;
    /* Text left */
  }

  .methodology {
    column-gap: 1.5rem;
  }

  .visual-banner {
    margin-block: -2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 0;
    margin-top: -2.5rem;
  }

}


/* ==== MOBILE (Breakpoint: 800px) ==== */

@media (max-width: 800px) {

  .section-list {
    grid-column: 2 / -1;
    row-gap: var(--spacing-grid-row);
  }

  .page-layout__grid>.page-header,
  .page-layout__content-wrapper>.page-header {
    margin-top: 1.5rem;
  }

  .page-header {
    grid-column: 1 / -1;
  }

  .text-block {
    grid-column: 1 / -1;
  }

  .visual-banner__caption-text {
    grid-column: 1 / -1;
  }

  .center-width-image__image {
    min-height: auto;
    height: auto;
  }

  .image-gallery__item {
    grid-column: 1 / -1;
  }

  .image-gallery__item img {
    height: auto;
  }

  .nav-cards {
    grid-column: 1 / -1;
    gap: 2rem;
  }

  .feature-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
  }

  .feature-preview__image,
  .feature-preview__text {
    width: 100%;
  }

  .nav-cards__item {
    grid-column: span 4;
  }

  .team-member-list {
    grid-column: 1 / -1;
  }

  .team-member {
    grid-column: 1 / -1;
  }

  .methodology {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }



}