/* style/gdpr.css */

/* Custom properties for colors */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-login-btn-bg: #C30808;
    --register-login-btn-text: #FFFF00;
    --background-color-page: #FFFFFF; /* Specific background for this page's main content */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --border-color: #e0e0e0;
}

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

/* Hero Section */
.page-gdpr__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), #009688); /* Gradient with a slightly different green for visual interest */
    color: var(--text-color-light);
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-gdpr__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 image if needed */
}

.page-gdpr__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.page-gdpr__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px; /* Ensure images are not too small */
}

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

.page-gdpr__hero-section h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-color-light);
    line-height: 1.2;
}

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

.page-gdpr__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--register-login-btn-bg); /* Use specific red for CTA */
    color: var(--register-login-btn-text); /* Use specific yellow for CTA text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-gdpr__cta-button:hover {
    background: #a30606; /* Slightly darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-gdpr__section {
    padding: 60px 20px;
    margin-bottom: 0; /* Sections should not have external margin */
    background-color: var(--background-color-page);
}

.page-gdpr__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-gdpr__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-gdpr__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-gdpr__text-block {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-color-dark);
}

.page-gdpr__keyword {
    font-weight: bold;
    color: var(--primary-color);
}

.page-gdpr__link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-gdpr__link:hover {
    color: #004d2a; /* Darker green on hover */
    text-decoration: underline;
}

/* Dark Section Styling */
.page-gdpr__dark-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-gdpr__dark-section .page-gdpr__section-title {
    color: var(--text-color-light);
}

.page-gdpr__dark-section .page-gdpr__section-title::after {
    background-color: var(--secondary-color);
}

.page-gdpr__dark-section .page-gdpr__text-block {
    color: var(--text-color-light);
}

/* Medium Background Section Styling */
.page-gdpr__medium-bg {
    background-color: #f8f8f8; /* A very light grey, still light background */
    color: var(--text-color-dark);
}

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

.page-gdpr__commitment-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on green background */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-gdpr__commitment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-gdpr__commitment-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-color-light);
}

.page-gdpr__commitment-item p {
    color: var(--text-color-light);
}

/* Your Rights Grid */
.page-gdpr__rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-gdpr__right-item {
    text-align: center;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: var(--secondary-color); /* White background for cards */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-gdpr__right-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-gdpr__right-item img {
    width: 100%; /* Make card images responsive */
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 4px;
    object-fit: cover;
    min-height: 200px; /* Ensure images are not too small */
    min-width: 200px; /* Ensure images are not too small */
}

.page-gdpr__card-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-gdpr__right-item p {
    color: var(--text-color-dark);
}

/* Data Collection List */
.page-gdpr__data-list,
.page-gdpr__security-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    color: var(--text-color-dark);
}

.page-gdpr__data-list li,
.page-gdpr__security-list li {
    background: var(--secondary-color);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    color: var(--text-color-dark);
}

.page-gdpr__security-list img {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 30px auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Ensure images are not too small */
    min-width: 200px; /* Ensure images are not too small */
}

/* Contact Info */
.page-gdpr__contact-info {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
}

.page-gdpr__contact-info p {
    margin-bottom: 10px;
}

.page-gdpr__btn-primary,
.page-gdpr__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-gdpr__btn-primary {
    background: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--primary-color);
}

.page-gdpr__btn-primary:hover {
    background: #004d2a; /* Darker green */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-gdpr__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-gdpr__btn-secondary:hover {
    background: #e0ffe0; /* Lighter green */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-gdpr__faq-list {
    margin-top: 40px;
}

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

/* FAQ默认状态 - 答案隐藏 */
.page-gdpr__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;
  color: var(--text-color-dark);
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-gdpr__faq-item.active .page-gdpr__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 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề FAQ */
.page-gdpr__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;
}

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

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

/* Tiêu đề vấn đề FAQ */
.page-gdpr__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 click */
  color: var(--primary-color);
}

/* Biểu tượng chuyển đổi */
.page-gdpr__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; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-gdpr__faq-item.active .page-gdpr__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Chuyển thành X khi active */
}

/* Responsive Design for Desktop */
@media (min-width: 1024px) {
    .page-gdpr__hero-section h1 {
        font-size: 3.5em;
    }
    .page-gdpr__hero-description {
        font-size: 1.3em;
    }
    .page-gdpr__section-title {
        font-size: 2.5em;
    }
}

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

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

    .page-gdpr__hero-section h1 {
        font-size: 2em;
    }

    .page-gdpr__hero-description {
        font-size: 1em;
    }

    .page-gdpr__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-gdpr__section {
        padding: 40px 15px;
    }

    .page-gdpr__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-gdpr__container {
        padding: 0; /* Remove horizontal padding, sections handle it */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-gdpr__text-block {
        padding: 0 15px;
    }

    .page-gdpr__commitment-grid,
    .page-gdpr__rights-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-gdpr__commitment-item,
    .page-gdpr__right-item {
        padding: 20px;
    }

    .page-gdpr__commitment-title,
    .page-gdpr__card-title {
        font-size: 1.3em;
    }

    .page-gdpr__data-list li,
    .page-gdpr__security-list li {
        padding: 12px 15px;
        font-size: 0.95em;
    }

    .page-gdpr__contact-info {
        font-size: 1em;
    }

    .page-gdpr__btn-primary,
    .page-gdpr__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;
    }

    /* Images responsiveness */
    .page-gdpr img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover !important;
        min- /* Adjust minimum height for mobile */
        min- /* Adjust minimum width for mobile */
    }

    .page-gdpr__hero-image {
        margin-bottom: 20px;
    }
    
    .page-gdpr__hero-image img {
        border-radius: 4px;
    }

    .page-gdpr__security-list img {
        max-width: 100% !important;
        margin: 20px auto !important;
    }

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