/* style/about.css */
/* Body background color from shared.css: var(--site-background-color, #1a1a2e) which is dark. */
/* Therefore, text color for main content should be light (e.g., #ffffff) by default. */

:root {
  --kclub-primary-color: #26A9E0;
  --kclub-secondary-color: #FFFFFF;
  --kclub-login-color: #EA7C07;
  --kclub-dark-text: #333333;
  --kclub-light-text: #ffffff;
  --kclub-background-light: #f8f9fa;
}

.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--kclub-light-text); /* Default text color for dark body background */
  background-color: transparent; /* Rely on body background from shared.css */
}

.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%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px; /* Adjusted padding, no var(--header-offset) */
  padding-top: 10px; /* Small top padding as per requirement */
  background-color: var(--kclub-primary-color); /* Using brand color for hero background */
  overflow: hidden;
}

.page-about__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-about__hero-content {
  position: relative; /* Ensure content is above any background */
  z-index: 2;
  color: var(--kclub-light-text);
  max-width: 900px;
}

.page-about__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-about__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box; /* Include padding in width calculation */
  text-align: center;
}

.page-about__btn-primary {
  background-color: var(--kclub-login-color); /* Using login color for primary CTA */
  color: var(--kclub-secondary-color);
  border: 2px solid var(--kclub-login-color);
}

.page-about__btn-primary:hover {
  background-color: #d16d00; /* Darkened EA7C07 */
  border-color: #d16d00;
}

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

.page-about__btn-secondary:hover {
  background-color: var(--kclub-secondary-color);
  color: var(--kclub-primary-color);
}

/* Sections */
.page-about__mission-section,
.page-about__advantages-section,
.page-about__security-section,
.page-about__community-section,
.page-about__faq-section,
.page-about__contact-section {
  padding: 60px 0;
}

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

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

.page-about__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit from section for dark/light bg */
}

.page-about__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-about__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
}

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

.page-about__text-block {
  flex: 1;
  font-size: 1.1em;
}

.page-about__text-block p {
  margin-bottom: 1em;
  color: inherit;
}

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

.page-about__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

/* Advantages Section */
.page-about__advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-about__advantage-card {
  background-color: rgba(255, 255, 255, 0.15); /* Light transparent background for dark section */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: var(--kclub-light-text);
}

.page-about__advantage-image-card {
  grid-column: span 2; /* Make image card span two columns on desktop */
  background-color: transparent;
  box-shadow: none;
  padding: 0;
}

.page-about__advantage-card .page-about__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--kclub-secondary-color);
}

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

.page-about__faq-item {
  background-color: var(--kclub-secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--kclub-dark-text);
}

.page-about__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em;
  color: var(--kclub-dark-text);
}

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

.page-about__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

.page-about__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  line-height: 1.5;
  color: var(--kclub-dark-text);
}

.page-about__faq-answer p {
  margin-bottom: 0.5em;
  color: inherit;
}

/* Contact Section */
.page-about__contact-section {
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-about__content-grid {
    flex-direction: column;
  }

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

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

  .page-about__advantage-image-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .page-about {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-about__hero-section {
    padding: 60px 15px;
    padding-top: 10px !important; /* body already has padding-top */
  }

  .page-about__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

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

  .page-about__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important; /* Enforce full width for button container */
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-about__btn-primary,
  .page-about__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

  .page-about__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-about__container,
  .page-about__hero-section,
  .page-about__mission-section,
  .page-about__advantages-section,
  .page-about__security-section,
  .page-about__community-section,
  .page-about__faq-section,
  .page-about__contact-section {
    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 */
  }

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

  /* Ensure no image is smaller than 200px (desktop rule, but needs to be checked for mobile as well) */
  .page-about img {
    min-width: 200px !important;
    min-height: 200px !important;
  }

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

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

/* Ensure no image filter is applied */
.page-about img {
  filter: none !important;
}