/* site/css/style.css - Playtavo Foundation CSS - Fully Fixed Version */

/* 1. CSS Custom Properties (Variables) - Enhanced for Accessibility and Consistency */
:root {
  /* Colors - Cyberpunk inspired, WCAG AA compliant contrast */
  --color-primary: #000000; /* Black for high contrast text */
  --color-secondary: #7B2CBF; /* Electric purple */
  --color-background: #1a1a1a; /* Darker background for better contrast */
  --color-surface: #2d2d2d; /* Surfaces with improved visibility */
  --color-accent: #39FF14; /* Neon green */
  --color-accent-alt: #FF9500; /* Orange accent */
  --color-text: #FFFFFF; /* Pure white text */
  --color-text-muted: #E5E7EB; /* Lighter grey, high contrast */
  --color-link: #60A5FA; /* Light blue for links, high contrast */
  --color-error: #EF4444; /* Red */
  --color-success: var(--color-accent);
  --color-border: #4B5563; /* Border color with contrast */

  /* Typography - Standardized and Readable */
  --font-family-headings: 'Orbitron', sans-serif;
  --font-family-body: 'Roboto', sans-serif;
  --font-size-xl: 3rem; /* Slightly reduced to prevent cut-offs */
  --font-size-lg: 2.25rem;
  --font-size-md: 1.5rem;
  --font-size-base: 1.125rem; /* Increased base */
  --font-size-sm: 0.9375rem; /* Larger small text */
  --line-height-base: 1.7; /* Improved readability */
  --line-height-heading: 1.3;

  /* Spacing - Consistent System */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--color-accent);

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;

  /* Z-index */
  --z-modal: 1050;
  --z-nav: 1030;

  /* Navbar height for padding */
  --navbar-height: 76px;
}

/* 2. Reset and Base Styles */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0; padding: 0 var(--space-lg) var(--space-lg);
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
  padding-top: var(--navbar-height); /* Fix for fixed navbar */
}

body.is-loading { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-family-headings);
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--color-text);
  word-wrap: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

p { margin: 0 0 var(--space-md); line-height: var(--line-height-base); }

a { color: var(--color-link); text-decoration: none; transition: color var(--transition-fast); }

a:hover, a:focus { color: var(--color-accent); outline: 2px solid var(--color-accent); outline-offset: 2px; }

img, video { max-width: 100%; height: auto; display: block; object-fit: contain; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { border: none; cursor: pointer; font-family: inherit; transition: all var(--transition-fast); }

input, textarea, select { font-family: inherit; font-size: inherit; }

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;500&display=swap');

/* Typography Scale */
h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-lg); }
h3 { font-size: var(--font-size-md); }
h4 { font-size: var(--font-size-base); }
h5, h6 { font-size: var(--font-size-sm); }

.lead { font-size: 1.25rem; font-weight: 300; color: var(--color-text-muted); line-height: 1.6; }

/* 3. Layout - Fixed for Alignment and Overflow */
.container-custom {
  max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); width: 100%; box-sizing: border-box;
}

.hero-section {
  position: relative; 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: var(--color-text); 
  overflow: hidden;
  padding: var(--space-xl) 0;
}

.hero-section::before { 
  content: ''; 
  position: absolute; 
  top: 0; left: 0; right: 0; bottom: 0; 
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for better text contrast */
  z-index: 1; 
}

.hero-section > * { position: relative; z-index: 2; }

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.section { padding: var(--space-2xl) 0; }

/* Bootstrap Fixes - Equal Height Cards, Image Handling */
.row[class*='g-'] { display: flex; flex-wrap: wrap; }
.row[class*='g-'] > [class*='col-'] { display: flex; flex-direction: column; }

.row[class*='g-'] > [class*='col-'] > .card,
.row[class*='g-'] > [class*='col-'] > .team-card,
.row[class*='g-'] > [class*='col-'] > .job-card,
.row[class*='g-'] > [class*='col-'] > .testimonial-card,
.row[class*='g-'] > [class*='col-'] > .news-card,
.row[class*='g-'] > [class*='col-'] > .transmission-card,
.row[class*='g-'] > [class*='col-'] > .game-card {
  flex: 1;
}

/* Base card styles - compatible with Bootstrap */
[class*='card'], .gamelift-card, .job-card, .testimonial-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--border-radius);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  box-shadow: var(--shadow-sm); overflow: hidden;
}

[class*='card']:hover, .gamelift-card:hover, .job-card:hover, .testimonial-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-glow); border-color: var(--color-accent);
}

.card-img-top, img.card-image {
  width: 100%; aspect-ratio: 16 / 9; height: auto;
  object-fit: cover; border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body { flex: 1; display: flex; flex-direction: column; padding: var(--space-md); gap: var(--space-sm); background: transparent; }

.card-title { color: var(--color-text); margin-bottom: var(--space-sm); font-size: var(--font-size-md); font-weight: 600; }

.card-text { color: var(--color-text-muted); flex: 1; line-height: var(--line-height-base); font-size: var(--font-size-sm); }

/* Fix for cut-off images */
.explore-image img, .section-image img { max-width: 100%; height: auto; object-fit: contain; overflow: visible; }

/* Heading wrap fix */
.section-heading { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }

/* 4. Components - Fixed Contrast and Alignment */

/* Buttons - High Contrast Text */
.btn {
  display: inline-block; padding: var(--space-md) var(--space-lg); border-radius: var(--border-radius);
  font-weight: 500; text-align: center; text-decoration: none; transition: all var(--transition-normal);
  border: 2px solid transparent; color: var(--color-primary) !important; /* Black text */
  background: var(--color-accent); margin: var(--space-sm) 0;
}

.btn:hover, .btn:focus { background: var(--color-primary); color: var(--color-accent) !important; transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.btn-secondary { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }

.btn-secondary:hover, .btn-secondary:focus { background: var(--color-accent); color: var(--color-primary) !important; }

.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-text-muted); }

.btn-outline:hover, .btn-outline:focus { background: var(--color-text-muted); color: var(--color-background); }

.btn-outline-light {
  color: #fff !important;
  border-color: #fff !important;
  background: transparent !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}

/* Forms - Enhanced Contrast and Alignment */
.form-control, input[type='file'] { 
  background: var(--color-surface); border: 2px solid var(--color-border); color: var(--color-text);
  border-radius: var(--border-radius); padding: var(--space-md); transition: border-color var(--transition-fast);
  width: 100%; box-sizing: border-box; line-height: 1.5;
}

.form-control:focus, input[type='file']:focus { border-color: var(--color-accent); box-shadow: 0 0 0 0.2rem rgba(57, 255, 20, 0.25); outline: none; }

.form-control::placeholder { color: #9CA3AF; opacity: 1; } /* Better placeholder contrast */

.form-label { color: var(--color-text); font-weight: 500; margin-bottom: var(--space-sm); }

/* Form rows aligned */
.form-row, .form-group { display: flex; gap: var(--space-md); align-items: flex-end; flex-wrap: wrap; }

.form-row .form-control, .form-row input { flex: 1; min-width: 200px; }

/* Dropdown options spacing */
select option { padding: var(--space-md) var(--space-sm); }

/* Navigation - Centered, Spaced, No Cut-off */
.navbar-custom {
  background: rgba(26, 26, 26, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0; position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
}

.navbar-brand { 
  font-family: var(--font-family-headings); font-size: var(--font-size-lg); font-weight: 700;
  color: var(--color-text) !important; /* High contrast logo */
  text-shadow: 0 0 10px var(--color-accent); /* Glow for visibility */
}

.navbar-nav {
  display: flex; justify-content: center; flex: 1; gap: var(--space-lg);
  margin: 0 auto; padding: 0 var(--space-xl) 0 0; /* Right padding to prevent edge closeness */
}

.nav-link {
  color: var(--color-text-muted) !important; transition: color var(--transition-fast); position: relative;
  padding: var(--space-md) var(--space-lg); white-space: nowrap; min-width: fit-content;
  font-size: var(--font-size-base);
}

.nav-link:hover, .nav-link:focus, .nav-link.active { color: var(--color-accent) !important; }

.nav-link::after {
  content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--color-accent);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Cookie Banner - Fixed Spacing and Contrast */
.cookie-banner {
  background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-md);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-md);
}

.cookie-banner .btn { margin: 0 var(--space-sm); padding: var(--space-sm) var(--space-md); font-size: var(--font-size-sm); }

.cookie-banner a { color: var(--color-accent) !important; } /* Better link contrast */

/* Footer - Standardized Spacing, Alignment, Typography */
.footer {
  background: var(--color-primary); color: var(--color-text); padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border); font-size: var(--font-size-sm); line-height: 1.7;
}

.footer a { color: var(--color-link) !important; display: block; margin-bottom: var(--space-xs); }

.footer a:hover { color: var(--color-accent) !important; }

.footer .col, .footer-column {
  padding: 0 var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm);
  align-items: flex-start; /* Consistent left alignment */
  min-width: 200px;
}

.footer h5 { margin-bottom: var(--space-md); color: var(--color-text); font-size: var(--font-size-base); }

.footer ul { list-style: none; padding: 0; gap: var(--space-xs); }

.footer ul li { margin-bottom: var(--space-sm); line-height: 1.5; }

.footer .copyright {
  font-size: var(--font-size-sm); text-align: center; padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border); width: 100%; margin-top: var(--space-lg);
  color: var(--color-text-muted);
}

/* Social Icons - High Contrast, Spaced */
.social-icons, .follow-us { display: flex; gap: var(--space-md); align-items: center; }

.social-icons a, .follow-us a {
  color: var(--color-text) !important; font-size: var(--font-size-base); transition: color var(--transition-fast);
  text-decoration: none;
}

.social-icons a:hover, .follow-us a:hover { color: var(--color-accent) !important; }

/* Back Button Centered */
.back-button, .btn-back { display: block; margin: var(--space-2xl) auto 0; text-align: center; max-width: 200px; }

/* Filter Buttons - Consistent Style */
.filter-buttons { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-lg); }

.filter-btn {
  padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-border); background: transparent;
  color: var(--color-text); border-radius: var(--border-radius); transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover { background: var(--color-accent); color: var(--color-primary); border-color: var(--color-accent); }

.back-to-top {
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  background: var(--color-accent);
  color: var(--color-primary);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* Job Cards - Bootstrap Compatible */
.job-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.job-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1), rgba(57, 255, 20, 0.05));
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  border-radius: var(--border-radius);
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--color-accent);
}

.job-card:hover::before { opacity: 1; }

.job-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.job-card:hover .job-card__image {
  transform: scale(1.02);
}

.job-card__body { padding: var(--space-md); background: transparent; }

.job-card__body h5 {
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.job-card__body p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.job-card__cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
  color: var(--color-primary) !important;
  border: none;
  padding: var(--space-sm) var(--space-md);
  font-weight: 500;
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.job-card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(57, 255, 20, 0.3);
}

.job-item.is-hidden { display: none !important; }

@media (min-width: 768px) {
  .job-card__image {
    max-height: 260px;
  }

  .job-card__body {
    padding: var(--space-lg);
  }

  .job-card__body h5 {
    font-size: var(--font-size-lg);
  }

  .job-card__body p {
    font-size: var(--font-size-base);
  }

  .job-card__cta {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-base);
  }
}

@media (min-width: 1024px) {
  .job-card__image {
    max-height: 280px;
  }

  .job-card__body h5 {
    font-size: var(--font-size-xl);
  }

  .job-card__cta {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-md);
  }
}

/* Team Cards - Bootstrap Compatible */
.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
}

.team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.06), rgba(57, 255, 20, 0.03));
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  border-radius: var(--border-radius);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--color-accent);
}

.team-card:hover::before {
  opacity: 1;
}

.team-card .card-img-top {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.team-card:hover .card-img-top {
  transform: scale(1.02);
}

.team-card .card-body { padding: var(--space-md); background: transparent; }

.team-card .card-title {
  color: var(--color-accent);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.team-card .text-muted {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.team-card .card-text {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.team-card .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .team-card .card-img-top {
    max-height: 360px;
  }

  .team-card .card-body {
    padding: var(--space-lg);
  }

  .team-card .card-title {
    font-size: var(--font-size-lg);
  }

  .team-card .card-text {
    font-size: var(--font-size-base);
  }

  .team-card .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-base);
  }
}

@media (min-width: 1024px) {
  .team-card .card-img-top {
    max-height: 400px;
  }

  .team-card .card-title {
    font-size: var(--font-size-xl);
  }

  .team-card .btn {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-md);
  }
}

/* News Cards - Bootstrap Compatible */
.news-item article.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
}

.news-item article.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.05), rgba(123, 44, 191, 0.03));
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  border-radius: var(--border-radius);
}

.news-item article.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--color-accent);
}

.news-item article.card:hover::before {
  opacity: 1;
}

.news-item .card-img-top {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.news-item article.card:hover .card-img-top {
  transform: scale(1.02);
}

.news-item .card-body { padding: var(--space-md); background: transparent; }

.news-item .card-title {
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.news-item .card-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.news-item .text-muted {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.news-item .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .news-item .card-img-top {
    max-height: 260px;
  }

  .news-item .card-body {
    padding: var(--space-lg);
  }

  .news-item .card-title {
    font-size: var(--font-size-lg);
  }

  .news-item .card-text {
    font-size: var(--font-size-base);
  }

  .news-item .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-base);
  }
}

@media (min-width: 1024px) {
  .news-item .card-img-top {
    max-height: 280px;
  }

  .news-item .card-title {
    font-size: var(--font-size-xl);
  }

  .news-item .btn {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-md);
  }
}

/* Newsletter Form Aligned */
.newsletter-form { display: flex; align-items: center; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

.newsletter-form input { flex: 1; max-width: 300px; }

.newsletter-form .btn { white-space: nowrap; }

/* Quick Facts - Consistent Spacing */
.quick-facts { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-sm); }

.quick-facts dt { font-weight: 600; color: var(--color-text); margin: 0; padding: var(--space-xs) 0; }

.quick-facts dd { margin: 0; padding: var(--space-xs) 0; color: var(--color-text-muted); }

.quick-facts a { color: var(--color-accent) !important; }

/* Testimonials - Consistent Padding */
.testimonial-card { padding: var(--space-lg); margin-bottom: var(--space-lg); }

/* Our Nexus - Balanced Layout */
.nexus-section { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: center; }

.nexus-section .empty-space { min-height: 200px; background: var(--color-surface); border-radius: var(--border-radius); }

/* Latest Transmissions - Aligned Buttons */
.transmission-card .btn { margin-top: auto; align-self: flex-start; }

.transmission-card { display: flex; flex-direction: column; height: 100%; }

/* Data Stream - Aligned Buttons */
.news-card .buttons { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* Deep Dive - Aligned Actions */
.deep-dive-actions { display: flex; align-items: center; gap: var(--space-md); justify-content: flex-start; }

/* Join Conversation - Equal Heights */
.conversation-box { min-height: 150px; padding: var(--space-lg); display: flex; flex-direction: column; justify-content: space-between; }

.subscribe-section { text-align: center; margin-top: var(--space-lg); }

/* Hide Stray Elements */
.stray-text { display: none; } /* For 'compelling narratives.' if classed */

/* Particles */
#particles-js { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* Loader */
.loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--color-background); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity var(--transition-slow); }

.logo-loader { font-size: var(--font-size-xl); color: var(--color-text); animation: glitch 2s infinite; }

@keyframes glitch { 0%, 100% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } }

.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader .loader-content { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }

/* 5. Responsive - Mobile First */
@media (min-width: 768px) {
  .container-custom { padding: 0 var(--space-xl); }
  .hero-section { min-height: 100vh; }
  .navbar-nav { gap: var(--space-xl); padding-right: var(--space-2xl); }
  [class*='card'] { min-height: auto; }
  .nexus-section { grid-template-columns: 2fr 1fr; }
  .footer .row { gap: var(--space-xl); }
}

@media (min-width: 1024px) {
  .container-custom { max-width: 1200px; padding: 0 var(--space-2xl); }
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }

  /* Enhanced card styles for large screens */
  [class*='card'], .gamelift-card, .job-card, .testimonial-card {
    min-height: auto;
  }

  .card-img-top, img.card-image { max-height: 260px; }
  .card-body { padding: var(--space-lg); }
  .card-title { font-size: var(--font-size-lg); }
  .card-text { font-size: var(--font-size-base); }
}

@media (min-width: 1440px) {
  /* Ultra-wide desktop optimization */
  .container-custom { max-width: 1400px; }

  [class*='card'], .gamelift-card, .job-card, .testimonial-card {
    min-height: auto;
  }

  .card-img-top, img.card-image { max-height: 280px; }
  .card-body { padding: var(--space-xl); }
  .card-title { font-size: var(--font-size-xl); }
  .card-text { font-size: var(--font-size-md); }
}

@media (max-width: 767px) {
  body { padding-top: 60px; } /* Smaller navbar on mobile */
  .navbar-nav { flex-direction: column; gap: var(--space-md); text-align: center; padding: 0; }
  .btn { width: 100%; margin-bottom: var(--space-sm); }

  /* Mobile card optimizations - keeping Bootstrap compatibility */
  .card-img-top, img.card-image { max-height: 220px; }
  .card-body { padding: var(--space-md); }
  .card-title { font-size: var(--font-size-md); }
  .card-text { font-size: var(--font-size-sm); }

  /* Specific mobile adjustments for special cards */
  .job-card__image { max-height: 200px; }
  .team-card .card-img-top { max-height: 260px; }
  .news-item .card-img-top { max-height: 200px; }
  .game-card .card-img-top { max-height: 200px; }

  .footer .col { padding: 0 var(--space-sm); align-items: center; text-align: center; }
  .form-row { flex-direction: column; }
  .nexus-section { grid-template-columns: 1fr; }
  .filter-buttons { justify-content: center; }
  .cookie-banner { flex-direction: column; text-align: center; }
}

/* Micro-interactions */
* { transition: all var(--transition-fast); }

.btn:hover { transform: scale(1.05); }

.card:hover img { transform: scale(1.04); }

.card-img-top { transition: transform var(--transition-normal); overflow: hidden; }

*:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted) !important; }
.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.mb-0 { margin-bottom: 0 !important; }

.grid-custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }

.game-card.is-hidden { display: none !important; }

/* Game Card Styles - Bootstrap Compatible */
.game-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.08), rgba(57, 255, 20, 0.04));
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  border-radius: var(--border-radius);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--color-accent);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card .card-img-top {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.game-card:hover .card-img-top {
  transform: scale(1.02);
}

.game-card .card-body { padding: var(--space-md); background: transparent; }

.game-card .card-title {
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.game-card .card-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.game-card .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

@media (min-width: 768px) {
  .game-card .card-body {
    padding: var(--space-lg);
  }

  .game-card .card-title {
    font-size: var(--font-size-lg);
  }

  .game-card .card-text {
    font-size: var(--font-size-base);
  }

  .game-card .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-base);
  }
}

@media (min-width: 1024px) {
  .game-card .card-title {
    font-size: var(--font-size-xl);
  }

  .game-card .btn {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-md);
  }
}
.newsletter-feedback { margin-top: var(--space-md); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* Fade In */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn 0.6s ease-out; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Phone Number Non-Break */
.phone-nowrap { white-space: nowrap; }

/* Placeholder Capitalization - CSS can't fix text, but style consistently */
::placeholder { text-transform: lowercase; } /* Or adjust as needed */

/* Ensure no overflow in headers */
header { overflow: visible; padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

/* Vibrant Accents for Engagement */
.section-accent { background: linear-gradient(90deg, var(--color-surface), var(--color-accent-alt)); padding: var(--space-xl); border-radius: var(--border-radius-lg); margin: var(--space-lg) 0; }