/* Poker page styles */
.poker-page {
  --poker-section-gap: var(--space-xxxl);
  --poker-card-gap: var(--space-lg);
  --poker-grid-gap: var(--space-lg);
}

.poker-section {
  padding-block: var(--poker-section-gap);
}

.poker-section--light {
  background-color: var(--color-foam);
}

.poker-section--dark {
  background-color: var(--surface-dark);
  color: var(--color-text-on-dark);
}

.poker-section--dark .poker-section__title {
  color: var(--color-text-on-dark);
}

.poker-section--dark .poker-copy {
  color: var(--color-text-on-dark);
}

.poker-section--dark .content-list > li::before {
  background-color: var(--color-coral);
}

.poker-section__container {
  display: flex;
  flex-direction: column;
  gap: var(--poker-section-gap);
}

.poker-section__title {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  margin-block-end: var(--space-md);
  position: relative;
  padding-block-end: var(--space-sm);
}

.poker-section__title::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 3rem;
  height: 3px;
  background-color: var(--color-coral);
  border-radius: 2px;
}

.poker-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.poker-copy--left {
  max-width: 50rem;
  text-align: left;
  margin-inline: 0;
}

.poker-copy--center {
  max-width: 43.75rem;
  text-align: center;
  margin-inline: auto;
  align-items: center;
}

.poker-copy--center .poker-section__title::after {
  inset-inline-start: 50%;
  transform: translateX(-50%);
}

.poker-copy p,
.poker-copy ul {
  margin-block-end: 0;
}

/* Hero */
.poker-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--surface-dark);
}

.poker-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.poker-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.poker-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 42, 74, 0.45) 0%, rgba(10, 42, 74, 0.75) 100%);
}

.poker-hero__content {
  position: relative;
  z-index: 1;
  max-width: 43.75rem;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--container-padding);
  text-align: center;
  color: var(--color-text-on-dark);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
}

.poker-hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  color: var(--color-text-on-dark);
  margin-block-end: 0;
}

.poker-hero__lead {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text-on-dark);
  margin-block-end: 0;
  max-width: 43.75rem;
}

.poker-hero__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  min-width: 0;
}

.poker-hero__cta {
  min-width: 0;
}

/* Rules grid */
.poker-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--poker-grid-gap);
  min-width: 0;
}

.poker-rule-card,
.poker-variant-card,
.poker-related-card {
  background-color: var(--surface-card);
  border: var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.poker-rule-card:hover,
.poker-variant-card:hover,
.poker-related-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.poker-rule-card__title,
.poker-variant-card__title,
.poker-related-card__title {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  margin-block-end: 0;
}

.poker-rule-card p,
.poker-variant-card p,
.poker-related-card p {
  margin-block-end: 0;
}

.poker-rule-card__list,
.poker-variant-card__list {
  margin-block-end: 0;
}

/* Variants grid */
.poker-variants-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--poker-grid-gap);
  min-width: 0;
}

/* Poker room layout */
.poker-room-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-xl);
  align-items: start;
  min-width: 0;
}

.poker-room-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.poker-room-copy .poker-section__title {
  margin-block-end: 0;
}

.poker-room-copy p {
  margin-block-end: 0;
}

.poker-room-list {
  margin-block-end: 0;
}

.poker-room-figure {
  margin-block-end: 0;
  min-width: 0;
}

.poker-room-lightbox-trigger {
  display: block;
  border-radius: var(--radius-image);
  overflow: hidden;
}

.poker-room-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-image);
  transition: transform var(--transition-base);
}

.poker-room-lightbox-trigger:hover .poker-room-image {
  transform: scale(1.02);
}

.poker-room-caption {
  margin-block-start: var(--space-xs);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-text-secondary);
}

/* Etiquette, tournament, tips lists */
.poker-etiquette-list,
.poker-tournament-list,
.poker-tips-list,
.poker-responsible-list {
  margin-block-end: 0;
}

/* Related grid */
.poker-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--poker-grid-gap);
  min-width: 0;
}

.poker-related-card__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-coral);
  text-decoration: none;
  transition: color var(--transition-fast);
  align-self: flex-start;
}

.poker-related-card__link:hover {
  color: var(--color-ocean-mid);
  text-decoration: underline;
}

/* Lightbox */
.poker-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(10, 42, 74, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.poker-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.poker-lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-image);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.poker-lightbox__close {
  position: absolute;
  inset-block-start: var(--space-md);
  inset-inline-end: var(--space-md);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-circle);
  background-color: var(--color-foam);
  color: var(--color-text-primary);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.poker-lightbox__close:hover {
  background-color: var(--color-coral);
  color: var(--color-text-on-accent);
}

/* Responsive */
@media (max-width: 62rem) {
  .poker-rules-grid,
  .poker-variants-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poker-room-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .poker-room-figure {
    order: -1;
  }
}

@media (max-width: 48rem) {
  .poker-page {
    --poker-section-gap: var(--space-xl);
  }

  .poker-section {
    padding-block: var(--space-xl);
  }

  .poker-hero {
    min-height: 70vh;
  }

  .poker-hero__content {
    padding-inline: var(--space-md);
    gap: var(--space-md);
  }

  .poker-hero__title {
    font-size: var(--text-h1);
    line-height: var(--leading-h1);
  }

  .poker-hero__lead {
    font-size: var(--text-small);
    line-height: var(--leading-small);
  }

  .poker-rules-grid,
  .poker-variants-grid,
  .poker-related-grid {
    grid-template-columns: 1fr;
  }

  .poker-copy--left,
  .poker-copy--center {
    max-width: 100%;
  }

  .poker-copy--center {
    text-align: left;
    align-items: flex-start;
  }

  .poker-copy--center .poker-section__title::after {
    inset-inline-start: 0;
    transform: none;
  }

  .poker-room-image {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .poker-rule-card,
  .poker-variant-card,
  .poker-related-card {
    transition: none;
  }

  .poker-rule-card:hover,
  .poker-variant-card:hover,
  .poker-related-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .poker-room-lightbox-trigger:hover .poker-room-image {
    transform: none;
  }

  .poker-lightbox {
    transition: none;
  }
}
