/* style/about.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-about {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color from custom palette */
  background-color: var(--background, #08160F); /* Body background from custom palette */
}

/* Container for consistent content width */
.page-about__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-about__section {
  padding: 80px 0;
  text-align: center;
}

.page-about__dark-section {
  background-color: var(--deep-green, #0A4B2C); /* Darker green background for specific sections */
  color: var(--text-main, #F2FFF6);
}

.page-about__section-title {
  font-size: clamp(28px, 4vw, 48px); /* min: 28px, preferred: 4vw, max: 48px */
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__sub-title {
  font-size: clamp(24px, 3vw, 32px); /* min: 24px, preferred: 3vw, max: 32px */
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text-main, #F2FFF6);
}

.page-about__section-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-secondary, #A7D9B8);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Ensure image is above content block */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom */
  overflow: hidden;
}

.page-about__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px;
}

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

.page-about__hero-content {
  position: relative; /* Ensure content is above any potential background elements */
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.page-about__main-title {
  font-size: clamp(32px, 5vw, 56px); /* min: 32px, preferred: 5vw, max: 56px */
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-about__subtitle {
  font-size: 20px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 40px;
}

/* Buttons */
.page-about__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
  margin-top: 30px;
}

.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-about__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #ffffff;
  border: none;
}

.page-about__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-about__btn-secondary {
  background: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E); /* Custom border color */
}

.page-about__btn-secondary:hover {
  background: rgba(var(--text-main-rgb, 242, 255, 246), 0.1); /* Slight background on hover */
  transform: translateY(-2px);
}

/* Content Grids */
.page-about__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 50px;
  text-align: left;
}

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

.page-about__text-block {
  flex: 1;
  min-width: 300px;
}

.page-about__text-block p {
  margin-bottom: 20px;
  color: var(--text-secondary, #A7D9B8);
}

.page-about__image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-about__image-wrapper--full-width {
  flex: none;
  width: 100%;
  margin-top: 40px;
}

.page-about__image-wrapper--small {
  max-width: 600px;
  margin: 40px auto;
  flex: none;
}

.page-about__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* History & Mission Section */
.page-about__history-mission-section,
.page-about__security-fairness-section,
.page-about__promotions-support-section,
.page-about__vision-values-section {
  padding: 80px 0;
  text-align: center;
}

.page-about__features-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  text-align: left;
}

.page-about__features-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--text-secondary, #A7D9B8);
}

.page-about__features-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--glow, #57E38D); /* Green checkmark */
  font-weight: bold;
}

.page-about__feature-highlight {
  color: var(--text-main, #F2FFF6);
}

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

.page-about__game-card,
.page-about__feature-card {
  background-color: var(--card-bg, #11271B); /* Custom card background */
  border: 1px solid var(--border, #2E7A4E); /* Custom border color */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-about__game-card:hover,
.page-about__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.page-about__card-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
}

.page-about__game-card p,
.page-about__feature-card p {
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-about__card-link {
  color: var(--glow, #57E38D); /* Green link color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-about__card-link:hover {
  color: var(--gold, #F2C14E); /* Gold on hover */
  text-decoration: underline;
}

/* Vision & Values */
.page-about__values-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.page-about__values-list li {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  padding: 25px;
  color: var(--text-secondary, #A7D9B8);
  text-align: left;
}

.page-about__value-item-title {
  color: var(--text-main, #F2FFF6);
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
}

/* FAQ Section */
.page-about__faq-section {
  padding: 80px 0;
  background-color: var(--background, #08160F);
}

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

.page-about__faq-item {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-about__faq-item summary {
  list-style: none; /* Remove default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  font-size: 18px;
  position: relative;
}

.page-about__faq-item summary::-webkit-details-marker {
  display: none; /* Hide Chrome's default marker */
}

.page-about__faq-qtext {
  flex-grow: 1;
}

.page-about__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #57E38D);
  transition: transform 0.3s ease;
}

.page-about__faq-item[open] .page-about__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-about__faq-answer {
  padding: 0 25px 20px 25px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 16px;
  border-top: 1px solid var(--divider, #1E3A2A);
  margin-top: -1px; /* Overlap border for clean look */
}

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

.page-about__faq-contact-link {
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
}

.page-about__faq-contact-link:hover {
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-about__section-title {
    font-size: clamp(28px, 4vw, 40px);
  }
  .page-about__main-title {
    font-size: clamp(32px, 5vw, 48px);
  }
  .page-about__sub-title {
    font-size: clamp(24px, 3vw, 28px);
  }
}

@media (max-width: 768px) {
  .page-about__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-about__hero-image-wrapper {
    max-height: 400px;
    margin-bottom: 20px;
  }
  .page-about__hero-content {
    padding: 0 15px;
  }
  /* clamp handles font-size for main-title */
  .page-about__subtitle {
    font-size: 18px;
    margin-bottom: 30px;
  }
  .page-about__section {
    padding: 60px 0;
  }
  /* clamp handles font-size for section-title and sub-title */
  .page-about__section-description {
    font-size: 16px;
    padding: 0 15px;
  }

  .page-about__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

  .page-about__content-grid {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }
  .page-about__content-grid--reverse {
    flex-direction: column; /* Keep column for mobile */
  }

  .page-about__game-cards-grid,
  .page-about__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }
  
  .page-about__image-wrapper {
    padding: 0 15px;
  }

  .page-about__features-list,
  .page-about__values-list {
    padding: 0 15px;
  }

  .page-about__faq-list {
    padding: 0 15px;
  }
  .page-about__faq-item summary {
    font-size: 16px;
    padding: 15px 20px;
  }
  .page-about__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* Image responsiveness */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Container responsiveness for images/buttons */
  .page-about__container,
  .page-about__section,
  .page-about__content-grid,
  .page-about__game-cards-grid,
  .page-about__features-grid,
  .page-about__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Specific override for hero section, as it has its own padding */
  .page-about__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure no filter is applied to images */
.page-about img {
  filter: none;
}

/* Custom color variables from palette */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --background: #08160F;
  --card-bg: #11271B;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;

  /* RGB values for transparency calculations if needed */
  --text-main-rgb: 242, 255, 246;
}