/* style/about.css */

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

.page-about {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--qq8-code-text-main); /* Default text color for the page */
  background-color: var(--qq8-code-background); /* Default background for the page */
}

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

/* Sections */
.page-about__hero-section,
.page-about__mission-vision-section,
.page-about__why-choose-us-section,
.page-about__responsible-gaming-section,
.page-about__technology-innovation-section,
.page-about__faq-section,
.page-about__cta-section {
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.page-about__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 80px;
  overflow: hidden;
}

.page-about__dark-section {
  background-color: var(--qq8-code-background);
  color: var(--qq8-code-text-main);
}

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

.page-about__section-title {
  font-size: clamp(2.2em, 4vw, 3.2em);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--qq8-code-gold);
  line-height: 1.2;
}

.page-about__dark-section .page-about__section-title {
  color: var(--qq8-code-gold);
}

.page-about__light-bg .page-about__section-title {
  color: var(--qq8-code-primary);
}

.page-about__description {
  font-size: 1.1em;
  margin-bottom: 40px;
  color: var(--qq8-code-text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__light-bg .page-about__description {
  color: #666666;
}

/* Hero specific styles */
.page-about__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height to maintain aspect ratio */
  overflow: hidden;
  margin-bottom: 40px;
}

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

.page-about__main-title {
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--qq8-code-gold);
  line-height: 1.2;
  font-size: clamp(2.5em, 5vw, 3.5em); /* Using clamp for responsive h1 */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-about__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-about__btn-primary {
  background: var(--qq8-code-button-gradient);
  color: var(--qq8-code-text-main);
  border: 2px solid transparent;
}

.page-about__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-about__btn-secondary {
  background-color: transparent;
  color: var(--qq8-code-gold);
  border: 2px solid var(--qq8-code-gold);
}

.page-about__btn-secondary:hover {
  background-color: var(--qq8-code-gold);
  color: var(--qq8-code-background);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

/* Content Grid */
.page-about__content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  text-align: left;
  align-items: center;
}

.page-about__content-grid--reverse {
  grid-template-columns: 1fr 1fr;
}

.page-about__grid-item {
  padding: 20px;
}

.page-about__grid-item .page-about__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px;
}

.page-about__item-title {
  font-size: 1.8em;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 15px;
  color: var(--qq8-code-primary);
}

.page-about__dark-section .page-about__item-title {
  color: var(--qq8-code-gold);
}

.page-about__text-block {
  font-size: 1em;
  color: var(--qq8-code-text-secondary);
  margin-bottom: 15px;
}

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

/* Features Grid (Why Choose Us) */
.page-about__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-about__feature-card {
  background-color: var(--qq8-code-card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border: 1px solid var(--qq8-code-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--qq8-code-text-main);
}

.page-about__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 15px var(--qq8-code-glow);
}

.page-about__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px;
}

.page-about__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--qq8-code-gold);
}

.page-about__card-text {
  font-size: 0.95em;
  color: var(--qq8-code-text-secondary);
}

/* Responsible Gaming List */
.page-about__responsible-gaming-section ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  text-align: left;
}

.page-about__responsible-gaming-section li {
  background-color: #f9f9f9;
  border-left: 5px solid var(--qq8-code-primary);
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  color: #333333;
  font-size: 1em;
}

.page-about__responsible-gaming-section li strong {
  color: var(--qq8-code-deep-green);
}

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

.page-about__faq-item {
  margin-bottom: 15px;
  border: 1px solid var(--qq8-code-border);
  border-radius: 8px;
  background-color: var(--qq8-code-card-bg);
  color: var(--qq8-code-text-main);
}

.page-about__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  list-style: none; /* Remove default marker */
  color: var(--qq8-code-gold);
}

.page-about__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

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

.page-about__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--qq8-code-glow);
}

.page-about__faq-item[open] .page-about__faq-toggle {
  content: '−';
}

.page-about__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: var(--qq8-code-text-secondary);
  line-height: 1.7;
}

.page-about__faq-answer p {
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__content-grid {
    grid-template-columns: 1fr;
  }
  .page-about__content-grid--reverse {
    grid-template-columns: 1fr;
  }
  .page-about__grid-item:first-child {
    order: 2; /* Reverse order for image on mobile for responsible gaming */
  }
  .page-about__grid-item:last-child {
    order: 1;
  }
  .page-about__responsible-gaming-section .page-about__grid-item:last-child {
    order: 1; /* Image first on mobile */
  }
}

@media (max-width: 768px) {
  .page-about__hero-section,
  .page-about__mission-vision-section,
  .page-about__why-choose-us-section,
  .page-about__responsible-gaming-section,
  .page-about__technology-innovation-section,
  .page-about__faq-section,
  .page-about__cta-section {
    padding: 40px 0;
  }

  .page-about__hero-section {
    padding-top: 10px !important;
  }

  .page-about__section-title {
    font-size: 2em;
  }

  .page-about__main-title {
    font-size: 2.2em;
  }

  .page-about__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-about__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
  }

  .page-about__btn-primary,
  .page-about__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-about__container,
  .page-about__grid-item,
  .page-about__feature-card,
  .page-about__faq-item {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-about__card-image {
    height: auto !important; /* Ensure card images resize proportionally */
    max-height: 250px; /* Optional: cap height on mobile if needed */
  }

  .page-about__responsible-gaming-section li {
    padding: 10px 15px;
  }

  .page-about__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

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

/* Ensure content images are not smaller than 200px even with general img rules */
.page-about__image, .page-about__card-image {
  min-width: 200px;
  min-height: 200px;
}

/* Override specific styles for responsible gaming section to ensure image is above text on mobile */
@media (max-width: 768px) {
  .page-about__responsible-gaming-section .page-about__content-grid {
    flex-direction: column; /* Ensure vertical stacking */
  }
  .page-about__responsible-gaming-section .page-about__grid-item:first-child {
    order: 2; /* Text block second */
  }
  .page-about__responsible-gaming-section .page-about__grid-item:last-child {
    order: 1; /* Image block first */
  }
}