/* style/contact.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f5f5f5;
  --border-color: #e0e0e0;
  --accent-red: #C30808;
  --accent-yellow: #FFFF00;
}

.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-color, var(--background-light)); /* Fallback for body background */
}

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

.page-contact__section-spacing {
  padding: 80px 0;
}

.page-contact__section-title {
  font-size: 38px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-contact__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: var(--text-dark);
}

.page-contact__section-text {
  font-size: 16px;
  text-align: justify;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

/* Hero Section */
.page-contact__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #017439aa 100%);
  color: var(--text-light);
  overflow: hidden;
}

.page-contact__hero-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.page-contact__hero-title {
  font-size: 52px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-contact__hero-description {
  font-size: 22px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-contact__cta-button {
  display: inline-block;
  padding: 18px 45px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__cta-button--primary {
  background: var(--accent-red);
  color: var(--accent-yellow);
  border: 2px solid var(--accent-yellow);
}

.page-contact__cta-button--primary:hover {
  background: #a80707;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-contact__cta-button--secondary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-contact__cta-button--secondary:hover {
  background: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-contact__method-card {
  background: var(--secondary-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-dark);
}

.page-contact__method-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-contact__method-icon {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 25px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  padding: 10px;
}

.page-contact__method-title {
  font-size: 26px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-contact__method-description {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-contact__social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.page-contact__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: var(--text-light);
  border-radius: 50%;
  font-size: 20px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-contact__social-icon:hover {
  background: var(--accent-red);
  transform: scale(1.1);
}

/* Contact Form */
.page-contact__contact-form-section {
  background-color: var(--background-light);
}

.page-contact__form {
  max-width: 700px;
  margin: 50px auto 0 auto;
  padding: 40px;
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-contact__form-group {
  margin-bottom: 25px;
}

.page-contact__form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: bold;
  color: var(--primary-color);
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
  outline: none;
}

.page-contact__form-textarea {
  resize: vertical;
}

.page-contact__form .page-contact__cta-button {
  width: 100%;
  margin-top: 20px;
}

/* FAQ Section */
.page-contact__faq-section {
  background-color: var(--secondary-color);
}

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

.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.page-contact__faq-question:hover {
  background: #005a2e;
}

.page-contact__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--accent-yellow);
  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: 32px;
  height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  transform: rotate(45deg); /* Change to X or rotate */
  color: var(--accent-yellow);
}

.page-contact__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 25px;
  opacity: 0;
  background: var(--background-light);
  color: var(--text-dark);
  border-radius: 0 0 10px 10px;
}

.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 2000px !important; /* Ensure it can expand for any content */
  padding: 25px !important;
  opacity: 1;
}

/* Commitment Section */
.page-contact__commitment-section {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-contact__commitment-section .page-contact__section-title,
.page-contact__commitment-section .page-contact__section-intro,
.page-contact__commitment-section .page-contact__section-text {
  color: var(--text-light);
}

.page-contact__commitment-section .page-contact__cta-button {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__hero-title {
    font-size: 44px;
  }
  .page-contact__hero-description {
    font-size: 20px;
  }
  .page-contact__section-title {
    font-size: 32px;
  }
  .page-contact__section-intro {
    font-size: 16px;
  }
  .page-contact__method-title {
    font-size: 22px;
  }
  .page-contact__faq-question h3 {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-contact__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
  }
  .page-contact__hero-title {
    font-size: 36px;
  }
  .page-contact__hero-description {
    font-size: 18px;
    margin-bottom: 30px;
  }
  .page-contact__cta-button {
    padding: 15px 30px;
    font-size: 18px;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-contact__cta-button--primary, .page-contact__cta-button--secondary {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-contact__section-spacing {
    padding: 50px 0;
  }
  .page-contact__section-title {
    font-size: 28px;
  }
  .page-contact__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-contact__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-contact__methods-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-contact__method-card {
    padding: 25px;
  }
  .page-contact__method-icon {
    width: 120px;
    height: 120px;
  }
  .page-contact__method-title {
    font-size: 20px;
  }
  .page-contact__method-description {
    font-size: 15px;
  }
  .page-contact__social-links {
    gap: 10px;
  }
  .page-contact__social-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .page-contact__form {
    padding: 30px 20px;
  }
  .page-contact__form-label {
    font-size: 16px;
  }
  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 12px;
    font-size: 15px;
  }

  .page-contact__faq-question {
    padding: 15px 20px;
  }
  .page-contact__faq-question h3 {
    font-size: 16px;
  }
  .page-contact__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-contact__faq-answer {
    padding: 0 20px;
  }
  .page-contact__faq-item.active .page-contact__faq-answer {
    padding: 20px !important;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-contact__section, .page-contact__card, .page-contact__container, .page-contact__methods-grid, .page-contact__form-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-contact__methods-grid, .page-contact__social-links {
    flex-wrap: wrap !important;
  }
  .page-contact__social-icon {
    margin: 0 5px;
  }
}

@media (max-width: 480px) {
  .page-contact__hero-title {
    font-size: 30px;
  }
  .page-contact__hero-description {
    font-size: 16px;
  }
  .page-contact__section-title {
    font-size: 24px;
  }
  .page-contact__faq-question h3 {
    font-size: 15px;
  }
  .page-contact__faq-toggle {
    font-size: 22px;
    width: 26px;
    height: 26px;
  }
}

/* Color Contrast Fixes (if needed, based on body background) */
/* Assuming --background-color is light (e.g., #f5f5f5 or white) */
.page-contact {
  color: var(--text-dark); /* Default dark text on light background */
}

.page-contact__method-card,
.page-contact__form,
.page-contact__faq-item {
  background: var(--secondary-color); /* White background */
  color: var(--text-dark); /* Dark text */
}

.page-contact__dark-section {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-contact__faq-question {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-contact__faq-answer {
  background: var(--background-light);
  color: var(--text-dark);
}

.page-contact__cta-button--primary {
  background: var(--accent-red);
  color: var(--accent-yellow);
}

.page-contact__cta-button--secondary {
  background: var(--primary-color);
  color: var(--text-light);
}