/* =========================================================================
   iMovies homepage — glass over backdrop. Desktop and mobile are two
   independent layouts (separate markup), carousel is JS-positioned.
   ========================================================================= */

.glass-home { --glow: #22d3ee; position: relative; min-height: 100vh; overflow: hidden; background: #000; }

.gh-backdrop { position: fixed; inset: 0; z-index: 0; }
.gh-backdrop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.gh-backdrop img.is-active { opacity: 1; z-index: 1; }
.gh-backdrop::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.4) 100%),
    linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 60%);
}
.gh-glow { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(60% 50% at 78% 30%, color-mix(in srgb, var(--glow) 26%, transparent) 0%, transparent 70%); transition: background 0.6s ease; }

.gh-badge { padding: 3px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.gh-watch-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--glow); color: #04141b; font-weight: 700; padding: 13px 30px; border-radius: 999px; text-decoration: none; box-shadow: 0 8px 30px -6px color-mix(in srgb, var(--glow) 60%, transparent); }
.gh-mylist-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 999px; text-decoration: none; }
.gh-trailer-link { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.85); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.gh-trailer-link .play-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); }
.gh-social { display: flex; gap: 10px; }
.gh-social a { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #fff; }
.gh-logo { font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.gh-logo .c-w { color: #fff; }
.gh-logo .c-b { color: var(--glow); }
.gh-logo .gh-star { color: #7dd3fc; text-shadow: 0 0 10px #22d3ee, 0 0 20px #22d3ee; }

/* Carousel — track is position:relative, items are position:absolute and
   fully positioned/scaled by JS via inline transform, so the active item
   is always mathematically centered regardless of scale/count. */
.gh-carousel { position: relative; width: 100%; touch-action: pan-y; cursor: grab; user-select: none; overflow: hidden; }
.gh-carousel:active { cursor: grabbing; }
.gh-carousel-item {
  position: absolute; top: 50%; left: 50%;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}
.gh-carousel-item img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }

/* =========================================================================
   DESKTOP VIEW
   ========================================================================= */
.gh-desktop { display: block; position: relative; z-index: 4; }
.gh-desktop .gh-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 40px; background: transparent; }
.gh-desktop .gh-nav-center { display: flex; align-items: center; gap: 26px; }
.gh-desktop .gh-nav-home { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.14); }
.gh-desktop .gh-nav-links { display: flex; gap: 22px; }
.gh-desktop .gh-nav-links a { color: rgba(255,255,255,0.85); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.gh-desktop .gh-nav-links a:hover { color: #fff; }
.gh-desktop .gh-nav-right { display: flex; align-items: center; gap: 14px; }
.gh-desktop .gh-search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 8px 16px; }
.gh-desktop .gh-search input { background: none; border: none; outline: none; color: #fff; font-size: 0.85rem; width: 150px; }
.gh-desktop .gh-search input::placeholder { color: rgba(255,255,255,0.55); }
.gh-desktop .gh-login { background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; }

.gh-desktop .gh-hero { display: flex; align-items: center; gap: 30px; padding: 30px 40px 10px; min-height: 520px; }
.gh-desktop .gh-hero-info { flex: 0 0 auto; width: 46%; max-width: 560px; }
.gh-desktop .gh-title-logo { max-width: 420px; max-height: 140px; object-fit: contain; margin-bottom: 16px; filter: drop-shadow(0 6px 22px rgba(0,0,0,0.5)); }
.gh-desktop .gh-title-fallback { font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 800; color: #fff; margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.6); }
.gh-desktop .gh-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.gh-desktop .gh-desc { color: rgba(255,255,255,0.82); margin-bottom: 22px; max-width: 50ch; line-height: 1.6; font-size: 0.92rem; }
.gh-desktop .gh-actions-row1 { display: flex; align-items: center; gap: 14px; }

.gh-desktop .gh-carousel-wrap { flex: 1; height: 340px; background: rgba(255,255,255,0.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.1); border-radius: 26px; }
.gh-desktop .gh-carousel { height: 100%; }
.gh-desktop .gh-carousel-item { width: 150px; }

.gh-desktop .gh-below-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 40px 34px; }

@media (max-width: 1000px) { .gh-desktop { display: none; } }

/* =========================================================================
   MOBILE VIEW
   ========================================================================= */
.gh-mobile { display: none; position: relative; z-index: 4; min-height: 100vh; flex-direction: column; }

.gh-mobile .gh-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: transparent; }
.gh-mobile .gh-nav-home { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.14); flex: 0 0 auto; }
.gh-mobile .gh-search { flex: 1; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 8px 14px; }
.gh-mobile .gh-search input { background: none; border: none; outline: none; color: #fff; font-size: 0.85rem; width: 100%; }
.gh-mobile .gh-search input::placeholder { color: rgba(255,255,255,0.55); }
.gh-mobile .gh-login { flex: 0 0 auto; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; text-decoration: none; }

.gh-mobile .gh-hero-info { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; padding: 18px 20px 0; text-align: center; }
.gh-mobile .gh-title-logo { max-width: 240px; max-height: 100px; object-fit: contain; margin: 0 auto 12px; }
.gh-mobile .gh-title-fallback { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.gh-mobile .gh-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.gh-mobile .gh-desc { color: rgba(255,255,255,0.85); font-size: 0.86rem; line-height: 1.5; margin: 0 auto 18px; max-width: 42ch; }
.gh-mobile .gh-actions-row1 { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.gh-mobile .gh-watch-btn { padding: 11px 24px; font-size: 0.9rem; }
.gh-mobile .gh-mylist-btn { padding: 10px 18px; font-size: 0.85rem; }

/* Slim glass strip — carousel only, nothing else sits on it */
.gh-mobile .gh-carousel-block { flex: 0 0 auto; margin-top: auto;
  margin-top: auto;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 10px 0;
}
.gh-mobile .gh-carousel-wrap { height: 260px; }
.gh-mobile .gh-carousel { height: 100%; }
.gh-mobile .gh-carousel-item { width: 108px; }

/* Below-row now OFF the glass — transparent, directly under the strip */
.gh-mobile .gh-below-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 20px; background: transparent; }

@media (min-width: 1001px) { .gh-mobile { display: none !important; } }
@media (max-width: 1000px) { .gh-mobile { display: flex; } }

/* =========================================================================
   Text-free browsing rows
   ========================================================================= */
.gh-rows { position: relative; z-index: 4; background: rgba(4,6,10,0.88); padding-top: 20px; }
.gh-row-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 0 32px; margin: 28px 0 12px; }
.gh-row-heading h2 { color: #fff; font-size: 1.15rem; font-weight: 700; }
.gh-row-heading a { color: rgba(255,255,255,0.6); font-size: 0.78rem; font-weight: 600; text-decoration: none; }
.gh-poster-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 32px 16px; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
.gh-poster-row::-webkit-scrollbar { display: none; }
.gh-poster-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.gh-poster { flex: 0 0 auto; width: 150px; border-radius: 16px; overflow: hidden; scroll-snap-align: start; transition: transform 0.25s ease; }
.gh-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.gh-poster:hover { transform: translateY(-4px) scale(1.03); }

@media (max-width: 640px) {
  .gh-row-heading, .gh-poster-row { padding-inline: 18px; }
  .gh-poster { width: 108px; }
}
