/* style/about.css */

/* Base styles for the about page */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark background */
  background-color: var(--dark-bg-1); /* Inherited from shared, assuming dark */
}

.page-about__section {
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden; /* Prevent content overflow for this section */
}

.page-about__dark-section {
  background-color: #017439; /* Brand primary color for dark sections */
  color: #ffffff;
}

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

.page-about__main-heading {
  font-size: 3.2em;
  color: #FFFF00; /* Highlighted color for main heading */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-about__secondary-heading {
  font-size: 2.5em;
  color: #FFFFFF;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-about__sub-heading {
  font-size: 1.8em;
  color: #FFFF00; /* Highlighted color for sub-headings */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-about__paragraph {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__intro-text {
  font-size: 1.3em;
  color: #ffffff;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  margin: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-about__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-about__btn-primary:hover {
  background-color: #e02020;
  border-color: #e02020;
  color: #ffffff;
}

.page-about__btn-secondary {
  background-color: #ffffff;
  color: #017439; /* Brand primary color */
  border: 2px solid #017439;
}

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

/* Hero Section */
.page-about__hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 600px;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background-color: var(--dark-bg-1); /* Assuming dark background from shared */
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.page-about__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.page-about__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Subtle background image */
}

/* Grid Layouts */
.page-about__grid-3-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 40px;
}

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

/* Cards */
.page-about__card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #ffffff;
}

.page-about__card-title {
  font-size: 1.5em;
  color: #FFFF00;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-about__card-title a {
  color: #FFFF00;
  text-decoration: none;
}

.page-about__card-title a:hover {
  text-decoration: underline;
}

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

/* Image Content */
.page-about__image-content {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  display: block; /* Ensure it behaves as a block element for max-width */
  object-fit: cover;
}

/* Timeline */
.page-about__timeline {
  position: relative;
  margin: 50px auto;
  padding: 0;
  list-style: none;
  max-width: 800px;
}

.page-about__timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #FFFF00;
  transform: translateX(-50%);
}

.page-about__timeline-item {
  margin-bottom: 40px;
  position: relative;
  width: 50%;
  padding-left: 30px;
  box-sizing: border-box;
  text-align: left;
}

.page-about__timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 30px;
  padding-left: 0;
  text-align: right;
}

.page-about__timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 30px;
}

.page-about__timeline-item::before {
  content: '';
  position: absolute;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #017439;
  border: 3px solid #FFFF00;
  z-index: 1;
}

.page-about__timeline-item:nth-child(odd)::before {
  right: -8px;
  left: auto;
}

.page-about__timeline-item:nth-child(even)::before {
  left: -8px;
}

.page-about__timeline-year {
  font-size: 1.4em;
  color: #FFFF00;
  margin-bottom: 5px;
}

.page-about__timeline-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* Products & Services */
.page-about__product-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
}

.page-about__product-image {
  max-width: 100%;
  height: 200px; /* Fixed height for product images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Safety and Fairness section */
.page-about__text-block {
  text-align: left;
}

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

/* Team Section */
.page-about__team-member {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-about__team-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid #FFFF00;
}

/* CTA Section */
.page-about__cta-content {
  background-color: #017439;
  border-radius: 15px;
  padding: 40px;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  margin-top: 50px;
  margin-bottom: 50px;
}

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

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

.page-about__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.2em;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.page-about__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-about__faq-title {
  margin: 0;
  font-size: 1.2em;
  color: #FFFF00;
}

.page-about__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFFF00;
  transition: transform 0.3s ease;
}

.page-about__faq-item.active .page-about__faq-toggle {
  transform: rotate(45deg); /* Plus sign to X or minus */
  color: #C30808;
}

.page-about__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: rgba(255, 255, 255, 0.02);
}

.page-about__faq-item.active .page-about__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px;
}

.page-about__faq-text {
  color: #f0f0f0;
  font-size: 1em;
  margin-bottom: 0;
}

.page-about__faq-text a {
  color: #FFFF00;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__main-heading {
    font-size: 2.8em;
  }

  .page-about__secondary-heading {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-about__hero-section {
    min-height: 500px;
    padding: 40px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header */
  }

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

  .page-about__intro-text {
    font-size: 1.1em;
  }

  .page-about__secondary-heading {
    font-size: 1.8em;
  }

  .page-about__sub-heading {
    font-size: 1.5em;
  }

  .page-about__paragraph {
    font-size: 1em;
  }

  .page-about__section {
    padding: 40px 15px;
  }

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

  .page-about__timeline::before {
    left: 15px;
  }

  .page-about__timeline-item {
    width: 100%;
    padding-left: 45px;
    padding-right: 15px;
    text-align: left;
  }

  .page-about__timeline-item:nth-child(odd) {
    left: 0;
    padding-left: 45px;
    padding-right: 15px;
    text-align: left;
  }

  .page-about__timeline-item:nth-child(odd)::before {
    left: 0;
    right: auto;
    transform: translateX(calc(-50% - 15px));
  }

  .page-about__timeline-item:nth-child(even) {
    left: 0;
    padding-left: 45px;
    padding-right: 15px;
  }

  .page-about__timeline-item:nth-child(even)::before {
    left: 0;
    transform: translateX(calc(-50% - 15px));
  }

  .page-about__timeline-item::before {
    left: 15px !important;
    transform: translateX(-50%) !important;
  }

  .page-about__cta-content {
    padding: 30px 20px;
  }

  .page-about__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-about__btn-primary,
  .page-about__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile image and video responsiveness */
  .page-about img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-about video,
  .page-about__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__video-section,
  .page-about__video-container,
  .page-about__video-wrapper,
  .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;
    overflow: hidden !important;
  }

  .page-about__product-image {
    height: auto; /* Allow height to adjust for mobile */
  }

  /* Content area image size constraint for mobile */
  .page-about__content-area img,
  .page-about__vision-mission img,
  .page-about__history img,
  .page-about__products-services img,
  .page-about__safety-fairness img,
  .page-about__social-responsibility img,
  .page-about__team img,
  .page-about__cta-section img {
    min-width: 200px !important; /* Enforce min width */
    min-height: 200px !important; /* Enforce min height */
    width: 100% !important; /* Ensure it takes full width */
    height: auto !important; /* Maintain aspect ratio */
  }
}

/* Ensure content area images don't go below 200px on desktop either */
.page-about__content-area img,
.page-about__vision-mission img,
.page-about__history img,
.page-about__products-services img,
.page-about__safety-fairness img,
.page-about__social-responsibility img,
.page-about__team img,
.page-about__cta-section img {
  min-width: 200px;
  min-height: 200px;
}