:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f0f0f0; /* From shared.css body */
  --bg-white: #ffffff;
  --border-light: #e0e0e0;
}

.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body bg */
  background-color: var(--bg-light); /* Inherited from body, explicitly for context */
}

/* Fixed Header Offset */
.page-about__hero-section {
  padding-top: var(--header-offset, 120px); /* Desktop default, controlled by shared */
}

/* Hero Section */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px; /* Add padding to the bottom */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); /* Gold to Dark Red gradient */
  color: var(--text-light); /* White text on dark/gradient background */
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-about__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 100%; /* Ensure it's responsive */
}

.page-about__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); /* Add some shadow for depth */
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-about__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light); /* White text on dark background */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability */
}

.page-about__hero-description {
  font-size: 1.3em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-light); /* White text on dark background */
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* Gold button */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-about__cta-button:hover {
  background: var(--secondary-color); /* Dark red on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-about__cta-button--centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* General Section Styling */
.page-about__section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-light);
}

.page-about__section:last-of-type {
  border-bottom: none;
}

.page-about__dark-section {
  background-color: var(--secondary-color); /* Dark red background */
  color: var(--text-light); /* White text on dark background */
}

.page-about__dark-section .page-about__section-title,
.page-about__dark-section .page-about__text-block,
.page-about__dark-section .page-about__game-title,
.page-about__dark-section .page-about__faq-question h3 {
  color: var(--text-light); /* Ensure all text is white */
}

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

.page-about__section-title {
  font-size: 2.5em;
  color: var(--primary-color); /* Gold titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-about__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.page-about__dark-section .page-about__section-title::after {
  background: var(--text-light); /* White line for dark sections */
}

.page-about__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

/* Image Wrappers for floating images */
.page-about__image-wrapper {
  margin: 30px 0;
  text-align: center; /* Center images by default */
}

.page-about__image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block; /* Ensure block for margin auto */
  margin: 0 auto; /* Center image */
}

.page-about__image-wrapper--left img {
  float: left;
  margin-right: 30px;
  margin-bottom: 15px;
  width: 400px; /* Specific width for floating, will be overridden by responsive */
  height: auto;
}

.page-about__image-wrapper--right img {
  float: right;
  margin-left: 30px;
  margin-bottom: 15px;
  width: 400px; /* Specific width for floating, will be overridden by responsive */
  height: auto;
}

/* Clearfix for floating images */
.page-about__section::after {
  content: "";
  display: table;
  clear: both;
}

/* Game Grid */
.page-about__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  margin-bottom: 50px;
}

.page-about__game-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-about__game-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

.page-about__game-title {
  font-size: 1.5em;
  color: var(--primary-color); /* Gold titles for game items */
  margin-bottom: 15px;
}

.page-about__dark-section .page-about__game-title {
  color: var(--primary-color); /* Gold titles for game items on dark background */
}

.page-about__dark-section .page-about__game-item p {
  color: var(--text-light); /* White text for game item descriptions */
}


/* FAQ Section */
.page-about__faq-list {
  margin-top: 40px;
}

.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--bg-white); /* White background for answers */
  border-radius: 0 0 5px 5px;
  color: var(--text-dark); /* Dark text on white background */
}

/* Question style */
.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-about__faq-item.active .page-about__faq-question {
  border-color: var(--primary-color); /* Gold border when active */
  background-color: #fff; /* Keep white background */
}

.page-about__dark-section .page-about__faq-question {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}
.page-about__dark-section .page-about__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}
.page-about__dark-section .page-about__faq-item.active .page-about__faq-question {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.2);
}
.page-about__dark-section .page-about__faq-item.active .page-about__faq-answer {
  background: var(--bg-white); /* Answers always white bg for readability */
  color: var(--text-dark);
}


.page-about__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--text-dark); /* Default dark text */
}

.page-about__dark-section .page-about__faq-question h3 {
  color: var(--text-light); /* White text on dark section question */
}

/* Toggle icon */
.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Gold icon */
  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: 28px;
  height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: var(--secondary-color); /* Dark red when active */
  transform: rotate(180deg); /* Rotate for minus sign effect */
}

.page-about__faq-answer p {
  margin-bottom: 15px;
}

.page-about__faq-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-about__faq-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__hero-title {
    font-size: 2.8em;
  }
  .page-about__hero-description {
    font-size: 1.2em;
  }
  .page-about__section-title {
    font-size: 2em;
  }
  .page-about__image-wrapper--left img,
  .page-about__image-wrapper--right img {
    float: none;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 600px; /* Limit max width for floating images on medium screens */
  }
}

@media (max-width: 768px) {
  .page-about {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Header Offset for mobile */
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-about__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-about__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-about__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-about__section {
    padding: 40px 0;
  }
  .page-about__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-about__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-about__section-title::after {
    width: 60px;
  }

  .page-about__text-block {
    font-size: 1em;
  }

  /* Mobile image responsiveness */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-about__image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0; /* Remove potential extra padding from wrapper */
  }
  .page-about__image-wrapper img {
    margin: 0 auto;
    float: none;
  }
  .page-about__image-wrapper--left img,
  .page-about__image-wrapper--right img {
    margin-left: auto;
    margin-right: auto;
  }

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

  .page-about__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-about__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-about__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-about__faq-answer {
    padding: 0 15px;
  }
  .page-about__faq-item.active .page-about__faq-answer {
    padding: 15px !important;
  }
  .page-about__faq-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}