/* Import base styles */
@import url("../styles/components/base.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ============================================
   LEGAL PAGES - UNIFIED STYLESHEET
   Terms of Service & Privacy Policy
   ============================================ */

/* Hero Section for Legal Pages */
.hero-legal {
  height: 65vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--bg-dark) 0%,
    var(--primary-dark) 100%
  );
  position: relative;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.hero-legal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 0 0 L 20 0 M 0 0 L 0 20" fill="none" stroke="rgba(139,148,158,0.04)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  background-size: 50vh 50vh;
}

.hero-content-legal {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-legal h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--primary-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.last-updated {
  color: var(--primary-light);
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
}

.hero-description {
  color: var(--text-muted);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* Contact Info in Hero (Privacy Policy) */
.contact-info-hero {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: clamp(20px, 3.5vw, 32px);
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.contact-info-hero p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  margin: 0;
  line-height: 1.6;
}

.contact-info-hero strong {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-info-hero a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  word-break: break-word;
}

.contact-info-hero a:hover {
  color: var(--primary-color);
}

/* Document Content Section */
.terms-content {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.legal-document {
  max-width: 100%;
}

/* Legal Sections as Cards */
.legal-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.legal-section:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(108, 50, 172, 0.3);
}

/* Section Numbers */
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(108, 50, 172, 0.4);
  transition: all 0.3s ease;
}

.legal-section:hover .section-number {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(108, 50, 172, 0.5);
}

.legal-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.legal-section p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

/* Introduction Text */
.intro-text {
  font-size: clamp(1.05rem, 2vw, 1.2rem) !important;
  line-height: 1.8 !important;
  color: var(--text-primary) !important;
  font-weight: 400;
  background: linear-gradient(
    135deg,
    rgba(108, 50, 172, 0.1) 0%,
    rgba(162, 89, 255, 0.05) 100%
  );
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

/* Lists */
.legal-section ul {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.legal-section ul li {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 0.9rem;
  padding-left: 2rem;
  position: relative;
}

.legal-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.legal-section:hover ul li::before {
  color: var(--primary-light);
  transform: translateX(3px);
}

/* Special Text Styles */
.note {
  background: linear-gradient(
    135deg,
    rgba(108, 50, 172, 0.15) 0%,
    rgba(162, 89, 255, 0.08) 100%
  );
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--text-primary) !important;
  font-style: italic;
  margin: 1.5rem 0 !important;
  font-size: clamp(0.95rem, 1.75vw, 1.05rem) !important;
  backdrop-filter: blur(4px);
}

.warning-text {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.15) 0%,
    rgba(255, 193, 7, 0.08) 100%
  );
  border-left: 4px solid #ffc107;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  margin: 1.5rem 0 !important;
  font-size: clamp(0.95rem, 1.75vw, 1.05rem) !important;
  backdrop-filter: blur(4px);
}

/* Highlighted Section */
.highlight-section {
  background: linear-gradient(
    135deg,
    rgba(108, 50, 172, 0.12) 0%,
    rgba(162, 89, 255, 0.06) 100%
  );
  border: 2px solid var(--primary-color);
}

.highlight-section:hover {
  box-shadow: 0 25px 50px rgba(108, 50, 172, 0.4);
  border-color: var(--primary-light);
}

/* Privacy Highlights */
.privacy-highlights {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.privacy-point {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.privacy-point:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

.privacy-point:last-child {
  margin-bottom: 0;
}

.check-icon {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.privacy-point:hover .check-icon {
  color: var(--primary-light);
  transform: scale(1.2);
}

/* GDPR Rights Grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.right-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  text-align: center;
}

.right-item:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 35px rgba(108, 50, 172, 0.3);
}

.right-item h3 {
  color: var(--text-primary);
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.right-item h3 i {
  color: var(--primary-color);
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.right-item:hover h3 i {
  color: var(--primary-light);
  transform: scale(1.15);
}

.right-item p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.75vw, 1.05rem);
  line-height: 1.6;
  margin: 0;
}

/* Contact CTA */
.contact-cta {
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.15rem) !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin: 2rem 0 1.5rem !important;
  padding: 1.25rem;
  background: linear-gradient(
    135deg,
    rgba(108, 50, 172, 0.15) 0%,
    rgba(162, 89, 255, 0.08) 100%
  );
  border-radius: 12px;
  border: 1px solid var(--primary-color);
}

.contact-cta a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
}

.contact-cta a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width 0.3s ease;
}

.contact-cta a:hover {
  color: var(--primary-color);
}

.contact-cta a:hover::after {
  width: 100%;
}

/* Links */
.legal-section a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.legal-section a:hover {
  color: var(--primary-color);
}

/* Contact Section */
.contact-section {
  background: linear-gradient(
    135deg,
    rgba(108, 50, 172, 0.15) 0%,
    rgba(162, 89, 255, 0.08) 100%
  );
  border: 2px solid var(--primary-color);
  text-align: center;
}

.contact-section h2 {
  color: var(--primary-light);
  margin-bottom: 1.25rem;
}

.contact-section:hover {
  box-shadow: 0 25px 50px rgba(108, 50, 172, 0.4);
  border-color: var(--primary-light);
}

.contact-details {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.contact-card-inline {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.contact-card-inline:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(108, 50, 172, 0.3);
}

.contact-card-inline i {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.contact-card-inline:hover i {
  color: var(--primary-light);
  transform: scale(1.1);
}

.contact-card-inline a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(1rem, 1.9vw, 1.1rem);
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legal-section {
  animation: fadeInUp 0.6s ease-out backwards;
}

.legal-section:nth-child(1) { animation-delay: 0.05s; }
.legal-section:nth-child(2) { animation-delay: 0.1s; }
.legal-section:nth-child(3) { animation-delay: 0.15s; }
.legal-section:nth-child(4) { animation-delay: 0.2s; }
.legal-section:nth-child(5) { animation-delay: 0.25s; }
.legal-section:nth-child(6) { animation-delay: 0.3s; }
.legal-section:nth-child(7) { animation-delay: 0.35s; }
.legal-section:nth-child(8) { animation-delay: 0.4s; }
.legal-section:nth-child(9) { animation-delay: 0.45s; }
.legal-section:nth-child(10) { animation-delay: 0.5s; }
.legal-section:nth-child(11) { animation-delay: 0.55s; }
.legal-section:nth-child(12) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
  .hero-legal {
    height: auto;
    min-height: 400px;
    padding: 3rem 1.5rem;
  }

  .hero-legal h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .terms-content {
    padding: 3rem 1.5rem;
  }

  .legal-section {
    padding: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .section-number {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .legal-section ul li {
    padding-left: 1.75rem;
  }

  .rights-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-legal h1 {
    font-size: 2rem;
  }

  .legal-section {
    padding: 1.5rem;
  }

  .section-number {
    margin-bottom: 1rem;
  }

  .contact-card-inline {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}