
.navbar-legal {
    background: linear-gradient(135deg, #0D1B2A 0%, var(--primary) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-legal .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--container-padding);
    height: 80px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-4px);
}

/* ==========================================
   LEGAL PAGE - Estructura Principal
   ========================================== */
.legal-page {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(180deg, #F7F9FA 0%, #FFFFFF 100%);
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem var(--container-padding) 5rem;
}

/* ==========================================
   HEADER
   ========================================== */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light);
}

.legal-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--cd-text);
    margin-bottom: 1rem;
}

.legal-date {
    font-size: 0.95rem;
    color: var(--cd-text-light);
    font-style: italic;
}

/* ==========================================
   INTRO
   ========================================== */
.legal-intro {
    background: white;
    padding: 2rem;
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.legal-intro p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.legal-intro p:last-child {
    margin-bottom: 0;
}

.legal-intro strong {
    color: var(--primary);
    font-weight: 700;
}

.legal-intro a {
    color: var(--secondary);
    text-decoration: underline;
    font-weight: 600;
}

.legal-intro a:hover {
    color: var(--primary);
}

/* ==========================================
   TABLE OF CONTENTS
   ========================================== */
.legal-toc {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.legal-toc h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
}

.legal-toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.75rem;
}

.legal-toc li::before {
    content: counter(toc-counter) ". ";
    color: var(--secondary);
    font-weight: 700;
    margin-right: 0.5rem;
}

.legal-toc a {
    color: var(--cd-text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-block;
}

.legal-toc a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */
.legal-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    scroll-margin-top: 100px;
}

.legal-section h3 {
    font-size: 1.35rem;
    color: var(--cd-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-section h4 {
    font-size: 1.15rem;
    color: var(--cd-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--cd-text-light);
}

.legal-section strong {
    color: var(--cd-text);
    font-weight: 700;
}

.legal-section a {
    color: var(--secondary);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.legal-section a:hover {
    color: var(--primary);
}

/* Lists */
.legal-section ul,
.legal-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--cd-text-light);
}

.legal-section ul li::marker {
    color: var(--secondary);
    font-weight: 700;
}

.legal-section ol li::marker {
    color: var(--primary);
    font-weight: 700;
}

/* Nested lists */
.legal-section ul ul,
.legal-section ol ul,
.legal-section ul ol,
.legal-section ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   CONTACT INFO BLOCK
   ========================================== */
.contact-info-legal {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--secondary);
}

.contact-info-legal p {
    margin-bottom: 0.5rem;
}

.contact-info-legal p:last-child {
    margin-bottom: 0;
}

.contact-info-legal a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.contact-info-legal a:hover {
    text-decoration: underline;
}

/* ==========================================
   ACCEPTANCE BLOCK
   ========================================== */
.legal-acceptance {
    background: linear-gradient(135deg, rgba(3, 101, 140, 0.05) 0%, rgba(0, 167, 169, 0.05) 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    border: 2px solid rgba(0, 167, 169, 0.2);
}

.legal-acceptance h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.legal-acceptance p {
    margin-bottom: 1rem;
    color: var(--cd-text);
    font-weight: 500;
}

.legal-acceptance p:last-child {
    margin-bottom: 0;
}

.legal-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.legal-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
    color: white;
}

.legal-nav a[aria-current="page"] {
    font-weight: 700;
    text-decoration: underline;
}
/* ══════════════════════════════════════════
   FOOTER — Rediseño estratégico v2
   ══════════════════════════════════════════ */
.footer {
  background: #07111C;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Línea superior decorativa */
.footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #03658C 0%, #00A7A9 50%, #03658C 100%);
}

/* ── CTA Banner ── */
.footer-cta-bar {
  background: linear-gradient(135deg, #0D2235 0%, #0A3049 100%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 2.25rem 0;
}
.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-cta-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.footer-cta-text span {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.footer-cta-actions {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.footer-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  background: linear-gradient(135deg, #03658C, #00A7A9);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .2s, transform .2s;
}
.footer-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0,167,169,.35);
  transform: translateY(-1px);
  color: #fff;
}
.footer-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.footer-btn-wa:hover {
  background: #1dbf5a;
  transform: translateY(-1px);
  color: #fff;
}

/* ── Cuerpo principal ── */
.footer-body {
  padding: 3.5rem 0 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Columna Brand ── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-logo-link {
  display: inline-block;
  text-decoration: none;
}
.logo-text-footer {
  font-family: 'Raleway', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .05em;
}
.footer-tagline {
  font-size: .88rem;
  line-height: 1.65;
  color: rgba(255,255,255,.5);
  margin: 0;
  max-width: 30ch;
}

/* Badge Lighthouse */
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(0,200,83,.1);
  border: 1px solid rgba(0,200,83,.25);
  border-radius: 8px;
  padding: .5rem .85rem;
  width: fit-content;
  cursor: default;
}
.footer-badge-scores {
  display: flex;
  gap: .6rem;
}
.footer-badge-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.footer-badge-score .val {
  font-size: .95rem;
  font-weight: 800;
  color: #00c853;
}
.footer-badge-score .lbl {
  font-size: .6rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
.footer-badge-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.1);
}
.footer-badge-label {
  font-size: .7rem;
  font-weight: 700;
  color: #00c853;
  text-transform: uppercase;
  letter-spacing: .08em;
  writing-mode: vertical-rl;
}

/* Redes sociales */
.footer-social {
  display: flex;
  gap: .5rem;
}
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.footer-social a:hover,
.footer-social a:focus-visible {
  background: #03658C;
  border-color: #03658C;
  color: #fff;
  outline: none;
}

/* ── Columnas de links ── */
.footer-column { min-width: 0; }
.footer-column-title {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 1rem;
  line-height: 1.4;
}
.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-column li {
  margin-bottom: .55rem;
}
.footer-column a {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: color .18s;
}
.footer-column a:hover,
.footer-column a:focus-visible {
  color: #fff;
  outline: none;
}
.footer-column a .link-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s, transform .18s;
  font-size: .75rem;
  color: #00A7A9;
}
.footer-column a:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
}
.link-disabled {
  opacity: .35;
  pointer-events: none;
  cursor: default;
}
.link-soon {
  font-size: .65rem;
  font-weight: 700;
  background: rgba(0,167,169,.15);
  color: #00A7A9;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: .05em;
  vertical-align: middle;
  text-transform: uppercase;
  margin-left: .25rem;
}

/* ── Separador ── */
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.07);
  margin: 0;
}

/* ── Bottom ── */
.footer-bottom {
  padding: 1.5rem 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p {
  margin: 0;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.footer-legal a {
  color: rgba(255,255,255,.3);
  text-decoration: none;
  font-size: .8rem;
  transition: color .18s;
}
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 2rem; }
  .footer-tagline { max-width: 100%; }
}
@media (max-width: 768px) {
  .footer-cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-cta-actions { width: 100%; }
  .footer-btn-primary,
  .footer-btn-wa { flex: 1; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { flex-direction: column; gap: 1.25rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .navbar-legal .nav-container {
        height: 70px;
    }

    .navbar-legal .nav-logo img {
        height: 60px;
    }

    .btn-back {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .legal-page {
        padding-top: 70px;
    }

    .legal-container {
        padding: 2rem 1.5rem 3rem;
    }

    .legal-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-intro {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .legal-toc {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .legal-toc h2 {
        font-size: 1.25rem;
    }

    .legal-content {
        padding: 2rem 1.5rem;
    }

    .legal-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
        scroll-margin-top: 80px;
    }

    .legal-section h3 {
        font-size: 1.25rem;
    }

    .legal-section h4 {
        font-size: 1.1rem;
    }

    .contact-info-legal {
        padding: 1.25rem;
    }

    .legal-acceptance {
        padding: 1.5rem;
        margin-top: 2rem;
    }


    .legal-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 1.5rem 1rem 2rem;
    }

    .legal-header h1 {
        font-size: 1.75rem;
    }

    .legal-date {
        font-size: 0.875rem;
    }

    .legal-intro {
        padding: 1.25rem;
    }

    .legal-intro p {
        font-size: 1rem;
    }

    .legal-toc {
        padding: 1.25rem;
    }

    .legal-content {
        padding: 1.5rem 1rem;
    }

    .legal-section h2 {
        font-size: 1.35rem;
    }

    .legal-section ul,
    .legal-section ol {
        padding-left: 1.25rem;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .navbar-legal,
    .btn-back,
    .legal-toc {
        display: none;
    }

    .legal-page {
        background: white;
        padding-top: 0;
    }

    .legal-container {
        max-width: 100%;
        padding: 1cm;
    }

    .legal-content {
        box-shadow: none;
        padding: 0;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-section h2 {
        page-break-after: avoid;
    }

    a {
        text-decoration: underline;
        color: black !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */
.legal-section:focus,
.legal-section h2:focus,
.legal-section h3:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .legal-intro {
        border-left-width: 6px;
    }

    .legal-section {
        border-bottom-width: 2px;
    }

    .legal-acceptance {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-back,
    .legal-toc a,
    .legal-section a {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
