/* style/esports.css */

/* Variables */
:root {
  --primary-color: #1A202C; /* Deep Midnight Blue/Black */
  --secondary-color: #FFD700; /* Gold */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --bg-light: #f8f9fa;
  --border-color: #333333; /* Darker border for dark theme */
}

/* Base styles for the page content, ensuring contrast with body background */
.page-esports {
  color: var(--text-light); /* Light text for dark body background */
  background-color: var(--bg-dark); /* Ensure sections have background, not transparent */
  padding-top: 120px; /* Space for fixed header on desktop */
}

/* General Container */
.page-esports__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section Styling */
.page-esports__hero-section,
.page-esports__introduction-section,
.page-esports__games-section,
.page-esports__betting-guide-section,
.page-esports__promotions-section,
.page-esports__features-section,
.page-esports__faq-section,
.page-esports__final-cta-section {
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}

.page-esports__dark-section {
  background-color: var(--primary-color); /* Use primary brand color for dark sections */
  color: var(--text-light);
}

.page-esports__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--secondary-color); /* Gold for titles */
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.page-esports__main-title {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Gold for H1 */
  line-height: 1.2;
}

.page-esports__description,
.page-esports__text-block {
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.85); /* Slightly muted white */
}

.page-esports__text-block {
  text-align: left; /* Adjust for more natural reading flow */
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.page-esports__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-esports__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Responsive button */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-esports__btn-primary {
  background: var(--secondary-color); /* Gold background */
  color: var(--primary-color); /* Dark text for contrast */
}

.page-esports__btn-primary:hover {
  background: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-esports__btn-secondary {
  background: transparent;
  color: var(--secondary-color); /* Gold text */
  border: 2px solid var(--secondary-color);
}

.page-esports__btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Image Styling */
.page-esports__image-wrapper {
  margin: 40px auto;
  max-width: 900px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-esports__image {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Game List Section */
.page-esports__game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-esports__game-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly visible card background */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
}

.page-esports__game-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-esports__game-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 3px solid var(--secondary-color);
  padding: 10px;
  background-color: rgba(255, 215, 0, 0.1);
}

.page-esports__game-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-esports__game-description {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-esports__card-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-esports__card-button:hover {
  background: #e6c200;
  transform: translateY(-1px);
}

/* Betting Guide Section */
.page-esports__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-esports__step-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
}

.page-esports__step-icon {
  width: 60px;
  height: 60px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-esports__step-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-esports__step-description {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Promotions Section */
.page-esports__promo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-esports__promo-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
}

.page-esports__promo-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-esports__promo-image {
  width: 100%;
  max-width: 250px; /* Adjust image size for promos */
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-esports__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-esports__promo-description {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Features Section */
.page-esports__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-esports__feature-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  color: var(--text-light);
}

.page-esports__feature-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-esports__feature-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-esports__feature-description {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* FAQ Section */
.page-esports__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ container style */
.page-esports__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* FAQ default state - answer hidden */
.page-esports__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px; /* Adjusted for consistency */
  opacity: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* FAQ expanded state - ⚠️ Use !important and sufficiently large max-height */
.page-esports__faq-item.active .page-esports__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use !important to ensure priority, value large enough for content */
  padding: 20px !important; /* Adjusted for consistency */
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-esports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1); /* Darker background for question */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-esports__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-esports__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Question title style */
.page-esports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--secondary-color); /* Gold for FAQ questions */
  pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-esports__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-esports__faq-item.active .page-esports__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect, or keep as '-' */
  color: var(--secondary-color);
}

.page-esports__app-download-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 15px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}