/* style/about.css */

/* Variables for consistency */
:root {
  --primary-color: #007BFF;
  --secondary-color: #FFC107;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-dark: #0a0a0a;
  --bg-light: #f8f9fa; /* Slightly off-white for contrast */
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
}

/* Base styles for the page content, considering the dark body background */
.page-about {
  color: var(--text-light); /* Default text color for sections on body bg */
  background-color: var(--bg-dark); /* Ensure it matches body if needed, but sections will override */
  padding-top: 120px; /* Desktop: Adjust for fixed header */
  box-sizing: border-box;
}

/* General container for content sections */
.page-about__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  box-sizing: border-box;
}

/* Light background container */
.page-about__light-bg {
  background-color: var(--card-bg);
  color: var(--text-dark);
}

/* Dark background container */
.page-about__dark-bg {
  background-color: var(--primary-color); /* Using primary brand color for dark sections */
  color: var(--text-light);
}

/* Section titles */
.page-about__main-title,
.page-about__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-about__main-title {
  color: var(--text-dark); /* For light-bg section */
}

.page-about__dark-bg .page-about__section-title {
  color: var(--text-light); /* For dark-bg section */
}

/* Content wrapper for image and text blocks */
.page-about__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}

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

.page-about__image-block {
  flex: 1;
  min-width: 300px; /* Minimum width for image block */
  box-sizing: border-box;
}

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

.page-about__text-block {
  flex: 2;
  font-size: 16px;
  line-height: 1.7;
  box-sizing: border-box;
}

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

.page-about__text-block--light p {
  color: var(--text-light);
}

/* CTA Buttons */
.page-about__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  justify-content: center; /* Center buttons if there are multiple */
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 200px; /* Ensure buttons have a decent size */
}

.page-about__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.page-about__btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.page-about__btn-secondary {
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

/* Article list in news section */
.page-about__article-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.page-about__article-list li {
  margin-bottom: 10px;
  font-size: 16px;
}

.page-about__article-list a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.page-about__article-list a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* FAQ Section */
.page-about__faq-section {
  padding-bottom: 60px; /* Extra padding at the bottom */
}

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

.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Lighter shadow for FAQ items */
}

.page-about__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark); /* Ensure dark text on light answer background */
}

.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* Sufficiently large value */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--bg-light); /* Light background for answer */
  border-radius: 0 0 5px 5px;
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark); /* Ensure dark text on light question background */
}

.page-about__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #eeeeee;
}

.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-dark); /* Ensure dark text */
}

.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: var(--primary-color); /* Change color when active */
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-about__container {
    padding: 40px 20px;
  }
  .page-about__main-title,
  .page-about__section-title {
    font-size: 32px;
  }
  .page-about__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .page-about__content-wrapper--reverse {
    flex-direction: column; /* Keep consistent on smaller screens */
  }
  .page-about__text-block,
  .page-about__image-block {
    flex: none;
    width: 100%;
  }
  .page-about__cta-group {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .page-about {
    padding-top: 100px !important; /* Mobile: Adjust for fixed header */
  }
  .page-about__container {
    padding: 30px 15px;
    margin-bottom: 30px;
  }
  .page-about__main-title,
  .page-about__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-about__text-block {
    font-size: 15px;
    line-height: 1.6;
  }
  .page-about__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    min-width: unset;
    width: 100%; /* Full width for mobile buttons */
  }
  .page-about__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-about__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-about__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-about__faq-answer {
    padding: 0 15px;
  }
  .page-about__faq-item.active .page-about__faq-answer {
    padding: 15px !important;
  }

  /* Force image responsiveness with !important */
  .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__image-block,
  .page-about__text-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0px !important; /* Remove padding from container to allow section padding to control overall width */
    padding-right: 0px !important;
  }
  .page-about__container {
    padding-left: 15px !important; /* Add back padding to the container itself */
    padding-right: 15px !important;
  }
}