:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --background-light: #f9f9f9;
    --button-register: #C30808;
    --button-register-text: #FFFF00;
}

.page-gdpr {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--secondary-color); /* Matches body background assumption */
}

.page-gdpr__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 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;
    padding-top: var(--header-offset, 120px); /* Ensure spacing from fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, #015f2e 100%); /* Green gradient */
    color: var(--text-light);
}

.page-gdpr__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--text-light);
}

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

.page-gdpr__hero-image-wrapper {
  width: 100%;
  margin-bottom: 30px;
  max-width: 900px; /* Constrain image width in hero */
}

.page-gdpr__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-gdpr__btn-primary,
.page-gdpr__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping for buttons */
    word-wrap: break-word; /* Allow text wrapping for buttons */
    box-sizing: border-box;
}

.page-gdpr__btn-primary {
    background: var(--button-register); /* Specific color for register */
    color: var(--button-register-text); /* Specific text color for register */
    border: 2px solid var(--button-register);
}

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

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

.page-gdpr__btn-secondary:hover {
    background: #e0e0e0;
    border-color: #015f2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* General Sections */
.page-gdpr__section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-gdpr__section:last-of-type {
    border-bottom: none;
}

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

.page-gdpr__sub-title {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-gdpr__section--intro p,
.page-gdpr__section--data-usage p {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

/* Dark Section for Rights */
.page-gdpr__section--rights {
    background-color: var(--primary-color); /* Dark background */
    color: var(--text-light); /* Light text */
}

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

.page-gdpr__section--rights p {
    color: var(--text-light);
}

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

.page-gdpr__card {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-gdpr__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-gdpr__card-image {
    width: 100%;
    max-width: 250px; /* Constrain card image size */
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
    object-fit: cover;
}

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

.page-gdpr__card p {
    font-size: 1em;
    color: var(--text-light);
    flex-grow: 1; /* Ensure consistent card height */
}

/* Protection Section */
.page-gdpr__list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.page-gdpr__list-item {
    background: var(--background-light);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1.1em;
    color: var(--text-dark);
}

.page-gdpr__list-item strong {
    color: var(--primary-color);
}

.page-gdpr__image-full {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    margin: 30px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.page-gdpr__contact-info {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
}

.page-gdpr__contact-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.page-gdpr__contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.page-gdpr__contact-info a:hover {
    text-decoration: underline;
}

.page-gdpr__image-contact {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px 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 2px 10px 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;
  padding: 0 15px;
  opacity: 0;
  background: var(--background-light);
  color: var(--text-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;
  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: var(--background-light);
  border-color: #d0d0d0;
}

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

/* Tiêu đề câu hỏi FAQ */
.page-gdpr__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
  color: var(--primary-color); /* Màu tiêu đề câu hỏi FAQ */
}

/* 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); /* Thay đổi thành dấu gạch chéo hoặc dấu trừ */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-gdpr__hero-title {
        font-size: 2.5em;
    }
    .page-gdpr__hero-description {
        font-size: 1.1em;
    }
    .page-gdpr__section-title {
        font-size: 1.8em;
    }
    .page-gdpr__sub-title {
        font-size: 1.4em;
    }
    .page-gdpr__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-gdpr__container {
        padding: 15px;
    }

    /* Hero Section Mobile */
    .page-gdpr__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-gdpr__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-gdpr__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-gdpr__hero-image {
        border-radius: 4px;
    }

    .page-gdpr__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to container of buttons */
    }

    .page-gdpr__btn-primary,
    .page-gdpr__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General Sections Mobile */
    .page-gdpr__section {
        padding: 40px 0;
    }
    .page-gdpr__section-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    .page-gdpr__sub-title {
        font-size: 1.2em;
    }

    .page-gdpr__list-item {
        font-size: 1em;
        padding: 12px 15px;
    }

    /* Images Mobile */
    .page-gdpr img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-gdpr__section,
    .page-gdpr__card,
    .page-gdpr__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Mobile */
    .page-gdpr__faq-question {
      padding: 15px;
      flex-wrap: wrap;
    }
    
    .page-gdpr__faq-question h3 {
      font-size: 15px;
      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;
    }
}