/* style/contact.css */

/* CSS Variables for theme colors */
:root {
  --primary-color: #26A9E0; /* Main brand color (light blue) */
  --secondary-color: #FFFFFF; /* Auxiliary color (white) */
  --text-dark: #333333; /* Dark text for light backgrounds */
  --text-light: #ffffff; /* Light text for dark backgrounds */
  --button-login: #EA7C07; /* Specific color for login-like buttons */
  --background-default: #FFFFFF; /* Default background */
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.1);
}

.page-contact {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--background-default); /* Default background */
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

/* 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;
  background: linear-gradient(135deg, var(--primary-color) 0%, #aed6f1 100%); /* Light blue gradient */
  color: var(--text-light);
  overflow: hidden; /* Ensure image doesn't overflow */
}

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

.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: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px var(--shadow-light);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-contact__hero-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-contact__hero-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: var(--text-light);
}

.page-contact__hero-description a {
  color: var(--secondary-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-contact__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
  width: 100%;
}

.page-contact__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-primary {
  background: var(--button-login); /* Use specific login color for primary CTA */
  color: var(--text-light);
  border: 2px solid transparent;
}

.page-contact__btn-primary:hover {
  background: #c76706; /* Slightly darker orange */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-contact__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);
}

/* General Section Styling */
.page-contact__section {
  padding: 80px 20px;
  text-align: center;
}

.page-contact__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-contact__section-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-contact__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-dark);
}

.page-contact__section-description a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Contact Methods Section */
.page-contact__contact-methods {
  background-color: var(--background-default);
}

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

.page-contact__method-card {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px var(--shadow-light);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

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

.page-contact__method-text {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1; /* Push button to bottom */
}

.page-contact__method-text a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-contact__method-detail {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--button-login);
  margin-bottom: 20px;
}
.page-contact__method-detail a {
  color: var(--button-login);
  text-decoration: none;
}
.page-contact__method-detail a:hover {
  text-decoration: underline;
}


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

.page-contact__contact-form .page-contact__section-title,
.page-contact__contact-form .page-contact__section-description {
  color: var(--text-light);
}

.page-contact__form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--secondary-color);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: left;
}

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

.page-contact__form-label {
  display: block;
  font-size: 1.1em;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: bold;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  color: var(--text-dark);
  background-color: #f9f9f9;
}

.page-contact__form-textarea {
  resize: vertical;
  min-height: 120px;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
  color: #888;
}

.page-contact__submit-button {
  width: auto; /* Allow button to size naturally */
  max-width: 100%; /* Ensure responsiveness */
  padding: 15px 40px;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

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

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

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.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 20px; /* Adjusted padding for consistency */
  opacity: 0;
  color: var(--text-dark);
  text-align: left;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important; /* Adjusted padding for consistency */
  opacity: 1;
  background: #f9f9f9;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 5px 5px;
}
.page-contact__faq-item.active .page-contact__faq-answer p {
  margin-top: 0;
}
.page-contact__faq-item.active .page-contact__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Vấn đề kiểu dáng */
.page-contact__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;
  text-align: left;
}

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

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

/* Vấn đề tiêu đề kiểu dáng */
.page-contact__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: var(--text-dark);
}

/* Chuyển đổi biểu tượng */
.page-contact__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Sử dụng màu thương hiệu cho biểu tượng chuyển đổi */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: var(--button-login); /* Thay đổi màu khi hoạt động */
  transform: rotate(45deg); /* Tùy chọn: xoay để tạo hiệu ứng 'X' */
}


/* Why Us Section */
.page-contact__why-us {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-contact__why-us .page-contact__section-title,
.page-contact__why-us .page-contact__section-description {
  color: var(--text-light);
}
.page-contact__why-us a {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

.page-contact__feature-card {
  background: rgba(255, 255, 255, 0.15); /* Semi-transparent white background */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease, background-color 0.3s ease;
  color: var(--text-light);
}

.page-contact__feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.25);
}

.page-contact__feature-title {
  font-size: 1.8em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-contact__feature-text {
  font-size: 1em;
  color: var(--text-light);
}
.page-contact__feature-text a {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Quick Links Section */
.page-contact__quick-links {
  background-color: var(--background-default);
}

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

.page-contact__quick-link-button {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__hero-title {
    font-size: 2.8em;
  }
  .page-contact__hero-description {
    font-size: 1.1em;
  }
  .page-contact__section-title {
    font-size: 2em;
  }
  .page-contact__method-card img {
    max-width: 200px;
  }
}

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

  .page-contact__hero-section {
    padding: 40px 15px;
  }
  .page-contact__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-contact__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-contact__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-contact__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
  }

  .page-contact__section {
    padding: 50px 15px;
  }
  .page-contact__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-contact__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-contact__methods-grid,
  .page-contact__features-grid,
  .page-contact__quick-links-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-contact__method-card,
  .page-contact__feature-card {
    padding: 25px;
  }
  .page-contact__method-card img {
    
    min- /* Adjust min size for mobile */
    min- /* Adjust min size for mobile */
  }

  .page-contact__form {
    padding: 30px 20px;
  }
  .page-contact__form-label {
    font-size: 1em;
  }
  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px 12px;
    font-size: 0.95em;
  }
  .page-contact__submit-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  /* FAQ Mobile */
  .page-contact__faq-question {
    padding: 15px;
  }
  .page-contact__faq-question h3 {
    font-size: 1em;
  }
  .page-contact__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  .page-contact__faq-item.active .page-contact__faq-answer {
    padding: 15px !important;
  }

  /* Image responsiveness for mobile */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Ensure min size for all content images */
    min-height: 200px !important; /* Ensure min size for all content images */
  }
  .page-contact__section,
  .page-contact__card,
  .page-contact__container,
  .page-contact__form,
  .page-contact__faq-list,
  .page-contact__hero-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-contact__hero-section,
  .page-contact__contact-methods,
  .page-contact__contact-form,
  .page-contact__faq-section,
  .page-contact__why-us,
  .page-contact__quick-links {
    padding-left: 0;
    padding-right: 0;
  }
  .page-contact__method-card img {
    min-width: 200px !important; /* Ensure min size for card images */
    min-height: 200px !important; /* Ensure min size for card images */
  }
}

/* Ensure all links within main content use brand color */
.page-contact a:not(.page-contact__cta-button):not(.page-contact__btn-primary):not(.page-contact__btn-secondary):not(.page-contact__quick-link-button) {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-contact a:not(.page-contact__cta-button):not(.page-contact__btn-primary):not(.page-contact__btn-secondary):not(.page-contact__quick-link-button):hover {
  color: #1e87b7; /* Slightly darker primary color */
  text-decoration: underline;
}

/* Contrast Fixes */
.page-contact__dark-bg {
  background: var(--primary-color);
  color: var(--text-light);
}
.page-contact__light-bg {
  background: var(--background-default);
  color: var(--text-dark);
}

/* Ensure all images maintain original color */
.page-contact img {
  filter: none !important; /* Absolutely no filter */
}

/* Specific button styles for consistency on mobile */
.page-contact__btn-primary,
.page-contact__btn-secondary {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-contact__cta-buttons,
.page-contact__quick-links-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact__cta-button,
  .page-contact__submit-button,
  .page-contact__quick-link-button {
    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;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .page-contact__cta-buttons,
  .page-contact__quick-links-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 15px; /* Adjust gap for mobile */
  }
  .page-contact__cta-buttons {
    flex-direction: column;
  }
}