/* Legal Pages Common Styles */
.legal-page {
  background: var(--light-gray, #f8faff);
  min-height: 100vh;
}

.legal-header {
  padding: 4rem 0 2rem;
  color: #fff;
  text-align: center;
}

.legal-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.legal-title .gradient-text {
  background: linear-gradient(45deg, #fff, #ffd43b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-icon {
  font-size: 1.5rem;
  margin-left: 0.5rem;
}

.legal-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.last-updated {
  font-size: 0.875rem;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 1.5rem;
  display: inline-block;
}

.legal-content {
  padding: 4rem 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.legal-main,
.legal-main-single {
  background: #fff;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.15);
}

.legal-main-single {
  max-width: 900px;
  margin: 0 auto;
}

.legal-section {
  margin-bottom: 3rem;
  scroll-margin-top: 2rem;
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f8faff;
  position: relative;
}

.legal-section h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-pink, #E91E63);
}

.legal-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #343a40;
  margin: 1.5rem 0 1rem;
}

.legal-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #343a40;
  margin: 1rem 0 0.5rem;
}

.legal-section p {
  color: #6c757d;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

/* TOC Sidebar */
.toc-sidebar {
  position: sticky;
  top: 1.5rem;
}

.toc-card {
  background: #fff;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.15);
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #343a40;
  border-bottom: 2px solid #ff6b9d;
  padding-bottom: 0.5rem;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-link {
  color: #6c757d;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.toc-link:hover {
  background: #f8faff;
  color: #ff6b9d;
  border-left-color: #ff6b9d;
  transform: translateX(5px);
}

/* Special Components */
.important-note {
  background: #fff3cd;
  border: 2px solid #ffd43b;
  padding: 1.5rem;
  border-radius: 1.5rem;
  margin: 1.5rem 0;
  color: #856404;
}

.text-link {
  color: #ff6b9d;
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

/* === Icon badges (reuses the site's step/benefit icon language) === */
.legal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: #fff;
  border: 2px solid;
}

.legal-icon-badge.sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.legal-icon-badge.pink   { border-color: #ffdeeb; color: #E91E63; }
.legal-icon-badge.purple { border-color: #e5e0ff; color: #7B68EE; }
.legal-icon-badge.cyan   { border-color: #d1f7f7; color: #00CED1; }
.legal-icon-badge.gold   { border-color: #fef3c7; color: #f59e0b; }
.legal-icon-badge.green  { border-color: #d1fae5; color: #059669; }

/* === "¿Para qué sirven?" style benefit grid === */
.legal-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 576px) {
  .legal-benefits-grid { grid-template-columns: repeat(4, 1fr); }
}

.legal-benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.5rem 1rem;
  background: #f8faff;
  border-radius: 18px;
}

.legal-benefit-item h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  color: #343a40;
}

.legal-benefit-item p {
  font-size: 0.78rem;
  margin: 0;
  color: #6c757d;
  line-height: 1.4;
}

/* === Cookie / data category cards === */
.cookie-category {
  background: #fff;
  border: 1px solid #f1f3f5;
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.03);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.category-header-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.category-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status.required {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.status.optional {
  background: rgba(123, 104, 238, 0.1);
  color: #7B68EE;
}

.cookie-list {
  margin-top: 1rem;
  border-top: 1px solid #f1f3f5;
}

.cookie-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.cookie-item strong {
  color: #343a40;
  font-size: 0.9rem;
}

.cookie-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #9ca3af;
}

.third-party-notice {
  background: #f8faff;
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.third-party-notice h4 {
  margin-top: 0;
  font-size: 0.95rem;
}

/* === Third-party services grid === */
.third-parties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.third-party-item {
  background: #fff;
  border: 1px solid #f1f3f5;
  border-radius: 16px;
  padding: 1.25rem;
}

.third-party-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.third-party-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.third-party-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7B68EE;
  background: rgba(123, 104, 238, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* === Per-browser instructions === */
.browsers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.browser-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #f8faff;
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
}

.browser-item i {
  font-size: 1.4rem;
  color: #7B68EE;
  margin-top: 0.15rem;
  width: 1.4rem;
  text-align: center;
}

.browser-item h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.browser-item p {
  margin: 0;
  font-size: 0.8rem;
  color: #6c757d;
}

/* === Impact comparison === */
.impact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.impact-item {
  border-radius: 16px;
  padding: 1.25rem;
}

.impact-item.negative { background: rgba(220, 38, 38, 0.06); }
.impact-item.positive { background: rgba(5, 150, 105, 0.07); }

.impact-item h4 {
  margin-top: 0;
  font-size: 0.92rem;
}

/* === Version history === */
.version-item {
  background: #f8faff;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
}

.version-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.version-item p {
  margin: 0;
  font-size: 0.85rem;
}

/* === Contact methods === */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #f8faff;
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  font-size: 0.88rem;
  color: #495057;
  line-height: 1.5;
}

.contact-method i {
  color: var(--primary-pink, #E91E63);
  font-size: 1.05rem;
  margin-top: 0.15rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.contact-method strong {
  color: #343a40;
}

/* === Accessibility measures list === */
.legal-measure-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.legal-measure-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #f8faff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
}

.legal-measure-item i {
  color: var(--primary-pink, #E91E63);
  font-size: 1.05rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.legal-measure-item span {
  color: #495057;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* === Important note with icon === */
.important-note {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.important-note i {
  font-size: 1.1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* === Sitemap section headers with icon === */
.sitemap-group h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sitemap-group h3 i {
  color: var(--primary-pink, #E91E63);
  font-size: 0.95rem;
  width: 1.1rem;
  text-align: center;
}

.sitemap-group a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sitemap-group a i {
  font-size: 0.65rem;
  color: #cbd5e1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.sitemap-group a:hover i {
  color: var(--primary-pink, #E91E63);
  transform: translateX(3px);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .toc-sidebar {
    position: relative;
    top: auto;
  }
  
  .legal-main,
  .legal-main-single {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .legal-header {
    padding: 2rem 0 1.5rem;
  }
  
  .legal-title {
    font-size: 2rem;
  }
  
  .legal-main,
  .legal-main-single {
    padding: 1rem;
  }
}

