/* style/about.css */

/* Base styles for the page-about scope */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #FFFFFF; /* Default body background */
}

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

/* Hero Section */
.page-about__hero-section {
  position: relative;
  width: 100%;
  height: 70vh; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  box-sizing: border-box;
}

.page-about__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-about__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
  z-index: 1;
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  max-width: 800px;
  padding: 20px;
}

.page-about__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FFFFFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-about__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #FFFFFF;
}

.page-about__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

.page-about__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #000000; /* Changed to black for WCAG AA contrast on #C30808 */
  border: 2px solid #C30808;
}

.page-about__btn-primary:hover {
  background-color: #a30707;
  border-color: #a30707;
  color: #000000; /* Keep black */
}

.page-about__btn-secondary {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-about__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #017439;
}

.page-about__btn-secondary--white-text {
  background-color: #FFFFFF;
  color: #017439;
  border: 2px solid #FFFFFF;
}

.page-about__btn-secondary--white-text:hover {
  background-color: #f0f0f0;
  color: #017439;
}

/* Section titles and text blocks */
.page-about__section-title {
  font-size: 2.5em;
  color: #017439; /* Main brand color for titles */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 60px;
}

.page-about__section-title--white {
  color: #FFFFFF;
}

.page-about__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* Intro Section */
.page-about__intro-section {
  padding: 80px 0;
}

/* Vision & Mission Section */
.page-about__vision-mission-section {
  padding: 80px 0;
}

.page-about__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: start;
}

.page-about__grid-layout--reverse {
  flex-direction: row-reverse; /* For security section */
}

.page-about__grid-item {
  display: flex;
  flex-direction: column;
}

.page-about__card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  height: 100%; /* Ensure cards have equal height */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.page-about__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-about__card-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 15px;
  flex-grow: 0; /* Don't grow */
}

.page-about__card-text {
  font-size: 1em;
  color: #555555;
  text-align: justify;
  flex-grow: 1; /* Allow text to grow and push title/image to top */
}

/* Values Section */
.page-about__values-section {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #FFFFFF;
}

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

.page-about__value-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-about__value-title {
  font-size: 1.5em;
  color: #FFFF00; /* Custom color for value titles on dark background, passes contrast */
  margin-bottom: 15px;
}

.page-about__value-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* Journey Section */
.page-about__journey-section {
  padding: 80px 0;
}

/* Security Section */
.page-about__security-section {
  padding: 80px 0;
}

.page-about__text-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-about__text-content--white {
  color: #FFFFFF;
}

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

.page-about__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsible Gaming Section */
.page-about__responsible-gaming-section {
  padding: 80px 0;
  background-color: #017439;
  color: #FFFFFF;
}

/* Team Section */
.page-about__team-section {
  padding: 80px 0;
}

.page-about__team-image-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-about__team-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* CTA Section */
.page-about__cta-section {
  padding: 80px 0;
  background-color: #017439;
  text-align: center;
  color: #FFFFFF;
}

.page-about__cta-content {
  max-width: 900px;
}

.page-about__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-about__cta-text {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-about__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-about__faq-section {
  padding: 80px 0;
}

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

.page-about__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-about__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

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

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

.page-about__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-about__faq-item[open] > summary .page-about__faq-toggle {
  content: "−";
}

.page-about__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
  text-align: justify;
  background-color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__hero-title {
    font-size: 2.8em;
  }
  .page-about__section-title {
    font-size: 2em;
  }
  .page-about__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-about__hero-section {
    height: 60vh;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
  }

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

  .page-about__hero-description {
    font-size: 1em;
  }

  .page-about__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    padding-top: 40px;
  }

  .page-about__text-block {
    font-size: 0.95em;
    padding: 0 15px; /* Add padding for content blocks on mobile */
  }

  .page-about__grid-layout {
    grid-template-columns: 1fr;
  }

  .page-about__grid-layout--reverse {
    flex-direction: column;
  }

  .page-about__card {
    padding: 20px;
  }

  .page-about__card-title {
    font-size: 1.5em;
  }

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

  .page-about__cta-title {
    font-size: 1.8em;
  }

  .page-about__cta-text {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-about__hero-cta-buttons,
  .page-about__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding for button containers */
  }

  /* Force button responsiveness */
  .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;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-about__hero-cta-buttons,
  .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-wrap: wrap !important;
    gap: 10px;
  }

  /* Force image responsiveness */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__image-container,
  .page-about__team-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

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

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

/* Ensure no filter on images */
.page-about img {
  filter: none !important;
}

/* Color contrast fixes based on body background (default light) */
.page-about__dark-bg {
  background-color: #017439;
  color: #FFFFFF;
}

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

/* Specific button colors for primary (Register/Login) */
.page-about__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #000000; /* Changed to black for WCAG AA contrast on #C30808 */
  border: 2px solid #C30808;
}

.page-about__btn-primary:hover {
  background-color: #a30707;
  border-color: #a30707;
  color: #000000; /* Keep black */
}

/* Adjust secondary button on dark background to match font color rule */
.page-about__btn-secondary {
  background-color: transparent;
  color: #FFFFFF; /* Default for dark background */
  border: 2px solid #FFFFFF;
}

.page-about__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #017439;
}

.page-about__btn-secondary.page-about__btn-secondary--white-text {
  background-color: #FFFFFF;
  color: #017439;
  border: 2px solid #FFFFFF;
}

.page-about__btn-secondary.page-about__btn-secondary--white-text:hover {
  background-color: #f0f0f0;
  color: #017439;
}

/* Ensure titles on dark background are white */
.page-about__dark-bg .page-about__section-title,
.page-about__dark-bg .page-about__cta-title {
  color: #FFFFFF;
}

/* Ensure text on dark background is light */
.page-about__dark-bg .page-about__text-block,
.page-about__dark-bg .page-about__cta-text {
  color: #f0f0f0;
}