/* === Trang chủ - index.css === */

/* === Body & Main Content General Styles (based on shared.css dark background) === */
.page-index {
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

/* === Module 0: Hero Section === */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, shared.css handles body padding */
  max-width: 1330px;
  margin: 0 auto;
}
.page-index__hero-image {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}
.page-index__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* === Module 1: H1 Title + SEO Links === */
.page-index__title-section {
  max-width: 1330px;
  margin: 20px auto;
  padding: 0 20px;
  text-align: center;
}
.page-index__page-title {
  color: #F2FFF6; /* Text Main */
  margin: 0 0 15px;
  text-align: center;
}
/* H1 font-size is not explicitly set to avoid overriding */
.page-index__title-main {
  display: inline-block;
  position: relative;
  padding: 0 15px;
}
.page-index__title-main::before,
.page-index__title-main::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 2px;
  background-color: #F2C14E; /* Gold */
  transform: translateY(-50%);
}
.page-index__title-main::before {
  left: -25px;
}
.page-index__title-main::after {
  right: -25px;
}
.page-index__seo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  color: #A7D9B8; /* Text Secondary */
  padding: 10px 0;
}
.page-index__seo-links a {
  color: #57E38D; /* Glow */
  text-decoration: underline;
}
.page-index__seo-link-item {
  display: inline-block;
}

/* === Module 2: Scrollable Long Text === */
.page-index__home-content {
  border: 1px solid #F2C14E; /* Gold */
  border-radius: 10px;
  padding: 0 10px;
  height: 650px;
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #13994A #0A4B2C; /* Thumb and Track */
  max-width: 1330px;
  margin: 20px auto;
  background-color: #11271B; /* Card BG */
}
.page-index__home-content::-webkit-scrollbar {
  width: 8px;
}
.page-index__home-content::-webkit-scrollbar-track {
  background: #0A4B2C; /* Deep Green */
  border-radius: 10px;
}
.page-index__home-content::-webkit-scrollbar-thumb {
  background-color: #13994A; /* Button color */
  border-radius: 10px;
  border: 2px solid #0A4B2C;
}
.page-index__home-content blockquote {
  border-left: 4px solid #F2C14E; /* Gold */
  margin: 20px 0;
  padding-left: 15px;
  color: #A7D9B8; /* Text Secondary */
}
.page-index__home-content blockquote p {
  margin: 0;
  color: #A7D9B8;
}
.page-index__home-content blockquote a {
  color: #57E38D;
  text-decoration: underline;
}
.page-index__home-content-title {
  background: linear-gradient(-225deg, #28a745 0%, #44107a 29%, #ff1361 67%, #fff800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: page-index-gradient 5s linear infinite;
  margin: 30px 0 20px;
  font-size: 28px;
  text-align: center;
}
@keyframes page-index-gradient {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.page-index__home-content p {
  color: #F2FFF6; /* Text Main */
  margin: 0 0 15px;
  line-height: 1.6;
}
.page-index__home-content h3 {
  color: #F2C14E; /* Gold */
  margin: 25px 0 10px;
  font-size: 22px;
}
.page-index__home-content ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #F2FFF6; /* Text Main */
}
.page-index__home-content ul li {
  margin-bottom: 5px;
  color: #F2FFF6;
}
.page-index__home-content ul li a {
  color: #57E38D;
  text-decoration: underline;
}
.page-index__wp-caption {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
}
.page-index__wp-caption img {
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.page-index__wp-caption-text {
  color: #A7D9B8; /* Text Secondary */
  font-size: 14px;
  margin-top: 10px;
}

/* === Module 3–6 Shared: Dark Section & Gold Title Line === */
.page-index__row-games,
.page-index__row-sport,
.page-index__row-coop {
  background-color: #08160F; /* Background */
  padding: 40px 20px;
  max-width: 1330px;
  margin: 20px auto;
  box-sizing: border-box;
  border-radius: 10px;
}
.page-index__games-title,
.page-index__sport-title,
.page-index__coop-title {
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 24px;
  position: relative;
  padding-bottom: 10px;
  font-size: 28px;
}
.page-index__games-title::after,
.page-index__sport-title::after,
.page-index__coop-title::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: #F2C14E; /* Gold */
  margin: 8px auto 0;
}

/* === Module 3: Game Slider === */
.page-index__slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0 10px; /* For prev/next buttons not to be cut */
}
.page-index__slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  transition: transform 0.4s ease;
  padding-bottom: 10px; /* Space for scrollbar on mobile */
}
.page-index__game-slide {
  flex: 0 0 205px; /* Width of card + some buffer */
  max-width: 205px;
  min-width: 0;
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2E7A4E; /* Border */
}
.page-index__game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px;
}
.page-index__game-card-image {
  border-radius: 8px;
  overflow: hidden;
  height: 146px;
  margin-bottom: 8px;
}
.page-index__game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-index__game-card h4 {
  color: #F2C14E; /* Gold */
  margin: 0;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-index__slider-prev,
.page-index__slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(17, 168, 78, 0.7); /* Main color with opacity */
  border: none;
  color: #fff;
  font-size: 20px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 5px;
  z-index: 10;
}
.page-index__slider-prev {
  left: 0;
}
.page-index__slider-next {
  right: 0;
}
.page-index__slider-prev::before { content: '‹'; }
.page-index__slider-next::before { content: '›'; }

/* === Module 4: Partner Fixed 6 Columns (No Scroll) === */
.page-index__banners-top-wrapper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: visible; /* Ensure no hidden content */
  padding: 0 10px;
}
.page-index__banner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  border: 1px solid #2E7A4E; /* Border */
  padding: 10px 5px;
}
.page-index__banner-item a {
  display: block;
  width: 100%;
  max-width: 120px; /* Desktop visual size */
  margin: 0 auto;
  text-align: center;
}
.page-index__banner-item img {
  width: 100%;
  
  height: auto;
  
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* === Module 5: Blog Cards Equal Height Grid === */
.page-index__blog-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch; /* Ensures equal height for items in the same row */
  padding: 0 10px;
}
.page-index__blog-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2E7A4E; /* Border */
  height: 100%;
  transition: border-color 0.3s ease;
}
.page-index__blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.page-index__blog-card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  flex-shrink: 0;
}
.page-index__blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-index__blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* Allows body to grow and push button to bottom */
  padding: 15px;
  min-height: 0;
}
.page-index__blog-card-body h5 {
  color: #F2C14E; /* Gold */
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
}
.page-index__blog-card-body p {
  color: #A7D9B8; /* Text Secondary */
  margin: 0 0 12px;
  flex: 1 1 auto; /* Allows paragraph to grow and push button to bottom */
  font-size: 14px;
  line-height: 1.5;
}
.page-index__btn-outline {
  margin-top: auto; /* Pushes button to the bottom */
  align-self: flex-start;
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid #13994A; /* Button color */
  border-radius: 5px;
  color: #13994A;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.page-index__btn-outline:hover {
  background-color: #13994A;
  color: #fff;
}
.page-index__blog-card:hover {
  border-color: #57E38D; /* Glow */
}
.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(17, 168, 78, 0.9); /* Main color with opacity */
  color: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}
.page-index__post-date span:first-child { display: block; font-weight: bold; font-size: 14px; }

/* === Module 6: Latest Blog Slider === */
.page-index__blog-slider {
  position: relative;
  overflow: hidden;
  padding: 0 10px;
}
.page-index__blog-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
  padding-bottom: 10px; /* Space for scrollbar on mobile */
}
.page-index__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* (100% - 2*gap) / 3 */
  max-width: calc(33.333% - 14px);
  min-width: 0;
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2E7A4E; /* Border */
  transition: border-color 0.3s ease;
}
.page-index__blog-slide:hover {
  border-color: #57E38D; /* Glow */
}
.page-index__blog-slide-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px;
}
.page-index__blog-slide-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 10px;
}
.page-index__blog-slide-link h5 {
  color: #F2C14E; /* Gold */
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.4;
}
.page-index__blog-slide-link p {
  color: #A7D9B8; /* Text Secondary */
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(17, 168, 78, 0.7); /* Main color with opacity */
  border: none;
  color: #fff;
  font-size: 20px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 5px;
  z-index: 10;
}
.page-index__blog-slider-prev {
  left: 0;
}
.page-index__blog-slider-next {
  right: 0;
}
.page-index__blog-slider-prev::before { content: '‹'; }
.page-index__blog-slider-next::before { content: '›'; }

/* === General Image and Button Responsive === */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__btn-container,
.page-index__button-group {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* === Mobile Responsive (max-width: 768px) === */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-index__hero-section {
    padding-top: 10px;
    margin: 0;
  }
  .page-index__title-section {
    padding: 0 15px;
  }
  .page-index__page-title {
    font-size: 24px;
  }
  .page-index__title-main::before,
  .page-index__title-main::after {
    width: 15px;
  }
  .page-index__title-main::before { left: -10px; }
  .page-index__title-main::after { right: -10px; }
  .page-index__home-content {
    height: 500px; /* Adjust height for mobile */
    margin: 15px auto;
    padding: 0 8px;
  }
  .page-index__home-content-title {
    font-size: 22px;
    margin: 20px 0 15px;
  }
  .page-index__home-content h3 {
    font-size: 18px;
  }
  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop {
    padding: 30px 15px;
    margin: 15px auto;
  }
  .page-index__games-title,
  .page-index__sport-title,
  .page-index__coop-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .page-index__slider-wrapper {
    padding: 0;
  }
  .page-index__slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Ensure scrollbar is visible */
  }
  .page-index__game-slide {
    scroll-snap-align: start;
    flex: 0 0 160px;
    max-width: 160px;
  }
  .page-index__slider-prev,
  .page-index__slider-next {
    display: none; /* Hide buttons on mobile for swipe */
  }
  .page-index__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    padding: 0;
  }
  .page-index__banner-item {
    padding: 8px 3px;
  }
  .page-index__banner-item img {
    
    
  }
  .page-index__blog-masonry {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .page-index__blog-card-body h5 {
    font-size: 16px;
  }
  .page-index__blog-card-body p {
    font-size: 13px;
  }
  .page-index__blog-slider {
    padding: 0;
  }
  .page-index__blog-slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
  }
  .page-index__blog-slide {
    scroll-snap-align: start;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide buttons on mobile for swipe */
  }
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__hero-section,
  .page-index__title-section,
  .page-index__home-content,
  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop,
  .page-index__banner-item,
  .page-index__blog-card,
  .page-index__blog-slide,
  .page-index__slider-wrapper,
  .page-index__blog-slider,
  .page-index__banners-top-wrapper,
  .page-index__blog-masonry {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__btn-container,
  .page-index__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-index__cta-buttons {
    display: flex;
    flex-direction: column; /* Mobile vertical arrangement */
  }
}

/* Tablet Responsive (min-width: 769px and max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-index__hero-section,
  .page-index__title-section,
  .page-index__home-content,
  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__home-content {
    height: 600px;
  }
  .page-index__games-title,
  .page-index__sport-title,
  .page-index__coop-title {
    font-size: 26px;
  }
  .page-index__slider-wrapper {
    padding: 0 10px;
  }
  .page-index__game-slide {
    flex: 0 0 180px;
    max-width: 180px;
  }
  .page-index__banners-top-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 700px;
  }
  .page-index__blog-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-index__blog-slide {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}