﻿/***************/
/* Card slider */
/***************/
.slider {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: space-around;
  align-items: center;
  overflow: visible;
}

.slider__container {
  display: flex;
  gap: 24px;
  overflow: hidden;
  width: calc((238px * 4) + (1.5rem * 3));
  overflow-y: visible;
  margin-block-start: 0;
  padding-inline-start: 0;
}

.slider__item {
  list-style-type: none; 
}

.slider__arrow {
  position: relative;
  cursor: pointer;
  width: 64px;
  height: auto;
}

.slider__arrow {
  top: -26px;
}

.slider__arrow {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.slider__arrow svg {
  opacity: 0.3;
  transition: opacity 0.3s;
}

.slider__arrow.active svg {
  opacity: 1;
}

/* Default (no hover): keep white fill */
.slider__arrow svg rect:first-of-type {
  fill: white; /* overridden by CSS; safer than relying on the SVG attribute */
}

/* Hover: use the same color as the border */
.slider__arrow:hover svg rect:first-of-type {
  fill: #24b7ba; /* or var(--color1) if you use CSS variables */
}

/* Show 3 cards */
@media (max-width: 1231px) {
  .slider__container {
    width: calc((238px * 3) + (1.5rem * 2));
  }
}

/* Show 2 cards */
@media (max-width: 969px) {
  .slider__container {
    width: calc((238px * 2) + (1.5rem * 1));
  }
}

/* Show 1 card */
@media (max-width: 707px) {
  .slider__container {
    width: 238px;
  }
}

@media (max-width: 445px) {
  .slider {
    justify-content: center;
    gap: 0;
  }

  .slider__arrow {
    z-index: 10;
    margin: 0 -32px;
  }
}

/****************/
/* --- Grid --- */
/****************/
.card-grid {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-inline-start: 0;
  padding-inline-start: 0;
}

.card-grid__filter-container {
  margin-bottom: 2rem; 
  display: flex;
  gap: 1rem;
  align-items: center;
}

.card-grid__item {
  list-style-type: none;
}

/****************/
/* --- Card --- */
/****************/
.card {
  width: 226px;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.card__image-container {
  width: 100%;
  height: 303px;
}

.card__image {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.card__heading {
  /* truncate text to 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: 60px;
  line-height: normal;
  font-size: 1.5rem;
  font-family: Montserrat-SemiBold, 'Courier New', Courier, monospace;
  color: var(--color4);
  margin-top: 1rem;
}

/* Places the link over the entire card for better accessibility */
.card__link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-indent: -9999px; /* Hide the text visually */
}

/*****************/
/* Photo gallery */
/*****************/
.gallery {
  display: flex;
  width: 100%;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

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

.gallery__column--reverse {
  flex-direction: column-reverse;
}

@media (width <=480px) {
  .gallery {
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
  }

  .gallery__column-reverse {
    flex-direction: column;
  }
}

.gallery__item {
  width: 238px;
  flex-shrink: 0;
}

.gallery__item--large {
  height: 333px;
}

.gallery__item--small {
  height: 238px;
}

.gallery__item-img {
  object-fit: cover;
  height: inherit;
  width: inherit;
  border-radius: 10px;
}

/****************/
/* Title Banner */
/****************/

.banner {
  background-color: var(--color7);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (max-width: 768px) {
  .banner {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/******************/
/* Splash Section */
/******************/

.splash {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.splash__text {
  width: 45%;
}

.splash__title {
  font-family: MontserratAlternates-Bold, 'Courier New', Courier, monospace;
  font-size: 4rem;
  color: var(--color4);
  width: 130%;
  margin-bottom: 0;
}

.splash__title--cy {
  font-size: 3.5rem;
}

.splash__sub-text {
  font-family: Montserrat-Regular, 'Courier New', Courier, monospace;
  font-size: 1.25rem;
  padding-top: 1rem;
  padding-right: 1.5rem;
}

.splash__image {
  width: 55%;
  position: relative;
  aspect-ratio: 1/1;
}

.splash__image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.splash__image img:nth-child(1) {
  width: 100%;
  z-index: 1;
}

.splash__image img:nth-child(2) {
  width: 90%;
  z-index: 2;
}

.splash__image img:nth-child(3) {
  width: 80%;
  z-index: 3;
}

.splash__decorative {
  position: relative;
}

/* Positioning for decorative elements */
/*
  The calculations below place the decorative elements
  relative to the center of the viewport, ensuring they
  stay aligned regardless of screen size.
*/
.splash__decorative :nth-child(1) {
  left: calc(50% - (1200px / 2));
  top: -15px;
}

.splash__decorative :nth-child(2) {
  left: calc(50% - (550px / 2));
  top: 450px;
}

.splash__decorative :nth-child(3) {
  right: calc(50% - (1200px / 2));
  top: -15px;
}
/* ----------------------------------- */

/* ------ Responsive Adjustments ----- */
@media (width <=1072px) {
  .splash__decorative img {
    display: none;
  }
}

@media (width <=768px) {
  .splash-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .splash {
    flex-direction: column-reverse;
  }

  .splash__text {
    width: 100%;
  }

  .splash__title {
    font-size: 2rem;
    width: 100%;
  }

  .splash__sub-text {
    font-size: 1rem;
    padding-right: 0;
  }

  .splash__image {
    width: 90%;
  }
}
/* ---------------------------------- */

/*************/
/* Pre-title */
/*************/
.pre-title {
  font-family: MontserratAlternates-Bold, 'Courier New', Courier, monospace;
  font-size: 1.25rem;
  color: var(--color1);
  margin-bottom: 0.5rem;
}

.pre-title--marker {
  display: inline-block;
  width: 40px;
  height: 3px;
  background-color: var(--color1);
  margin-right: 0.5rem;
  position: relative;
  bottom: 5px;
}

/*********************/
/* Side-by-side card */
/*********************/
.side-by-side-card {
  display: flex;
  min-height: 250px;
  max-width: 800px;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  align-items: stretch;
  z-index: 1;
  gap: 1rem;
}

.side-by-side-card__image-wrapper {
  flex: 1 1 40%;
  position: relative;
  min-height: 300px;
  max-height: 400px;
  aspect-ratio: 2 / 3;
}

.side-by-side-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.side-by-side-card__content {
  flex: 1 1 60%;
  padding: 20px;
  background: #fff;
  border: 3px solid #ddd;
  border-radius: 10px;
}

.side-by-side-card__title {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.side-by-side-card__text {
  font-size: 1rem;
}

@media (max-width: 700px) {
  .side-by-side-card {
    flex-direction: column;
    min-height: auto;
  }
  .side-by-side-card__image-wrapper {
    height: 200px;
    width: auto;
    flex: none;
  }
  .side-by-side-card__content {
    text-align: left;
    padding: 10px;
  }
}

/*********************/
/* Image and caption */
/*********************/

.card-with-fig-and-caption__img-container {
  width: 9.5rem;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.card-with-fig-and-caption__img {
  margin-bottom: 8px;
  border-radius: 15px;
  border: 3px solid var(--color6);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-with-fig-and-caption__text {
  border-radius: 10px;
  margin-bottom: 24px;
  font-weight: bold;
  max-width: 10rem;
}

@media (max-width: 768px) {
  .card-with-fig-and-caption__img-container {
    width: 12rem;
  }
}

/*********************/
/* Skip to content */
/*********************/

.skip-to-content {
  position: absolute;
  left: -10000px;
  top: auto;
  overflow: hidden;
  padding: 3px 7px;
  background-color: var(--color5);
  text-decoration: none;
  color: var(--color7);
  font-weight: bold;
}

.skip-to-content:focus {
  position: fixed;
  left: auto;
  top: auto;
}
