/* style/gdpr.css */

/* Variables (if not already in shared.css) */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f4f4f4; /* From body background */
  --border-color: #e0e0e0;
}

.page-gdpr {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--bg-light); /* Ensure consistency */
  padding-top: var(--header-offset, 120px); /* Space for fixed header */
}

/* 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) 0%, #0056b3 100%); /* Gradient with primary color */
  color: var(--text-light);
  overflow: hidden;
}

.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;
}

.page-gdpr__hero-image {
  width: 100%;
  max-width: 800px; /* Adjust max-width for image */
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.page-gdpr__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: none; /* Ensure no filter changes color */
}

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

.page-gdpr__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Highlight with secondary color */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
}

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

.page-gdpr__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-dark); /* Text on secondary color should be dark */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box; /* Button responsiveness */
  white-space: normal; /* Button responsiveness */
  word-wrap: break-word; /* Button responsiveness */
}

.page-gdpr__cta-button:hover {
  background: #ffdb8e; /* Lighter secondary for hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-gdpr__section {
  padding: 70px 20px;
  text-align: center;
}

.page-gdpr__section:nth-of-type(even) {
  background-color: #f9f9f9;
}

.page-gdpr__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-gdpr__section-title {
  font-size: 2.2em;
  margin-bottom: 40px;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.3;
}

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

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

.page-gdpr p {
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.7;
  color: inherit; /* Inherit color from parent section */
}

.page-gdpr a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-gdpr a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

.page-gdpr__grid--2-col {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.page-gdpr__grid--3-col {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Card Styling */
.page-gdpr__card {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark); /* Ensure dark text on light card */
  display: flex;
  flex-direction: column;
}

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

.page-gdpr__card--light {
  background: rgba(255, 255, 255, 0.95); /* Slightly transparent on dark bg */
  color: var(--text-dark);
}

.page-gdpr__card-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no filter changes color */
}

.page-gdpr__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
  flex-grow: 1; /* Allow title to grow */
}

/* Process Steps */
.page-gdpr__process {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-gdpr__process-step {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  flex: 1 1 calc(50% - 30px); /* Two columns on larger screens */
  max-width: calc(50% - 30px);
  color: var(--text-dark);
}

.page-gdpr__process-title {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

/* Contact Info */
.page-gdpr__contact-info {
  margin-top: 30px;
  font-size: 1.1em;
  color: var(--text-light);
}

.page-gdpr__contact-info a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-gdpr__contact-info a:hover {
  color: #ffdb8e;
}

.page-gdpr__button-group {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%; /* Button container responsiveness */
  max-width: 100%; /* Button container responsiveness */
  box-sizing: border-box; /* Button container responsiveness */
  overflow: hidden; /* Button container responsiveness */
}

.page-gdpr__btn-primary,
.page-gdpr__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 200px; /* Ensure buttons are not too small */
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box; /* Button responsiveness */
  white-space: normal; /* Button responsiveness */
  word-wrap: break-word; /* Button responsiveness */
}

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

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

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

.page-gdpr__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-gdpr__faq {
  padding-bottom: 70px;
}

.page-gdpr__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

/* 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 20px; /* Adjust padding for better look */
  opacity: 0;
  text-align: left;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 Sử dụng!important và max-height đủ lớn để đảm bảo nó 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 quyền ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important; /* Adjust padding for better look */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* Question styling */
.page-gdpr__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  text-align: left;
}

.page-gdpr__faq-item.active .page-gdpr__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d0d0d0;
}

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

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

/* Question title styling */
.page-gdpr__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: var(--primary-color);
}

/* Toggle icon */
.page-gdpr__faq-toggle {
  font-size: 28px; /* Slightly larger for better tap target */
  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; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger tap target */
  height: 32px; /* Larger tap target */
  border-radius: 50%;
  background-color: #f0f0f0;
}

.page-gdpr__faq-item.active .page-gdpr__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate for 'minus' effect */
  background-color: var(--secondary-color);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-gdpr__main-title {
    font-size: 2.5em;
  }
  .page-gdpr__section-title {
    font-size: 2em;
  }
}

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

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

  .page-gdpr__main-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-gdpr__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-gdpr__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important; /* Button responsiveness */
    max-width: 300px !important; /* Constrain width on mobile if needed */
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

  .page-gdpr__grid--2-col,
  .page-gdpr__grid--3-col {
    grid-template-columns: 1fr;
  }

  .page-gdpr__card {
    padding: 25px;
    text-align: center;
  }

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

  .page-gdpr__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    filter: none; /* Ensure no filter changes color */
  }

  .page-gdpr__process-step {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 25px;
  }

  .page-gdpr__process-title {
    font-size: 1.4em;
  }

  .page-gdpr__button-group {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-gdpr__btn-primary,
  .page-gdpr__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
  }

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

/* Ensure all images are responsive and not small icons */
.page-gdpr img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: none; /* Ensure no filter changes color */
}

/* Image container responsiveness */
.page-gdpr__section, 
.page-gdpr__card, 
.page-gdpr__container, 
.page-gdpr__hero-image, 
.page-gdpr__button-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent content overflow */
}

/* Specific image sizes */
.page-gdpr__hero-image img[width="1200"][height="675"] { /* Updated HTML width/height */
    /* Styles for hero image, will be handled by max-width: 100%; height: auto; */
}

.page-gdpr__card-image[width="800"][height="600"] {
    /* Styles for card images */
}

.page-gdpr__card-image[width="600"][height="400"] {
    /* Styles for smaller card images if needed */
}