/* ============================================================
   SUBPAGE COMMON — Editorial Hero, Overview Strip, Breadcrumb
   Cool-tone variation of shopping-detail-redesign
   ============================================================ */

/* ── Navbar solid (subpages) ── */
.navbar--solid {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-glass);
}
.nav-link.active {
  color: var(--color-cool-accent-light);
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-cool-accent);
}


/* ============================================================
   EDITORIAL HERO
   ============================================================ */
.sub-hero {
  position: relative;
  height: 55vh;
  min-height: 400px;
  overflow: hidden;
}
.sub-hero--compact {
  height: 35vh;
  min-height: 260px;
}

.sub-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-cool-bg);
}
.sub-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: subHeroZoom 18s ease-out forwards;
}
.sub-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.1) 30%,
    rgba(0,0,0,0.6) 85%,
    rgba(0,0,0,0.85) 100%
  );
}

@keyframes subHeroZoom {
  to { transform: scale(1); }
}

/* Slideshow hero — crossfade multiple images */
.sub-hero-bg--slideshow img.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.5s ease, transform 6s ease-out;
  animation: none;
}
.sub-hero-bg--slideshow img.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.sub-hero-content {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--container-max);
  padding: 0 var(--container-px);
}
.sub-hero--compact .sub-hero-content {
  top: 65%;
}
@media (min-width: 768px) {
  .sub-hero-content { padding: 0 var(--container-px-md); }
}
@media (min-width: 1024px) {
  .sub-hero-content { padding: 0 var(--container-px-lg); }
}
@media (max-width: 767px) {
  .sub-hero-content { top: 62%; }
  .sub-hero-breadcrumb { margin-bottom: 0.875rem; }
  .sub-hero-title { margin-bottom: 0.875rem; }
}

/* Breadcrumb inside hero */
.sub-hero-breadcrumb {
  font-size: var(--text-overline);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: subFadeUp 1s 0.3s forwards;
}
.sub-hero-breadcrumb span {
  color: var(--color-cool-accent-light);
}

/* Title — Bold sans-serif */
.sub-hero-title {
  font-family: var(--font-display);
  /* Page-level hero title — matches --text-h1 mobile floor (32) and
     desktop ceiling (48). Slightly steeper vw so it scales up faster on
     tablets where the hero image gives plenty of room. */
  font-size: clamp(2rem, 7.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
  word-break: keep-all;
  overflow-wrap: break-word;
  opacity: 0;
  animation: subFadeUp 1s 0.5s forwards;
  text-wrap: balance;
}
.sub-hero-title em {
  font-style: normal;
  color: var(--color-cool-accent-light);
}

/* Subtitle */
.sub-hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 2.4vw, 1.125rem);
  font-weight: 400;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.02em;
  max-width: 480px;
  line-height: 1.65;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  word-break: break-word;
  overflow-wrap: anywhere;
  opacity: 0;
  animation: subFadeUp 1s 0.7s forwards;
}

/* Scroll indicator — hidden on compact sub-hero */
.sub-hero--compact .sub-hero-scroll {
  display: none;
}
.sub-hero-scroll {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: subFadeUp 1s 1s forwards;
}
.sub-hero-scroll span {
  font-size: var(--text-overline);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 767px) {
  /* Hide scroll hint on narrow viewports — overlaps with hero content */
  .sub-hero-scroll { display: none; }
}

/* Landscape phones / short viewports: prevent min-height from exceeding viewport */
@media (orientation: landscape) and (max-height: 500px) {
  .sub-hero {
    min-height: 0;
    height: 100dvh;
  }
  .sub-hero-content { top: 58%; }
  .sub-hero-title {
    font-size: clamp(1.5rem, 4.5vh, 2.25rem);
    margin-bottom: 0.5rem;
  }
  .sub-hero-subtitle {
    font-size: 0.875rem;
    line-height: 1.45;
  }
  .sub-hero-breadcrumb {
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
  }
  .sub-hero-scroll { display: none; }
}

.sub-hero-scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-cool-accent-light), transparent);
  animation: subScrollPulse 2s infinite;
}

@keyframes subScrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes subFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sub-hero-bg img { animation: none !important; transform: none !important; }
  .sub-hero-bg--slideshow img.hero-slide { transition: opacity 0.01s ease; transform: none; }
  .sub-hero-breadcrumb,
  .sub-hero-title,
  .sub-hero-subtitle,
  .sub-hero-scroll { animation: none; opacity: 1; }
  .sub-hero-scroll-line { animation: none; }
}


/* ============================================================
   OVERVIEW STRIP
   ============================================================ */
.sub-overview-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--color-bg);
  max-width: var(--container-max);
  margin: 0 auto;
}
@media (min-width: 768px) {
  .sub-overview-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sub-overview-item {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--color-border-glass);
  transition: background 0.4s;
}
@media (min-width: 768px) {
  .sub-overview-item { padding: 2rem; }
}
.sub-overview-item:last-child { border-right: none; }
.sub-overview-item:nth-child(2) {
  border-right: none;
}
@media (min-width: 768px) {
  .sub-overview-item:nth-child(2) { border-right: 1px solid var(--color-border-glass); }
}
.sub-overview-item:hover {
  background: rgba(255,255,255,0.02);
}

.sub-overview-label {
  font-size: var(--text-overline);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cool-muted);
  margin-bottom: 0.5rem;
}

.sub-overview-value {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}
.sub-overview-value a {
  color: var(--color-cool-accent-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.sub-overview-value a:hover {
  border-bottom-color: var(--color-cool-accent-light);
}


/* ============================================================
   SECTION TAG (editorial style)
   ============================================================ */
.sub-section-tag {
  font-size: var(--text-overline);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-cool-accent-light);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sub-section-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-cool-accent);
}


/* ============================================================
   BREADCRUMB (in-content)
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-overline);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-sep { color: #999; }
.breadcrumb-current { color: #666; }

/* ============================================================
   DETAIL PAGES — mobile padding compaction (2026-04-24)
   Reduces vertical/horizontal padding on bordered cards and
   section blocks where mobile felt cramped-but-long. Applies
   to resort, shopping, theme-park, sports, local-trip, event
   detail pages uniformly via common selectors.
   ============================================================ */
@media (max-width: 767px) {
  /* Destination title card (resort-detail + shopping-detail override) */
  .detail-info-inner,
  .detail-hero--light + .detail-info-card .detail-info-inner {
    padding: 2rem 1.5rem;
  }

  /* Allow character-level break as last-resort for ultra-long Korean
     compound nouns (e.g. "수원케이티위즈파크"). Font-size hierarchy is
     governed by the responsive --text-h1/h2 tokens (see style.css :root)
     so every heading scales together — no per-page overrides needed. */
  .detail-info-card .detail-info-title,
  .detail-info-inner .detail-info-title,
  .sd-about .sd-about-heading,
  .sd-svc .sd-service-heading {
    overflow-wrap: anywhere;
  }
  .detail-info-card .detail-info-title,
  .detail-info-inner .detail-info-title {
    max-width: 100%;
  }

  /* Destination info strip — keep compact */
  .sd-dest-info-card { padding: 1rem 1.25rem; }

  /* About section */
  .sd-about { padding: 2.75rem 0; }
  .sd-about-grid { gap: 1.25rem; }
  /* sd-about-overline margin-bottom는 desktop 규칙에서 0으로 설정됨 */
  .sd-about-heading { margin-bottom: 0.875rem; }

  /* Mobility service section */
  .sd-svc { padding: 2.75rem 0; }
  .sd-svc-header { margin-bottom: 1.25rem; }
  .sd-svc-columns { gap: 1.75rem; }

  /* Shuttle/Private tabs — sticky at navbar bottom, shrink on scroll.
     `.is-stuck` toggled by IntersectionObserver in js/main.js.
     Compact state: full-viewport bleed (viewport-centered regardless of
     parent container padding), no drop shadow, just a hairline divider. */
  .sd-svc-tabs {
    position: sticky;
    top: 66px;                         /* measured mobile navbar height */
    z-index: 20;
    transition: padding 0.25s ease, gap 0.25s ease,
                background 0.25s ease, border-radius 0.25s ease,
                margin 0.25s ease, width 0.25s ease, border-color 0.25s ease;
  }
  .sd-svc-tabs.is-stuck {
    padding: 0.3rem;
    gap: 0.3rem;
    border-radius: 0;
    /* Full viewport bleed — now safe because html/body use overflow: clip
       instead of hidden (see style.css) so sticky positioning stays correct. */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
  }
  .sd-svc-tabs.is-stuck .sd-svc-tab {
    padding: 0.55rem 0.5rem;
    font-size: 0.9375rem;
    border-radius: 0.3rem;
  }
  .sd-svc-tabs.is-stuck .sd-svc-tab-desc {
    display: none;
  }
  @media (prefers-reduced-motion: reduce) {
    .sd-svc-tabs { transition: none; }
  }

  /* Event detail (poster + info) */
  .ev-detail-inner { padding: 1.75rem var(--container-px) 2.75rem; }
  .ev-breadcrumb { margin-bottom: 1.5rem; }

  /* Event inquiry section */
  .ev-inquiry { padding: 2.75rem 0 3rem; }
  .ev-inquiry-header { margin-bottom: 1.75rem; }
  .ev-inquiry-form { padding: 1.5rem 1.25rem; }
}
