/* ==== Global Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100vw;
}

html,
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: #0c1228; /* Midnight Spin BG */
  color: #dce8ff; /* Midnight Spin Text */
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
}

main {
  flex: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  color: #56d4f2; /* Midnight Spin Accent */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #3a86ff; /* Midnight Spin Secondary */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  color: #ffffff;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h4 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

img,
canvas,
iframe,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  box-sizing: border-box;
}

/* ==== Layout & Container ==== */
.cfa9nz-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==== Header ==== */
.cfa9nz-header {
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark background */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); /* For Safari */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

.cfa9nz-logo {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  gap: 10px;
}

.cfa9nz-logo span {
  background: linear-gradient(90deg, #5865f2, #56d4f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cfa9nz-desktop-nav ul {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.cfa9nz-desktop-nav a {
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: #dce8ff;
  opacity: 0.9;
}

.cfa9nz-desktop-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cfa9nz-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cfa9nz-age-flag {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
  display: flex;
  align-items: center;
}

.cfa9nz-hamburger {
  display: none; /* Hidden by default, shown in media queries */
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.4rem;
  cursor: pointer;
  color: #dce8ff;
  transition: all 0.3s ease;
}

.cfa9nz-hamburger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.cfa9nz-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-20px);
  opacity: 0;
}

.cfa9nz-mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
}

.cfa9nz-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cfa9nz-mobile-menu a {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(86, 212, 242, 0.5);
}

.cfa9nz-mobile-menu a:hover {
  color: #56d4f2;
}

.cfa9nz-close-menu {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem; /* Increased size */
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 10000;
}

.cfa9nz-close-menu:hover {
  color: #56d4f2;
}

#cfa9nz-disclosure-bar {
  background: #120820;
  color: #ce93d8;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.76em;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #6a1b9a;
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  top: 60px; /* Below the header */
  z-index: 999;
}

/* ==== Hero Section ==== */
.cfa9nz-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  padding: 140px 5%;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 600px; /* Ensure enough space for visual */
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.cfa9nz-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(12, 18, 40, 0.9), rgba(12, 18, 40, 0.6));
  z-index: 1;
}

.cfa9nz-hero-text {
  position: relative;
  z-index: 2;
  padding-right: 40px;
}

.cfa9nz-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 24px;
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(86, 212, 242, 0.4);
}

.cfa9nz-hero p {
  font-size: 1.2rem;
  margin-bottom: 32px;
  opacity: 0.95;
}

.cfa9nz-hero-image {
  position: relative;
  display: flex;
  justify-content: flex-end;
  z-index: 2;
  height: 600px; /* Fixed height for consistency */
}

.cfa9nz-hero-image img {
  width: 100%;
  height: 100%; /* Fill the container */
  object-fit: cover;
  border-radius: 40px 0 40px 0;
  box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.3);
}

.cfa9nz-hero-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

/* ==== Buttons ==== */
.cfa9nz-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #5865f2, #56d4f2);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(86, 212, 242, 0.4);
}

.cfa9nz-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 35px rgba(86, 212, 242, 0.6);
  color: #ffffff;
}

/* ==== Game Grid ==== */
.cfa9nz-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px 30px;
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
}

.cfa9nz-game-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); /* For Safari */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Push content down */
}

.cfa9nz-game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.cfa9nz-game-card-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for all cards */
  overflow: hidden;
  position: relative; /* For potential overlays */
}

.cfa9nz-game-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Ensure it takes up space */
  border-radius: 16px; /* Slightly rounded corners for the image */
  margin: -30px 20px 20px 20px; /* Positioning and shadow offset */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cfa9nz-game-card-content {
  padding: 20px;
  text-align: center;
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Align content to bottom */
}

.cfa9nz-game-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(86, 212, 242, 0.3);
}

.cfa9nz-game-card-description {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

/* ==== Content Section Styling ==== */
.cfa9nz-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
}

.cfa9nz-content-section h2,
.cfa9nz-content-section h3 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
}

.cfa9nz-content-section p {
  font-size: 1.1rem;
  text-align: justify;
}

/* ==== Footer ==== */
.cfa9nz-footer {
  padding: 50px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: auto; /* Push footer to bottom */
}

.cfa9nz-footer h3 {
  margin-bottom: 20px;
  opacity: 0.8;
  font-size: 1.5rem;
}

.cfa9nz-footer ul {
  display: flex;
  gap: 25px;
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid rgba(150, 150, 150, 0.2);
  padding-bottom: 20px;
  width: 100%;
}

.cfa9nz-footer ul li a {
  color: #dce8ff;
  opacity: 0.9;
  font-weight: 500;
  font-size: 1rem;
}

.cfa9nz-footer ul li a:hover {
  color: #56d4f2;
  text-decoration: underline;
}

.cfa9nz-footer-contact span {
  color: #dce8ff;
  opacity: 0.85;
  font-size: 0.95em;
}

.cfa9nz-footer h4 {
  margin: 0 0 8px 0;
  color: #ffcc00;
  font-size: 1.2em;
}

.cfa9nz-footer p {
  margin: 0;
  opacity: 0.9;
  font-size: 1em;
}

.cfa9nz-footer p a {
  color: inherit; /* Inherit color from parent */
  text-decoration: underline;
}

.cfa9nz-footer p a:hover {
  color: #56d4f2;
}

.cfa9nz-copyright {
  margin-top: 15px;
  text-align: center;
  font-size: 0.85em;
  opacity: 0.75;
  line-height: 1.55;
}

.cfa9nz-copyright a {
  color: inherit;
  text-decoration: underline;
}

/* ==== Responsiveness & Mobile Fixes ==== */

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .cfa9nz-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 80px 5% 60px !important;
    gap: 40px !important;
    min-height: unset !important;
    background-attachment: scroll !important;
  }

  .cfa9nz-hero-text {
    padding-right: 0 !important;
    text-align: center;
  }

  .cfa9nz-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem) !important;
  }

  .cfa9nz-hero p {
    font-size: 1.1rem !important;
  }

  .cfa9nz-hero-image {
    height: 450px !important; /* Adjust for smaller screens */
    display: flex !important; /* Keep image visible but centered */
    justify-content: center;
  }

  .cfa9nz-hero-image img {
    border-radius: 30px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
  }

  .cfa9nz-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 24px !important;
    padding: 0 16px !important;
  }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body {
    font-size: 15px;
    overflow-x: hidden;
  }

  .cfa9nz-header {
    padding: 12px 16px !important;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .cfa9nz-desktop-nav {
    display: none !important;
  }

  .cfa9nz-hamburger {
    display: flex !important;
  }

  .cfa9nz-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 60px 16px 40px !important;
    text-align: center !important;
    gap: 24px !important;
  }

  .cfa9nz-hero h1,
  .cfa9nz-hero-text h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }

  .cfa9nz-hero p,
  .cfa9nz-hero-text p {
    font-size: 1rem !important;
    margin-bottom: 24px !important;
  }

  .cfa9nz-hero-image {
    display: none !important; /* Hide hero image on mobile to simplify */
  }

  .cfa9nz-game-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
    margin-top: 60px !important;
  }

  .cfa9nz-game-card {
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05) !important;
  }

  .cfa9nz-game-card-image-wrapper img {
    height: 140px !important;
    border-radius: 10px !important;
    margin: -20px 10px 10px 10px !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
  }

  .cfa9nz-game-card-content {
    padding: 15px !important;
  }

  .cfa9nz-game-card-title {
    font-size: 1.2rem !important;
  }

  .cfa9nz-btn {
    padding: 12px 24px !important;
    font-size: 0.85rem !important;
  }

  .cfa9nz-content-section {
    padding: 40px 16px !important;
    font-size: 1rem !important;
    text-align: left; /* Better for mobile */
  }

  .cfa9nz-content-section h2,
  .cfa9nz-content-section h3 {
    font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
  }

  .cfa9nz-footer {
    padding: 30px 16px !important;
    font-size: 0.85rem !important;
  }

  .cfa9nz-footer ul {
    flex-direction: column !important;
    gap: 10px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 20px !important;
  }

  .cfa9nz-footer ul li {
    margin-bottom: 5px;
  }

  .cfa9nz-footer p {
    font-size: 0.95em !important;
    text-align: left !important;
  }

  .cfa9nz-copyright {
    font-size: 0.78em !important;
  }

  #cfa9nz-disclosure-bar {
    padding: 6px 12px !important;
    font-size: 0.7rem !important;
    top: 50px; /* Adjust based on header height */
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  .cfa9nz-hero h1,
  .cfa9nz-hero-text h1 {
    font-size: clamp(1.4rem, 8vw, 2rem) !important;
  }

  .cfa9nz-hero p {
    font-size: 0.95rem !important;
  }

  .cfa9nz-game-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .cfa9nz-game-card-image-wrapper img {
    height: 180px !important;
  }

  .cfa9nz-btn {
    padding: 10px 20px !important;
    font-size: 0.8rem !important;
  }
}

/* === DESKTOP ONLY: Hide hamburger, show nav === */
@media (min-width: 769px) {
  .cfa9nz-hamburger {
    display: none !important;
  }
  .cfa9nz-desktop-nav {
    display: flex !important;
  }
  .cfa9nz-mobile-menu {
    display: none !important; /* Ensure mobile menu is hidden on desktop */
  }
}

/* ==== Specific class overrides for premium look ==== */
.cfa9nz-hero {
  background-image: url('hero-bgy.jpg'); /* Example stylish background */
}

/* Ensure button hover effects are punchy */
.cfa9nz-btn {
  background: linear-gradient(90deg, #5865f2, #56d4f2);
  box-shadow: 0 8px 25px rgba(86, 212, 242, 0.4);
}

.cfa9nz-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 35px rgba(86, 212, 242, 0.6);
}

/* Subtle glow effect for interactive elements */
.cfa9nz-game-card:hover {
  box-shadow: 0 20px 40px rgba(86, 212, 242, 0.3);
}

/* Premium feel for headers */
.cfa9nz-header {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}