/* style/index.css */

/* General Styles for .page-index */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: #B71C1C; /* Background */
}

.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-index__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #FFD86A; /* Gold-like for titles */
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__section-description {
  font-size: 18px;
  color: #FFF5E1;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css handles body padding-top */
  margin-top: 0;
  width: 100%;
  overflow: hidden;
}

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

.page-index__hero-image {
  width: 100%;
  margin: 0;
  line-height: 0;
}

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

/* Products Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #7A0E0E; /* Deep Red */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Front 4 occupy 4 cols, last 2 occupy 2 cols */
  gap: 20px;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
}

.page-index__products-grid--small {
  grid-template-columns: repeat(4, 1fr);
}

.page-index__products-grid--large {
  grid-template-columns: repeat(2, 1fr);
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for product card */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
  justify-self: center; /* Center cards in grid cells */
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

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

.page-index__product-card-image {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  line-height: 0;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Preserve aspect ratio */
  display: block;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__main-title {
  font-size: clamp(28px, 3.5vw, 48px); /* Responsive font size */
  font-weight: 700;
  color: #FFD86A;
  margin-bottom: 25px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__description {
  font-size: 18px;
  color: #FFF5E1;
  max-width: 900px;
  margin: 0 auto 50px auto;
  line-height: 1.8;
}

.page-index__intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__feature-item {
  background: #D32F2F; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #F2B544; /* Border */
}

.page-index__feature-title {
  font-size: 24px;
  color: #FFD86A;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index__feature-item p {
  font-size: 16px;
  color: #FFF5E1;
  line-height: 1.7;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  text-align: center;
  background: #B71C1C; /* Background */
}

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

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button custom color */
  color: #7A0E0E; /* Deep Red for text to ensure contrast */
  border: none;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: transparent;
  color: #FFD86A;
  border: 2px solid #FFD86A;
}

.page-index__btn-secondary:hover {
  background: #FFD86A;
  color: #7A0E0E;
  transform: translateY(-2px);
}

/* Games Section */
.page-index__games-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__game-card {
  background: #D32F2F; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #F2B544; /* Border */
}

.page-index__game-title {
  font-size: 22px;
  color: #FFD86A;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index__game-card p {
  font-size: 16px;
  color: #FFF5E1;
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-index__read-more-link {
  color: #FFD86A;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-index__read-more-link:hover {
  color: #FFCC66;
  text-decoration: underline;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__promo-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #F2B544; /* Border */
  text-align: left;
}

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

.page-index__promo-content {
  padding: 20px;
}

.page-index__promo-title {
  font-size: 22px;
  color: #FFD86A;
  margin: 20px 20px 10px 20px;
  font-weight: 600;
}

.page-index__promo-card p {
  font-size: 16px;
  color: #FFF5E1;
  line-height: 1.7;
  margin: 0 20px 20px 20px;
}

.page-index__promo-card .page-index__btn-primary {
  margin: 0 20px 20px 20px;
  width: calc(100% - 40px);
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__security-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 50px;
}

.page-index__security-text {
  text-align: left;
}

.page-index__security-title {
  font-size: 26px;
  color: #FFD86A;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index__security-text p {
  font-size: 16px;
  color: #FFF5E1;
  line-height: 1.7;
  margin-bottom: 25px;
}

.page-index__security-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-index__btn-contact {
  margin-top: 20px;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #F2B544; /* Border */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #FFD86A;
  font-weight: 600;
  font-size: 18px;
}

details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: #C91F17; /* Main color for hover */
}

.page-index__faq-qtext {
  flex: 1;
  text-align: left;
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #FFD86A;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 25px;
  background: #7A0E0E; /* Deep Red */
  border-radius: 0 0 10px 10px;
  color: #FFF5E1;
  font-size: 16px;
  line-height: 1.7;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__blog-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #F2B544; /* Border */
  text-align: left;
}

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

.page-index__blog-content {
  padding: 20px;
}

.page-index__blog-title {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-index__blog-title a {
  color: #FFD86A;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #FFCC66;
  text-decoration: underline;
}

.page-index__blog-meta {
  font-size: 14px;
  color: #FFCC66; /* Glow color */
  margin-bottom: 15px;
}

.page-index__blog-card p {
  font-size: 16px;
  color: #FFF5E1;
  line-height: 1.7;
  margin-bottom: 20px;
}

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

/* Default dark/light background sections */
.page-index__dark-section {
  background-color: #B71C1C; /* Background */
  color: #FFF5E1;
}

.page-index__light-bg {
  background-color: #7A0E0E; /* Deep Red */
  color: #FFF5E1;
}

/* Global image responsiveness for content area */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__container {
    padding: 30px 15px;
  }

  .page-index__section-title {
    font-size: 32px;
  }

  .page-index__section-description {
    font-size: 17px;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack products grids vertically */
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__intro-features {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-index__games-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-index__promotions-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-index__security-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-index__access-links {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-index__hero-section {
    padding-top: 10px !important;
  }

  /* Products Section */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .page-index__products-container {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid */
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 100%; /* Adjust for 2-column layout */
  }

  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Each large card on its own row */
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 100%;
  }

  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* General content sections */
  .page-index__container {
    padding: 20px 15px;
  }

  .page-index__section-title {
    font-size: 28px;
  }

  .page-index__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index__main-title {
    font-size: 26px; /* Smaller for mobile h1 */
    margin-bottom: 20px;
  }

  .page-index__description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-index__intro-features,
  .page-index__games-list,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .page-index__feature-item,
  .page-index__game-card,
  .page-index__promo-card,
  .page-index__blog-card {
    padding: 25px;
  }

  .page-index__feature-title,
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__blog-title {
    font-size: 20px;
  }

  .page-index__feature-item p,
  .page-index__game-card p,
  .page-index__promo-card p,
  .page-index__blog-card p {
    font-size: 15px;
  }

  /* Buttons and button containers */
  .page-index__access-links {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to container */
    overflow: hidden;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-index__btn-contact {
    width: 100% !important;
  }

  /* Security & Support Section */
  .page-index__security-title {
    font-size: 22px;
  }

  .page-index__security-text p {
    font-size: 15px;
  }

  /* FAQ Section */
  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }

  .page-index__faq-toggle {
    font-size: 24px;
    width: 25px;
  }

  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 20px;
    font-size: 15px;
  }

  .page-index__view-all-button .page-index__btn-primary {
    width: calc(100% - 30px) !important;
    margin: 0 15px;
  }

  /* All images within .page-index */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* All sections/cards/containers to prevent overflow */
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__intro-section,
  .page-index__quick-access-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
}