/* =========================================================
   SPARK FITNESS ZONE — Demo 2
   Responsive polish
   ========================================================= */

@media (max-width: 1360px) {
  .nav-link { padding-inline: 8px; font-size: 0.72rem; }
  .phone-pill { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 410px; padding-inline: 42px; }
  .hero-athlete-wrap { right: 15%; top: 36px; width: min(52vw, 680px); height: calc(100% - 36px); }
  .hero-rim { right: 18%; top: 14%; }
}

@media (max-width: 1180px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-shell { justify-content: space-between; backdrop-filter: none; }
  .nav-actions { margin-left: auto; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100vw;
    height: 100vh;
    padding: 80px 24px 40px;
    background: rgba(5, 6, 7, 0.97);
    backdrop-filter: blur(20px);
    transform: translateY(-102%);
    visibility: hidden;
    transition: transform 0.5s var(--ease), visibility 0.5s;
  }
  .nav-links.is-open { transform: translateY(0); visibility: visible; }
  .nav-link { padding: 9px 18px; font-size: 1.02rem; }
  .nav-link.is-active::after { bottom: 4px; width: 28px; }
  .nav-mobile-cta { display: inline-flex; margin-top: 18px; }
  .nav-mobile-meta { display: block; margin-top: 14px; color: #8e8e8e; font-size: 0.72rem; }
  .mobile-toggle { z-index: 110; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 390px; }
  .hero-title { font-size: clamp(2.8rem, 5.2vw, 5rem); }
  .hero-athlete-wrap { right: 10%; top: 32px; width: 54vw; height: calc(100% - 32px); opacity: 0.95; }
  .hero-rim { right: 14%; top: 15%; width: 420px; height: 420px; }
  .hero-cards { transform: perspective(1000px) rotateY(-16deg) rotateX(6deg) rotateZ(-2.5deg); }
  .tour-panel { grid-template-columns: 320px minmax(0, 1fr); }
  .showcase-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1.2fr 0.8fr 0.9fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .container { width: min(var(--container), calc(100% - 36px)); }
  .section { padding: 74px 0; }
  .hero { min-height: 900px; background-position: 55% 15%; }
  .hero-inner { grid-template-columns: 1fr; min-height: 900px; padding: 44px 32px 30px; align-content: start; }
  .hero-copy { max-width: 700px; }
  .hero-athlete-wrap { right: -2%; top: 60px; bottom: 0; width: 66vw; height: calc(100% - 60px); opacity: 0.72; }
  .hero-rim { right: 4%; top: 18%; width: 380px; height: 380px; }
  .hero-cards { align-self: end; width: min(100%, 560px); margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { margin-top: 36px; }
  .hero-title { font-size: clamp(2.9rem, 7vw, 5.4rem); }
  .tour-panel { grid-template-columns: 1fr; padding: 26px; }
  .tour-stage { min-height: 430px; order: 2; }
  .tour-copy { order: 1; }
  .tour-copy h2, .tour-copy p { max-width: 560px; }
  .program-row { gap: 30px; }
  .class-grid, .trainer-grid, .card-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-grid, .contact-grid { grid-template-columns: 1fr; }
  .story-media { max-width: 520px; }
  .masonry { columns: 2; }
  .feature-bar { flex-wrap: wrap; }
  .feature-item { flex: 1 1 40%; }
  .feature-bar .btn { width: 100%; }
  .page-hero-inner { min-height: 340px; padding: 38px 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-col:last-child { grid-column: auto; }
}

@media (max-width: 768px) {
  body { padding-bottom: 96px; }
  .container { width: min(var(--container), calc(100% - 28px)); }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .announcement { font-size: 0.62rem; line-height: 1.45; letter-spacing: 0.05em; padding: 8px 14px; }
  .site-header { padding: 8px 0; }
  .nav-shell { width: calc(100% - 20px); min-height: 58px; padding: 6px 10px 6px 12px; }
  .brand-logo { width: 38px; height: 38px; object-fit: contain; }
  .brand-name { font-size: 0.88rem; }
  .brand-sub { font-size: 0.46rem; }
  .nav-cta { display: none; }

  /* Mobile App Hero */
  .hero-shell { width: calc(100% - 16px); margin: 6px auto 0; }
  .hero {
    min-height: auto;
    border-radius: 28px;
    background:
      radial-gradient(circle at 50% 12%, rgba(255, 189, 69, 0.18), transparent 45%),
      linear-gradient(180deg, rgba(5, 6, 7, 0.90) 0%, rgba(5, 6, 7, 0.72) 35%, rgba(5, 6, 7, 0.96) 100%),
      url("../img/hero-gym-neon.webp") 52% -80px / 140% auto no-repeat;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 210, 122, 0.12);
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 30px 18px 24px;
    gap: 0;
  }
  .hero-copy {
    display: contents;
  }
  .hero-badge {
    order: 1;
    margin-bottom: 16px;
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    padding: 5px 12px;
  }
  .hero-title {
    order: 2;
    font-size: clamp(2.35rem, 10.5vw, 3.4rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
  }
  .hero-sub {
    order: 3;
    margin-top: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #c4c4c4;
    max-width: 100%;
  }
  .hero-actions {
    order: 4;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 52px;
    font-size: 0.94rem;
    border-radius: 26px;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(246, 183, 60, 0.4);
  }
  .play-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    border-radius: 24px;
    background: rgba(255, 210, 122, 0.06);
    border: 1px solid rgba(255, 210, 122, 0.22);
    font-size: 0.88rem;
    padding: 4px 16px;
  }
  .play-icon { width: 34px; height: 34px; }
  .play-icon svg { width: 14px; height: 14px; }

  /* Ambassador Showcase Card */
  .hero-athlete-wrap {
    order: 5;
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: 380px;
    margin: 24px 0 8px;
    opacity: 1;
    z-index: 2;
    overflow: hidden;
    border-radius: 24px;
    background:
      radial-gradient(circle at 50% 32%, rgba(255, 185, 60, 0.25), transparent 50%),
      linear-gradient(180deg, rgba(20, 18, 15, 0.5) 0%, rgba(5, 6, 7, 0.9) 100%),
      url("../img/hero-gym-neon.webp") 52% -110px / cover no-repeat;
    border: 1px solid rgba(255, 210, 122, 0.26);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 210, 122, 0.15);
  }
  .hero-athlete {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 1;
    filter: contrast(1.08) brightness(1.06) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.8));
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 98%);
  }
  .hero-rim { display: none; }

  /* 4 Program Cards Touch Carousel */
  .hero-cards {
    order: 6;
    display: flex;
    flex-direction: row;
    gap: 14px;
    width: calc(100% + 36px);
    margin: 16px -18px 0;
    padding: 38px 18px 14px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    transform: none;
    transform-origin: center center;
    z-index: 3;
  }
  .hero-cards::-webkit-scrollbar { display: none; }
  .hero-cards::before { display: none; }

  .program-float {
    flex: 0 0 82vw;
    max-width: 320px;
    height: 84px;
    min-height: 84px;
    scroll-snap-align: center;
    padding: 0 16px 0 18px;
    margin: 0;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(255, 190, 70, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 2.4px solid rgba(255, 195, 60, 0.85);
    background: linear-gradient(135deg, rgba(24, 21, 18, 0.94) 0%, rgba(12, 12, 14, 0.96) 100%);
    overflow: visible;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .program-float.is-top {
    transform: none;
    box-shadow: 0 0 26px rgba(255, 190, 69, 0.5), 0 14px 34px rgba(0, 0, 0, 0.6);
  }
  .program-float.is-top::after { display: none; }

  .program-float-icon {
    width: 30px;
    height: 30px;
    transform: none;
    color: #ffbe45;
  }
  .program-float-icon svg { width: 20px; height: 20px; }
  .program-float-copy {
    padding-left: 10px;
    border-left: 1.5px solid rgba(255, 200, 80, 0.35);
    transform: none;
  }
  .program-float-copy strong {
    font-size: 0.88rem;
    line-height: 1.15;
    color: #ffffff;
  }
  .program-float-thumb {
    position: absolute;
    bottom: 0;
    transform: none;
    pointer-events: none;
    z-index: 4;
  }
  .program-float:nth-child(1) .program-float-thumb { right: 46px; height: 124px; max-width: 145px; }
  .program-float:nth-child(2) .program-float-thumb { right: 64px; height: 102px; max-width: 80px; }
  .program-float:nth-child(3) .program-float-thumb { right: 54px; height: 106px; max-width: 115px; }
  .program-float:nth-child(4) .program-float-thumb { right: 50px; height: 96px; max-width: 120px; }

  .program-float-arrow {
    width: 30px;
    height: 30px;
    transform: none;
    margin-left: auto;
    border: 1.2px solid rgba(255, 190, 70, 0.55);
    border-radius: 50%;
    color: #ffbe45;
  }
  .program-float-arrow svg { width: 13px; height: 13px; }

  /* Hero Stats Grid */
  .hero-stats {
    order: 7;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
    padding-top: 0;
    width: 100%;
  }
  .hero-stat {
    padding: 14px 16px;
    border: 1px solid rgba(255, 210, 122, 0.18);
    border-radius: 18px;
    background: rgba(16, 14, 12, 0.75);
    backdrop-filter: blur(14px);
  }
  .hero-stat:first-child, .hero-stat:nth-child(3) { border-left: 1px solid rgba(255, 210, 122, 0.18); padding-left: 16px; }
  .hero-stat strong { font-size: 1.25rem; }
  .hero-stat span { font-size: 0.68rem; margin-top: 3px; }

  /* Tour Panel & Stage */
  .tour-panel { padding: 18px; border-radius: 24px; }
  .tour-icon { width: 52px; height: 52px; margin-bottom: 16px; }
  .tour-stage { min-height: 280px; aspect-ratio: 16 / 10; border-radius: 18px; }
  .photo-tour-hint { font-size: 0.6rem; padding: 6px 11px; top: 10px; left: 10px; }
  .hotspot span { display: none; }
  .hotspot { padding: 7px; }
  .hotspot::before { width: 8px; height: 8px; }

  /* Panels, Compare & Plans */
  .panel { padding: 20px; border-radius: 22px; }
  .panel-head { flex-direction: column; gap: 12px; }
  .transform-body { grid-template-columns: 1fr; }
  .compare { aspect-ratio: 1.15 / 1; border-radius: 20px; }
  .plans { grid-template-columns: 1fr; gap: 16px; }
  .plan-card { min-height: 0; padding: 26px 20px; border-radius: 24px; }
  .plan-card.is-popular { transform: none; border: 1.8px solid #ffbe45; box-shadow: 0 0 24px rgba(255, 190, 70, 0.3); }
  .plan-card.is-popular:hover { transform: translateY(-4px); }
  .plan-summary { min-height: 0; }
  .feature-bar { padding: 14px; gap: 12px; }
  .feature-item { flex: 1 1 100%; border-left: 0; border-top: 1px solid rgba(212, 175, 55, 0.12); padding: 10px 4px 2px; }
  .feature-item:first-child { border-top: 0; padding-top: 4px; }
  .page-hero { border-radius: 24px; }
  .page-hero-inner { min-height: 300px; padding: 30px 20px; }
  .page-hero h1 { font-size: clamp(2.35rem, 10vw, 3.7rem); }
  .card-grid.three, .card-grid.two, .class-grid, .trainer-grid, .value-grid, .branch-grid { grid-template-columns: 1fr; }
  .program-row { grid-template-columns: 1fr; gap: 22px; padding: 34px 0; }
  .program-row:nth-child(even) .program-media { order: 0; }
  .highlights { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .form-grid, .vip-points { grid-template-columns: 1fr; }
  .form-panel { padding: 20px; }
  .vip-gate { padding: 24px 20px; border-radius: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 44px 0 28px; }
  .footer-col:last-child { grid-column: auto; }
  .footer-bottom { padding-bottom: 110px; }
  .app-dock { display: block; }
  .compare-large { aspect-ratio: 1.1 / 1; border-radius: 20px; }
  .modal-card { border-radius: 18px; }
  .tour-modal-copy { left: 16px; right: 16px; bottom: 14px; }
  .tour-modal-copy h3 { font-size: 1.1rem; }
  .tour-modal-bar { padding: 10px 14px; }
  .lightbox { padding: 14px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 0.82rem; }
  .brand-sub { letter-spacing: 0.2em; }
  .hero-title { font-size: 2.52rem; }
  .hero-athlete-wrap { height: 360px; }
  .mobile-bar .call { flex-basis: 39%; font-size: 0.66rem; }
  .mobile-bar .pass { font-size: 0.66rem; }
}
