:root {
  --primary-color: #017439; /* momo88 bet green */
  --secondary-color: #C30808; /* Register/Login red */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --bg-color-light: #FFFFFF;
  --bg-color-dark: #017439;
  --link-color: #017439;
  --link-hover-color: #C30808;
}

/* Base styles for the page content */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background-color: var(--bg-color-light); /* Assuming body background is light */
}

/* Section styling */
.page-about__section {
  padding: 60px 20px;
  margin-bottom: 0; /* Remove default margin */
}

.page-about__section-title {
  font-size: 32px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

/* HERO Section - specific overrides for About Us */
.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 */
  background-color: var(--bg-color-dark); /* Dark background for contrast with light text */
  color: var(--text-color-light);
  overflow: hidden; /* Ensure no image overflow */
}

.page-about__hero-section .page-about__section-title {
  color: var(--text-color-light); /* Title in hero section should be light */
}

.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%; /* Ensure it takes full width within max-width */
}

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden; /* For border-radius on image */
}

.page-about__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px; /* Apply border-radius directly to image */
}

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

.page-about__hero-content h1 {
  /* No fixed font-size, rely on font-weight, line-height, etc. */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--text-color-light);
  font-size: clamp(28px, 4vw, 48px); /* Use clamp for H1 */
}

.page-about__hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  color: var(--text-color-light);
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-about__btn-primary {
  background: var(--secondary-color); /* Use red for register/login as per custom color */
  color: var(--text-color-light);
  border: 2px solid transparent;
}

.page-about__btn-primary:hover {
  background: #a30606; /* Slightly darker red */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
  background: var(--bg-color-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-about__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Introduction Section */
.page-about__introduction {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-about__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-about__text-block {
  flex: 2;
  font-size: 17px;
}

.page-about__text-block p {
  margin-bottom: 20px;
}

.page-about__image-block {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  min-width: 200px; /* Min size constraint */
}

.page-about__image-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

/* Values Section */
.page-about__values {
  background-color: var(--bg-color-dark);
  color: var(--text-color-light);
}

.page-about__values .page-about__section-title {
  color: var(--text-color-light);
}

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

.page-about__card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  color: var(--text-color-light); /* Light text for dark background */
}

.page-about__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-about__card p {
  font-size: 16px;
  line-height: 1.5;
}

.page-about__cta-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* For responsiveness */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Commitment Section */
.page-about__commitment {
  background-color: var(--bg-color-light);
  color: var(--text-color-dark);
}

.page-about__commitment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-about__commitment-item {
  background: var(--bg-color-light);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color-dark);
}

.page-about__commitment-item img {
  width: 100%;
  max-width: 400px; /* Limit image width within item */
  height: auto;
  min-height: 200px; /* Min size constraint */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-about__commitment-title {
  font-size: 22px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* FAQ Section */
.page-about__faq {
  padding-top: 40px;
  padding-bottom: 60px;
  background-color: #f9f9f9; /* Slightly different background for FAQ */
}

details.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
details.page-about__faq-item summary.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none; /* Remove default marker */
  transition: background-color 0.3s ease;
}
details.page-about__faq-item summary.page-about__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for Webkit browsers */
}
details.page-about__faq-item summary.page-about__faq-question:hover {
  background: #f5f5f5;
}
.page-about__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-color-dark);
}
.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-about__faq-item .page-about__faq-answer {
  padding: 0 20px 20px;
  background: #fcfcfc;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  color: var(--text-color-dark);
}
details.page-about__faq-item .page-about__faq-answer p {
  margin-bottom: 10px;
}
details.page-about__faq-item .page-about__faq-answer p:last-child {
  margin-bottom: 0;
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-about__section-title {
    font-size: 28px;
  }

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

  .page-about__hero-content p {
    font-size: 16px;
  }

  .page-about__text-block {
    font-size: 16px;
  }

  .page-about__card-title,
  .page-about__commitment-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-about__section {
    padding: 40px 15px;
  }

  .page-about__hero-section {
    padding-top: 10px !important; /* body handles header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-about__hero-image {
    margin-bottom: 20px;
  }

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

  .page-about__hero-content h1 {
    font-size: clamp(22px, 6vw, 36px);
  }

  .page-about__hero-content p {
    font-size: 15px;
  }

  .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;
  }

  .page-about__cta-row {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

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

  .page-about__text-block {
    order: 2; /* Text after image on mobile */
  }

  .page-about__image-block {
    order: 1;
    width: 100%; /* Ensure image takes full width */
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-about__image-block img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
  }

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

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

  .page-about__commitment-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px; /* Ensure minimum size is maintained */
  }

  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; }

  /* Ensure all images are responsive */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__content-wrapper,
  .page-about__grid,
  .page-about__commitment-grid,
  .page-about__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Specific color contrast classes for safety (if needed) */
.page-about__dark-bg {
  background-color: var(--bg-color-dark);
  color: var(--text-color-light);
}

.page-about__light-bg {
  background-color: var(--bg-color-light);
  color: var(--text-color-dark);
}