/* style/about.css */

/* Custom properties for colors */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-bg: #C30808;
  --login-button-bg: #C30808;
  --button-text-color: #FFFF00; /* For register/login buttons */
  --light-text-color: #f8f9fa; /* For dark backgrounds */
  --dark-text-color: #333333; /* For light backgrounds */
  --border-color: #e0e0e0;
  --background-color-light: #f9f9f9;
}

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

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

.page-about__section {
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.page-about__section-title {
  font-size: 36px;
  margin-bottom: 30px;
  color: var(--primary-color);
  font-weight: bold;
}

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

.page-about__paragraph {
  font-size: 17px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__paragraph--white {
  color: var(--light-text-color);
}

/* Hero Section */
.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: var(--header-offset, 120px); /* Fixed header spacing */
  background: linear-gradient(135deg, var(--primary-color) 0%, #000000 100%); /* Darker gradient for hero */
  color: var(--light-text-color);
  overflow: hidden; /* Ensure no overflow from image */
}

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

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.page-about__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
  border-radius: 8px;
  margin-top: -80px; /* Overlap with image slightly */
}

.page-about__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--light-text-color);
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-about__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--light-text-color);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--register-button-bg); /* Use custom color for register/login */
  color: var(--button-text-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__cta-button:hover {
  background: #a30606; /* Slightly darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* General Buttons */
.page-about__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--light-text-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.page-about__btn-primary:hover {
  background: #005a2e; /* Darker green */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-about__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
}

.page-about__btn-secondary:hover {
  background: #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* About Us Intro */
.page-about__about-us-intro {
  background-color: var(--secondary-color);
  color: var(--dark-text-color);
}

.page-about__image-text-block {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.page-about__image-text-block img {
    flex-shrink: 0;
    width: 40%;
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-about__image-text-block .page-about__paragraph {
    flex-grow: 1;
    margin: 0;
    max-width: none;
}


/* Mission & Vision */
.page-about__mission-vision {
  background-color: var(--primary-color); /* Dark background for this section */
  color: var(--light-text-color);
}

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

.page-about__mission-item {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-about__mission-item img {
  width: 100%;
  max-width: 250px;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.page-about__mission-subtitle {
  font-size: 24px;
  color: var(--light-text-color);
  margin-bottom: 15px;
}

/* Why Choose Section */
.page-about__why-choose {
  background-color: var(--background-color-light);
  color: var(--dark-text-color);
}

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

.page-about__advantage-card {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-about__advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-about__advantage-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.page-about__card-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Expert Team */
.page-about__expert-team {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}

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

.page-about__team-gallery img {
  width: 100%;
  height: 250px;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Tech & Security */
.page-about__tech-security {
  background-color: var(--secondary-color);
  color: var(--dark-text-color);
}

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

.page-about__feature-item {
  background: var(--background-color-light);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.page-about__feature-item img {
  width: 200px;
  height: 200px;
  max-width: 200px; /* Max width to prevent overly large images */
  object-fit: contain; /* Use contain for icons/logos */
  margin-bottom: 20px;
}

.page-about__feature-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Partnerships */
.page-about__partnerships {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}

.page-about__partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-about__partner-logos img {
  width: 200px;
  height: 200px;
  max-width: 200px;
  object-fit: contain;
  /* Removed filter to comply with strict image color rules */
}

/* Contact Info */
.page-about__contact-info {
  background-color: var(--background-color-light);
  color: var(--dark-text-color);
}

.page-about__contact-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  margin-bottom: 30px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__contact-item {
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-about__contact-item::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  font-size: 20px;
  line-height: 1;
}

.page-about__contact-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-about__contact-link:hover {
  text-decoration: underline;
}

/* FAQ Section */
.page-about__faq-section {
  background-color: var(--secondary-color);
  color: var(--dark-text-color);
  padding-bottom: 80px;
}

.page-about__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important */
  padding: 20px 15px !important; /* 🚨 Using !important */
  opacity: 1;
  background: var(--background-color-light);
  border-radius: 0 0 5px 5px;
  color: var(--dark-text-color);
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  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;
}

.page-about__faq-question:hover {
  background: var(--background-color-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; /* Prevent h3 from blocking click event */
  color: var(--dark-text-color);
}

.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  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);
  transform: rotate(45deg); /* Optional: rotate for 'x' effect, or just change text */
}

/* Global image styles for responsiveness and minimum size */
.page-about img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: none !important; /* Explicitly ensure no filter */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__hero-title {
    font-size: 40px;
  }
  .page-about__hero-description {
    font-size: 18px;
  }
  .page-about__section-title {
    font-size: 30px;
  }
  .page-about__paragraph {
    font-size: 16px;
  }
  .page-about__image-text-block {
    flex-direction: column;
    text-align: center;
  }
  .page-about__image-text-block img {
    width: 80%;
    max-width: 500px;
    margin-bottom: 20px;
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
  }
}

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