/* hero */
/* Ensure homepage main fills viewport so footer sits at bottom when content is short */
main.ffw.subgrid {
  min-height: 100vh;
}

.homepage-bg {
  width: 100%;
  height: 100vh;
  /* Full screen */
  overflow: hidden;
}

/* The image fills the screen */
.background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Very important */
  border-radius: 0px !important;
}

/* Text sits on top */
.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding-bottom: 36px;
}

/* Reignite Renaissance Section */
.hero-renaissance {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.renaissance-main {
  color: var(--shw);
  font-family: var(--font-sans);
  font-size: 70px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 40px 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.renaissance-translation-top {
  color: var(--shw);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
  margin-top: 20px;
}

.renaissance-translation-bottom {
  color: var(--shw);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

/* Gradient opacity for top translations (above main headline) */
/* 1st = 20%, 2nd = 40%, 3rd = 60%, 4th = 80%, 5th = 100% */
.hero-renaissance .renaissance-translation-top:nth-of-type(1) {
  opacity: 0.2;
}

.hero-renaissance .renaissance-translation-top:nth-of-type(2) {
  opacity: 0.4;
}

.hero-renaissance .renaissance-translation-top:nth-of-type(3) {
  opacity: 0.6;
}

.hero-renaissance .renaissance-translation-top:nth-of-type(4) {
  opacity: 0.8;
}

.hero-renaissance .renaissance-translation-top:nth-of-type(5) {
  opacity: 1;
}

/* Gradient opacity for bottom translations (below main headline) */
/* 6th span = 100%, 7th = 80%, 8th = 60%, 9th = 40%, 10th = 20% */
.hero-renaissance .renaissance-translation-bottom:nth-of-type(6) {
  opacity: 1;
}

.hero-renaissance .renaissance-translation-bottom:nth-of-type(7) {
  opacity: 0.8;
}

.hero-renaissance .renaissance-translation-bottom:nth-of-type(8) {
  opacity: 0.6;
}

.hero-renaissance .renaissance-translation-bottom:nth-of-type(9) {
  opacity: 0.4;
}

.hero-renaissance .renaissance-translation-bottom:nth-of-type(10) {
  opacity: 0.2;
}

/* Responsive adjustments for Renaissance section */

/* Medium/Laptop devices */
@media (max-width: 1500px) {
  .renaissance-main {
    font-size: 50px;
    margin: 20px 0;
  }

  .renaissance-translation-top {
    font-size: 16px;
    margin-top: 16px;
  }

  .renaissance-translation-bottom {
    font-size: 16px;
    margin-bottom: 16px;
  }
}

/* Tablet devices */
@media (max-width: 900px) {
  .hero-renaissance {
    right: 24px;
  }

  .renaissance-main {
    font-size: 36px;
    letter-spacing: 0.03em;
    margin: 20px 0;
  }

  .renaissance-translation-top,
  .renaissance-translation-bottom {
    font-size: 12px;
    letter-spacing: 0.03em;
  }
}

/* Mobile devices */
@media (max-width: 640px) {
  .hero-renaissance {
    right: 16px;
    gap: 4px;
  }

  .renaissance-main {
    font-size: 24px;
    letter-spacing: 0.02em;
    margin: 12px 0;
  }

  .renaissance-translation-top,
  .renaissance-translation-bottom {
    font-size: 9px;
    letter-spacing: 0.02em;
    margin-top: 8px;
    margin-bottom: 8px;
  }
}

/* Optional styling */
.hero-description {
  color: var(--shw);
  text-align: center;
  font-family: Montserrat;
  font-size: 24px;
  font-style: normal;
  font-weight: 540;
  line-height: 28px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 1500px) {
  .hero-description {
    font-size: 20px;
  }
}


.homepage-heading {
  color: var(--mb);
  font-family: var(--font-sans);
  font-size: 48px;
  font-style: normal;
  font-weight: 440;
  line-height: 52px;
  letter-spacing: 1.92px;
  text-transform: uppercase;
}

.homepage-subheading {
  color: var(--mb);
  font-family: Montserrat;
  font-size: 24px;
  font-style: normal;
  font-weight: 540;
  line-height: 28px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* Laptop devices */
@media (max-width: 1500px) {
  .homepage-subheading {
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
  }
}



#brows_by_subject .browse-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 32px;
  align-items: center;
}

#brows_by_subject .browse-link {
  display: inline-flex !important;
}

#brows_by_subject .browse-img {
  display: block;
  max-width: 100%;
  height: auto;
}


#brows_by_subject .browse-item {
  text-align: center;
}

#brows_by_subject .browse-link {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

#brows_by_subject .browse-label {
  margin: 0;
  color: var(--mb);

  /* Uppercase/Semibold/1.25 */
  font-family: Montserrat;
  font-size: 24px;
  font-style: normal;
  font-weight: 540;
  line-height: 28px;
  /* 116.667% */
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.homepage-spotlight {
  background: var(--grey-100);
}

#articles .section-inner {
  padding-left: 60px;
  padding-right: 60px;
}

.articles-homepage-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--breve);
  row-gap: var(--semibreve);
  margin: var(--semibreve) 0;
}

@media (min-width: 1200px) {
  .articles-homepage-container {
    /*grid-template-columns: 1fr 1fr 1fr;*/
  }
}

@media (max-width: 900px) {
  .articles-homepage-container {
    column-gap: var(--semibreve);
  }
}

@media (max-width: 640px) {
  .articles-homepage-container {
    grid-template-columns: 1fr;
  }
}

/* British Landscape Artists - 2 cards on desktop/laptop/tablet, 1 on mobile */
.search-dashoard {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px;
}

/* Remove the large bottom margin from cards in this grid */
.search-dashoard .search-result-card {
  margin-bottom: 0 !important;
}

@media (max-width: 640px) {
  .search-dashoard {
    grid-template-columns: 1fr !important;
  }
}

/* Override .search-img dimensions for British Landscape section */
.double-dashboard {
  width: 100% !important;
  max-width: 704px;
  height: auto !important;
  aspect-ratio: 704 / 469 !important;
  object-fit: cover;
}

.double-card {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.homepage-hero-section {
  height: 100vh;
  padding-top: var(--header-height);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--minim);
  border-bottom: var(--grey-400) 1px solid;
}

.hero-logo {
  width: min(500px, 100%);
}

.hero-logo-tagline {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 1.2em;
  letter-spacing: 0.08em;
}

/* other sections */
.homepage-section {
  /*min-height: 100vh;*/
  padding-top: var(--semibreve);
  padding-bottom: var(--semibreve);

  &.step {
    grid-column: full-start / full-end;
  }
}

/* steps */
.homepage-step-container {
  background-color: var(--ib);
  background: linear-gradient(180deg, var(--ib) 0%, #163B42 100%);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;

  &:not(:last-child) {
    border-bottom: 1px solid var(--shw);
  }

  &>:first-child {
    border-right: 1px solid rgba(from var(--shw) r g b / 0.2);
  }
}

.homepage-step-image {
  object-fit: contain;
  width: 100%;
  height: 100%;
  padding: var(--semibreve);
}

.homepage-step-text-container {
  padding: var(--semibreve);

  & * {
    color: var(--shw);
  }
}

.homepage-step-title {
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
}

.homepage-step-description {
  line-height: 2;
  margin-bottom: var(--semibreve);
}

.homepage-iconed-details-container {
  display: flex;
  flex-direction: column;
  gap: var(--breve);
  margin-top: var(--breve);
}

.homepage-spotlight-section {
  grid-column: full-start / full-end;
  background-color: var(--ib);
  display: grid;
  grid-template-columns: 1fr;
}

.homepage-spotlight-portrait-container {
  justify-self: center;
  padding: var(--semibreve);
}

.homepage-spotlight-portrait {
  aspect-ratio: 5 / 8;
  max-width: 250px;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
}

.homepage-spotlight-text-container {
  padding: var(--semibreve);

  &>p,
  &>h2 {
    color: var(--shw);
  }
}

.homepage-spotlight-title {
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.homepage-spotlight-blurb {
  margin-bottom: var(--semibreve);
}

.homepage-bottom-logoo {
  width: 50px;
}

.homepage-logoo-container {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media only screen and (min-width: 640px) {
  .homepage-iconed-details-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .homepage-section.step {
    grid-column: pad-start / pad-end;
  }

  .homepage-step-container {
    border-radius: var(--crotchet);
    grid-template-columns: 1fr 1fr;
  }

  .homepage-step-container:not(:last-child) {
    margin-bottom: var(--breve);
    border-bottom: none;
  }

  .homepage-step-container[image="first"] {
    grid-template-columns: 2fr 1fr;
  }

  .homepage-step-container[image="last"] {
    grid-template-columns: 1fr 2fr;
  }

  .homepage-spotlight-section {
    grid-column: pad-start / pad-end;
    border-radius: var(--crotchet);
    grid-template-columns: 1fr 2fr;
  }

  .homepage-spotlight-text-container {
    border-left: 1px solid rgb(from var(--shw) r g b / 0.2);
  }
}

/* ========================================
   Artists Carousel Styles
   ======================================== */

.artists-carousel-wrapper {
  position: relative;
  width: 100%;
}

.artists-carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Override the search-results grid for homepage carousel */
.artists-carousel .search-results {
  display: flex !important;
  gap: 24px;
  transition: transform 0.4s ease-out;
}

/* Artist cards in carousel - show 4 on desktop */
.artists-carousel .search-result-card {
  flex: 0 0 calc((100% - 72px) / 4);
  /* 4 cards with 3 gaps of 24px */
  min-width: 0;
  margin-bottom: 0;
  width: auto;
  /* Override fixed 320px width */
}

/* Override fixed image dimensions for carousel */
.artists-carousel .search-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
}

/* Position arrows OUTSIDE the section using absolute positioning */
.artists-carousel-wrapper .gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.artists-carousel-wrapper .gallery-arrow--left {
  left: -60px;
}

.artists-carousel-wrapper .gallery-arrow--right {
  right: -60px;
}

.artists-carousel-wrapper .gallery-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Laptop devices - show 3 artists */
@media (max-width: 1500px) {
  .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 72px) / 4);
    /* 4 cards with 3 gaps of 24px */
  }
}

/* Tablet devices - show 2 artists */
@media (max-width: 900px) {
  .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 24px) / 2);
    /* 2 cards with 1 gap of 24px */
  }

  .artists-carousel-wrapper .gallery-arrow--left {
    left: -45px;
  }

  .artists-carousel-wrapper .gallery-arrow--right {
    right: -45px;
  }
}

/* Mobile devices - show 1 artist, arrows hidden, swipe enabled */
@media (max-width: 640px) {

  .artists-carousel .search-result-card {
    flex: 0 0 100%;
  }

  .artists-carousel-wrapper .gallery-arrow--left,
  .artists-carousel-wrapper .gallery-arrow--right {
    display: none;
  }

  /* Enable swipe on mobile */
  .artists-carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .artists-carousel-container::-webkit-scrollbar {
    display: none;
  }

  .artists-carousel .search-results {
    scroll-snap-type: x mandatory;
  }

  .artists-carousel .search-result-card {
    scroll-snap-align: center;
  }
}