/* style/gdpr.css */

/* Variables for colors */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000080; /* Dark Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #000;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
}

/* Base styles for GDPR page content */
.page-gdpr {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Ensure consistency if main is not transparent */
  line-height: 1.6;
  padding-top: 10px; /* Desktop: Adjust for fixed header */
}

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

/* Hero Section */
.page-gdpr__hero-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #000060 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--primary-color);
}

.page-gdpr__hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.page-gdpr__main-title {
  font-size: 3.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-gdpr__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.page-gdpr__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--secondary-color); /* Text on gold should be dark blue for contrast */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-gdpr__cta-button:hover {
  background: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-gdpr__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--primary-color); /* Text on dark blue should be gold */
  border: 2px solid var(--primary-color);
}

.page-gdpr__cta-button--secondary:hover {
  background: #000060; /* Slightly darker dark blue */
  color: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-gdpr__section {
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-gdpr__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-gdpr__section-subtitle {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
}

.page-gdpr__content-block {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}

.page-gdpr__content-block--reverse {
  flex-direction: row-reverse;
}

.page-gdpr__content-block p {
  flex: 1;
  font-size: 1.05em;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.page-gdpr__content-block p a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-gdpr__content-block p a:hover {
  color: #e6c200;
}

.page-gdpr__image {
  flex: 0 0 40%;
  max-width: 40%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.page-gdpr__image--left {
  margin-right: 20px;
}

.page-gdpr__image--right {
  margin-left: 20px;
}

/* Grid Layout for data collection cards */
.page-gdpr__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-gdpr__card {
  background: rgba(0, 0, 0, 0.4); /* Dark background with transparency */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-gdpr__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-gdpr__card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-gdpr__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-gdpr__center-cta {
  text-align: center;
  margin-top: 50px;
}

/* User Rights Section */
.page-gdpr__rights-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

.page-gdpr__right-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.page-gdpr__right-item:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.page-gdpr__right-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-gdpr__right-item p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
  line-height: 1.6;
}

/* Contact DPO Section */
.page-gdpr__contact-dpo {
  text-align: center;
}

.page-gdpr__contact-info {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 30px;
  max-width: 600px;
  margin: 40px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-gdpr__contact-info p {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
}

.page-gdpr__contact-info strong {
  color: var(--primary-color);
}

.page-gdpr__contact-info a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

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

/* FAQ Section */
.page-gdpr__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

.page-gdpr__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-gdpr__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(0, 0, 0, 0.5); /* Slightly darker for question */
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-gdpr__faq-question:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
}

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

.page-gdpr__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-gdpr__faq-item.active .page-gdpr__faq-toggle {
  color: var(--text-light);
  transform: rotate(180deg); /* Rotate for minus sign effect */
}

.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 25px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.2); /* Lighter background for answer */
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
  line-height: 1.6;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-gdpr__faq-item.active .page-gdpr__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important for priority, large enough value */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-gdpr__faq-answer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.page-gdpr__faq-answer p a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-gdpr__faq-answer p a:hover {
  color: #e6c200;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-gdpr__main-title {
    font-size: 3em;
  }
  .page-gdpr__section-title {
    font-size: 2em;
  }
  .page-gdpr__content-block {
    flex-direction: column;
    text-align: center;
  }
  .page-gdpr__content-block--reverse {
    flex-direction: column;
  }
  .page-gdpr__image {
    max-width: 80%;
    margin: 20px auto !important;
  }
  .page-gdpr__content-block p {
    flex: none;
  }
  .page-gdpr__rights-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-gdpr {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
  }
  .page-gdpr__container {
    padding: 0 15px;
  }
  .page-gdpr__hero-section {
    padding: 60px 0;
  }
  .page-gdpr__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-gdpr__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-gdpr__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-gdpr__cta-button {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-gdpr__section {
    padding: 40px 0;
  }
  .page-gdpr__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-gdpr__section-subtitle {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-gdpr__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-gdpr__card {
    padding: 20px;
  }
  .page-gdpr__card-title {
    font-size: 1.3em;
  }
  .page-gdpr__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 20px auto !important;
    box-sizing: border-box !important;
  }

  /* FAQ Mobile Styles */
  .page-gdpr__faq-question {
    padding: 15px 20px;
  }
  .page-gdpr__faq-question h3 {
    font-size: 1em;
  }
  .page-gdpr__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }
  .page-gdpr__faq-answer {
    padding: 15px 20px !important;
    font-size: 0.9em;
  }
}

/* Global Image Responsive Styles (ensure no overflow) */
.page-gdpr img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all containing elements are responsive */
.page-gdpr__section,
.page-gdpr__card,
.page-gdpr__container,
.page-gdpr__content-block,
.page-gdpr__rights-list,
.page-gdpr__faq-list,
.page-gdpr__contact-info {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important; /* Crucial for preventing horizontal scroll */
}

/* Specific mobile overrides for images and containers */
@media (max-width: 768px) {
  .page-gdpr img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-gdpr__hero-section,
  .page-gdpr__section,
  .page-gdpr__data-collection,
  .page-gdpr__user-rights,
  .page-gdpr__data-security,
  .page-gdpr__faq,
  .page-gdpr__contact-dpo {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-gdpr__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-gdpr__content-block {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}