/* style/index.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* Base styles for the page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* Default text color, will be adjusted by intelligent contrast */
  background-color: var(--deep-navy); /* Base background color from shared.css */
}

.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: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color); /* Default, overridden by specific section */
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #555555; /* Default, overridden by specific section */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Color variables from custom palette */
:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main-color: #F3F8FF;
  --text-secondary-color: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy: #08162B; /* Body background color */
}

/* Intelligent Contrast System */
.page-index__dark-bg {
  background-color: var(--deep-navy); /* Or other dark background */
  color: var(--text-main-color); /* White text on dark background */
}

.page-index__dark-bg .page-index__section-title {
  color: var(--text-main-color);
}

.page-index__dark-bg .page-index__section-description {
  color: var(--text-secondary-color);
}

.page-index__light-bg {
  background-color: #ffffff; /* Example light background */
  color: #333333; /* Dark text on light background */
}

.page-index__light-bg .page-index__section-title {
  color: var(--primary-color); /* Use primary color for titles on light bg */
}

.page-index__light-bg .page-index__section-description {
  color: #555555;
}

/* HERO main image area */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--deep-navy); /* Match body background for seamless transition */
  overflow: hidden;
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Important for flex items */
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 800;
  color: var(--text-main-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary-color);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border: none;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Module 1: Intro Section */
.page-index__intro-section {
  padding: 80px 0;
}

.page-index__intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-index__intro-text p {
  margin-bottom: 15px;
  font-size: 17px;
  color: #333333;
}

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

/* Module 2: Quick Links */
.page-index__quick-links-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__quick-link-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__quick-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--secondary-color);
}

.page-index__quick-link-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text-main-color);
}

.page-index__quick-link-card p {
  font-size: 15px;
  color: var(--text-secondary-color);
}

/* Module 3: Games Section */
.page-index__games-section {
  padding: 80px 0;
}

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #333333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-index__game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__game-card h3 {
  font-size: 22px;
  padding: 20px 20px 10px;
  color: var(--primary-color);
}

.page-index__game-card p {
  font-size: 15px;
  padding: 0 20px 20px;
  color: #555555;
  flex-grow: 1; /* Ensures content pushes to bottom */
}

/* Module 4: 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: 40px;
}

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

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

.page-index__promo-card img {
  width: 100%;
   /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__promo-card h3 {
  font-size: 20px;
  padding: 20px 20px 10px;
  color: var(--text-main-color);
}

.page-index__promo-card p {
  font-size: 15px;
  padding: 0 20px 20px;
  color: var(--text-secondary-color);
  flex-grow: 1;
}

.page-index__button-group {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.page-index__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Module 5: Security Section */
.page-index__security-section {
  padding: 80px 0;
}

.page-index__security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted min-width for 200x200 images */
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-index__security-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px; /* Adjusted padding */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__security-item img {
  width: 200px; /* Enforce minimum display size */
  height: 200px; /* Enforce minimum display size */
  margin-bottom: 20px;
  object-fit: contain; /* Ensure image fits without cropping */
  display: block;
}

.page-index__security-item h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-index__security-item p {
  font-size: 15px;
  color: #555555;
}

/* Module 6: FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
}
details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: rgba(var(--primary-color-rgb, 17, 59, 122), 0.1); /* Use rgba for hover effect */
}
.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}
.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: rgba(16, 35, 63, 0.5); /* Slightly lighter background for answer based on card-bg */
  border-radius: 0 0 5px 5px;
}
.page-index__faq-item .page-index__faq-answer p {
  color: var(--text-secondary-color);
  font-size: 16px;
}

/* Module 7: Blog Section */
.page-index__blog-section {
  padding: 80px 0;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #333333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-index__blog-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-index__blog-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-index__blog-content p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 15px;
}

.page-index__blog-date {
  font-size: 14px;
  color: #888888;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-index__hero-content p {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }
  .page-index__section-title {
    font-size: 30px;
  }
  .page-index__section-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__hero-image img {
    border-radius: 4px;
  }
  
  .page-index__hero-content h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.3;
  }
  .page-index__hero-content p {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    margin-bottom: 25px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__intro-section,
  .page-index__quick-links-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__security-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 0;
  }

  .page-index__container {
    padding: 20px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__intro-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .page-index__intro-image {
    order: -1; /* Image appears above text on mobile */
  }

  .page-index__section-title {
    font-size: 24px;
    margin-bottom: 15px;
  }
  .page-index__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-index__quick-links-grid,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-index__game-card img,
  .page-index__promo-card img,
  .page-index__blog-card img {
    
  }

  .page-index__game-card h3,
  .page-index__promo-card h3,
  .page-index__blog-content h3 {
    font-size: 18px;
  }

  .page-index__game-card p,
  .page-index__promo-card p,
  .page-index__blog-content p {
    font-size: 14px;
  }

  .page-index__security-item img {
    width: 200px; /* Adhering to minimum 200px display size */
    height: 200px; /* Adhering to minimum 200px display size */
  }

  .page-index__security-item h3 {
    font-size: 18px;
  }

  .page-index__faq-question {
    padding: 15px;
  }
  .page-index__faq-qtext {
    font-size: 16px;
  }
  .page-index__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  .page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }
  .page-index__faq-item .page-index__faq-answer p {
    font-size: 14px;
  }

  .page-index__button-group {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__button-group a {
    width: 100%;
  }

  /* Image responsive rules */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section, /* Ensuring all section-level containers are responsive */
  .page-index__card, /* Ensuring all card-level containers are responsive */
  .page-index__container { /* Ensuring main content container is responsive */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure no filter on images */
.page-index img {
  filter: none !important;
}