/* style/about.css */

/* Variables and Base Styles */
:root {
  --primary-color: #FF4500; /* Orange Red */
  --secondary-color: #1E90FF; /* Dodger Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212; /* Body background from shared.css */
  --card-bg-dark: rgba(255, 255, 255, 0.08); /* Slightly transparent white on dark background */
  --border-color-dark: rgba(255, 255, 255, 0.15);
  --shadow-dark: rgba(0, 0, 0, 0.3);
}

.page-about {
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Ensure consistency with body background */
  line-height: 1.6;
  font-family: 'Arial', sans-serif;
  padding-bottom: 60px; /* General bottom padding for the page */
}

/* Fixed Navigation Bar Spacing - MUST BE HERE */
.page-about__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on actual fixed header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #000000 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

.page-about__section {
  padding: 60px 0;
  position: relative;
}

.page-about__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Section */
.page-about__hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.page-about__main-title {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-about__hero-description {
  font-size: 18px;
  color: #cccccc;
  max-width: 800px;
  margin-bottom: 40px;
}

.page-about__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width for responsive buttons */
  max-width: 500px;
  margin: 0 auto;
}

.page-about__cta-button,
.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-dark);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't exceed container width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-about__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-about__btn-primary:hover {
  background: #e63900;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-dark);
}

.page-about__btn-secondary {
  background: var(--secondary-color);
  color: var(--text-light);
}

.page-about__btn-secondary:hover {
  background: #1472cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-dark);
}

/* Brand Introduction Section */
.page-about__brand-introduction {
  background-color: var(--bg-dark);
  padding-top: 40px; /* Adjust if needed */
}

.page-about__brand-overview {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
}

.page-about__brand-image {
  flex: 1;
  max-width: 50%;
  border-radius: 12px;
  box-shadow: 0 8px 25px var(--shadow-dark);
  object-fit: cover;
  min-height: 300px; /* Ensure minimum height */
}

.page-about__brand-text {
  flex: 1;
  color: #e0e0e0;
  font-size: 17px;
}

.page-about__brand-text p {
  margin-bottom: 15px;
}

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

.page-about__feature-item {
  background-color: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-dark);
  border: 1px solid var(--border-color-dark);
}

.page-about__feature-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-about__feature-item p,
.page-about__value-list {
  color: #c0c0c0;
  font-size: 16px;
}

.page-about__value-list {
  list-style: none;
  padding: 0;
}

.page-about__value-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-about__value-list li::before {
  content: '✓';
  color: var(--secondary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Why Choose Us Section */
.page-about__dark-section {
  background-color: #0d0d0d; /* Slightly darker background for contrast */
  color: var(--text-light);
}

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

.page-about__advantage-card {
  background-color: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px var(--shadow-dark);
  border: 1px solid var(--border-color-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-about__advantage-icon {
  width: 250px; /* Example size, ensuring >= 200px */
  height: 150px;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-about__card-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-about__advantage-card p {
  color: #c0c0c0;
  font-size: 16px;
}

.page-about__cta-bottom {
  text-align: center;
  margin-top: 40px;
}

/* Responsible Gambling Section */
.page-about__responsible-gambling {
  background-color: var(--bg-dark);
}

.page-about__responsible-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: #e0e0e0;
  font-size: 17px;
}

.page-about__responsible-content p {
  margin-bottom: 20px;
}

/* FAQ Section */
.page-about__faq-section {
  background-color: #0d0d0d;
}

.page-about__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow-dark);
  border: 1px solid var(--border-color-dark);
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--card-bg-dark);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.page-about__faq-question:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-light);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-about__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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect from '+' */
}

.page-about__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 25px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--border-color-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important for priority, large enough value */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-about__faq-answer p {
  color: #c0c0c0;
  font-size: 16px;
  margin-bottom: 15px;
}

.page-about__btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-about__btn-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Blog Section */
.page-about__blog-section {
  background-color: var(--bg-dark);
}

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

.page-about__blog-item {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-dark);
  border: 1px solid var(--border-color-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-about__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px var(--shadow-dark);
}

.page-about__blog-item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-about__blog-item-content {
  padding: 20px;
}

.page-about__blog-item-title {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-about__blog-item-title a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-about__blog-item-title a:hover {
  color: var(--secondary-color);
}

.page-about__blog-item-excerpt {
  font-size: 15px;
  color: #c0c0c0;
  margin-bottom: 15px;
  line-height: 1.5;
}

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

/* General image responsive styles */
.page-about img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-about__main-title {
    font-size: 40px;
  }
  .page-about__section-title {
    font-size: 30px;
  }
  .page-about__brand-overview {
    flex-direction: column;
  }
  .page-about__brand-image {
    max-width: 80%;
    margin-bottom: 30px;
  }
  .page-about__brand-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Fixed Navigation Bar Spacing - MOBILE */
  .page-about__hero-section {
    padding-top: 100px !important; /* Mobile: Adjust based on actual fixed header height */
    padding-bottom: 40px;
  }

  .page-about__container {
    padding: 0 15px; /* Adjust padding for mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-about__hero-description {
    font-size: 16px;
  }

  .page-about__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }

  .page-about__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding: 0 15px;
  }

  /* 🚨 Buttons responsive adaptation - MUST BE HERE */
  .page-about__cta-button,
  .page-about__btn-primary,
  .page-about__btn-secondary,
  .page-about a[class*="button"],
  .page-about a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-about__brand-image {
    max-width: 100%;
    min-height: 200px;
  }

  .page-about__feature-item,
  .page-about__advantage-card,
  .page-about__blog-item {
    padding: 20px;
  }

  .page-about__feature-title,
  .page-about__card-title {
    font-size: 20px;
  }

  .page-about__faq-question {
    padding: 15px 20px;
  }
  .page-about__faq-question h3 {
    font-size: 16px;
  }
  .page-about__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-about__faq-answer {
    padding: 0 20px;
  }
  .page-about__faq-item.active .page-about__faq-answer {
    padding: 15px 20px !important;
  }

  .page-about__blog-list {
    grid-template-columns: 1fr;
  }
  .page-about__blog-item-image {
    height: 180px;
  }
  .page-about__blog-item-title {
    font-size: 18px;
  }

  /* 🚨 General image responsive styles - MUST BE HERE */
  .page-about img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* 🚨 All image containers responsive styles - MUST BE HERE */
  .page-about__section,
  .page-about__container,
  .page-about__brand-overview,
  .page-about__brand-text,
  .page-about__feature-item,
  .page-about__advantage-card,
  .page-about__blog-item,
  .page-about__blog-item-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }
  .page-about__brand-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-about__advantage-icon {
    width: 200px !important; /* Min size for mobile */
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-about__main-title {
    font-size: 28px;
  }
  .page-about__section-title {
    font-size: 24px;
  }
  .page-about__hero-description {
    font-size: 15px;
  }
}

/* Ensure contrast for text on dark backgrounds */
.page-about h1, .page-about h2, .page-about h3, .page-about h4, .page-about h5, .page-about h6 {
  color: var(--text-light); /* Default for headings */
}

.page-about__dark-section .page-about__section-title {
  color: var(--primary-color); /* Maintain brand color for titles */
}

.page-about__dark-section .page-about__advantage-card {
  background-color: rgba(255, 255, 255, 0.08); /* Light transparency on darker background */
  color: var(--text-light);
}

.page-about__dark-section .page-about__advantage-card p {
  color: #c0c0c0;
}

.page-about__responsible-content p {
  color: #e0e0e0;
}