/* Hub + leitor — carrosséis Como funciona */

.como-guides {
  margin-top: calc(0.35rem * var(--landing-scale, 1));
}

.como-guides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(0.7rem * var(--landing-scale, 1));
}

.como-guide-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
  font: inherit;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(18px * var(--landing-scale, 1));
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.como-guide-card:hover,
.como-guide-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(244, 114, 182, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}

.como-guide-card:active {
  transform: translateY(-1px);
}

.como-guide-card__art {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.7rem 0.2rem;
  background: transparent;
}

.como-guide-card__art img {
  width: 78%;
  height: 78%;
  max-width: 78%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.como-guide-card__art--coin img {
  width: 34%;
  height: auto;
  max-width: 5.4rem;
  max-height: 70%;
  filter: grayscale(1) brightness(1.55) contrast(0.92);
}

.como-guide-card__body {
  flex-shrink: 0;
  padding: 0.45rem 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.como-guide-card__title {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 3.4vw, 0.98rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

.como-guide-card__desc {
  font-size: clamp(0.62rem, 2.5vw, 0.75rem);
  line-height: 1.3;
  color: var(--muted);
  text-wrap: balance;
}

/* —— Leitor em tela cheia —— */

.page-carrossel-guia {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(42, 100, 180, 0.28), transparent 55%),
    var(--bg);
  color: var(--text);
  padding: 16px 16px 24px;
}

.page-carrossel-guia .guia-top {
  max-width: 720px;
  width: 100%;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-carrossel-guia .sub-back {
  align-self: flex-start;
}

.page-carrossel-guia .guia-head h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.page-carrossel-guia .guia-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.page-carrossel-guia .guia-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-carrossel-guia .guia-langs a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.page-carrossel-guia .guia-langs a.is-on {
  color: var(--accent2);
  border-color: var(--accent2);
}

.page-carrossel-guia .guia-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.page-carrossel-guia .guia-frame {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1080 / 1350;
  max-height: calc(100dvh - 200px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
}

.page-carrossel-guia .guia-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.page-carrossel-guia .guia-frame img.is-on {
  opacity: 1;
}

.page-carrossel-guia .guia-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.page-carrossel-guia .guia-nav.prev { left: 0; }
.page-carrossel-guia .guia-nav.next { right: 0; }

.page-carrossel-guia .guia-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.page-carrossel-guia .guia-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 540px;
}

.page-carrossel-guia .guia-dots button {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  border: 0;
  padding: 0;
  background: #2a5080;
  cursor: pointer;
}

.page-carrossel-guia .guia-dots button.is-on {
  background: linear-gradient(90deg, #f472b6, #22d3ee);
  width: 18px;
}

.page-carrossel-guia .guia-counter {
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Modal na própria página —— */

body.guia-modal-open {
  overflow: hidden;
}

.guia-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #070e1c;
  color: var(--text);
  padding:
    max(8px, env(safe-area-inset-top))
    0
    max(10px, env(safe-area-inset-bottom));
}

.guia-modal[hidden] {
  display: none;
}

.guia-modal__close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 4;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 14, 28, 0.72);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.guia-modal__close:hover,
.guia-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.guia-modal__stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guia-modal .guia-frame {
  position: relative;
  width: min(100vw, calc((100dvh - 64px) * 1080 / 1350));
  aspect-ratio: 1080 / 1350;
  max-height: calc(100dvh - 64px);
  overflow: hidden;
  background: #0a1628;
  touch-action: pan-y;
}

.guia-modal .guia-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.guia-modal .guia-frame img.is-on {
  opacity: 1;
}

.guia-modal .guia-frame.is-waiting::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: guia-spin 0.7s linear infinite;
}

@keyframes guia-spin {
  to { transform: rotate(360deg); }
}

.guia-modal .guia-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.guia-modal .guia-nav.prev { left: 0; }
.guia-modal .guia-nav.next { right: 0; }

.guia-modal .guia-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.guia-modal .guia-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(100%, 540px);
  padding: 0 16px;
}

.guia-modal .guia-dots button {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  border: 0;
  padding: 0;
  background: #2a5080;
  cursor: pointer;
}

.guia-modal .guia-dots button.is-on {
  background: linear-gradient(90deg, #f472b6, #22d3ee);
  width: 18px;
}

.guia-modal .guia-counter {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.guia-modal.is-soon .guia-frame,
.guia-modal.is-soon .guia-foot {
  display: none;
}

.guia-modal__soon {
  max-width: 22rem;
  margin: 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
