/* ============================================================
   PoolSpa.Pro – Homepage 2 (Full-screen immersive style)
   ============================================================ */

/* No padding — content is full bleed under transparent header */
.home2-body {
  padding-top: 0;
  padding-bottom: 0;
  background: #000;
}

/* ── Transparent overlay header ─────────────────────────── */
.home2-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  /* subtle gradient so logo reads against any image */
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 100%);
  pointer-events: none;
}

.home2-header .site-logo {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.home2-header .accent {
  color: var(--accent);
}

/* ── Full-screen snap feed ──────────────────────────────── */
.home2-feed {
  position: fixed;
  top: 0;
  bottom: var(--nav-height);
  left: 0;
  right: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  max-width: none;
  margin: 0;
  scrollbar-width: none;
}

.home2-feed::-webkit-scrollbar {
  display: none;
}

/* ── Each project card = one full view ──────────────────── */
.home2-card {
  position: relative;
  height: calc(100dvh - var(--nav-height));
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

/* ── Before / After media — stacked, fill full card ─────── */
.home2-media-pair {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.home2-media-pair figure {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: 0;
}

.home2-media-pair img,
.home2-media-pair video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home2-video-wrap {
  height: 100%;
  position: relative;
  display: block;
}

.home2-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Before / After pill labels */
.home2-media-pair figcaption {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.42);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(122, 168, 193, 0.22);
  pointer-events: none;
}

/* ── Play button for videos ─────────────────────────────── */
.home2-play-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.home2-play-btn-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(122,168,193,0.9) 0%, rgba(92,143,170,0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.15s;
}

.home2-play-btn:hover .home2-play-btn-inner {
  transform: scale(1.08);
}

.home2-play-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
  margin-left: 3px;
}

.home2-play-btn .icon-pause { display: none; margin-left: 0; }
.home2-play-btn.playing .icon-play  { display: none; }
.home2-play-btn.playing .icon-pause { display: block; }
.home2-play-btn.playing { opacity: 0; }
.home2-play-btn.playing:hover { opacity: 1; }

/* ── Title + description overlay at bottom of card ──────── */
.home2-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1rem 1.1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  pointer-events: none;
}

.home2-card-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  margin-bottom: 0.25rem;
}

.home2-card-desc {
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── Swipe-up hint ──────────────────────────────────────── */
.home2-card:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
}

/* ── Slide counter ──────────────────────────────────────── */
.home2-counter {
  position: fixed;
  bottom: calc(var(--nav-height) + 10px);
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.75);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 50;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.06em;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Loading / empty states ─────────────────────────────── */
.home2-feed .loading,
.home2-feed .empty-state {
  color: rgba(255,255,255,0.5);
  margin: auto;
  text-align: center;
  padding: 3rem 1rem;
}

/* Footer is behind the fixed feed on mobile — hide it */
.home2-body .license-footer {
  display: none;
}

/* ── Desktop — restore card layout ─────────────────────── */
@media (min-width: 600px) {
  .home2-body {
    background: var(--bg);
    padding-top: var(--header-height);
    padding-bottom: var(--nav-height);
  }

  .home2-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    pointer-events: auto;
    background-image: none;
  }

  .home2-header .site-logo {
    color: var(--text);
    text-shadow: none;
  }

  .home2-feed {
    position: static;
    overflow-y: visible;
    scroll-snap-type: none;
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    bottom: auto;
    scrollbar-width: auto;
  }

  .home2-feed::-webkit-scrollbar {
    display: auto;
  }

  .home2-card {
    height: auto;
    scroll-snap-align: none;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.28);
  }

  .home2-media-pair {
    flex: none;
  }

  .home2-media-pair figure {
    flex: none;
    min-height: auto;
  }

  .home2-media-pair img,
  .home2-media-pair video {
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .home2-card-overlay {
    position: static;
    background: none;
    padding: 0.75rem 1rem 1rem;
  }

  .home2-card-title {
    color: var(--text);
    text-shadow: none;
    font-size: 1rem;
    font-weight: 600;
  }

  .home2-card-desc {
    color: var(--text-muted);
    text-shadow: none;
  }

  .home2-counter {
    display: none;
  }

  .home2-card:not(:last-child)::after {
    display: none;
  }

  .license-footer {
    display: block;
  }
}
