/* Games Page Styles */

/* Hero Section */
.games-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Background Image */
.games-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.games-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blue Gradient - Top 30% vertical gradient from #0000FF 100% to #0000FF 0% */
.games-hero-gradient-blue {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30vh;
  background: linear-gradient(180deg, #0000FF 0%, rgba(0, 0, 255, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Black Gradient - Horizontal gradient from #000000 21% to #000000 80% (left to right) */
.games-hero-gradient-black {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.21) 0%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 3;
}

/* Hero Content */
.games-hero-content {
  position: relative;
  z-index: 4;
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.games-hero-content .container {
  max-width: none;
  margin: 0;
  padding-left: 60px;
  padding-right: 24px;
}

.games-hero-text {
  max-width: 900px;
  text-align: left;
}

.games-hero-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 24px;
}

.games-hero-subtitle {
  font-family: 'Archivo', sans-serif;
  font-weight: 300;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

/* Games Navigation */
.games-hero-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.games-hero-nav .container {
  max-width: none;
  margin: 0;
  padding-left: 60px;
  padding-right: 24px;
}

.games-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.games-nav-item {
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;

  transition: background 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.games-nav-item:hover {
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

.games-nav-item.active {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
  color: #fff;
}

.games-nav-item.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0px;
  right: 0px;
  height: 3px;
  background: #fff;
}

.coming-soon-badge {
  font-size: 14px;
  opacity: 0.7;
  font-weight: 300;
}

/* Games Navigation Dropdown */
.games-nav-dropdown {
  position: relative;
  display: inline-block;
}

.games-nav-dropdown-toggle svg {
  transition: transform 0.3s ease;
}

.games-nav-dropdown.active .games-nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.games-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-radius: 0 0 8px 8px;
  min-width: 140px;
  padding: 6px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  list-style: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}

.games-nav-dropdown.active .games-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: block;
}

/* Ensure dropdown items are always visible when dropdown is active */
.games-nav-dropdown.active .games-dropdown-menu li {
  display: block;
  visibility: visible;
}

.games-nav-dropdown.active .games-dropdown-menu .games-nav-item {
  display: block;
  visibility: visible;
  opacity: 1;
}

.games-dropdown-menu li {
  margin: 0;
  padding: 0;
}

.games-dropdown-menu .games-nav-item {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
  border-bottom: none;
}

.games-dropdown-menu .games-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.games-dropdown-menu .games-nav-item.active {
  background: rgba(255, 255, 255, 0.2);
}

.games-dropdown-menu .games-nav-item.active:after {
  display: none;
}

/* Disclaimer */
.games-hero-disclaimer {
  position: absolute;
  bottom: 54px;
  right: 24px;
  max-width: 840px;
  z-index: 6;
}

.games-hero-disclaimer p {
  font-family: 'Archivo', sans-serif;
  font-weight: 300;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .games-hero-content {
    padding-top: 100px;

  }
  
  .games-hero-content .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .games-hero-title {
    font-size: clamp(40px, 8vw, 70px);
  }

  .games-hero-subtitle {
    font-size: clamp(32px, 7vw, 56px);
  }

  /* Move navigation tabs above disclaimer on mobile */
  .games-hero-nav {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 6;
    padding-bottom: 0;
  }

  .games-hero-disclaimer {
    position: absolute;
    bottom: 90px;
    right: 24px;
    left: 24px;
    max-width: calc(100% - 48px);
    margin-bottom: 0;
    padding-bottom: 0;
    z-index: 5;
  }

  .games-hero-nav .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .games-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .games-nav-item {
    font-size: 14px;
    padding: 10px 16px;
    white-space: nowrap;
  }

  /* Hide Athletes tab on mobile */
  .games-nav > .games-nav-item:last-child,
  .games-nav > .games-nav-disabled {
    display: none !important;
  }

  .games-hero-disclaimer p {
    text-align: left;
    font-size: 11px;
    margin-bottom: 0;
  }

  /* Fix dropdown menu alignment on mobile */
  .games-dropdown-menu {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 0;
    right: auto;
    min-width: 120px;
    width: auto;
    border-radius: 0 0 8px 8px;
  }

  .games-dropdown-menu .games-nav-item {
    padding: 10px 16px;
    white-space: nowrap;
    display: block;
    width: 100%;
  }

  /* Adjust hero section to accommodate disclaimer above nav */
  .games-hero {
    display: flex;
    flex-direction: column;
  }

  .games-hero-content {
    flex: 1;
  }

  /* Container for disclaimer and nav on mobile */
  .games-hero::after {
    content: '';
    display: block;
    order: 2;
  }
}

/* FSP Games Content Section */
.games-content-section {
  display: block;
  background: #000;
}

.games-content-section[style*="display: none"] {
  display: none !important;
}

/* Override WBL CSS to ensure navbar uses Archivo font */
.site-header,
.site-header *,
.main-nav,
.main-nav *,
.header-inner,
.header-inner * {
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Competition Rules Popup Modal */
.rules-popup{
  position:fixed;
  inset:0;
  z-index:9999;
  opacity:0;
  visibility:hidden;
  transition:opacity 0.3s ease,visibility 0.3s ease;
  pointer-events:none;
}
.rules-popup[aria-hidden="false"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.rules-popup-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.rules-popup-content{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  background:#fff;
  border-radius:24px 24px 0 0;
  max-height:90vh;
  overflow-y:auto;
  transform:translateY(100%);
  transition:transform 0.4s cubic-bezier(0.4,0,0.2,1);
  padding:40px 24px 60px;
  box-shadow:0 -4px 24px rgba(0,0,0,0.15);
}
.rules-popup[aria-hidden="false"] .rules-popup-content{
  transform:translateY(0);
}
.rules-popup-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:32px;
  padding-bottom:24px;
  border-bottom:1px solid rgba(0,0,0,0.1);
  gap:24px;
}
.rules-popup-title-section{
  flex:1;
}
.rules-popup-title{
  font-size:32px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:#000;
  margin:0 0 8px 0;
}
.rules-popup-subtitle{
  font-size:18px;
  font-weight:400;
  line-height:1.5;
  color:#6A6D78;
  margin:0;
}
.rules-popup-close{
  background:transparent;
  border:none;
  cursor:pointer;
  padding:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#000;
  transition:opacity 0.2s ease;
  border-radius:8px;
  flex-shrink:0;
}
.rules-popup-close:hover{
  opacity:0.7;
  background:rgba(0,0,0,0.05);
}
.rules-popup-body{
  display:flex;
  flex-direction:column;
  gap:32px;
}
.rules-content{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.rules-section-title{
  font-size:24px;
  font-weight:600;
  line-height:1.2;
  color:#4D4D4D;
  margin:0;
}
.rules-placeholder{
  font-size:16px;
  font-weight:400;
  line-height:1.6;
  color:#6A6D78;
  margin:0;
  font-style:italic;
}
.rules-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.rules-list li{
  font-size:16px;
  font-weight:400;
  line-height:1.6;
  color:#4D4D4D;
  padding-left:24px;
  position:relative;
}
.rules-list li:before{
  content:"•";
  position:absolute;
  left:0;
  color:#0000FF;
  font-weight:600;
}
.rules-cta-section{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  padding-top:24px;
  border-top:1px solid rgba(0,0,0,0.1);
}
.btn-rules-cta-primary{
  background:#0000FF;
  color:#fff;
  font-size:16px;
  font-weight:600;
  line-height:1.25;
  letter-spacing:-0.01em;
  padding:12px 32px;
  border-radius:12px;
  text-decoration:none;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:opacity 0.2s ease, transform 0.2s ease;
  border:2px solid #0000FF;
}
.btn-rules-cta-primary:hover{
  opacity:0.9;
  transform:translateY(-2px);
}
.btn-rules-cta-secondary{
  background:transparent;
  color:#0000FF;
  font-size:16px;
  font-weight:600;
  line-height:1.25;
  letter-spacing:-0.01em;
  padding:12px 32px;
  border-radius:12px;
  text-decoration:none;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
  border:2px solid #0000FF;
}
.btn-rules-cta-secondary:hover{
  background:#0000FF;
  color:#fff;
  transform:translateY(-2px);
}

/* Rules Button Styles */
.bowler-btn-rules,
.squash-btn-rules,
.cricket-btn-rules,
.club-btn-rules{
  background:transparent;
  border:1px solid rgba(255,255,255,0.5);
  color:#fff;
  font-size:14px;
  font-weight:500;
  padding:8px 20px;
  border-radius:8px;
  cursor:pointer;
  transition:all 0.2s ease;
}
.bowler-btn-rules:hover,
.squash-btn-rules:hover,
.cricket-btn-rules:hover,
.club-btn-rules:hover{
  background:rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.8);
}

/* Responsive Rules Popup */
@media(max-width:960px){
  .rules-popup-content{
    padding:32px 20px 40px;
    border-radius:20px 20px 0 0;
  }
  .rules-popup-title{
    font-size:24px;
  }
  .rules-popup-subtitle{
    font-size:16px;
  }
  .rules-cta-section{
    flex-direction:column;
    width:100%;
  }
  .btn-rules-cta-primary,
  .btn-rules-cta-secondary{
    width:100%;
    max-width:280px;
  }
}
@media(max-width:640px){
  .rules-popup-content{
    padding:24px 16px 32px;
  }
  .rules-popup-title{
    font-size:20px;
  }
  .rules-popup-subtitle{
    font-size:15px;
  }
  .rules-section-title{
    font-size:20px;
  }
  .btn-rules-cta-primary,
  .btn-rules-cta-secondary{
    max-width:100%;
  }
}

@media (max-width: 480px){
  .games-hero-title{font-size:32px}
  .games-hero-subtitle{font-size:24px}
  .card-button{font-size:12px;padding:8px 16px}
  .card-description{font-size:13px}
  .grid-text-title{font-size:11px}
  .worlds-best-buttons{flex-direction:column;gap:12px}
  .btn-get-started-hero,.btn-download-app-hero{width:100%;font-size:14px}
}