/* style/terms-conditions.css */

/* Base styles for the terms-conditions page */
.page-terms-conditions {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #ffffff; /* Explicitly set for content area if body is white */
}

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

/* Hero Section */
.page-terms-conditions__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); /* Ensure space for fixed header */
    background-color: #F0F8FF; /* Light background for hero section */
    overflow: hidden; /* Prevent image overflow */
}

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

.page-terms-conditions__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

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

.page-terms-conditions__hero-title {
    font-size: 3.2em;
    color: #26A9E0; /* Brand primary color for title */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.page-terms-conditions__hero-description {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-terms-conditions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Custom color for login/register */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-terms-conditions__cta-button:hover {
    background: #d66a06;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-terms-conditions__content-section {
    padding: 60px 0;
}

.page-terms-conditions__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-terms-conditions__dark-bg {
    background-color: #26A9E0; /* Primary brand color */
    color: #ffffff;
}

.page-terms-conditions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    color: inherit; /* Inherit color from parent section */
}

.page-terms-conditions__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
    color: inherit; /* Inherit color from parent section */
}

.page-terms-conditions__paragraph {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.page-terms-conditions__list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-terms-conditions__list-item {
    margin-bottom: 10px;
    font-size: 1.05em;
}

/* Grid Layout for content */
.page-terms-conditions__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.page-terms-conditions__grid--two-col {
    grid-template-columns: 1fr 1fr;
}

.page-terms-conditions__grid--reverse {
    grid-template-columns: 1fr 1fr;
}

.page-terms-conditions__grid-item {
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark sections */
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}
.page-terms-conditions__dark-bg .page-terms-conditions__grid-item {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background for items in dark section */
    color: #ffffff;
}
.page-terms-conditions__light-bg .page-terms-conditions__grid-item {
    background-color: #f9f9f9; /* Light background for items in light section */
    color: #333333;
    border: 1px solid #e0e0e0;
}


.page-terms-conditions__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    object-fit: cover;
}
.page-terms-conditions__image--right {
    margin-left: auto;
}

/* Buttons */
.page-terms-conditions__btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-terms-conditions__btn-primary:hover {
    background: #1e87bb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: #ffffff;
    color: #26A9E0; /* Primary brand color for text */
    border: 2px solid #26A9E0;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-terms-conditions__btn-secondary:hover {
    background: #e0f2f7;
    color: #1e87bb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-terms-conditions__faq-section {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light grey background for FAQ */
}

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

/* FAQ容器样式 */
.page-terms-conditions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

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

/* FAQ展开状态 - \ud83d\udea8 使用!important和足够大的max-height确保一定能展开 */
.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
  max-height: 2000px !important; /* \ud83d\udea8 使用!important确保优先级，值 đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  border: 1px solid #e0e0e0;
  border-top: none;
}

/* 问题样式 */
.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-question {
    border-radius: 5px 5px 0 0;
    border-bottom: none;
}

/* 问题标题样式 */
.page-terms-conditions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-terms-conditions__faq-toggle {
  font-size: 24px;
  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; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
  color: #26A9E0; /* Primary color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect, or simply change to '-' in JS */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-terms-conditions__hero-title {
        font-size: 2.8em;
    }
    .page-terms-conditions__hero-description {
        font-size: 1.1em;
    }
    .page-terms-conditions__section-title {
        font-size: 2em;
    }
    .page-terms-conditions__sub-title {
        font-size: 1.6em;
    }
    .page-terms-conditions__grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .page-terms-conditions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-terms-conditions__hero-title {
        font-size: 2em;
    }
    .page-terms-conditions__hero-description {
        font-size: 1em;
    }
    .page-terms-conditions__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-terms-conditions__content-section {
        padding: 40px 0;
    }
    .page-terms-conditions__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-terms-conditions__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-terms-conditions__sub-title {
        font-size: 1.4em;
    }
    .page-terms-conditions__paragraph,
    .page-terms-conditions__list-item {
        font-size: 0.95em;
    }

    .page-terms-conditions__grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 30px;
    }
    .page-terms-conditions__grid--two-col {
        grid-template-columns: 1fr;
    }
    .page-terms-conditions__grid--reverse {
        grid-template-columns: 1fr;
    }

    /* Image responsive rules */
    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-terms-conditions__grid-item {
        padding: 15px;
    }

    /* Button responsive rules */
    .page-terms-conditions__btn-primary,
    .page-terms-conditions__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;
    }

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

@media (max-width: 480px) {
    .page-terms-conditions__hero-title {
        font-size: 1.8em;
    }
    .page-terms-conditions__hero-description {
        font-size: 0.9em;
    }
    .page-terms-conditions__section-title {
        font-size: 1.6em;
    }
    .page-terms-conditions__sub-title {
        font-size: 1.2em;
    }
}