/* ==========================================================================
   King Johnnie Casino - Design System & Base Styles
   Theme: Urban Noir, Charcoal, Gold, Premium Aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-primary: #121212;
  --bg-secondary: #1E1E1E;
  --bg-tertiary: #2A2A2A;
  
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #888888;
  
  --accent-gold: #D4AF37;
  --accent-gold-hover: #F2C94C;
  --accent-gold-dark: #AA8C2C;
  
  --border-color: #333333;
  --error: #FF4B4B;
  --success: #00E676;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Other */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;
  
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.6);
  --shadow-gold: 0 4px 14px rgba(212, 175, 55, 0.2);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Core Web Vitals optimization */
  font-display: swap; 
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold-hover);
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Layout & Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-12) 0;
}

.grid {
  display: grid;
  gap: var(--space-6);
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--border-radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-gold-hover), var(--accent-gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
  color: var(--bg-primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-secondary:hover {
  background-color: rgba(212, 175, 55, 0.1);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* Header & Nav */
.header {
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo span {
  color: var(--accent-gold);
}

.nav-links {
  display: none; /* Mobile first */
}

.nav-toggle {
  display: block;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: var(--space-16) 0 var(--space-12);
  background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23D4AF37" fill-opacity="0.1"/></svg>');
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  background: linear-gradient(to right, #FFF, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

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

/* Cards */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-6);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-tertiary);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-4);
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  color: var(--accent-gold);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  padding: 0 var(--space-4);
}

.faq-item.active .faq-answer {
  padding-bottom: var(--space-4);
}

/* Content Blocks for Articles */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: var(--space-8);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-2);
}

.article-content ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: var(--space-2);
}

/* Author Box (EEAT) */
.author-box {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--accent-gold);
  margin-top: var(--space-12);
}

.author-img {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.author-info h4 {
  margin-bottom: var(--space-1);
}

.author-info p {
  margin-bottom: 0;
  font-size: var(--text-sm);
}

/* Footer */
.footer {
  background-color: var(--bg-tertiary);
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-12);
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-col h4 {
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   Media Queries (Desktop)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  
  .hero h1 { font-size: 3.5rem; }
  
  .nav-toggle {
    display: none;
  }
  
  .nav-links {
    display: flex;
    gap: var(--space-6);
  }
  
  .nav-links a {
    color: var(--text-primary);
    font-weight: 500;
  }
  
  .nav-links a:hover {
    color: var(--accent-gold);
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Utility Classes */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
