/* style/contact.css */

/* Base styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #f8f8f8;
}

/* Ensure padding-top for header offset */
.page-contact {
    padding-top: var(--header-offset, 120px);
}

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

.page-contact__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #2C3E50; /* Dark blue for titles */
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

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

/* 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, rgba(255, 215, 0, 0.1), rgba(44, 62, 80, 0.1)); /* Light gradient overlay */
}

.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-section img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    filter: brightness(0.7); /* Slightly darken image for text contrast */
}

.page-contact__hero-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 900px;
    color: #ffffff; /* White text on darkened image */
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent background for text */
}

.page-contact__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFD700; /* Gold for main title */
    line-height: 1.2;
}

.page-contact__intro-text {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-contact__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Primary gold color */
    color: #2C3E50; /* Dark blue text on gold button */
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-contact__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Methods Section */
.page-contact__methods-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background for this section */
}

.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: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

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

.page-contact__card-title {
    font-size: 24px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 15px;
}

.page-contact__method-card p {
    font-size: 16px;
    color: #555555;
    margin-bottom: 25px;
}

/* Form Section */
.page-contact__form-section {
    padding: 80px 0;
    background-color: #2C3E50; /* Dark blue background */
    color: #ffffff; /* White text on dark background */
}

.page-contact__form-section .page-contact__section-title,
.page-contact__form-section .page-contact__section-description {
    color: #ffffff;
}

.page-contact__contact-form {
    max-width: 700px;
    margin: 40px auto 0;
    background: #3a4f6a; /* Slightly lighter dark blue for form background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #556b82;
    border-radius: 5px;
    background-color: #4a617e;
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #FFD700; /* Gold focus border */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

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

.page-contact__form-submit-btn {
    width: auto;
    min-width: 180px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    background: #FFD700;
    color: #2C3E50;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-contact__form-submit-btn:hover {
    background: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

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

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

/* 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 25px; /* Adjust padding for better look */
  opacity: 0;
  background-color: #f0f0f0;
  color: #555555;
}

/* 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 25px !important; /* Adjust padding for better look */
  opacity: 1;
  background: #f0f0f0;
  border-radius: 0 0 8px 8px;
}

/* Vấn đề phong cách */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjust padding for better look */
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-contact__faq-item.active .page-contact__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #FFD700; /* Gold border when active */
}

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

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

/* Phong cách tiêu đề vấn đề */
.page-contact__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
  color: #2C3E50;
}

/* Chuyển đổi biểu tượng */
.page-contact__faq-toggle {
  font-size: 28px; /* Biểu tượng lớn hơn */
  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; /* Ngăn chặn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Khu vực chuyển đổi lớn hơn */
  height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: #FFD700; /* Màu vàng khi hoạt động */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}


/* Call to Action Section */
.page-contact__call-to-action {
    padding: 80px 0;
    background-color: #2C3E50; /* Dark blue background */
    color: #ffffff;
    text-align: center;
}

.page-contact__call-to-action .page-contact__section-title,
.page-contact__call-to-action .page-contact__section-description {
    color: #ffffff;
}

.page-contact__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.page-contact__btn-primary,
.page-contact__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure buttons are responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary {
    background: #FFD700;
    color: #2C3E50;
    border: 2px solid transparent;
}

.page-contact__btn-primary:hover {
    background: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-contact__btn-secondary {
    background: transparent;
    color: #FFD700;
    border: 2px solid #FFD700;
}

.page-contact__btn-secondary:hover {
    background: #FFD700;
    color: #2C3E50;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-contact__main-title {
        font-size: 40px;
    }

    .page-contact__intro-text {
        font-size: 18px;
    }

    .page-contact__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    /* Mobile header offset override */
    .page-contact {
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-contact__hero-section {
        padding: 40px 15px;
    }

    .page-contact__hero-content {
        width: 95%;
        padding: 15px;
    }

    .page-contact__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-contact__intro-text {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .page-contact__cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }

    .page-contact__section-title {
        font-size: 28px;
        padding-top: 30px;
    }

    .page-contact__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-contact__methods-section,
    .page-contact__form-section,
    .page-contact__faq-section,
    .page-contact__call-to-action {
        padding: 60px 0;
    }

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

    .page-contact__method-card {
        padding: 25px;
    }

    .page-contact__card-title {
        font-size: 22px;
    }

    .page-contact__contact-form {
        padding: 30px;
        margin-top: 30px;
    }

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

    .page-contact__form-submit-btn {
        width: 100%; /* Full width button on mobile */
        padding: 15px 20px;
        font-size: 16px;
    }

    /* FAQ Mobile Styles */
    .page-contact__faq-question {
      padding: 15px 20px;
      flex-wrap: wrap;
    }
    
    .page-contact__faq-question h3 {
      font-size: 16px;
      margin-bottom: 0;
      width: calc(100% - 40px);
    }
    
    .page-contact__faq-toggle {
      margin-left: 10px;
      width: 28px;
      height: 28px;
      font-size: 24px;
    }
    
    .page-contact__faq-answer {
      padding: 0 20px;
    }
    
    .page-contact__faq-item.active .page-contact__faq-answer {
      padding: 15px 20px !important;
    }

    /* Buttons responsive */
    .page-contact__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact a[class*="button"],
    .page-contact a[class*="btn"] {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      white-space: normal !important;
      word-wrap: break-word !important;
      padding-left: 15px; /* Add padding for mobile */
      padding-right: 15px; /* Add padding for mobile */
    }
    
    .page-contact__cta-buttons,
    .page-contact__button-group,
    .page-contact__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
    }

    /* Images responsive */
    .page-contact img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-contact__section,
    .page-contact__card,
    .page-contact__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-contact__main-title {
        font-size: 28px;
    }

    .page-contact__intro-text {
        font-size: 15px;
    }

    .page-contact__section-title {
        font-size: 24px;
    }

    .page-contact__form-input,
    .page-contact__form-textarea {
        font-size: 14px;
    }
}