/* style/contact.css */

/* General page styling */
.page-contact {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light background */
  background-color: var(--secondary-color); /* White background */
}

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

.page-contact__section-title {
  font-size: 36px;
  color: #017439; /* Primary color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-contact__section-description {
  font-size: 18px;
  color: #555555;
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-contact__cta-button,
.page-contact__btn-primary,
.page-contact__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-contact__btn-primary {
  background: #017439; /* Primary color */
  color: #ffffff;
  border: 2px solid #017439;
}

.page-contact__btn-primary:hover {
  background: #005a2e; /* Darker green on hover */
  border-color: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-contact__btn-secondary:hover {
  background: #f0f0f0;
  color: #005a2e;
  border-color: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.page-contact__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 offset */
  background: linear-gradient(135deg, #017439, #005a2e); /* Darker gradient for hero */
  color: #ffffff; /* White text for dark background */
}

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

.page-contact__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-contact__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-contact__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Yellow for main title as per register/login font color for emphasis */
}

.page-contact__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-contact__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Contact Info Section */
.page-contact__info-section {
  padding: 80px 0;
  background-color: var(--secondary-color); /* White background */
}

.page-contact__contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-contact__method-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 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;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

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

.page-contact__method-title {
  font-size: 24px;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-contact__method-text {
  font-size: 16px;
  color: #666666;
  margin-bottom: 25px;
  flex-grow: 1; /* Allow text to take up available space */
}

.page-contact__method-card .page-contact__btn-primary,
.page-contact__method-card .page-contact__btn-secondary {
    width: 100%;
    margin-top: auto; /* Push button to bottom */
}

.page-contact__social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.page-contact__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f0f0f0;
    color: #017439;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid #e0e0e0;
}

.page-contact__social-icon:hover {
    background: #017439;
    color: #ffffff;
    border-color: #017439;
}


/* Contact Form Section */
.page-contact__form-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #017439, #005a2e); /* Darker gradient for form */
  color: #ffffff;
}

.page-contact__form-section .page-contact__section-title {
  color: #FFFF00; /* Yellow for title */
}

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

.page-contact__form-layout {
  display: flex;
  gap: 50px;
  align-items: center;
  flex-wrap: wrap;
}

.page-contact__form-content {
  flex: 1;
  min-width: 400px;
}

.page-contact__form-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-contact__form-image img {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  min-width: 200px; /* Ensure minimum image size */
  min-height: 200px;
}

.page-contact__contact-form {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
}

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

.page-contact__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #ffffff;
  font-size: 16px;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: #FFFF00; /* Yellow focus border */
  background: rgba(0, 0, 0, 0.3);
  outline: none;
}

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

.page-contact__form-submit-btn {
  width: 100%;
  padding: 18px;
  font-size: 20px;
  border-radius: 8px;
  background: #C30808; /* Red for submit button */
  color: #FFFF00; /* Yellow text for submit button */
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-contact__form-submit-btn:hover {
  background: #a00606; /* Darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-contact__faq-section {
  padding: 80px 0;
  background-color: #f9f9f9; /* Light background for FAQ */
}

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

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

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-contact__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #017439; /* Primary color for toggle */
  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: 30px;
  height: 30px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: #C30808; /* Red when active */
  transform: rotate(45deg); /* Plus sign rotates to X */
}

.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: #fdfdfd;
  color: #555555;
}

.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain any content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 10px 10px;
  border: 1px solid #e0e0e0;
  border-top: none;
}

.page-contact__faq-answer p {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Image responsiveness and minimum size */
.page-contact img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-contact__main-title {
    font-size: 40px;
  }
  .page-contact__hero-description {
    font-size: 18px;
  }
  .page-contact__section-title {
    font-size: 32px;
  }
  .page-contact__method-title {
    font-size: 22px;
  }
  .page-contact__form-layout {
    flex-direction: column;
    gap: 30px;
  }
  .page-contact__form-content,
  .page-contact__form-image {
    min-width: unset;
    width: 100%;
  }
  .page-contact__form-image img {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-contact__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-contact__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-contact__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-contact__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-contact__cta-button,
  .page-contact__btn-primary,
  .page-contact__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-contact__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-contact__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-contact__container,
  .page-contact__method-card,
  .page-contact__contact-form,
  .page-contact__faq-item {
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-contact__contact-methods {
    grid-template-columns: 1fr;
  }
  .page-contact__method-card {
    padding: 25px;
  }
  .page-contact__method-title {
    font-size: 20px;
  }
  .page-contact__method-text {
    font-size: 15px;
  }

  .page-contact__form-content {
    order: 2; /* Form content below image on mobile */
  }
  .page-contact__form-image {
    order: 1;
    margin-bottom: 20px;
  }
  .page-contact__form-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* Ensure all images are responsive */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}