/* style/index-popular-games.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #000000;
  --background-light: #f5f5f5;
  --card-background: rgba(255, 255, 255, 0.1);
  --border-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

.page-index-popular-games {
  color: var(--text-light); /* Body background is dark, so text is light */
  background-color: var(--background-dark);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-top: 120px; /* Adjust for fixed header on desktop */
}

.page-index-popular-games__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Video Section */
.page-index-popular-games__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Desktop: Adjust for navigation bar height */
  background: var(--background-dark);
}

.page-index-popular-games__video-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index-popular-games__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.page-index-popular-games__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.page-index-popular-games__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
}

.page-index-popular-games__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-index-popular-games__video-link:hover .page-index-popular-games__video-overlay {
  opacity: 1;
}

.page-index-popular-games__video-click-hint {
  color: var(--text-light);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(255, 215, 0, 0.8); /* Primary color with transparency */
  border-radius: 5px;
  white-space: nowrap;
}

.page-index-popular-games__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-index-popular-games__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-light);
  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.3);
  border: none;
  cursor: pointer;
}

.page-index-popular-games__play-now-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.page-index-popular-games__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* H1 Title Section */
.page-index-popular-games__title-section {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #a00000 100%);
  color: var(--text-light);
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.5);
}

.page-index-popular-games__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  line-height: 1.2;
}

.page-index-popular-games__title-description {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.5;
  color: #f0f0f0;
}

.page-index-popular-games__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-index-popular-games__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.page-index-popular-games__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-dark);
}

.page-index-popular-games__cta-button--primary:hover {
  background: darken(var(--primary-color), 10%); /* This won't work in pure CSS, use a slightly darker hex */
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.page-index-popular-games__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-index-popular-games__cta-button--secondary:hover {
  background: darken(var(--secondary-color), 10%);
  background: #7a0000;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* General Section Styling */
.page-index-popular-games__section-title {
  font-size: 38px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.page-index-popular-games__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
  color: #cccccc;
}

/* Games Overview Section */
.page-index-popular-games__games-overview {
  padding: 80px 0;
  background: var(--background-dark);
}

.page-index-popular-games__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-index-popular-games__game-card {
  background: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.page-index-popular-games__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__game-card-title {
  font-size: 24px;
  margin: 20px 15px 10px;
  color: var(--primary-color);
}

.page-index-popular-games__game-card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index-popular-games__game-card-title a:hover {
  color: var(--text-light);
}

.page-index-popular-games__game-card-description {
  font-size: 16px;
  color: #cccccc;
  padding: 0 15px 20px;
}

.page-index-popular-games__game-card-button {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-dark);
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-index-popular-games__game-card-button:hover {
  background: var(--secondary-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Why Choose Us Section */
.page-index-popular-games__why-choose-us {
  padding: 80px 0;
  background: linear-gradient(to right, #1a1a1a, #000000);
}

.page-index-popular-games__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index-popular-games__feature-item {
  background: var(--card-background);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.page-index-popular-games__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-index-popular-games__feature-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index-popular-games__feature-description {
  font-size: 16px;
  color: #cccccc;
}

/* FAQ Section */
.page-index-popular-games__faq-section {
  padding: 80px 0;
  background: var(--background-dark);
}

.page-index-popular-games__faq-list {
  margin-top: 50px;
}

.page-index-popular-games__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-index-popular-games__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-index-popular-games__faq-item.active .page-index-popular-games__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--card-background);
  border-radius: 0 0 5px 5px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-top: none;
  color: #cccccc;
}

.page-index-popular-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-background);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index-popular-games__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
}

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

.page-index-popular-games__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

.page-index-popular-games__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index-popular-games__faq-item.active .page-index-popular-games__faq-toggle {
  color: var(--text-light);
  transform: rotate(45deg); /* Change from + to x visually */
}

/* Brand Section */
.page-index-popular-games__brand-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0d0d0d 0%, var(--background-dark) 100%);
}

.page-index-popular-games__brand-title {
  font-size: 38px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.page-index-popular-games__brand-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index-popular-games__brand-item {
  background: var(--card-background);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__brand-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.page-index-popular-games__brand-item h3 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

.page-index-popular-games__brand-item p {
  font-size: 16px;
  color: #cccccc;
  line-height: 1.7;
  text-align: justify;
}

.page-index-popular-games__brand-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Blog Section */
.page-index-popular-games__blog-section {
  padding: 80px 0;
  background: var(--background-dark);
}

.page-index-popular-games__blog-title {
  font-size: 38px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.page-index-popular-games__blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index-popular-games__blog-item {
  background: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.page-index-popular-games__blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index-popular-games__blog-item-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index-popular-games__blog-item-title {
  font-size: 20px;
  margin: 15px 15px 10px;
  color: var(--primary-color);
  line-height: 1.4;
}

.page-index-popular-games__blog-item-title:hover {
  color: var(--text-light);
}

.page-index-popular-games__blog-item-excerpt {
  font-size: 15px;
  color: #cccccc;
  padding: 0 15px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.page-index-popular-games__blog-item-date {
  display: block;
  font-size: 14px;
  color: #888888;
  padding: 0 15px 15px;
  text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index-popular-games__main-title {
    font-size: 42px;
  }
  .page-index-popular-games__section-title, .page-index-popular-games__blog-title, .page-index-popular-games__brand-title {
    font-size: 32px;
  }
  .page-index-popular-games__title-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games {
    padding-top: 100px; /* Adjust for fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-index-popular-games__video-section {
    padding-top: 10px !important; /* Mobile: Adjust for mobile navigation bar height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-index-popular-games__video-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  
  .page-index-popular-games__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index-popular-games__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    overflow: hidden !important;
  }
  
  .page-index-popular-games__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    object-fit: contain;
  }
  
  .page-index-popular-games__video-cta {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index-popular-games__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index-popular-games__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  .page-index-popular-games__title-section {
    padding: 40px 15px;
  }

  .page-index-popular-games__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-index-popular-games__title-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index-popular-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  
  .page-index-popular-games__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-index-popular-games__container {
    padding: 0 15px;
  }

  .page-index-popular-games__section-title, .page-index-popular-games__blog-title, .page-index-popular-games__brand-title {
    font-size: 28px;
  }
  
  .page-index-popular-games__section-description {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .page-index-popular-games__games-overview, .page-index-popular-games__why-choose-us, .page-index-popular-games__faq-section, .page-index-popular-games__brand-section, .page-index-popular-games__blog-section {
    padding: 50px 0;
  }

  .page-index-popular-games__game-grid, .page-index-popular-games__features-grid, .page-index-popular-games__brand-content, .page-index-popular-games__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index-popular-games__game-card-title {
    font-size: 20px;
  }
  
  .page-index-popular-games__game-card-description {
    font-size: 15px;
  }

  .page-index-popular-games__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-index-popular-games__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-index-popular-games__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-index-popular-games__faq-answer {
    padding: 0 15px;
  }
  
  .page-index-popular-games__faq-item.active .page-index-popular-games__faq-answer {
    padding: 15px !important;
  }
  
  .page-index-popular-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index-popular-games__game-card-image, .page-index-popular-games__brand-image, .page-index-popular-games__blog-item-image {
    height: 150px;
  }

  .page-index-popular-games__feature-icon {
    width: 60px;
    height: 60px;
  }
}