/* style/about.css */

/* Variables - for consistent colors and spacing within this page */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f8f8; /* A slightly off-white for sections */
  --border-color: #e0e0e0;
  --button-login-color: #EA7C07; /* From custom colors */
}

/* Base styles for the about page content */
.page-about {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* General Container for sections */
.page-about__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section Titles */
.page-about__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.page-about__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Sub-titles for blocks */
.page-about__sub-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

/* Paragraph descriptions */
.page-about__description {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Image content styles */
.page-about__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  filter: none; /* Ensure no CSS filter is applied */
}

/* Grid layout for cards/blocks */
.page-about__grid {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

.page-about__grid--2-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-about__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Card styles */
.page-about__card {
  background: var(--secondary-color); /* White background for cards */
  color: var(--text-dark); /* Dark text for cards */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

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

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

/* Button styles */
.page-about__cta-button,
.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-about__cta-button {
  background: var(--primary-color);
  color: var(--text-light);
  margin-top: 30px;
}

.page-about__cta-button:hover {
  background: #1e87b7; /* Darker shade of primary color */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid transparent;
  margin-top: 20px;
  margin-right: 15px;
}

.page-about__btn-primary:hover {
  background: #1e87b7;
  border-color: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-top: 20px;
}

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

/* Button container for multiple buttons */
.page-about__btn-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Text alignment helpers */
.page-about__text-center {
  text-align: center;
}

/* Section specific styles */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Light blue to white gradient */
  color: var(--text-dark); /* Default text color for hero, will be overridden by .page-about__hero-content */
}

.page-about__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-about__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  filter: none; /* Ensure no CSS filter is applied */
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--text-light); /* White text over primary color background/gradient */
}

.page-about__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--text-light); /* White text for main title */
}

/* Mission & Vision Section */
.page-about__mission-vision-section {
  background: var(--bg-light); /* Light background */
  color: var(--text-dark);
}

.page-about__mission-vision-section .page-about__container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-about__mission-vision-section .page-about__content-wrapper {
  flex: 1;
}

/* Values & Commitment Section */
.page-about__values-commitment-section {
  background: var(--primary-color); /* Darker background */
  color: var(--text-light); /* Light text */
}

.page-about__values-commitment-section .page-about__card {
  background: rgba(255, 255, 255, 0.9); /* Slightly transparent white cards */
  color: var(--text-dark); /* Dark text on cards */
}

.page-about__values-commitment-section .page-about__card-title {
  color: var(--primary-color); /* Primary color for card titles */
}

/* Products & Services Section */
.page-about__products-services-section {
  background: var(--secondary-color); /* White background */
  color: var(--text-dark);
}

.page-about__products-services-section .page-about__image-block {
  text-align: center;
  background: var(--bg-light);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-about__products-services-section .page-about__image-block .page-about__image-content {
  margin-bottom: 20px;
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  filter: none; /* Ensure no CSS filter is applied */
}

/* Security & Support Section */
.page-about__security-support-section {
  background: var(--primary-color); /* Darker background */
  color: var(--text-light); /* Light text */
}

.page-about__security-support-section .page-about__container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-about__security-support-section .page-about__text-block,
.page-about__security-support-section .page-about__image-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-about__security-support-section .page-about__sub-title {
  color: var(--text-light); /* White for sub-titles in dark sections */
}

/* FAQ Section */
.page-about__faq-section {
  background: var(--bg-light);
  color: var(--text-dark);
}

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

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

/* FAQ default state - answer hidden */
.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;
}

/* FAQ expanded state - ⚠️ Use !important and sufficiently large max-height */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use !important to ensure priority, value large enough for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 5px 5px;
}

/* Question style */
.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: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Question title style */
.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(--primary-color);
}

/* Toggle icon */
.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; /* 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); /* Rotate for 'x' effect, or simply change text to '-' */
}

/* CTA Section */
.page-about__cta-section {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 80px 20px;
}

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

.page-about__cta-section .page-about__section-title::after {
  background-color: var(--text-light);
}

.page-about__cta-section .page-about__description {
  color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-about__hero-image {
    width: 90%;
  }
  .page-about__main-title {
    font-size: 40px;
  }
  .page-about__section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-about {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-about__container {
    padding: 30px 15px;
  }

  .page-about__section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .page-about__sub-title {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-about__description {
    font-size: 16px;
  }

  /* Hero Section Mobile */
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-about__hero-image {
    border-radius: 4px;
    margin-bottom: 20px;
  }
  .page-about__main-title {
    font-size: 32px;
  }
  .page-about__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  /* Mission & Vision Section Mobile */
  .page-about__mission-vision-section .page-about__container {
    flex-direction: column;
    gap: 30px;
  }
  .page-about__mission-vision-section .page-about__image-content {
    order: -1; /* Image appears before text on mobile */
  }

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

  /* Cards Mobile */
  .page-about__card {
    padding: 25px;
  }
  .page-about__card-title {
    font-size: 20px;
  }

  /* Products & Services Section Mobile */
  .page-about__products-services-section .page-about__image-block {
    padding: 20px;
  }

  /* Security & Support Section Mobile */
  .page-about__security-support-section .page-about__grid--reverse-mobile {
    flex-direction: column-reverse; /* Reverse order for image/text blocks */
  }

  /* FAQ Mobile */
  .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;
  }

  /* Mobile image and button handling */
  .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: 15px;
    padding-right: 15px;
  }

  .page-about__cta-button,
  .page-about__btn-primary,
  .page-about__btn-secondary,
  .page-about a[class*="button"],
  .page-about a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important; /* Reset margin for stacking */
    margin-right: 0 !important; /* Reset margin for stacking */
    margin-bottom: 15px; /* Add space between stacked buttons */
  }
  
  .page-about__btn-container {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px; /* Space between stacked buttons */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}