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

/* Variables for consistency */
:root {
  --page-index-latest-games-primary-color: #0047AB;
  --page-index-latest-games-secondary-color: #FFD700;
  --page-index-latest-games-text-light: #ffffff;
  --page-index-latest-games-text-dark: #333333;
  --page-index-latest-games-background-dark: #121212;
  --page-index-latest-games-card-background: rgba(255, 255, 255, 0.08);
  --page-index-latest-games-border-color: rgba(255, 255, 255, 0.15);
  --page-index-latest-games-shadow-color: rgba(0, 0, 0, 0.3);
}

.page-index-latest-games {
  font-family: 'Arial', sans-serif;
  color: var(--page-index-latest-games-text-light); /* Light text on dark body background */
  background-color: var(--page-index-latest-games-background-dark); /* Inherited from body via shared.css */
  line-height: 1.6;
  padding-top: 120px; /* Adjust for fixed header on desktop */
}

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

.page-index-latest-games__hero-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--page-index-latest-games-primary-color) 0%, #002d6b 100%);
  color: var(--page-index-latest-games-text-light);
  position: relative;
  overflow: hidden;
}

.page-index-latest-games__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('[GALLERY:bg:Top88,abstract_gaming_pattern,hero_background]') no-repeat center center/cover;
  opacity: 0.1;
  z-index: 0;
}

.page-index-latest-games__hero-section .page-index-latest-games__container {
  position: relative;
  z-index: 1;
}

.page-index-latest-games__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 2px 2px 4px var(--page-index-latest-games-shadow-color);
}

.page-index-latest-games__hero-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px;
  opacity: 0.9;
}

.page-index-latest-games__hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-index-latest-games__hero-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--page-index-latest-games-shadow-color);
  border: none;
}

.page-index-latest-games__hero-button--primary {
  background: var(--page-index-latest-games-secondary-color);
  color: var(--page-index-latest-games-text-dark);
}

.page-index-latest-games__hero-button--primary:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index-latest-games__hero-button--secondary {
  background: transparent;
  color: var(--page-index-latest-games-text-light);
  border: 2px solid var(--page-index-latest-games-secondary-color);
}

.page-index-latest-games__hero-button--secondary:hover {
  background: var(--page-index-latest-games-secondary-color);
  color: var(--page-index-latest-games-text-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index-latest-games__content-section {
  padding: 60px 0;
}

.page-index-latest-games__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--page-index-latest-games-text-light);
  text-shadow: 1px 1px 3px var(--page-index-latest-games-shadow-color);
}

.page-index-latest-games__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
  opacity: 0.85;
}

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

.page-index-latest-games__category-card,
.page-index-latest-games__game-card {
  background: var(--page-index-latest-games-card-background);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--page-index-latest-games-shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--page-index-latest-games-text-light);
  border: 1px solid var(--page-index-latest-games-border-color);
}

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

.page-index-latest-games__category-image,
.page-index-latest-games__game-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--page-index-latest-games-border-color);
}

.page-index-latest-games__category-title,
.page-index-latest-games__game-title {
  font-size: 1.4em;
  font-weight: 600;
  margin: 20px 20px 10px;
  color: var(--page-index-latest-games-secondary-color);
}

.page-index-latest-games__category-title a,
.page-index-latest-games__game-title a {
  color: var(--page-index-latest-games-secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index-latest-games__category-title a:hover,
.page-index-latest-games__game-title a:hover {
  color: #fff;
}

.page-index-latest-games__category-text,
.page-index-latest-games__game-excerpt {
  font-size: 1em;
  margin: 0 20px 20px;
  flex-grow: 1;
  opacity: 0.8;
}

.page-index-latest-games__category-button,
.page-index-latest-games__game-button {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 12px 20px;
  background: var(--page-index-latest-games-primary-color);
  color: var(--page-index-latest-games-text-light);
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px var(--page-index-latest-games-shadow-color);
}

.page-index-latest-games__category-button:hover,
.page-index-latest-games__game-button:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.page-index-latest-games__game-card .page-index-latest-games__game-info {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-index-latest-games__why-top88 {
  background-color: #1a1a1a;
}

.page-index-latest-games__advantage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-index-latest-games__advantage-item {
  text-align: center;
  background: var(--page-index-latest-games-card-background);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--page-index-latest-games-shadow-color);
  border: 1px solid var(--page-index-latest-games-border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-latest-games__advantage-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-index-latest-games__advantage-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px var(--page-index-latest-games-secondary-color)); /* Allowed as it's not changing image color */
}

.page-index-latest-games__advantage-title {
  font-size: 1.5em;
  color: var(--page-index-latest-games-secondary-color);
  margin-bottom: 15px;
}

.page-index-latest-games__advantage-text {
  font-size: 1em;
  opacity: 0.8;
}

.page-index-latest-games__promotion-cta-section {
  background: linear-gradient(90deg, #002d6b 0%, var(--page-index-latest-games-primary-color) 100%);
  text-align: center;
  padding: 80px 0;
  color: var(--page-index-latest-games-text-light);
}

.page-index-latest-games__promotion-cta-content {
  max-width: 900px;
}

.page-index-latest-games__promotion-cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 4px var(--page-index-latest-games-shadow-color);
}

.page-index-latest-games__promotion-cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  opacity: 0.9;
}

.page-index-latest-games__promotion-cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--page-index-latest-games-secondary-color);
  color: var(--page-index-latest-games-text-dark);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.3em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px var(--page-index-latest-games-shadow-color);
  border: none;
}

.page-index-latest-games__promotion-cta-button:hover {
  background: #e6c200;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-index-latest-games .highlight {
  color: var(--page-index-latest-games-secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index-latest-games__hero-title {
    font-size: 2.8em;
  }

  .page-index-latest-games__section-title {
    font-size: 2.2em;
  }

  .page-index-latest-games__promotion-cta-title {
    font-size: 2.4em;
  }
}

@media (max-width: 768px) {
  .page-index-latest-games {
    padding-top: 100px !important; /* Adjust for fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-index-latest-games__hero-section {
    padding: 60px 0;
  }

  .page-index-latest-games__hero-title {
    font-size: 2.2em;
  }

  .page-index-latest-games__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-index-latest-games__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-index-latest-games__hero-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index-latest-games__content-section {
    padding: 40px 0;
  }

  .page-index-latest-games__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-index-latest-games__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-index-latest-games__category-grid,
  .page-index-latest-games__game-list,
  .page-index-latest-games__advantage-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index-latest-games__category-card,
  .page-index-latest-games__game-card,
  .page-index-latest-games__advantage-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px;
  }

  .page-index-latest-games__category-image,
  .page-index-latest-games__game-image {
    height: 180px;
  }

  .page-index-latest-games__category-title,
  .page-index-latest-games__game-title {
    font-size: 1.2em;
    margin: 15px 0 8px;
  }

  .page-index-latest-games__category-text,
  .page-index-latest-games__game-excerpt {
    font-size: 0.9em;
    margin: 0 0 15px;
  }

  .page-index-latest-games__category-button,
  .page-index-latest-games__game-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto 10px !important;
    padding: 10px 15px !important;
    font-size: 0.9em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index-latest-games__advantage-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  .page-index-latest-games__advantage-title {
    font-size: 1.3em;
  }

  .page-index-latest-games__promotion-cta-section {
    padding: 60px 0;
  }

  .page-index-latest-games__promotion-cta-title {
    font-size: 2em;
  }

  .page-index-latest-games__promotion-cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-index-latest-games__promotion-cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 30px !important;
    font-size: 1.1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* Ensure all images are responsive */
.page-index-latest-games img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .page-index-latest-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index-latest-games__hero-section .page-index-latest-games__container,
  .page-index-latest-games__content-section .page-index-latest-games__container,
  .page-index-latest-games__promotion-cta-section .page-index-latest-games__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }
}

/* Smart contrast assurance for dark background */
.page-index-latest-games__hero-section,
.page-index-latest-games__content-section,
.page-index-latest-games__promotion-cta-section {
  color: var(--page-index-latest-games-text-light); /* Light text on dark background */
}

.page-index-latest-games__category-card,
.page-index-latest-games__game-card,
.page-index-latest-games__advantage-item {
  background: var(--page-index-latest-games-card-background); /* Slightly transparent dark card */
  color: var(--page-index-latest-games-text-light); /* Light text on card */
}

.page-index-latest-games p,
.page-index-latest-games li {
  color: var(--page-index-latest-games-text-light); /* Ensure general text is light */
}