/* style/contact.css */

/* Base styles for the contact page */
.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: var(--background-color, #FFFFFF); /* Ensure consistency with shared body background */
}

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

/* Hero Section */
.page-contact__hero-section {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Apply header offset */
  background: linear-gradient(90deg, #017439 0%, #017439 50%, #005f2f 100%); /* Brand color gradient */
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-contact__hero-content {
  flex: 1;
  padding-left: 20px;
  z-index: 1;
}

.page-contact__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Register/Login font color for emphasis */
}

.page-contact__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-contact__btn-primary,
.page-contact__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box; /* Include padding in width calculation */
  text-align: center;
}

.page-contact__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFFFF; /* Adjusted for WCAG AA contrast with #C30808 */
  border: 2px solid #C30808;
}

.page-contact__btn-primary:hover {
  background-color: #e01010;
  border-color: #e01010;
}

.page-contact__btn-secondary {
  background-color: #ffffff;
  color: #017439; /* Main brand color */
  border: 2px solid #017439;
}

.page-contact__btn-secondary:hover {
  background-color: #f0f0f0;
  border-color: #005f2f;
}

.page-contact__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: 20px;
}

.page-contact__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-contact__methods-section,
.page-contact__faq-section,
.page-contact__location-section {
  padding: 60px 0;
  text-align: center;
}

.page-contact__section-title {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #017439; /* Main brand color */
}

.page-contact__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Dark background sections */
.page-contact__dark-section {
  background-color: #017439; /* Main brand color */
  color: #ffffff;
}

.page-contact__dark-section .page-contact__section-title {
  color: #ffffff;
}

.page-contact__dark-section .page-contact__section-description {
  color: #f0f0f0;
}

/* Light background sections */
.page-contact__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

/* Contact Methods Grid */
.page-contact__contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-contact__card {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e0e0e0; /* Ensure visibility on white background */
}

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

.page-contact__card-icon {
  width: 100%; /* Make icon responsive within card */
  height: auto;
  max-width: 150px; /* Limit max size for card icons */
  margin: 0 auto 20px auto;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px;
}

.page-contact__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439;
}

.page-contact__card-text {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-contact__card .page-contact__btn-primary {
  width: 100%;
}

.page-contact__social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap; /* Allow social icons to wrap */
}

.page-contact__social-icon {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  transition: transform 0.3s ease;
  /* Enforce min size as per global rule */
  min-width: 200px;
  min-height: 200px;
}

.page-contact__social-icon:hover {
  transform: scale(1.1);
}

/* FAQ Section */
.page-contact__faq-section {
  background-color: #017439; /* Main brand color */
  color: #ffffff;
}

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

.page-contact__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

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

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

.page-contact__faq-item.active .page-contact__faq-toggle {
  transform: rotate(45deg);
}

.page-contact__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

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

.page-contact__faq-answer p {
  margin-bottom: 10px;
  color: #f0f0f0; /* Ensure text in answer is light */
}

/* Location Section */
.page-contact__location-section {
  background-color: #FFFFFF;
  color: #333333;
}

.page-contact__location-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  text-align: left;
}

.page-contact__location-info {
  flex: 1;
}

.page-contact__location-info .page-contact__section-title {
  color: #017439;
}

.page-contact__location-info .page-contact__section-description {
  color: #555555;
}

.page-contact__address-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  font-size: 1.1em;
  color: #333333;
}

.page-contact__address-list li {
  margin-bottom: 10px;
}

.page-contact__map-wrapper {
  flex: 1;
  min-width: 300px;
  height: 400px; /* Fixed height for map */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
  .page-contact__hero-section {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
  }

  .page-contact__hero-content {
    padding-left: 0;
  }

  .page-contact__hero-image-wrapper {
    padding-right: 0;
    margin-top: 40px;
  }

  .page-contact__location-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-contact__location-info {
    margin-bottom: 40px;
  }

  .page-contact__map-wrapper {
    width: 100%;
    height: 350px;
  }
}

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

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

  .page-contact__section-title {
    font-size: 1.8em;
  }

  .page-contact__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    align-items: center;
  }

  .page-contact__btn-primary,
  .page-contact__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.9em;
  }

  /* Image responsive */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Image containers */
  .page-contact__section,
  .page-contact__card,
  .page-contact__container,
  .page-contact__hero-section,
  .page-contact__methods-section,
  .page-contact__faq-section,
  .page-contact__location-section,
  .page-contact__contact-grid,
  .page-contact__faq-list,
  .page-contact__location-content {
    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 */
  }

  .page-contact__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
  }

  .page-contact__card-icon {
    min-width: 200px !important;
    min-height: 200px !important;
    width: 100% !important;
    max-width: 100% !important; /* Ensure it doesn't exceed card width */
  }

  .page-contact__social-icon {
    width: 200px !important;
    height: 200px !important;
    min-width: 200px !important; /* Enforce 200x200 as per rule */
    min-height: 200px !important;
  }

  .page-contact__map-wrapper {
    height: 250px;
    width: 100% !important;
  }
}