/* style/partners.css */

/* --- General Styles for page-partners --- */
.page-partners {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #f8f8f8; /* Slightly off-white for main content area */
    padding-top: var(--header-offset, 120px); /* Ensure content is not covered by fixed header */
}

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

.page-partners__section-title {
    font-size: 36px;
    color: #0A2463; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    position: relative;
}

.page-partners__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #E0B34D; /* Secondary color for accent */
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-partners__section-title--light {
    color: #ffffff; /* White text for dark backgrounds */
}

.page-partners__section-title--light::after {
    background-color: #ffffff; /* White accent for dark backgrounds */
}

.page-partners__text-block {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-partners__text-block--light {
    color: #f0f0f0; /* Light text for dark backgrounds */
}

.page-partners__dark-bg {
    background-color: #0A2463; /* Primary brand color for dark sections */
    color: #ffffff;
    padding: 60px 0;
}

.page-partners__light-bg {
    background-color: #ffffff;
    color: #333333;
    padding: 60px 0;
}

.page-partners__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #E0B34D; /* Secondary color for CTA buttons */
    color: #0A2463; /* Primary color for text on secondary background */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-partners__cta-button:hover {
    background: #c79e3e; /* Slightly darker secondary color on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-partners__cta-button--large {
    padding: 18px 50px;
    font-size: 22px;
}

/* --- Hero Section --- */
.page-partners__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, #0A2463, #1A3E7A); /* Gradient with primary color */
    overflow: hidden; /* Ensure no overflow from image */
}

.page-partners__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any background effects */
}

.page-partners__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 900px; /* Limit image width in hero */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-partners__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-partners__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: #ffffff;
}

.page-partners__main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #E0B34D; /* Secondary color for main title */
}

.page-partners__description {
    font-size: 22px;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

/* --- Introduction Section --- */
.page-partners__introduction {
    padding: 80px 0;
}

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

.page-partners__feature-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-partners__feature-title {
    font-size: 24px;
    color: #0A2463;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-partners__feature-item p {
    font-size: 16px;
    color: #555555;
    line-height: 1.7;
}

/* --- Why Join Section --- */
.page-partners__why-join {
    padding: 80px 0;
}

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

.page-partners__benefit-card {
    background-color: #1A3E7A; /* Darker shade of primary for cards */
    color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-partners__benefit-image {
    width: 100%;
    max-width: 400px; /* Constrain image width within card */
    height: 300px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-partners__benefit-title {
    font-size: 28px;
    color: #E0B34D; /* Secondary color for benefit titles */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-partners__benefit-card p {
    font-size: 17px;
    color: #cccccc;
    line-height: 1.7;
}

/* --- How to Join Section --- */
.page-partners__how-to-join {
    padding: 80px 0;
}

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

.page-partners__step-item {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 5px solid #E0B34D; /* Accent with secondary color */
    transition: all 0.3s ease;
}

.page-partners__step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #0A2463; /* Change accent color on hover */
}

.page-partners__step-number {
    font-size: 48px;
    font-weight: bold;
    color: #E0B34D;
    margin-bottom: 15px;
    line-height: 1;
}

.page-partners__step-title {
    font-size: 24px;
    color: #0A2463;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-partners__step-item p {
    font-size: 16px;
    color: #555555;
    line-height: 1.7;
}

.page-partners__cta-area {
    text-align: center;
    margin-top: 60px;
}

/* --- FAQ Section --- */
.page-partners__faq-section {
    padding: 80px 0;
}

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

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

/* FAQ默认状态 - 答案隐藏 */
.page-partners__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;
  opacity: 0;
}

/* FAQ展开状态 - ⚠️ Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-partners__faq-item.active .page-partners__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;
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e0e0e0;
}

/* Vấn đề kiểu dáng */
.page-partners__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  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-partners__faq-item.active .page-partners__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #0A2463; /* Primary color when active */
}

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

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

/* Tiêu đề câu hỏi kiểu dáng */
.page-partners__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #0A2463; /* Primary color for question text */
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
}

/* Chuyển đổi biểu tượng */
.page-partners__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #E0B34D; /* Secondary color for toggle icon */
  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;
  height: 32px;
}

.page-partners__faq-item.active .page-partners__faq-toggle {
  color: #0A2463; /* Primary color when active */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng dấu trừ */
}

.page-partners__faq-answer p {
    font-size: 16px;
    line-height: 1.7;
    color: #555555;
}

/* --- Contact CTA Section --- */
.page-partners__contact-cta {
    padding: 80px 0;
    text-align: center;
}

.page-partners__text-center {
    text-align: center;
}

.page-partners__button-group {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
}

.page-partners__btn-primary,
.page-partners__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    box-sizing: border-box; /* Bao gồm padding và border trong tổng chiều rộng và chiều cao của phần tử */
    max-width: 100%; /* Đảm bảo các nút không bị tràn */
    white-space: normal; /* Cho phép văn bản xuống dòng */
    word-wrap: break-word; /* Ngắt từ dài */
}

.page-partners__btn-primary {
    background: #E0B34D; /* Secondary color */
    color: #0A2463; /* Primary color for text */
    border-color: #E0B34D;
}

.page-partners__btn-primary:hover {
    background: #c79e3e;
    border-color: #c79e3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-partners__btn-secondary {
    background: transparent;
    color: #E0B34D; /* Secondary color for text */
    border-color: #E0B34D;
}

.page-partners__btn-secondary:hover {
    background: #E0B34D;
    color: #0A2463;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-partners__main-title {
        font-size: 42px;
    }
    .page-partners__description {
        font-size: 20px;
    }
    .page-partners__section-title {
        font-size: 32px;
    }
    .page-partners__benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

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

    .page-partners__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-partners__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-partners__main-title {
        font-size: 34px;
        margin-bottom: 15px;
    }
    .page-partners__description {
        font-size: 18px;
        margin-bottom: 30px;
    }
    .page-partners__cta-button {
        padding: 12px 30px;
        font-size: 18px;
        width: 100% !important; /* Ensure buttons take full width */
        max-width: 100% !important;
    }
    .page-partners__cta-button--large {
        padding: 15px 40px;
        font-size: 20px;
    }

    .page-partners__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-partners__section-title::after {
        margin-top: 10px;
    }

    .page-partners__text-block {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-partners__features-grid,
    .page-partners__benefits-grid,
    .page-partners__steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
    }

    .page-partners__feature-item,
    .page-partners__benefit-card,
    .page-partners__step-item {
        padding: 25px;
    }

    .page-partners__feature-title,
    .page-partners__benefit-title,
    .page-partners__step-title {
        font-size: 22px;
    }

    .page-partners__benefit-image {
        height: 250px;
    }

    .page-partners__step-number {
        font-size: 40px;
    }

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

    .page-partners__button-group {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-partners__btn-primary,
    .page-partners__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px;
        padding: 12px 25px;
    }
    
    /* Ensure images within content areas are responsive */
    .page-partners img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-partners__hero-image img {
        border-radius: 8px;
    }
}