/* style/about.css */

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

/* Base styles for page-about, ensuring text contrast with body background (dark) */
.page-about {
  color: var(--text-main-color); /* Light text for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: var(--deep-navy-color); /* Ensure consistency if body bg is not applied */
}

.page-about h1, .page-about h2, .page-about h3 {
  color: var(--text-main-color);
  font-weight: 700;
  margin-bottom: 20px;
}

.page-about p {
  margin-bottom: 15px;
  color: var(--text-secondary-color);
}

.page-about a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-about a:hover {
  color: var(--gold-color);
}

/* Section common styles */
.page-about__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-about__section-title {
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-about__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

.page-about__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-main-color);
}

.page-about__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-about__light-bg h1, .page-about__light-bg h2, .page-about__light-bg h3 {
  color: var(--primary-color);
}

.page-about__light-bg p {
  color: #555555;
}

/* Hero Section */
.page-about__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 */
  overflow: hidden;
}

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

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

.page-about__hero-content h1 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-main-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-about__hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  max-width: 800px;
  margin: 0 auto 30px;
  color: var(--text-secondary-color);
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-about__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  filter: brightness(1.1);
}

/* General image styles */
.page-about__image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-about__image--centered {
  margin: 30px auto;
}

/* Content wrappers for text and image */
.page-about__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-about__content-wrapper--reversed {
  flex-direction: row-reverse;
}

.page-about__content-wrapper .page-about__text-block {
  flex: 1;
}

.page-about__content-wrapper .page-about__image {
  flex: 1;
  max-width: 50%;
}

/* Game Categories */
.page-about__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-about__card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-about__card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-about__card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text-main-color);
  padding: 0 15px;
}

.page-about__card p {
  font-size: 15px;
  color: var(--text-secondary-color);
  padding: 0 15px;
  margin-bottom: 20px;
}

.page-about__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
}

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

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

details.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

details.page-about__faq-item summary.page-about__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;
}

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

details.page-about__faq-item summary.page-about__faq-question:hover {
  background: rgba(var(--primary-color), 0.8);
}

.page-about__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}

.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-about__faq-item[open] .page-about__faq-toggle {
  transform: rotate(45deg);
}

details.page-about__faq-item .page-about__faq-answer {
  padding: 0 25px 20px;
  background: var(--deep-navy-color);
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-about__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-about__hero-image {
    border-radius: 8px;
  }

  .page-about__hero-content h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .page-about__hero-content p {
    font-size: clamp(15px, 3vw, 18px);
  }

  .page-about__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;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-about__container {
    padding: 30px 15px;
  }

  .page-about__section-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 30px;
  }

  .page-about__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-about__content-wrapper--reversed {
    flex-direction: column;
  }

  .page-about__content-wrapper .page-about__image {
    max-width: 100%;
  }

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

  .page-about__card {
    margin: 0 auto;
    max-width: 90%;
  }

  details.page-about__faq-item summary.page-about__faq-question {
    padding: 15px;
  }

  .page-about__faq-qtext {
    font-size: 15px;
  }

  .page-about__faq-toggle {
    font-size: 20px;
    width: 24px;
  }

  details.page-about__faq-item .page-about__faq-answer {
    padding: 0 15px 15px;
  }

  /* Mobile image responsiveness */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__hero-container,
  .page-about__content-wrapper,
  .page-about__game-categories {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Button group mobile adaptation */
  .page-about__cta-buttons,
  .page-about__button-group,
  .page-about__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
  }
}