/**
 * Gym Directory USA — Single Listing Page CSS
 * Blocks: LISTING-01 through LISTING-06
 */

/* ============================================================
   LISTING-01: HERO BLOCK
   ============================================================ */
.gd-listing-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: var(--gd-surface);
  overflow: hidden;
}

/* Desktop: 65% content / 35% photo */
.gd-listing-hero__inner {
  width: 100%;
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: var(--gd-space-2xl) var(--gd-space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-lg);
  align-items: center;
}

@media (min-width: 1024px) {
  .gd-listing-hero__inner {
    grid-template-columns: 65fr 35fr;
    min-height: 480px;
  }
}

/* Content stack */
.gd-listing-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--gd-space-md);
}

/* Type badge chips */
.gd-listing-hero__types {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gd-space-sm);
}

/* Gym name */
.gd-listing-hero__name {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: var(--gd-fw-black);
  color: var(--gd-navy);
  letter-spacing: -1.5px;
  line-height: 1.05;
  animation: gd-reveal-up 0.6s ease-out both;
}

/* Location line */
.gd-listing-hero__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--gd-body);
  color: var(--gd-text-muted);
}
.gd-listing-hero__location a:hover { color: var(--gd-flame); }
.gd-listing-hero__location svg { color: var(--gd-flame); flex-shrink: 0; }

/* Trust bar */
.gd-listing-hero__trust {
  display: flex;
  align-items: center;
  gap: var(--gd-space-md);
  flex-wrap: wrap;
}

.gd-listing-hero__rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gd-listing-hero__rating-num {
  font-size: 20px;
  font-weight: var(--gd-fw-bold);
  color: var(--gd-navy);
}

.gd-listing-hero__reviews {
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
}
.gd-listing-hero__reviews:hover { color: var(--gd-flame); }

.gd-listing-hero__price {
  font-size: var(--gd-body);
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-navy);
}

.gd-listing-hero__sep {
  width: 1px;
  height: 16px;
  background: var(--gd-border);
}

/* Quick facts row */
.gd-listing-hero__facts {
  display: flex;
  align-items: center;
  gap: var(--gd-space-md);
  flex-wrap: wrap;
}

.gd-listing-hero__fact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
}
.gd-listing-hero__fact svg { color: var(--gd-text-muted); }
.gd-listing-hero__fact strong { color: var(--gd-navy); }

.gd-listing-hero__fact-sep {
  width: 1px;
  height: 14px;
  background: var(--gd-border);
}

/* CTA buttons */
.gd-listing-hero__ctas {
  display: flex;
  align-items: center;
  gap: var(--gd-space-md);
  flex-wrap: wrap;
}

/* Tier badge — top right corner */
.gd-listing-hero__tier-badge {
  position: absolute;
  top: var(--gd-space-lg);
  right: var(--gd-space-lg);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: var(--gd-fw-semibold);
}

/* Shimmer animation for featured badge */
.gd-listing-hero__tier-badge--featured {
  background: linear-gradient(90deg, var(--gd-gold), #F0D080, var(--gd-gold));
  background-size: 200% auto;
  animation: gd-shimmer 2.5s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero photo (right 35%) */
.gd-listing-hero__photo {
  position: relative;
  overflow: hidden;
  border-radius: 0 var(--gd-radius-xl) var(--gd-radius-xl) 0;
  height: 100%;
  min-height: 360px;
}

.gd-listing-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Mobile: photo on top */
@media (max-width: 1023px) {
  .gd-listing-hero { flex-direction: column; min-height: auto; }
  .gd-listing-hero__photo {
    width: 100%;
    height: 240px;
    border-radius: 0;
    min-height: auto;
  }
  .gd-listing-hero__ctas { flex-direction: column; align-items: stretch; }
  .gd-listing-hero__ctas .gd-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   LISTING-02: STICKY NAV BAR
   ============================================================ */
.gd-sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  height: 56px;
  transform: translateY(-100%);
  transition: transform var(--anim-fast);
}

.gd-sticky-nav.is-visible { transform: translateY(0); }

.gd-sticky-nav__inner {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 var(--gd-space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--gd-space-xl);
}

/* Gym name + mini rating */
.gd-sticky-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--gd-space-sm);
  flex-shrink: 0;
}
.gd-sticky-nav__gym-name {
  font-size: 14px;
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-navy);
  white-space: nowrap;
}

/* Nav links */
.gd-sticky-nav__links {
  display: flex;
  align-items: center;
  gap: var(--gd-space-lg);
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.gd-sticky-nav__links::-webkit-scrollbar { display: none; }

.gd-sticky-nav__link {
  font-size: 14px;
  color: var(--gd-text-muted);
  white-space: nowrap;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--anim-fast), border-color var(--anim-fast);
}
.gd-sticky-nav__link:hover     { color: var(--gd-navy); }
.gd-sticky-nav__link.is-active { color: var(--gd-flame); border-bottom-color: var(--gd-flame); }

/* Right CTA */
.gd-sticky-nav__cta { flex-shrink: 0; }

@media (max-width: 767px) {
  .gd-sticky-nav__brand { display: none; }
  .gd-sticky-nav__cta   { display: none; }
  .gd-sticky-nav__inner { padding: 0 var(--gd-space-md); }
}

/* ============================================================
   LISTING-03: STATS STRIP
   ============================================================ */
.gd-stats-strip {
  background: var(--gd-navy);
  padding: 48px 0;
}

.gd-stats-strip__inner {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 var(--gd-space-xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gd-space-lg);
}

@media (min-width: 768px) {
  .gd-stats-strip__inner { grid-template-columns: repeat(6, 1fr); }
}

.gd-stat-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gd-space-sm);
  padding: 0 var(--gd-space-md);
  position: relative;
}

/* Dividers between stats */
.gd-stat-unit + .gd-stat-unit::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
  .gd-stat-unit:nth-child(even)::before { display: none; }
}

.gd-stat-unit__icon { color: var(--gd-flame); }

.gd-stat-unit__value {
  font-size: 36px;
  font-weight: var(--gd-fw-black);
  color: var(--gd-text-on-dark);
  font-family: var(--gd-font-sans);
  line-height: 1;
}

.gd-stat-unit__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gd-text-muted);
}

/* ============================================================
   LISTING-04: AMENITIES GRID
   ============================================================ */
.gd-amenities {
  padding: var(--gd-space-3xl) 0;
  background: var(--gd-surface);
}

.gd-amenities__header {
  margin-bottom: var(--gd-space-xl);
}

.gd-amenities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gd-space-md);
}

@media (min-width: 768px) {
  .gd-amenities__grid { grid-template-columns: repeat(4, 1fr); }
}

.gd-amenity-tile {
  background: var(--gd-off-white);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-lg);
  border: 1.5px solid var(--gd-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gd-space-sm);
  text-align: center;
  cursor: pointer;
  transition: background var(--anim-mid), border-color var(--anim-mid), transform var(--anim-mid);
}

.gd-amenity-tile__icon { color: var(--gd-navy); transition: color var(--anim-mid); }

.gd-amenity-tile__label {
  font-size: 15px;
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-navy);
  transition: color var(--anim-mid);
}

/* Hover */
.gd-amenity-tile:hover {
  background: var(--gd-navy);
  border-color: var(--gd-navy);
  transform: scale(1.03);
}
.gd-amenity-tile:hover .gd-amenity-tile__icon  { color: var(--gd-flame); }
.gd-amenity-tile:hover .gd-amenity-tile__label { color: #fff; }

/* Unavailable state */
.gd-amenity-tile--unavailable {
  opacity: 0.3;
  pointer-events: none;
}
.gd-amenity-tile--unavailable .gd-amenity-tile__label {
  text-decoration: line-through;
}

/* Featured amenity (pool): double-width */
.gd-amenity-tile--featured {
  grid-column: span 2;
  flex-direction: row;
  text-align: left;
  padding: 0;
  overflow: hidden;
}
.gd-amenity-tile--featured .gd-amenity-tile__photo {
  width: 50%;
  height: 100%;
  object-fit: cover;
}
.gd-amenity-tile--featured .gd-amenity-tile__inner {
  padding: var(--gd-space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--gd-space-sm);
}

/* Facility note */
.gd-amenities__note {
  margin-top: var(--gd-space-lg);
  font-size: var(--gd-body);
  color: var(--gd-text-muted);
}
.gd-amenities__note strong { color: var(--gd-navy); }

/* ============================================================
   LISTING-05: REVIEWS SECTION
   ============================================================ */
.gd-reviews {
  padding: var(--gd-space-3xl) 0;
  background: var(--gd-off-white);
}

/* Aggregate summary */
.gd-reviews__aggregate {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-2xl);
  margin-bottom: var(--gd-space-2xl);
  padding: var(--gd-space-xl);
  background: var(--gd-surface);
  border-radius: var(--gd-radius-xl);
  border: 1.5px solid var(--gd-border);
}

@media (min-width: 768px) {
  .gd-reviews__aggregate { grid-template-columns: 30fr 70fr; }
}

/* Left panel — big rating */
.gd-reviews__score-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gd-space-sm);
}

.gd-reviews__big-number {
  font-size: 80px;
  font-weight: var(--gd-fw-black);
  color: var(--gd-navy);
  line-height: 1;
  font-family: var(--gd-font-sans);
}

.gd-reviews__count {
  font-size: 14px;
  color: var(--gd-text-muted);
}

.gd-reviews__sources {
  display: flex;
  gap: var(--gd-space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--gd-space-sm);
}

.gd-reviews__source-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-pill);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-text-primary);
}

/* Right panel — bar breakdown */
.gd-reviews__bars { display: flex; flex-direction: column; gap: var(--gd-space-sm); }

.gd-reviews__bar-row {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  align-items: center;
  gap: var(--gd-space-sm);
}

.gd-reviews__bar-label {
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
  white-space: nowrap;
}

.gd-reviews__bar-track {
  height: 8px;
  background: var(--gd-border);
  border-radius: 4px;
  overflow: hidden;
}

.gd-reviews__bar-fill {
  height: 100%;
  background: var(--gd-gold);
  border-radius: 4px;
  width: 0;
  transition: width 0.6s ease-out;
}

.gd-reviews__bar-count {
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
  text-align: right;
}

/* Sort bar */
.gd-reviews__sort {
  display: flex;
  align-items: center;
  gap: var(--gd-space-md);
  flex-wrap: wrap;
  margin-bottom: var(--gd-space-lg);
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
}

.gd-reviews__sort-btn {
  background: none;
  border: none;
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--anim-fast), border-color var(--anim-fast);
  font-family: var(--gd-font-sans);
}
.gd-reviews__sort-btn.is-active {
  color: var(--gd-navy);
  border-bottom-color: var(--gd-navy);
}

/* Review list */
.gd-reviews__list { display: flex; flex-direction: column; gap: var(--gd-space-md); }

/* Review card */
.gd-review-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
  padding: var(--gd-space-lg);
  transition: border-color var(--anim-fast), box-shadow var(--anim-fast);
}
.gd-review-card:hover {
  border-color: rgba(15,15,17, 0.2);
  box-shadow: var(--gd-shadow-md);
}

.gd-review-card__header {
  display: flex;
  align-items: center;
  gap: var(--gd-space-md);
  margin-bottom: var(--gd-space-md);
}

/* Avatar (initials) */
.gd-review-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--gd-fw-bold);
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  /* Background color set inline via JS based on initials */
}

.gd-review-card__meta { flex: 1; }
.gd-review-card__author { font-weight: var(--gd-fw-semibold); font-size: 15px; color: var(--gd-navy); }
.gd-review-card__date   { font-size: var(--gd-small); color: var(--gd-text-muted); }

.gd-review-card__title {
  font-size: 15px;
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-navy);
  margin-bottom: var(--gd-space-sm);
}

.gd-review-card__body {
  font-size: var(--gd-body);
  color: #4A5568;
  line-height: var(--gd-lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gd-review-card__body.is-expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.gd-review-card__expand {
  display: inline-block;
  font-size: var(--gd-small);
  color: var(--gd-flame);
  cursor: pointer;
  margin-top: 4px;
}

.gd-review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--gd-space-md);
  padding-top: var(--gd-space-md);
  border-top: 1px solid var(--gd-border);
}

.gd-review-card__helpful {
  display: flex;
  align-items: center;
  gap: var(--gd-space-sm);
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
}

.gd-review-card__vote {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-sm);
  padding: 4px 10px;
  font-size: var(--gd-small);
  cursor: pointer;
  color: var(--gd-text-muted);
  transition: all var(--anim-fast);
  font-family: var(--gd-font-sans);
}
.gd-review-card__vote:hover { border-color: var(--gd-navy); color: var(--gd-navy); }
.gd-review-card__vote.is-voted { background: var(--gd-navy); color: #fff; border-color: var(--gd-navy); }

/* Load more */
.gd-reviews__load-more {
  text-align: center;
  margin-top: var(--gd-space-xl);
}

/* Write a review form */
.gd-reviews__form-wrap {
  margin-top: var(--gd-space-xl);
  background: var(--gd-surface);
  border: 1.5px solid var(--gd-border);
  border-radius: var(--gd-radius-xl);
  padding: var(--gd-space-xl);
  display: none;
}
.gd-reviews__form-wrap.is-open { display: block; }

.gd-reviews__form-title {
  font-size: var(--gd-h3);
  font-weight: var(--gd-fw-bold);
  margin-bottom: var(--gd-space-lg);
}

.gd-review-form { display: flex; flex-direction: column; gap: var(--gd-space-md); }

.gd-char-counter {
  text-align: right;
  font-size: var(--gd-small);
  color: var(--gd-text-muted);
}

/* ============================================================
   LISTING-06: MAP & LOCATION BLOCK
   ============================================================ */
.gd-location {
  padding: var(--gd-space-3xl) 0;
  background: var(--gd-surface);
}

.gd-location__inner {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 var(--gd-space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gd-space-xl);
}

@media (min-width: 768px) {
  .gd-location__inner { grid-template-columns: 60fr 40fr; align-items: start; }
}

/* Map container */
.gd-location__map {
  position: relative;
  height: 400px;
  border-radius: var(--gd-radius-lg) 0 0 var(--gd-radius-lg);
  overflow: hidden;
  background: var(--gd-navy);
}

.gd-location__map iframe,
.gd-location__map .gd-map-embed {
  width: 100%;
  height: 100%;
  border: none;
}

.gd-location__map-btn {
  position: absolute;
  bottom: var(--gd-space-md);
  right: var(--gd-space-md);
}

@media (max-width: 767px) {
  .gd-location__map { height: 240px; border-radius: var(--gd-radius-lg); }
}

/* Right panel */
.gd-location__panel {
  display: flex;
  flex-direction: column;
  gap: var(--gd-space-lg);
}

.gd-location__address {
  font-size: 16px;
  font-weight: var(--gd-fw-semibold);
  color: var(--gd-navy);
  line-height: var(--gd-lh-relaxed);
}

.gd-location__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: var(--gd-small);
  color: var(--gd-flame);
  cursor: pointer;
  font-family: var(--gd-font-sans);
  margin-top: 4px;
  transition: opacity var(--anim-fast);
}
.gd-location__copy-btn:hover { opacity: 0.8; }

/* Contact block */
.gd-location__contact {
  display: flex;
  flex-direction: column;
  gap: var(--gd-space-sm);
}

.gd-location__contact-item {
  display: flex;
  align-items: center;
  gap: var(--gd-space-sm);
  font-size: var(--gd-body);
  color: var(--gd-text-primary);
}
.gd-location__contact-item svg { color: var(--gd-flame); flex-shrink: 0; }
.gd-location__contact-item a:hover { color: var(--gd-flame); }

/* Hours today */
.gd-location__hours {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--gd-body);
}

.gd-location__hours-expand {
  font-size: var(--gd-small);
  color: var(--gd-flame);
  cursor: pointer;
}
.gd-location__hours-expand:hover { text-decoration: underline; }

/* Parking note */
.gd-location__parking {
  display: flex;
  align-items: flex-start;
  gap: var(--gd-space-sm);
  background: var(--gd-off-white);
  border-radius: var(--gd-radius-sm);
  padding: var(--gd-space-md);
  font-size: var(--gd-body);
  color: var(--gd-text-muted);
}
.gd-location__parking svg { color: var(--gd-navy); flex-shrink: 0; margin-top: 2px; }
