/* style/games.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000000; /* Black */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #0d0d0d; /* Assuming a dark background from shared.css var(--dark-bg-1) */
  --card-bg-light: #ffffff;
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --border-color: #333333;
  --hover-color: #e0b800;
  --red-highlight: #ff0000;
}

.page-games {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--background-dark); /* Ensure this matches shared.css */
  padding-top: 80px; /* Adjust for fixed header, if any. HERO section handles its own top. */
}

/* HERO Section */
.page-games__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-top: -80px; /* Offset the main padding-top if HERO starts at very top */
}

.page-games__hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.page-games__hero-image {
  width: 100%;
  margin: 0;
}

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

/* Logo Carousel Section */
.page-games__logo-carousel-section {
  width: 100%;
  padding: 40px 20px;
  background: var(--secondary-color); /* Dark background for logos */
}

.page-games__logo-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.page-games__logo-carousel {
  display: flex;
  gap: 20px;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 10px 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none; /* Disable user interaction for carousel */
}

.page-games__logo-carousel::-webkit-scrollbar {
  display: none;
}

.page-games__logo-item {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg-light); /* White background for logo items */
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto; /* Allow clicks on logo items */
}

.page-games__logo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.page-games__logo-item a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 15px;
  box-sizing: border-box;
  pointer-events: auto; /* Allow clicks on links inside logo items */
}

.page-games__logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Games Section */
.page-games__games-section {
  width: 100%;
  padding: 60px 20px;
  background: var(--background-dark);
}

.page-games__games-container {
  max-width: 1400px;
  margin: 0 auto;
}

.page-games__games-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

.page-games__featured-game-area {
  width: 100%;
}

.page-games__featured-game-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 20px 0;
  color: var(--primary-color); /* Yellow text */
  text-align: left;
}

.page-games__featured-game {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg-dark); /* Dark card background */
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-games__featured-game:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.page-games__featured-game-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-games__featured-game-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.page-games__featured-game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-games__games-grid-area {
  width: 100%;
}

.page-games__games-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.page-games__games-tab {
  background: none;
  border: none;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #999999;
  transition: color 0.3s ease;
  text-decoration: none;
  position: relative;
}

.page-games__games-tab:hover {
  color: var(--text-light);
}

.page-games__games-tab.active {
  color: var(--primary-color); /* Yellow for active tab */
  text-decoration: underline;
}

.page-games__games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  display: none;
}

.page-games__games-grid.active {
  display: grid;
}

.page-games__game-card {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg-dark); /* Dark card background */
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-games__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.page-games__game-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-games__game-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.page-games__game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-games__game-card-title {
  font-size: 15px;
  font-weight: 500;
  margin: 10px 0 15px 0;
  padding: 0 8px;
  color: var(--text-light); /* Light text for dark card */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

/* General Section Styles */
.page-games__section {
  padding: 60px 20px;
  background: var(--background-dark);
  color: var(--text-light);
}

.page-games__section:nth-of-type(even) {
  background: var(--secondary-color);
}

.page-games__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-games__heading {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
}

.page-games__paragraph {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--text-light);
}

.page-games__paragraph strong {
  color: var(--primary-color);
}

.page-games__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-games__btn-primary,
.page-games__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
}

.page-games__btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color); /* Dark text on gold button */
  border: 2px solid var(--primary-color);
}

.page-games__btn-primary:hover {
  background: var(--hover-color);
  border-color: var(--hover-color);
  color: var(--secondary-color);
}

.page-games__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-games__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.page-games__btn-sm {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  background: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.page-games__btn-sm:hover {
  background: var(--hover-color);
}

/* Quick Access Section */
.page-games__access-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-games__access-link {
  display: block;
  background: var(--card-bg-dark);
  color: var(--text-light);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-games__access-link:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Core Games Section */
.page-games__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-games__category-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-games__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-games__category-image {
  width: 100%;
  height: 200px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.page-games__category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-games__category-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-games__category-description {
  font-size: 15px;
  color: #cccccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-games__promo-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-games__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-games__promo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

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

.page-games__promo-description {
  font-size: 15px;
  color: #cccccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Security & CS Section */
.page-games__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-games__feature-item {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-games__feature-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-games__feature-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-games__feature-description {
  font-size: 15px;
  color: #cccccc;
}

.page-games__contact-info {
  margin-top: 50px;
  text-align: center;
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--primary-color);
}

.page-games__contact-info p {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-games__contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-games__contact-info li {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-games__contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-games__contact-info a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

/* FAQ Section */
.page-games__faq-list {
  margin-top: 40px;
}

.page-games__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg-dark);
  border: 1px solid var(--border-color);
}

.page-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.page-games__faq-question:hover {
  background: #1a1a1a;
}

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

.page-games__faq-toggle {
  font-size: 28px;
  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: 30px;
  height: 30px;
}

.page-games__faq-item.active .page-games__faq-question {
  background: #1a1a1a;
}

.page-games__faq-item.active .page-games__faq-toggle {
  color: var(--text-light);
  transform: rotate(180deg);
}

.page-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, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
}

.page-games__faq-item.active .page-games__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: var(--card-bg-dark);
  border-radius: 0 0 8px 8px;
  color: #cccccc;
}

.page-games__faq-answer p {
  margin: 0;
  padding: 0;
  color: #cccccc;
}

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

.page-games__blog-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.page-games__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-games__blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-games__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  line-height: 1.4;
  flex-grow: 1;
}

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

.page-games__blog-title a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

.page-games__blog-excerpt {
  font-size: 15px;
  color: #cccccc;
  margin: 0 20px 15px 20px;
}

.page-games__blog-date {
  font-size: 13px;
  color: #999999;
  margin: 0 20px 20px 20px;
  display: block;
}

.page-games__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .page-games__container {
    padding: 0 15px;
  }
  .page-games__heading {
    font-size: 28px;
  }
}

@media (max-width: 1024px) {
  .page-games__games-layout {
    grid-template-columns: 1fr;
  }
  .page-games__featured-game-image {
    height: 400px;
  }
  .page-games__games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-games__category-card, .page-games__promo-card, .page-games__feature-item, .page-games__blog-card {
    padding: 20px;
  }
  .page-games__category-title {
    font-size: 22px;
  }
  .page-games__promo-title {
    font-size: 20px;
  }
  .page-games__blog-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-games {
    padding-top: 100px; /* Mobile fixed header adjustment */
  }
  .page-games__hero-section {
    margin-top: -100px; /* Offset for mobile padding-top */
  }
  .page-games__section {
    padding: 40px 15px;
  }
  .page-games__heading {
    font-size: 24px;
    margin-bottom: 25px;
  }
  .page-games__paragraph {
    font-size: 15px;
  }
  .page-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-games__btn-primary, .page-games__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-games__logo-carousel-section {
    padding: 30px 15px;
  }
  .page-games__logo-item {
    width: 150px;
    height: 150px;
  }
  .page-games__games-section {
    padding: 40px 15px;
  }
  .page-games__featured-game-title {
    font-size: 22px;
  }
  .page-games__featured-game-image {
    height: 300px;
  }
  .page-games__games-tabs {
    gap: 15px;
  }
  .page-games__games-tab {
    font-size: 17px;
  }
  .page-games__games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-games__game-card-image {
    height: 150px;
  }
  .page-games__game-card-title {
    font-size: 13px;
    margin: 8px 0 10px 0;
    padding: 0 5px;
  }
  .page-games__access-links {
    flex-direction: column;
    gap: 10px;
  }
  .page-games__access-link {
    width: 100%;
  }
  .page-games__game-categories, .page-games__promo-grid, .page-games__features-grid, .page-games__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-games__category-image {
    height: 180px;
  }
  .page-games__promo-card img {
    height: 160px;
  }
  .page-games__feature-item img {
    width: 80px;
    height: 80px;
  }
  .page-games__contact-info {
    padding: 20px;
  }
  .page-games__faq-question h3 {
    font-size: 16px;
  }
  .page-games__faq-toggle {
    font-size: 24px;
    width: 26px;
    height: 26px;
  }
  .page-games__faq-answer {
    padding: 0 15px;
  }
  .page-games__faq-item.active .page-games__faq-answer {
    padding: 15px !important;
  }
  .page-games__blog-card img {
    height: 180px;
  }
  .page-games__blog-title {
    font-size: 17px;
    margin: 15px 15px 8px 15px;
  }
  .page-games__blog-excerpt, .page-games__blog-date {
    font-size: 14px;
    margin: 0 15px 15px 15px;
  }

  /* Mobile image forced adaptation */
  .page-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-games__section,
  .page-games__container,
  .page-games__logo-carousel-container,
  .page-games__games-container,
  .page-games__featured-game,
  .page-games__game-card,
  .page-games__category-card,
  .page-games__promo-card,
  .page-games__feature-item,
  .page-games__blog-card,
  .page-games__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-games__games-grid {
    grid-template-columns: 1fr;
  }
  .page-games__logo-item {
    width: 120px;
    height: 120px;
  }
  .page-games__featured-game-image {
    height: 250px;
  }
  .page-games__game-card-image {
    height: 120px;
  }
  .page-games__game-card-title {
    font-size: 12px;
  }
}