.stations-list-page-index .view-header {
  .field--name-body {
    width: clamp(320px, 66%, 800px);
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: var(--margin-m);
  }
}


/* Hero Layout for Stations List Page */

/* Break out of the container for the header */
.stations-list-page-index .view-header {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 2rem;
  padding: 0;
}

/* Hero Image Styling */
.stations-list-page-index .view-header .field--name-field-block-cover-image {
  position: relative;
  width: 100%;
  height: 50dvh; /* Hero height */
  overflow: hidden;
}

.stations-list-page-index .view-header .field--name-field-block-cover-image img, .stations-list-page-index .view-header .field--name-field-block-cover-image picture, .stations-list-page-index .view-header .field--name-field-block-cover-image figure {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  
}

/* Page Title Styling (Overlay) */
.stations-list-page-index .view-title-hero {
  position: absolute;
  top: 20%; /* Adjust as needed */
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  text-shadow: 0 2px 6px var(--c-black-transparent-1);
  z-index: 22;
  margin: 0;
  text-align: center;
  width: fit-content;
  padding: var(--margin-m) var(--margin-l);
  background: var(--blue-base);
  border-radius: var(--br-s);
  font-size: var(--fc-h1plus);
  font-weight: bold;

}




@media all and (width <= 600px) {
  .stations-list-page-index .view-header {
    
    
    .view-title-hero {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50% , -10%);
  }
    .field--name-body {
      margin-top: var(--margin-m);
    }
  }
}



/* Stations List Grid Layout */

.stations-list-page-index .view-content {

  ul.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--margin-l);
    list-style: none;
    margin: 0;
    padding: 0;

    & > li {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: stretch;
      gap: var(--margin-m);
      border: 2px solid var(--grey-light-2);
      border-radius: var(--br-s);
      overflow: hidden;
      padding: 0;
      margin: 0;
      position: relative;
      height: 100%;
      min-height: 400px;

      transition: all 0.3s ease-in-out;

    &:hover {
        box-shadow: 0 4px 8px var(--c-black-transparent-3);
        transform: scale(1.04);
    }
      
    
    .cover-image {
      position: absolute;
      top: 0;
      left: 0;
      
      aspect-ratio: 4 / 3;
      width: 100%;
      height: 100%;
      overflow: hidden;
      z-index: 3;

      .field-content {
        width: 100%;
        height: 100%;
      }

      img,figure, picture {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        aspect-ratio: 4 / 3;
        }
    }

    & > .views-field-fieldset {
      z-index: 7;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      padding: var(--margin-m);

      a {
        text-decoration: none;
        color: var(--white);
      }

      .views-field-title {
        margin: 0;
        padding: var(--margin-s) var(--margin-m);
        background: var(--blue-light-1);
        color: var(--white);
        font-size: var(--fc-h2);
        font-weight: bold;
        line-height: 1;
        letter-spacing: -1px;
        position: relative;
        top: 0;
        left: 0;
        width: fit-content;
        text-wrap: balance;
      }

      .views-field-field-subtitle,
      .views-field-field-station-address {
        margin: 0;
        padding: var(--margin-s) var(--margin-m);
        background: var(--blue-dark-1);
        color: var(--grey-light-2);
        font-size: var(--fc-p2);
        line-height: 1.1;
        font-weight: var(--fw-semibold);
        position: relative;
        top: 0;
        left: 0;
        width: fit-content;

      }

      .views-field-field-subtitle {
        background: var(--blue-dark-2);

        a {
        text-decoration: none;
        color: var(--grey-light-1);
        font-size: var(--fc-p);
        font-weight: var(--fw-normal);
        }
      }

      .views-field-field-station-address {
        background: var(--blue-dark-1);


        a {
        text-decoration: none;
        color: var(--grey-light-2);
        font-size: var(--fc-p);
        }
      }

      .views-field-view-node {
        position: absolute;
        bottom: var(--margin-m);
        right: var(--margin-m);

        
        background-color: var(--c-white-transparent-1);
        color: var(--blue-dark-1);
        font-weight: var(--fw-bold);
        padding: var(--margin-xs) var(--margin-m);
        border-radius: var(--br-s);
        border: 1px solid var(--c-white-transparent-1);
        text-decoration: none;

        a {
          text-decoration: none;
          color: var(--blue-base);
        }

        a::after {
          content: '→';
          margin-left: var(--margin-xs);
          color: var(--blue-base);
        }
        
      }
    }

    .views-field-field-photo-gallery ul {
      
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: center;
      gap: var(--margin-xs);
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        aspect-ratio: 1;
        overflow: hidden;
        width: 100px;
        height: 100px;
        padding: 0;
        margin: 0;
      }

      img,figure, picture {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: var(--br-s);
      }
    }
  }
}
}

/* Hide the default page title block on the stations list page */
body.path-stations #block-filorent01-page-title {
  display: none;
}