/*
 * Desktop homepage sections (GS-REQ-007). Loaded only by the desktop layout of Home/Index.
 * Requires gs-tokens.css, gs-base.css and gs-components.css.
 */

/* Hero (GS-REQ-007, 7.1-7.4): title and quick filters on the left, featured carousel on the right */
.gs-hero {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 56px 64px;
}

.gs-hero-intro {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 12px;
}

.gs-hero-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gs-hero-subtitle {
  margin: 0;
}

.gs-chip-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Featured carousel (GS-REQ-007, 7.4) */
.gs-hero-carousel {
  --gs-hero-media-height: 452px;
  position: relative;
}

.gs-hero-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.gs-hero-card:hover,
.gs-hero-card:focus {
  color: inherit;
}

.gs-hero-card:focus-visible {
  outline: 3px solid var(--gs-accent);
  outline-offset: 4px;
  border-radius: 22px;
}

.gs-hero-media {
  position: relative;
  height: var(--gs-hero-media-height);
  overflow: hidden;
  border-radius: 20px;
  background: var(--gs-media-bg);
  transition: box-shadow 0.2s ease;
}

.gs-hero-card:hover .gs-hero-media {
  box-shadow: var(--gs-shadow-card);
}

/* Portrait posters: whole image (contain) on a blurred copy (GS-REQ-006, 6.5); landscape images: cover (set by home.js) */
.gs-hero-media-bg,
.gs-hero-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gs-hero-media-bg {
  object-fit: cover;
  filter: blur(18px) brightness(0.72);
  transform: scale(1.25);
}

.gs-hero-media-img {
  object-fit: contain;
}

.gs-hero-media.is-landscape .gs-hero-media-img {
  object-fit: cover;
}

.gs-hero-media.is-landscape .gs-hero-media-bg {
  display: none;
}

.gs-hero-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--gs-ink);
  color: var(--gs-on-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Room on the right for the slide dots */
.gs-hero-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 120px;
}

.gs-hero-card-title {
  margin: 0;
}

.gs-hero-card:hover .gs-hero-card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gs-hero-card-meta {
  margin: 0;
  font-size: 16px;
  color: var(--gs-text-2);
}

/* Arrows: bottom right over the image */
.gs-hero-arrows {
  position: absolute;
  top: calc(var(--gs-hero-media-height) - 62px);
  right: 18px;
  display: flex;
  gap: 8px;
}

/* Fixed light circle: it always sits on an image, in both themes */
.gs-hero-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #15213A;
  cursor: pointer;
}

.gs-hero-arrow:hover {
  background: #FFFFFF;
}

.gs-hero-arrow:focus-visible,
.gs-hero-dot:focus-visible {
  outline: 3px solid var(--gs-accent);
  outline-offset: 2px;
}

/* Dots: right of the title, under the image */
.gs-hero-dots {
  position: absolute;
  top: calc(var(--gs-hero-media-height) + 16px);
  right: 0;
  display: flex;
}

/* 24px hit area around the small visible dot */
.gs-hero-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gs-hero-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gs-muted);
  opacity: 0.55;
}

.gs-hero-dot[aria-current="true"] {
  min-width: 30px;
}

.gs-hero-dot[aria-current="true"]::before {
  width: 22px;
  background: var(--gs-ink);
  opacity: 1;
}

/* Card row ("Tonight", GS-REQ-007, 7.5.3): --gs-row-cols visible cards, the rest scrolled with the arrows */
.gs-card-row {
  --gs-row-cols: 5;
  --gs-row-gap: 20px;
  display: flex;
  gap: var(--gs-row-gap);
  margin: 0;
  padding: 4px 4px 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
}

.gs-card-row::-webkit-scrollbar {
  display: none;
}

.gs-card-row-item {
  flex: 0 0 calc((100% - (var(--gs-row-cols) - 1) * var(--gs-row-gap)) / var(--gs-row-cols));
  min-width: 0;
  scroll-snap-align: start;
}

/* Image about 180px high, as in the mockup */
.gs-card-row .gs-card-media {
  aspect-ratio: auto;
  height: 180px;
}

/* "This weekend" (GS-REQ-007, 7.6): day tabs on the left, filter chips on the right of the same row */
.gs-weekend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--gs-line);
}

.gs-weekend-filters {
  padding-bottom: 6px;
}

/* 4 columns x 2 rows of standard cards, image about 210px high (GS-REQ-007, 7.6.5) */
.gs-weekend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-weekend-grid .gs-card-media {
  aspect-ratio: auto;
  height: 210px;
}

[data-gs-weekend-panel][aria-busy="true"] {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.gs-weekend-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--gs-text-2);
}

.gs-weekend-error {
  margin: 16px 0 0;
  color: var(--gs-text-2);
}

.gs-weekend-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.gs-weekend-more:has([hidden]) {
  display: none;
}

/* "Don't miss" (GS-REQ-007, 7.7): horizontal cards (GS-REQ-006, 6.5) in rows of 3 */
.gs-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-feature-card {
  display: flex;
  gap: 20px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--gs-line);
  border-radius: 18px;
  background: var(--gs-surface);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

.gs-feature-card:hover,
.gs-feature-card:focus {
  color: inherit;
}

.gs-feature-card:hover {
  box-shadow: var(--gs-shadow-card);
}

.gs-feature-card:hover .gs-feature-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gs-feature-card:focus-visible {
  outline: 3px solid var(--gs-accent);
  outline-offset: 4px;
}

/* Poster 150x200px, cover, radius 12px */
.gs-feature-media {
  flex-shrink: 0;
  width: 150px;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gs-media-bg);
}

.gs-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gs-feature-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-top: 4px;
}

.gs-feature-date {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gs-link);
}

.gs-feature-title {
  margin: 0;
}

.gs-feature-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--gs-text-2);
}

/* The venue sits at the bottom of the card */
.gs-feature-venue {
  margin: auto 0 0;
  font-size: 14px;
  color: var(--gs-muted);
}

/* "Browse by interest" (GS-REQ-007, 7.8): 6 category tiles in one row */
.gs-interest-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Category tile (GS-REQ-006, 6.5): image 230px high (cover), radius 16px, solid --gs-ink band with the name, no gradient */
.gs-category-tile {
  position: relative;
  display: block;
  height: 230px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--gs-media-bg);
  color: var(--gs-on-ink);
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

.gs-category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gs-category-tile-name {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 14px 16px;
  background: var(--gs-ink);
  color: var(--gs-on-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.gs-category-tile:hover {
  box-shadow: var(--gs-shadow-card);
  color: var(--gs-on-ink);
}

.gs-category-tile:hover .gs-category-tile-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gs-category-tile:focus-visible {
  outline: 3px solid var(--gs-accent);
  outline-offset: 3px;
}

/* "Free this week" (GS-REQ-007, 7.9.2): 6 compact cards in 3 columns x 2 rows */
.gs-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* "Venues" (GS-REQ-007, 7.10.2): 4 venue cards */
.gs-venue-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Tablet (768-1199): two narrower columns, then one column (Etap 3 plan, tablet adaptations) */
@media (max-width: 1199.98px) {
  .gs-card-row {
    --gs-row-cols: 4;
  }

  .gs-weekend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gs-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 3 x 2 tiles (Etap 3 plan, tablet adaptations) */
  .gs-interest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gs-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-hero {
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    gap: 32px;
    padding-block: 40px 48px;
  }

  .gs-hero-carousel {
    --gs-hero-media-height: 380px;
  }
}

@media (max-width: 991.98px) {
  .gs-card-row {
    --gs-row-cols: 3;
  }

  .gs-weekend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 2 x 2 venue cards (Etap 3 plan, tablet adaptations) */
  .gs-venue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The filter chips go under the tabs (Etap 3 plan, tablet adaptations) */
  .gs-weekend-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .gs-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-hero-intro {
    padding-top: 0;
  }
}

/* Narrow desktop windows: no horizontal scroll */
@media (max-width: 575.98px) {
  .gs-card-row {
    --gs-row-cols: 1.3;
  }

  .gs-weekend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-feature-media {
    width: 110px;
    height: 147px;
  }

  .gs-interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-category-tile {
    height: 180px;
  }

  .gs-compact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-hero-carousel {
    --gs-hero-media-height: 260px;
  }

  .gs-hero-card-text {
    padding-right: 0;
    padding-bottom: 28px;
  }

  .gs-hero-dots {
    top: auto;
    bottom: 0;
  }
}
