/* =========================================================
   VALROCA · PORTAL DE CLIENTES
   TÉRMINOS, AVISO LEGAL, COOKIES Y PRIVACIDAD
   ========================================================= */

:root {
  --legal-blue: #1e55a3;
  --legal-blue-dark: #102e63;
  --legal-blue-deep: #07172f;
  --legal-green: #31a836;
  --legal-green-hover: #38b83e;

  --legal-white: #ffffff;
  --legal-background: #f4f8fb;
  --legal-text: #162033;
  --legal-muted: #667085;
  --legal-border: #d7e0ea;
  --legal-soft-blue: rgba(30, 85, 163, 0.08);
  --legal-soft-green: rgba(49, 168, 54, 0.09);
  --legal-danger: #c9362b;

  --legal-radius-large: 24px;
  --legal-radius-medium: 16px;
  --legal-radius-small: 12px;
  --legal-shadow: 0 20px 55px rgba(7, 23, 47, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  color: var(--legal-text);
  background: var(--legal-background);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: var(--legal-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--legal-blue-dark);
  text-decoration: none;
}

/* Header */

.legal-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: linear-gradient(
    90deg,
    rgba(7, 23, 47, 0.97) 0%,
    rgba(16, 46, 99, 0.97) 100%
  );

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.legal-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1280px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.legal-logo {
  display: block;
  width: auto;
  max-width: 165px;
  max-height: 54px;
  object-fit: contain;
}

.legal-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.legal-brand-copy strong {
  color: #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.legal-brand-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);

  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;

  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, transform 0.2s ease;
}

.legal-back-button:hover {
  color: var(--legal-blue-deep);
  background: #ffffff;
  border-color: #ffffff;
  transform: translateY(-1px);
}

.legal-back-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.legal-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);

  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;

  font-size: 23px;
  cursor: pointer;

  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.legal-menu-button:hover {
  color: var(--legal-blue-deep);
  background: #ffffff;
  border-color: #ffffff;
}

.legal-menu-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

/* Hero */

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 20px 74px;
  color: var(--legal-white);
  background: radial-gradient(
      circle at 85% 15%,
      rgba(49, 168, 54, 0.18),
      transparent 30%
    ),
    linear-gradient(135deg, var(--legal-blue-deep), var(--legal-blue-dark));
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -190px;
  width: 390px;
  height: 390px;
  border: 70px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
}

.legal-hero-container {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.legal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 14px;
  color: var(--legal-white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.legal-hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  color: var(--legal-white);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.08;
}

.legal-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.7;
}

/* Layout */

.legal-main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

/* Navigation */

.legal-sidebar {
  position: sticky;
  top: 108px;
}

.legal-navigation {
  padding: 18px;
  background: var(--legal-white);
  border: 1px solid rgba(30, 85, 163, 0.1);
  border-radius: var(--legal-radius-medium);
  box-shadow: 0 12px 34px rgba(7, 23, 47, 0.06);
}

.legal-navigation-title {
  margin: 0 0 12px;
  color: var(--legal-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-navigation-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-navigation-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--legal-muted);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.legal-navigation-link i {
  flex: 0 0 auto;
  color: #8291a5;
  font-size: 19px;
}

.legal-navigation-link:hover,
.legal-navigation-link.is-active {
  color: var(--legal-blue);
  background: var(--legal-soft-blue);
}

.legal-navigation-link.is-active i {
  color: var(--legal-blue);
}

.legal-sidebar-note {
  margin-top: 16px;
  padding: 15px;
  color: var(--legal-muted);
  background: var(--legal-soft-green);
  border-left: 3px solid var(--legal-green);
  border-radius: 0 10px 10px 0;
  font-size: 12px;
  line-height: 1.55;
}

/* Content */

.legal-content {
  min-width: 0;
}

.legal-section {
  scroll-margin-top: 112px;
  margin: 0 0 28px;
  padding: 40px;
  background: var(--legal-white);
  border: 1px solid rgba(30, 85, 163, 0.09);
  border-radius: var(--legal-radius-large);
  box-shadow: var(--legal-shadow);
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e8edf3;
}

.legal-section-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: var(--legal-blue);
  background: var(--legal-soft-blue);
  border-radius: 15px;
  font-size: 25px;
}

.legal-eyebrow {
  margin: 0 0 5px;
  color: var(--legal-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.legal-section h2 {
  margin: 0;
  color: var(--legal-text);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
}

.legal-highlight {
  color: var(--legal-blue);
}

.legal-section h3 {
  margin: 34px 0 12px;
  color: var(--legal-blue-dark);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
}

.legal-section h3:first-child {
  margin-top: 0;
}

.legal-section p,
.legal-lead {
  margin: 0 0 18px;
  color: var(--legal-text);
  font-size: 16px;
  line-height: 1.78;
}

.legal-lead {
  color: #344054;
  font-size: 17px;
}

.legal-subheading {
  margin: 24px 0 10px;
  color: var(--legal-blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-block,
.legal-block-content {
  min-width: 0;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 24px;
  padding: 0;
  list-style: none;
}

.legal-list li {
  position: relative;
  padding-left: 29px;
  color: var(--legal-text);
  line-height: 1.65;
}

.legal-list-icon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
}

.legal-list > li > i,
.legal-list-icon i {
  color: var(--legal-blue);
}

.legal-icon-success {
  color: var(--legal-green) !important;
}

.legal-icon-danger {
  color: var(--legal-danger) !important;
}

/* Table */

.legal-section .table,
.legal-table {
  width: 100%;
  margin: 24px 0 10px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--legal-white);
  border: 1px solid var(--legal-border);
  border-radius: 14px;
  overflow: hidden;
  font-size: 13px;
}

.legal-section .table thead,
.legal-table thead {
  color: var(--legal-white);
  background: var(--legal-blue-dark);
}

.legal-section .table th,
.legal-section .table td,
.legal-table th,
.legal-table td {
  padding: 14px;
  border-right: 1px solid var(--legal-border);
  border-bottom: 1px solid var(--legal-border);
  vertical-align: top;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
}

.legal-section .table th:last-child,
.legal-section .table td:last-child,
.legal-table th:last-child,
.legal-table td:last-child {
  border-right: 0;
}

.legal-section .table tbody tr:last-child td,
.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-section .table tbody tr:nth-child(even),
.legal-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Footer */

.legal-footer {
  margin-top: 46px;
  padding: 30px 20px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--legal-blue-deep);
}

.legal-footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.legal-footer p {
  margin: 0;
  font-size: 13px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.legal-footer a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.legal-footer a:hover {
  color: var(--legal-white);
}

.legal-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--legal-white);
  background: var(--legal-blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(16, 46, 99, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.legal-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.legal-top-button:hover {
  color: var(--legal-white);
  background: var(--legal-blue-dark);
}

/* Tablet */

@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 92px;
  }

  .legal-header-container,
  .legal-main {
    width: min(100% - 32px, 100%);
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-navigation {
    display: none;
  }

  .legal-navigation.is-open {
    display: block;
    position: fixed;
    top: 90px;
    right: 16px;
    left: 16px;
    z-index: 1100;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    box-shadow: 0 22px 60px rgba(7, 23, 47, 0.2);
  }

  .legal-menu-button {
    display: inline-flex;
  }

  .legal-sidebar-note {
    display: none;
  }

  .legal-section {
    scroll-margin-top: 98px;
  }
}

/* Mobile */

@media (max-width: 767.98px) {
  .legal-header-container {
    min-height: 72px;
  }

  .legal-brand-copy {
    display: none;
  }

  .legal-logo {
    max-width: 145px;
  }

  .legal-back-button span {
    display: none;
  }

  .legal-back-button {
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .legal-hero {
    padding: 62px 20px 56px;
  }

  .legal-hero h1 {
    font-size: 38px;
  }

  .legal-hero p {
    font-size: 16px;
  }

  .legal-main {
    width: calc(100% - 24px);
    padding: 24px 0 50px;
  }

  .legal-section {
    padding: 27px 22px;
    border-radius: 18px;
  }

  .legal-section-header {
    gap: 12px;
    margin-bottom: 24px;
  }

  .legal-section-icon {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    font-size: 22px;
  }

  .legal-section h2 {
    font-size: 28px;
  }

  .legal-section h3 {
    font-size: 19px;
  }

  .legal-section p,
  .legal-lead {
    font-size: 15px;
  }

  .legal-section .table,
  .legal-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .legal-section .table th,
  .legal-section .table td,
  .legal-table th,
  .legal-table td {
    min-width: 155px;
  }

  .legal-footer-container {
    flex-direction: column;
    text-align: center;
  }

  .legal-footer-links {
    justify-content: center;
  }

  .legal-top-button {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 479.98px) {
  .legal-header-container {
    width: calc(100% - 24px);
  }

  .legal-hero {
    padding: 50px 16px 46px;
  }

  .legal-hero h1 {
    font-size: 33px;
  }

  .legal-main {
    width: calc(100% - 16px);
  }

  .legal-section {
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
