@import url("./style-base.css");

/* ============================================================
   Responsive hardening — tablets e mobile
   Mantém o visual original e corrige overflow/alinhamento.
   ============================================================ */

/* Evita que filhos de grids/flex forcem largura maior que a viewport. */
.hero-bottom > *,
.section-grid > *,
.training-board > *,
.community-grid > *,
.plans-grid > *,
.schedule-grid > *,
.quick-item,
.step,
.row > * {
  min-width: 0;
}

/* Preserve the two gallery photos already approved for production. The
   production stylesheet now loads synchronously in <head>, so this no longer
   depends on a late stylesheet injected by JavaScript. */
.gallery-main img {
  content: url("https://images.partners.gympass.com/image/partners/v1_vvF6nqeLNO7eBmMHPP9wLw/lg_d9259d7a-36ad-4442-8f80-365519860677_IMG5172.jpeg");
}
.gallery-side img {
  content: url("https://images.partners.gympass.com/image/partners/v1_vvF6nqeLNO7eBmMHPP9wLw/lg_bb5b8e88-2793-4013-bc09-aea888b25112_IMG4976.jpeg");
}
.gallery-main figcaption,
.gallery-side figcaption { font-size: 0; }
.gallery-main figcaption::after {
  content: "Alunos do CT Dell Futshow em Cabo Branco";
  font-size: .67rem;
}
.gallery-side figcaption::after {
  content: "Rotina de treino do CT Dell Futshow";
  font-size: .67rem;
}

/* Visible keyboard focus for the CSS-only plan selector. */
#pm:focus-visible ~ .plan-tabs label[for="pm"],
#pt:focus-visible ~ .plan-tabs label[for="pt"],
#pa:focus-visible ~ .plan-tabs label[for="pa"] {
  outline: 3px solid rgba(224, 58, 62, .55);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .navlinks { gap: 16px; font-size: .78rem; }
  .hero h1 { font-size: clamp(3rem, 7.6vw, 5.35rem); }
  .hero-bottom { gap: 22px; }
  .hero-mini { min-width: 0; width: min(100%, 420px); }
  .section-grid, .plans-grid, .schedule-grid { gap: 32px; }
  .training-board { grid-template-columns: 1fr; }
  .photo-card { min-height: 400px; }
}

@media (max-width: 820px) {
  /* O CSS anterior só mudava grid-template-columns, mas hero-bottom continuava flex. */
  .hero-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .hero-mini {
    min-width: 0;
    width: 100%;
    max-width: 520px;
    justify-self: start;
    margin-top: 0;
  }

  /* Em 2 colunas, os itens 3 e 4 formam uma nova linha. O 3 deve alinhar com o 1. */
  .quick-item:nth-child(3),
  .step:nth-child(3) { padding-left: 0; }

  .footer-top { grid-template-columns: 1fr; }
  .contact-row { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .hero-inner { padding: 30px 0 24px; }
  .eyebrow { font-size: .62rem; line-height: 1.4; }
  .hero h1 {
    font-size: clamp(2.55rem, 13.5vw, 3.6rem);
    max-width: none;
    overflow-wrap: anywhere;
  }
  .hero-bottom { margin-top: 18px; gap: 14px; }
  .hero-bottom p { margin: 0; max-width: none; }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 9px;
    line-height: 1.15;
    text-align: center;
  }

  .hero-mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
  .mini-stat { min-width: 0; }

  .quick-grid,
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .quick-item:nth-child(3),
  .step:nth-child(3) { padding-left: 0; }

  .qtop { gap: 5px; font-size: .59rem; }
  .quick-item strong { font-size: .77rem; line-height: 1.18; }
  .quick-item span { font-size: .64rem; line-height: 1.3; }
  .step small { font-size: .55rem; }
  .step strong { font-size: 1.02rem; }
  .step span { font-size: .66rem; line-height: 1.35; }

  /* Mantém dia, horário e CTA na mesma linha. */
  .row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .container { width: min(calc(100% - 20px), var(--max)); }

  .brand { gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: .72rem; }
  .brand small { display: none; }
  .theme-btn.clean { width: 34px; height: 34px; }
  .menu-label { height: 36px; padding: 0 9px; font-size: .73rem; }

  .hero { background-position: 58% center; }
  .hero-inner { padding: 24px 0 22px; }
  .hero h1 { font-size: clamp(2.28rem, 12vw, 3rem); line-height: .94; }
  .hero-bottom p { font-size: .8rem; }

  .actions { grid-template-columns: 1fr; }
  .hero-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stat { padding: 9px 7px; }

  /* Em telas muito estreitas, uma coluna fica mais legível e elimina os desalinhamentos. */
  .quick-grid,
  .timeline { grid-template-columns: 1fr; }

  .quick-item,
  .quick-item:not(:first-child) {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quick-item:last-child { border-bottom: 0; }

  .step,
  .step:not(:first-child) {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid #343936;
  }
  .step:last-child { border-bottom: 0; }

  .focus { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .fact { grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }

  .plan-head { gap: 8px; }
  .plan-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .schedule-table { padding: 3px 9px; }
  .row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 5px;
    font-size: .59rem;
  }

  .final-card { border-radius: 18px; }
  .final-copy h2 { overflow-wrap: anywhere; }

  .contact-chip { max-width: 100%; }
}

@media (max-width: 340px) {
  .brand strong { font-size: .67rem; }
  .hero h1 { font-size: 2.15rem; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .pill { padding-inline: 4px; }
}


/* ============================================================
   Localização — Google Maps
   ============================================================ */
.location {
  padding: 76px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.location-grid {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 32px;
  align-items: stretch;
}
.location-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.location-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: .93;
  letter-spacing: -.055em;
}
.location-copy p {
  margin: 16px 0 0;
  max-width: 440px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.58;
}
.location-link {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: .78rem;
  font-weight: 900;
  transition: transform .15s ease, opacity .2s ease;
}
.location-link:hover { opacity: .88; }
.location-link:active { transform: scale(.98); }
.location-map {
  min-width: 0;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--soft);
}
.location-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

@media (max-width: 820px) {
  .location-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .location-copy p { max-width: 620px; }
  .location-map,
  .location-map iframe { min-height: 360px; }
}

@media (max-width: 420px) {
  .location { padding: 58px 0; }
  .location-copy h2 { font-size: clamp(2.25rem, 11vw, 3rem); }
  .location-link { width: 100%; }
  .location-map,
  .location-map iframe {
    min-height: 300px;
    border-radius: 16px;
  }
}
