/* Typografin här håller sig till fyra behandlingar: Playfair för rubriker och
   priset, sidans vanliga kursiva Quicksand för all brödtext i en enda storlek,
   versala etiketter för det som bara är en skylt, och finstilt under knappen. */

.post-club-main {
  min-height: calc(100vh - var(--header-offset, var(--header-height)));
  /* ui.js sets an inline padding-top equal to the header's measured height,
     which beats anything written here — this is only the fallback for a load
     where that script does not get that far. The air below the header is set
     on .post-club-top, where nothing overrides it. */
  padding: var(--header-offset, var(--header-height)) 24px 90px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-warm) 100%);
}

.post-club-main > * {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}

/* ─── Etiketter och brödtext ─── */

p.post-club-label {
  margin: 0 0 8px;
  color: var(--text-dark);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-club-main p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ─── Topp ─── */

.post-club-top {
  padding-top: clamp(40px, 5vw, 76px);
  text-align: center;
  animation: post-club-rise 0.7s ease both;
}

.post-club-top h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

p.post-club-lead {
  max-width: 620px;
  margin-inline: auto;
  margin-block: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

/* ─── Kvartalet ─── */

.post-club-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
  margin-top: clamp(34px, 5vw, 56px);
  animation: post-club-rise 0.7s 0.1s ease both;
}

.post-club-feature {
  margin: 0;
}

.post-club-feature-button {
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  overflow: hidden;
  display: block;
  box-shadow: 0 18px 50px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-club-feature-button:hover:not(:disabled),
.post-club-feature-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px var(--shadow-light);
}

.post-club-feature-button:disabled {
  cursor: default;
}

.post-club-feature-button img {
  width: 100%;
  height: auto;
  display: block;
}

.post-club-feature-button .post-club-thumb-pending {
  aspect-ratio: 1 / 1;
  font-size: 0.85rem;
}

.post-club-quarter-info h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 4px;
}

p.post-club-quarter-ship {
  margin: 0 0 14px;
}

p.post-club-quarter-blurb {
  margin: 0 0 22px;
  opacity: 0.85;
}

.post-club-thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.post-club-thumb-button {
  width: 100%;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent-light) 70%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  overflow: hidden;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-club-thumb-button:hover:not(:disabled),
.post-club-thumb-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px var(--shadow-light);
}

.post-club-thumb-button:disabled {
  cursor: default;
}

.post-club-thumb-button img,
.post-club-thumb-pending {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.post-club-thumb-pending {
  display: grid;
  place-items: center;
  padding: 8px;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent-light) 18%, transparent) 0 10px, transparent 10px 20px);
  font-size: 0.72rem;
  line-height: 1.3;
  opacity: 0.7;
  text-align: center;
}

.post-club-thumb-label {
  display: block;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.3;
}

/* ─── Bli medlem ─── */

.post-club-join {
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--accent-light);
}

.post-club-includes {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--accent-light);
}

.post-club-includes h2,
.post-club-timeline-section h2 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.post-club-includes ul {
  margin: 0;
  padding-left: 18px;
}

.post-club-includes li {
  margin-bottom: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pris till vänster, knapp till höger: etiketten ryms på en rad och kortet
   blir en tredjedel lägre än när allt stod staplat. */
.post-club-buy {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid color-mix(in srgb, var(--accent-light) 80%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 45px var(--shadow-light);
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr);
  column-gap: clamp(20px, 4vw, 40px);
  align-items: center;
}

.post-club-buy > p.post-club-label {
  grid-column: 1;
  align-self: end;
  margin-bottom: 4px;
}

p.post-club-price {
  grid-column: 1;
  align-self: start;
  margin: 0;
  color: var(--text-dark);
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.post-club-form {
  grid-column: 2;
  grid-row: 1 / span 2;
}

/* Sidans enda handling, och den står bredvid ett pris i 2,4rem — den tål att
   väga tyngre än ett vanligt formulärs knapp. */
.post-club-form .submitBtn {
  width: 100%;
  margin-top: 0;
}

@media (min-width: 561px) {
  .post-club-form .submitBtn {
    padding: 19px 20px;
    font-size: 1.1rem;
  }
}

.post-club-form .submitBtn:disabled {
  cursor: wait;
  opacity: 0.65;
}

p.post-club-status {
  margin: 12px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

p.post-club-status:empty {
  display: none;
}

p.post-club-status.success { color: var(--text-dark); }
p.post-club-status.error { color: var(--error); }
p.post-club-status.pending { opacity: 0.7; }

.post-club-terms {
  grid-column: 1 / -1;
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--accent-light);
}

.post-club-terms li {
  margin-bottom: 7px;
  font-size: 0.78rem;
  line-height: 1.55;
  opacity: 0.75;
}

.post-club-terms li:last-child {
  margin-bottom: 0;
}

/* ─── Tidslinje ─── */

.post-club-timeline-section {
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--accent-light);
}

p.post-club-timeline-hint {
  margin: 0 0 20px;
  opacity: 0.75;
}

.post-club-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 16px;
  /* body lays the page out in a grid column sized to its widest content, so a
     row of cards this wide would stretch the whole page. Zero width keeps the
     cards out of that measurement; min-width fills the section again. */
  width: 0;
  min-width: 100%;
  display: flex;
  gap: clamp(14px, 2.5vw, 22px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.post-club-timeline-card {
  align-self: flex-start;
  flex: 0 0 200px;
  padding: 14px 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent-light) 70%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  scroll-snap-align: start;
}

.post-club-timeline-card.is-current {
  border-color: var(--accent-yellow);
  background: rgba(255, 255, 255, 0.85);
}

.post-club-timeline-card.is-past {
  opacity: 0.75;
}

/* Ett kommande kvartal utan tema är bara en tidpunkt — det ska se ut så. */
.post-club-timeline-card.is-secret {
  background: transparent;
  border-style: dashed;
}

.post-club-timeline-card.is-secret h3 {
  margin-bottom: 0;
}

.post-club-timeline-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-club-timeline-card.is-current .post-club-timeline-badge {
  background: var(--accent-yellow);
  color: var(--text-dark);
}

p.post-club-timeline-month {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.7;
  text-transform: capitalize;
}

.post-club-timeline-card h3 {
  margin: 2px 0 12px;
  font-size: 1.1rem;
}

.post-club-timeline-button {
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  display: block;
}

.post-club-timeline-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.post-club-timeline-button:disabled {
  cursor: default;
}

.post-club-timeline-media .post-club-thumb-pending {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
}

.post-club-timeline-media.is-empty {
  height: 48px;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent-light) 14%, transparent) 0 10px, transparent 10px 20px);
}

/* ─── Genväg till köpkortet (bara mobil) ─── */

.post-club-jump {
  display: none;
}

@media (max-width: 760px) {
  .post-club-jump {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--bg-light) 70%, color-mix(in srgb, var(--bg-light) 0%, transparent));
    transform: translateY(130%);
    transition: transform 0.28s ease;
  }

  .post-club-jump.is-visible {
    transform: translateY(0);
  }

  .post-club-jump button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent-yellow);
    color: var(--text-dark);
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px var(--shadow-light);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-club-jump {
    transition: none;
  }
}

/* ─── Lightbox ─── */

.post-club-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
}

.post-club-lightbox[hidden] {
  display: none;
}

.post-club-lightbox-figure {
  margin: 0;
  max-width: min(900px, 86vw);
  text-align: center;
}

.post-club-lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.post-club-lightbox-figure figcaption {
  margin-top: 14px;
  color: var(--white);
  font-size: 0.9rem;
}

.post-club-lightbox-close,
.post-club-lightbox-nav {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.post-club-lightbox-close:hover,
.post-club-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.post-club-lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.post-club-lightbox-nav {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  font-size: 32px;
}

@keyframes post-club-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .post-club-showcase {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 560px) {
  .post-club-buy {
    grid-template-columns: 1fr;
  }

  .post-club-form {
    grid-column: 1;
    grid-row: auto;
    margin-top: 16px;
  }
}

@media (max-width: 760px) {
  .post-club-top { padding-top: 30px; }
  .post-club-top h1 { font-size: 2.6rem; }
  .post-club-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-club-timeline-card { flex-basis: 70vw; }
  .post-club-lightbox-nav { position: fixed; bottom: 22px; }
  .post-club-lightbox-nav.prev { left: 22px; }
  .post-club-lightbox-nav.next { right: 22px; }
}
