/* ==========================================================================
   PERFORMANCE OPTIMIZED THEME - Lightweight & Fast
   Removed: backdrop-filter, heavy shadows, complex animations
   Added: CSS containment, optimized rendering
   ========================================================================== */

/* Import minimal font - system fonts prioritized */
:root {
  /* Core Palette - Simplified */
  --color-navy: #0a0f1a;
  --color-navy-dark: #050810;
  --color-navy-light: #111827;
  --color-slate: #1f2937;
  --color-slate-light: #374151;
  
  /* Accents - Simplified */
  --color-teal: #00d4aa;
  --color-teal-light: #5eead4;
  --color-teal-dark: #0d9488;
  --color-gold: #f59e0b;
  --color-gold-light: #fbbf24;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Backgrounds - Solid colors only */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(31, 41, 55, 0.8);
  --bg-glass: rgba(17, 24, 39, 0.9);
  
  /* Simple Gradients */
  --gradient-hero: linear-gradient(135deg, #0a0f1a 0%, #111827 100%);
  --gradient-teal: linear-gradient(135deg, #00d4aa 0%, #0d9488 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  
  /* Minimal Shadows - No glow effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.6);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* ==========================================================================
   BASE STYLES - Optimized
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* Disabled for performance */
}

/* Wrapper positioning */
.wrapper {
  position: relative;
  min-height: 100vh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 0 !important;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed; /* Changed from optimizeLegibility for speed */
}

@media (max-width: 768px) {
  body {
    padding-top: 0 !important;
    line-height: 1.7;
  }
}

/* ==========================================================================
   CSS CONTAINMENT - Performance Optimization
   ========================================================================== */
/* Contain layout and paint for better performance */
.navbar,
.hestia-top-bar,
.main-raised,
.game-card,
.stat-item,
.step-item,
.testimonial-card,
.trust-item,
.payment-item,
.faq-item,
.cta-section,
.ad-banner-container,
.fixed-bottom-bar {
  contain: layout style paint;
}

/* Content visibility for below-fold elements */
.games-gallery-section,
.stats-section,
.steps-section,
.payment-section,
.testimonials-section,
.trust-section,
.faq-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

/* ==========================================================================
   AD BANNER - Simplified
   ========================================================================== */
.ad-banner-container {
  width: 100% !important;
  margin: 10px 0 30px !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  min-height: 80px;
}

.ad-banner-container a {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100% !important;
  min-height: 80px;
}

.ad-banner-container img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: var(--radius-md) !important;
  object-fit: cover !important;
}

/* ==========================================================================
   TYPOGRAPHY - Simplified
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.hestia-title {
  font-weight: 700;
  line-height: 1.3;
}

h1 strong, h2 strong, .wp-block-heading strong {
  color: var(--color-teal);
}

a {
  color: var(--color-teal);
  text-decoration: none;
}

a:hover {
  color: var(--color-teal-light);
}

/* ==========================================================================
   TOP BAR - Fixed at top
   ========================================================================== */
.hestia-top-bar {
  background: var(--bg-glass) !important;
  border-bottom: 1px solid rgba(0, 212, 170, 0.1);
  height: 56px !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.hestia-top-bar .wp-block-buttons {
  gap: 10px;
}

.hestia-top-bar .wp-block-button a {
  background: var(--gradient-teal) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 8px 20px !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  margin: 0 !important;
}

.hestia-top-bar .wp-block-button:last-child a {
  background: transparent !important;
  border: 2px solid var(--color-teal) !important;
  color: var(--color-teal) !important;
  box-shadow: none;
}

.hestia-top-bar .wp-block-button:last-child a:hover {
  background: var(--color-teal) !important;
  color: var(--color-navy) !important;
}

/* Push header content down for fixed top bar */
.header.header-with-topbar {
  padding-top: 56px;
  position: relative;
  z-index: 500;
  background: var(--bg-primary);
}

/* Spacer paragraph after top bar - remove extra spacing */
.hestia-top-bar + p[style*="margin-bottom"] {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

/* Ad banner after top bar */
.hestia-top-bar ~ a[target="_blank"] {
  display: block;
}

/* ==========================================================================
   NAVIGATION - Static position (not fixed)
   ========================================================================== */
.navbar {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid rgba(0, 212, 170, 0.15);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1000;
  min-height: 60px;
}

/* Override Bootstrap navbar-fixed-top to make it static */
.navbar.navbar-fixed-top,
.navbar-fixed-top {
  position: relative !important;
  top: auto !important;
  z-index: 1000;
}

.navbar.navbar-transparent {
  background: var(--bg-primary) !important;
}

/* Ensure navbar stays above hero */
.navbar-default {
  background-color: var(--bg-primary) !important;
  border-color: rgba(0, 212, 170, 0.15) !important;
}

/* Navbar container background */
.navbar .container {
  position: relative;
  z-index: 1001;
}

/* Ensure nav items are above everything */
.navbar-nav {
  position: relative;
  z-index: 1002;
}

.navbar-brand img {
  height: 40px;
}

.navbar-nav > li > a {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 18px 16px !important;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar-nav > li > a:hover,
.navbar-nav > li.current-menu-item > a {
  color: var(--color-teal) !important;
}

/* Ensure menu items are clearly visible */
.navbar .nav > li > a {
  color: #ffffff !important;
}

.navbar .nav > li > a:focus,
.navbar .nav > li > a:hover {
  color: var(--color-teal) !important;
  background: rgba(0, 212, 170, 0.1);
}

/* Dropdown - No animation */
.dropdown-menu {
  background: var(--bg-glass);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 200px;
}

.dropdown-menu li a,
.dropdown-menu li a:visited,
.navbar .dropdown-menu li a,
.navbar .navbar-nav .dropdown .dropdown-menu li a {
  color: #ffffff !important;
  padding: 10px 16px;
  font-weight: 500;
  display: block;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus,
.navbar .dropdown-menu li:hover>a {
  color: var(--color-teal) !important;
  background: rgba(0, 212, 170, 0.15);
}

/* Dropdown toggle (MENU button) styling */
.dropdown-toggle {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.dropdown-toggle .caret {
  color: var(--color-teal);
  margin-left: 6px;
}

/* Mobile toggle */
.navbar-toggle {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-md);
  padding: 10px;
}

.navbar-toggle .icon-bar {
  background: var(--color-teal) !important;
  height: 2px;
}

/* ==========================================================================
   HERO SECTION - Simplified
   ========================================================================== */
.page-header {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  z-index: 0;
}

/* Carousel/hero container */
#carousel-hestia-generic,
.carousel {
  position: relative;
  z-index: 0;
}

.page-header .header-filter {
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.page-header .header-filter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.2) 0%, var(--color-navy) 100%);
  z-index: 0;
}

.hestia-big-title-content {
  position: relative;
  z-index: 2;
}

.hestia-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.sub-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   MAIN CONTENT - Simplified
   ========================================================================== */
.main-raised {
  background: var(--bg-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -50px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.section {
  padding: 60px 0;
}

.wp-block-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 40px 0 24px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 16px;
  line-height: 1.3;
}

.wp-block-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
}

.hestia-about-content p {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ==========================================================================
   GAME CARDS - Optimized, no 3D transforms
   ========================================================================== */
.games-gallery-section {
  margin: 30px 0;
  padding: 15px 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.game-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.game-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.game-card:hover .game-overlay {
  opacity: 1;
}

.play-btn {
  background: var(--gradient-teal);
  color: var(--color-navy);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.game-title {
  padding: 12px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(0, 212, 170, 0.08);
}

/* ==========================================================================
   PROMO COLUMNS - Simplified
   ========================================================================== */
.wp-block-columns {
  gap: 20px;
  margin: 30px 0;
}

.wp-block-column {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 212, 170, 0.1);
  overflow: hidden;
}

.wp-block-column figure {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.wp-block-column figure img {
  width: 100%;
  height: auto;
  display: block;
}

.wp-block-column p {
  padding: 16px;
  margin: 0;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

/* ==========================================================================
   BUTTONS - Simplified
   ========================================================================== */
.btn,
.btn-primary,
.wp-block-button__link {
  background: var(--gradient-teal) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 28px !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-navy) !important;
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

.btn:hover,
.wp-block-button__link:hover {
  background: var(--gradient-gold) !important;
}

/* ==========================================================================
   STATS SECTION - Optimized
   ========================================================================== */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 6px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ==========================================================================
   STEPS SECTION - Optimized
   ========================================================================== */
.steps-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0;
}

.step-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-teal);
  line-height: 1;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ==========================================================================
   PAYMENT SECTION - Optimized
   ========================================================================== */
.payment-section {
  margin: 24px 0;
}

.payment-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 20px;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.payment-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
}

.payment-icon {
  font-size: 1.8rem;
}

.payment-item span:last-child {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ==========================================================================
   TESTIMONIALS - Optimized
   ========================================================================== */
.testimonials-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.testimonial-stars {
  color: var(--color-gold);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.testimonial-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 212, 170, 0.08);
}

.author-name {
  color: var(--text-primary);
  font-weight: 600;
}

.author-win {
  color: var(--color-gold);
  font-size: 0.8rem;
}

/* ==========================================================================
   TRUST SECTION - Optimized
   ========================================================================== */
.trust-section {
  margin: 30px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.trust-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.trust-item h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 6px;
}

.trust-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
}

/* ==========================================================================
   FAQ SECTION - Optimized
   ========================================================================== */
.faq-section {
  margin: 30px 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 20px;
  cursor: pointer;
  position: relative;
  padding-right: 40px;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-teal);
  font-size: 1.3rem;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0 20px 16px;
  line-height: 1.6;
}

/* ==========================================================================
   CTA SECTION - Optimized
   ========================================================================== */
.cta-section {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  margin: 30px 0;
}

.cta-section h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 24px;
}

.cta-section .wp-block-buttons {
  justify-content: center;
}

/* ==========================================================================
   FOOTER - Optimized
   ========================================================================== */
.footer {
  background: var(--color-navy-dark) !important;
  border-top: 1px solid rgba(0, 212, 170, 0.08);
  padding: 60px 0 100px;
}

.footer-colum {
  margin-bottom: 30px;
}

#menu-footer {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

#menu-footer li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
}

#menu-footer li a:hover {
  color: var(--color-teal);
}

.footer > .container {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a[href="/sitemap.xml"] {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   FIXED BOTTOM BAR - Optimized
   ========================================================================== */
.fixed-bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 280px;
  background: var(--bg-glass);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.fixed-bottom-bar .btn-link {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-login {
  background: var(--gradient-teal);
  color: var(--color-navy) !important;
}

.btn-register {
  background: transparent;
  color: var(--color-teal) !important;
  border: 2px solid var(--color-teal);
}

/* ==========================================================================
   CATEGORY SECTION - Optimized
   ========================================================================== */
.category-section {
  display: inline-block;
  width: calc(33.333% - 16px);
  margin: 8px;
  vertical-align: top;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-height: 180px;
}

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   BRANDING HERO - Optimized
   ========================================================================== */
.brand-title-wrap {
  text-align: center;
  padding: 30px 0 15px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 212, 170, 0.1);
  color: var(--color-teal);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(0, 212, 170, 0.15);
  margin-bottom: 16px;
}

.brand-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 1.1rem;
  color: #ffffff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================================================
   SCROLLBAR - Simplified
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-navy);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal);
}

/* ==========================================================================
   SELECTION
   ========================================================================== */
::selection {
  background: var(--color-teal);
  color: var(--color-navy);
}

/* ==========================================================================
   IMAGE OPTIMIZATION
   ========================================================================== */
img {
  background: var(--bg-secondary);
  max-width: 100%;
  height: auto;
}

img[loading="lazy"] {
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE - TABLET (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  
  .stats-section,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps-section,
  .testimonials-section {
    grid-template-columns: 1fr;
  }
  
  .payment-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .category-section {
    width: calc(50% - 16px);
  }
  
  .wp-block-columns {
    flex-direction: column !important;
  }
  
  .wp-block-column {
    width: 100% !important;
    flex: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Typography */
  .hestia-title {
    font-size: 1.8rem !important;
  }
  
  .sub-title {
    font-size: 1rem;
    padding: 0 12px;
  }
  
  .wp-block-heading {
    font-size: 1.3rem !important;
    margin: 28px 0 16px;
  }
  
  /* Layout */
  .page-header {
    padding: 90px 0 60px;
  }
  
  .main-raised {
    margin: -30px 0 0;
    padding: 20px 12px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  
  .section {
    padding: 40px 0;
  }
  
  /* Games grid */
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .game-title {
    font-size: 0.75rem;
    padding: 10px 6px;
  }
  
  /* Stats */
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
  }
  
  .stat-item {
    padding: 16px 12px;
  }
  
  .stat-number {
    font-size: 1.6rem;
  }
  
  /* Steps */
  .steps-section {
    gap: 12px;
    margin: 24px 0;
  }
  
  .step-item {
    flex-direction: row;
    text-align: left;
    padding: 16px;
    gap: 12px;
  }
  
  .step-number {
    font-size: 2rem;
    min-width: 40px;
  }
  
  /* Payment */
  .payment-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .payment-item {
    padding: 14px 8px;
  }
  
  .payment-icon {
    font-size: 1.5rem;
  }
  
  /* Testimonials */
  .testimonials-section {
    gap: 12px;
    margin: 24px 0;
  }
  
  .testimonial-card {
    padding: 18px 16px;
  }
  
  .testimonial-author {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  /* Trust */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
  }
  
  .trust-item {
    padding: 16px 12px;
  }
  
  .trust-icon {
    font-size: 1.8rem;
  }
  
  /* FAQ */
  .faq-section {
    margin: 24px 0;
  }
  
  .faq-question {
    font-size: 0.9rem;
    padding: 14px 36px 14px 16px;
  }
  
  .faq-answer {
    font-size: 0.85rem;
    padding: 0 16px 14px;
  }
  
  /* CTA */
  .cta-section {
    padding: 28px 20px;
    margin: 24px 0;
  }
  
  .cta-section h3 {
    font-size: 1.2rem;
  }
  
  /* Category */
  .category-section {
    width: calc(50% - 12px);
    margin: 6px;
  }
  
  .category-card {
    padding: 16px 12px;
    min-height: 150px;
  }
  
  .category-icon {
    font-size: 1.8rem;
  }
  
  /* Footer */
  .footer {
    padding: 40px 0 90px;
  }
  
  #menu-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  /* Fixed bottom bar */
  .fixed-bottom-bar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    min-width: auto;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
  }
  
  .fixed-bottom-bar .btn-link {
    flex: 1;
    font-size: 0.8rem;
    padding: 12px 16px;
  }
  
  /* Mobile menu */
  .navbar-collapse {
    background: rgba(10, 15, 26, 0.98) !important;
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: var(--radius-lg);
    margin: 8px;
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .navbar .menu-item > a {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
  }
  
  /* Branding */
  .brand-title-wrap {
    padding: 20px 0 10px;
  }
  
  .brand-title {
    font-size: clamp(1.6rem, 5vw, 2rem);
  }
  
  .brand-subtitle {
    font-size: 0.95rem;
    padding: 0 10px;
  }
  
  /* Content visibility optimization */
  .games-gallery-section,
  .stats-section,
  .steps-section,
  .payment-section,
  .testimonials-section,
  .trust-section,
  .faq-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
  }
}

/* ==========================================================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .hestia-title {
    font-size: 1.5rem !important;
  }
  
  .wp-block-heading {
    font-size: 1.15rem !important;
  }
  
  .page-header {
    padding: 80px 0 50px;
  }
  
  .main-raised {
    padding: 16px 10px;
  }
  
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .game-title {
    font-size: 0.7rem;
    padding: 8px 6px;
  }
  
  .stats-section,
  .payment-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .stat-item {
    padding: 12px 8px;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  .step-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 14px;
  }
  
  .category-section {
    width: 100%;
    margin: 6px 0;
    display: block;
  }
  
  .category-card {
    flex-direction: row;
    text-align: left;
    padding: 14px;
    min-height: auto;
  }
  
  .category-icon {
    font-size: 1.8rem;
    margin: 0 12px 0 0;
    flex-shrink: 0;
  }
  
  .cta-section {
    padding: 20px 14px;
  }
  
  .cta-section h3 {
    font-size: 1.1rem;
  }
  
  .wp-block-button__link {
    width: 100%;
    padding: 12px 20px !important;
  }
  
  .fixed-bottom-bar {
    padding: 6px 8px;
  }
  
  .fixed-bottom-bar .btn-link {
    padding: 10px 12px;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   RESPONSIVE - EXTRA SMALL (max-width: 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .games-grid {
    gap: 8px;
  }
  
  .game-title {
    font-size: 0.65rem;
    padding: 6px 4px;
  }
  
  .stats-section,
  .payment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  .stat-number {
    font-size: 1.2rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .trust-grid {
    grid-template-columns: 1fr;
  }
  
  .fixed-bottom-bar {
    flex-direction: column;
    gap: 6px;
  }
  
  .fixed-bottom-bar .btn-link {
    width: 100%;
  }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .navbar .menu-item > a,
  #menu-footer li a,
  .faq-question {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Remove hover effects on touch */
  .game-card:hover,
  .wp-block-column:hover,
  .stat-item:hover,
  .step-item:hover,
  .testimonial-card:hover,
  .trust-item:hover,
  .payment-item:hover {
    transform: none;
  }
  
  /* Reduce shadow on touch */
  .main-raised,
  .wp-block-column,
  .stat-item,
  .step-item,
  .testimonial-card,
  .trust-item,
  .payment-item {
    box-shadow: var(--shadow-sm);
  }
  
  /* Active state feedback */
  .game-card:active,
  .stat-item:active,
  .step-item:active {
    transform: scale(0.98);
  }
}

/* ==========================================================================
   LANDSCAPE MODE
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .page-header {
    padding: 60px 0 40px;
    min-height: auto;
  }
  
  .hestia-title {
    font-size: 1.4rem !important;
  }
  
  .fixed-bottom-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 16px;
  }
  
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   REDUCED MOTION - Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   IOS SPECIFIC FIXES
   ========================================================================== */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    a {
      -webkit-touch-callout: none;
    }
    
    .navbar-collapse.in,
    .main-raised {
      -webkit-overflow-scrolling: touch;
    }
  }
}

/* ==========================================================================
   SAFE AREA INSETS - Notched phones
   ========================================================================== */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .fixed-bottom-bar {
      padding-left: max(10px, env(safe-area-inset-left));
      padding-right: max(10px, env(safe-area-inset-right));
      padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    .footer {
      padding-bottom: max(80px, env(safe-area-inset-bottom) + 70px) !important;
    }
  }
}
