/* ============================================================
   CapoSino Casino – Custom CSS
   Deep Sapphire & Gold Crown Luxe Theme
   ============================================================ */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  word-break: break-word;
  min-height: 100vh;
}

/* ============================================================
   Typography & Font Loading
   ============================================================ */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: Georgia, 'Times New Roman', serif;
}

/* ============================================================
   Colour Variables
   ============================================================ */

:root {
  --color-sapphire: #0a1a4e;
  --color-sapphire-dark: #060e2e;
  --color-sapphire-mid: #112266;
  --color-gold: #d4af37;
  --color-gold-light: #f0d060;
  --color-gold-dark: #a07820;
  --color-velvet: #1a0a2e;
  --color-cream: #fdf8ee;
  --color-silver: #c0c8d8;
  --color-accent: #2244aa;
}

/* ============================================================
   Parallax Hero
   ============================================================ */

.hero-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

@media (max-width: 768px) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

/* ============================================================
   Marquee Animation
   ============================================================ */

.marquee-track {
  display: flex;
  gap: 2rem;
  animation: marquee-scroll 35s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   CTA Pulse Animation
   ============================================================ */

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
}

.cta-pulse {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

/* ============================================================
   Game Cards
   ============================================================ */

.game-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-card:hover {
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.25);
}

/* ============================================================
   Provider Word Cloud Tags
   ============================================================ */

.provider-tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--color-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: default;
  word-break: keep-all;
}

.provider-tag:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--color-gold-light);
}

/* ============================================================
   FAQ Accordion
   ============================================================ */

.faq-item summary {
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] {
  border-color: rgba(212, 175, 55, 0.5);
}

.faq-item[open] summary {
  color: var(--color-gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================================================
   Gold Gradient Text Utility
   ============================================================ */

.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 50%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   Sticky Header Shadow
   ============================================================ */

#site-header {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Mobile Menu Transition
   ============================================================ */

#mobile-menu {
  transition: opacity 0.2s ease;
}

/* ============================================================
   Overflow Utilities
   ============================================================ */

.overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* ============================================================
   Homepage payments table
   ============================================================ */

.payments-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.payments-table th,
.payments-table td {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .payments-table-scroll {
    overflow-x: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .payments-table {
    display: block;
    width: 100%;
  }

  .payments-table thead {
    display: none;
  }

  .payments-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .payments-table tbody tr {
    display: block;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #112266;
  }

  .payments-table tbody tr:nth-child(even) {
    background: #0a1a4e;
  }

  .payments-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    white-space: normal;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
  }

  .payments-table td:first-child {
    justify-content: flex-start;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    background: rgba(212, 175, 55, 0.08);
    border-top: none;
  }

  .payments-table td:first-child::before {
    display: none;
  }

  .payments-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d4af37;
  }

  .payments-table td:last-child {
    text-align: right;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .payments-table {
    min-width: 42rem;
  }
}

/* ============================================================
   Prose Casino Styles (Single Pages)
   ============================================================ */

.prose-casino {
  color: var(--color-silver);
  max-width: 80ch;
  margin-left: auto;
  margin-right: auto;
  word-break: break-word;
}

.prose-casino h1,
.prose-casino h2,
.prose-casino h3,
.prose-casino h4,
.prose-casino h5,
.prose-casino h6 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--color-cream);
  margin-top: 1em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.prose-casino h1 { font-size: 2rem; }
.prose-casino h2 { font-size: 1.6rem; color: var(--color-gold); }
.prose-casino h3 { font-size: 1.3rem; color: var(--color-gold-light); }

.prose-casino p {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  line-height: 1.75;
}

.prose-casino a {
  color: var(--color-gold);
  text-decoration: underline;
  transition: color 0.2s;
}

.prose-casino a:hover {
  color: var(--color-gold-light);
}

.prose-casino strong {
  color: var(--color-cream);
  font-weight: 700;
}

.prose-casino em {
  color: var(--color-gold-light);
  font-style: italic;
}

.prose-casino ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 1em 0;
  color: var(--color-silver);
}

.prose-casino ol {
  list-style: decimal;
  padding-left: 1.5em;
  margin: 1em 0;
  color: var(--color-silver);
}

.prose-casino li {
  margin-bottom: 0.4em;
  line-height: 1.65;
}

.prose-casino blockquote {
  border-left: 4px solid var(--color-gold);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-silver);
  font-style: italic;
  background: rgba(212, 175, 55, 0.06);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
}

.prose-casino hr {
  border: none;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  margin: 2rem 0;
}

.prose-casino code {
  background: rgba(212, 175, 55, 0.12);
  color: var(--color-gold-light);
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  word-break: break-all;
}

.prose-casino pre {
  background: rgba(10, 26, 78, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose-casino pre code {
  background: transparent;
  padding: 0;
  word-break: normal;
}

/* ============================================================
   Prose Table Scroll (Mandatory Classes)
   ============================================================ */

.prose-casino .prose-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 1.5em 0;
  border-radius: 0.5rem;
}

.prose-casino .prose-table-scroll table {
  margin-top: 0;
  margin-bottom: 0;
}

/* Prose tables – auto-wrapped in Hugo's markdown renderer */
.prose-casino table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--color-silver);
  background: rgba(10, 26, 78, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 1.5em 0;
}

.prose-casino thead {
  background: var(--color-sapphire-mid);
  color: var(--color-gold);
}

.prose-casino th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.prose-casino td {
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.prose-casino tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

/* Wrap ALL tables by default for mobile safety */
.prose-casino table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .prose-casino table {
    display: table;
  }
}

/* ============================================================
   Responsive Utilities
   ============================================================ */

@media (max-width: 640px) {
  .hero-parallax {
    min-height: 90vh;
  }

  .provider-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
  }
}

/* ============================================================
   Section Dividers (SVG shapes)
   ============================================================ */

.section-divider-gold {
  position: relative;
}

.section-divider-gold::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 1.5rem auto 0;
  border-radius: 9999px;
}

/* ============================================================
   Shimmer Loading Animation (for images)
   ============================================================ */

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0.05) 25%,
    rgba(212, 175, 55, 0.15) 50%,
    rgba(212, 175, 55, 0.05) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 2s infinite linear;
}

/* ============================================================
   Glow Effects
   ============================================================ */

.glow-gold {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.1);
}

.glow-gold:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.2);
}

/* ============================================================
   Scroll Reveal Fade
   ============================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================================
   Card Hover Lift
   ============================================================ */

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   Focus States (Accessibility)
   ============================================================ */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
  body {
    background: white;
    color: black;
  }

  header,
  footer,
  .marquee-track {
    display: none;
  }
}
