/* Poker Guide Page Styles */

/* Hero */
.guide-hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--accent-green);
}

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

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

.guide-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 32, 36, 0.85) 0%, rgba(44, 74, 62, 0.68) 50%, rgba(28, 32, 36, 0.9) 100%);
}

.guide-hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-inline: auto;
  padding: var(--space-8) var(--container-padding);
  text-align: center;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.guide-hero__eyebrow {
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.875rem;
  margin-bottom: 0;
}

.guide-hero__title {
  color: var(--text-on-dark);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 0;
}

.guide-hero__lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 650px;
  margin-bottom: 0;
}

.guide-hero__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.guide-quick-link {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.guide-quick-link:hover {
  background: var(--accent-gold);
  color: var(--text-on-gold);
  border-color: var(--accent-gold);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Section Common */
.guide-section {
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
}

.guide-section--alt {
  background-color: var(--bg-alt);
}

.guide-section__header {
  text-align: center;
  max-width: 750px;
  margin-inline: auto;
  margin-bottom: var(--space-7);
}

.guide-section__header h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.guide-section__header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Hand Rankings Grid */
.rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

.ranking-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.ranking-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

.ranking-card__number {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-alt);
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranking-card--top .ranking-card__number {
  background-color: var(--accent-gold);
  color: var(--text-on-gold);
}

.ranking-card__name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  padding-right: var(--space-5);
}

.ranking-card__example {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-3);
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 600;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #1c2024;
  border: 1px solid #d5d0c8;
}

.card-chip--red {
  color: #c92a2a;
}

.ranking-card__desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* How to play tabs & step list */
.guide-formats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.format-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
}

.format-card h3 {
  font-size: 1.4rem;
  color: var(--accent-green);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.format-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.format-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.format-steps li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.format-steps li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: var(--text-on-gold);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.format-card:first-child .format-steps {
  counter-reset: step-counter;
}

.format-card:last-child .format-steps {
  counter-reset: step-counter;
}

/* Rules Section (House Rules & Responsible Play) */
.rules-container {
  max-width: 900px;
  margin-inline: auto;
}

.rule-group {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--space-6);
}

.rule-group h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.rule-group h3 .rule-icon {
  color: var(--accent-gold);
  font-size: 1.3rem;
}

.rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rule-list li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.rule-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--accent-green);
  font-size: 0.9rem;
}

.rule-list li strong {
  color: var(--text-primary);
}

/* Callout Box */
.guide-callout {
  background: rgba(44, 74, 62, 0.06);
  border-left: 4px solid var(--accent-green);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: var(--space-5);
  margin-block: var(--space-6);
}

.guide-callout p {
  color: var(--text-primary);
  font-size: 0.98rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Etiquette Two Column */
.etiquette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.etiquette-media {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.etiquette-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* PDF Rulebook Download Box */
.download-box {
  background: linear-gradient(135deg, #1C2024 0%, #2C4A3E 100%);
  border-radius: var(--radius-modal);
  padding: var(--space-8) var(--space-6);
  color: var(--text-on-dark);
  text-align: center;
  margin-top: var(--space-8);
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.download-box h3 {
  color: var(--text-on-dark);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--space-3);
}

.download-box p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}

.download-box__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

/* Download Modal */
.rulebook-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--container-padding);
}

.rulebook-modal[hidden] {
  display: none;
}

.rulebook-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.rulebook-modal__dialog {
  position: relative;
  background: var(--surface-card);
  border-radius: var(--radius-modal);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  padding: var(--space-7);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.rulebook-modal__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.rulebook-modal__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.rulebook-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.rulebook-modal__close:hover {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1023px) {
  .guide-formats-grid,
  .etiquette-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .etiquette-img {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .rankings-grid {
    grid-template-columns: 1fr;
  }

  .rule-group,
  .download-box {
    padding: var(--space-5) var(--space-4);
  }
}
