/* =============================================
   DRIIVO – Legal / Privacy Policy Styles
   Add to bottom of main.css or enqueue separately
============================================= */

/* ─── LEGAL HERO ─────────────────────────── */
.legal-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.legal-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center 40%;
  filter: brightness(0.2);
}

.legal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.95) 50%, rgba(10, 10, 10, 0.5) 100%);
}

.legal-hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 60px 60px;
  max-width: 700px;
}

.legal-hero-title {
  font-family: var(--font-title-major);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 16px;
}

.legal-hero-title .accent {
  color: var(--gold);
}

.legal-hero-meta {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--grey);
  margin-bottom: 16px;
}

.legal-hero-meta strong {
  color: var(--white);
}

.legal-hero-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
  max-width: 500px;
}

/* ─── LEGAL NAV IMPROVED ─────────────────── */
.legal-nav {
  background: #0c0c0c;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 80px;
  z-index: 100;
  overflow-x: auto;
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 60px;
  white-space: nowrap;
}

.legal-nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--black);
  background: var(--gold);
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 24px;
}

.legal-nav a {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  padding: 0 16px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.legal-nav a:hover {
  color: var(--white);
  border-bottom-color: rgba(201, 168, 76, 0.4);
}

.legal-nav a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ─── LEGAL BODY ─────────────────────────── */
.legal-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 60px;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 70px 0;
}

/* ─── LEGAL SECTION ──────────────────────── */
.legal-section {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 40px;
  align-items: start;
  scroll-margin-top: 160px;
  /* height of site header (~80px) + legal nav (~48px) + breathing room */
}

.legal-section-num {
  font-family: var(--font-title-major);
  font-size: 48px;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.85;
  line-height: 1;
  padding-top: 4px;
}

.legal-section-title {
  cursor: auto;
  transition: color 0.2s;
}

.legal-section-title.is-targeted {
  color: var(--gold);
}

.legal-section-title.is-targeted::after {
  content: ' #';
  color: var(--gold);
  opacity: 0.4;
  font-size: 0.6em;
  vertical-align: middle;
}

.legal-sub-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 28px 0 12px;
}

.legal-section-content p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.9;
  margin-bottom: 16px;
}

.legal-section-content p:last-child {
  margin-bottom: 0;
}

/* ─── LEGAL LIST ─────────────────────────── */
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.legal-list li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

.legal-list li strong {
  color: var(--white);
}

/* ─── HIGHLIGHT BOX ──────────────────────── */
.legal-highlight-box {
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  background: rgba(201, 168, 76, 0.05);
}

.legal-highlight-box strong {
  color: var(--white);
}

/* ─── LEGAL LINK ─────────────────────────── */
.legal-link {
  color: var(--gold);
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  transition: border-color 0.2s;
}

.legal-link:hover {
  border-color: var(--gold);
}

/* ─── TABLE ──────────────────────────────── */
.legal-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.legal-table th {
  background: #141414;
  padding: 14px 20px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
}

.legal-table td {
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ─── COOKIE GRID ────────────────────────── */
.legal-cookie-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 12px 0 24px;
}

.cookie-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  background: var(--dark);
  padding: 14px 20px;
  align-items: center;
}

.cookie-name {
  font-family: monospace;
  font-size: 12px;
  color: var(--gold);
  word-break: break-all;
}

.cookie-desc {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.5;
}

/* ─── RIGHTS GRID ────────────────────────── */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.right-item {
  border: 1px solid var(--border);
  padding: 24px 20px;
  transition: border-color 0.2s;
}

.right-item:hover {
  border-color: var(--gold);
}

.right-icon {
  width: 32px;
  height: 32px;
  color: var(--gold);
  margin-bottom: 12px;
}

.right-icon svg {
  width: 100%;
  height: 100%;
}

.right-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 8px;
}

.right-desc {
  font-size: 11px;
  color: var(--grey);
  line-height: 1.6;
}

/* ─── CONTACT GRID ───────────────────────── */
.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.legal-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  padding: 20px;
}

.legal-contact-icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.legal-contact-icon svg {
  width: 100%;
  height: 100%;
}

.legal-contact-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--grey);
  margin-bottom: 4px;
}

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 1024px) {
  .legal-body {
    padding: 60px 30px;
  }

  .rights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .legal-contact-grid {
    grid-template-columns: 1fr;
  }

  .cookie-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 768px) {
  .legal-hero-content {
    padding: 100px 24px 50px;
  }

  .legal-nav-inner {
    padding: 14px 24px;
  }

  .legal-body {
    padding: 40px 24px;
  }

  .legal-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .legal-section-num {
    font-size: 32px;
  }

  .rights-grid {
    grid-template-columns: 1fr;
  }

  .legal-table th,
  .legal-table td {
    padding: 10px 14px;
  }
}

@media (max-width: 768px) {
  .legal-hero-title {
    font-size: clamp(32px, 9vw, 54px);
    overflow-wrap: anywhere;
  }

  .legal-section {
    min-width: 0;
    scroll-margin-top: 160px;
  }

  .legal-section>*,
  .legal-contact-item>* {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .legal-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .legal-nav {
    top: 68px;
  }
}

/* Legal pages share the storefront's spacing, gold accents and readable type. */
.driivo-legal .legal-hero-content {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 150px var(--page-gutter) 64px;
}

.driivo-legal .legal-hero {
  min-height: 440px;
  border-bottom: 1px solid var(--border);
}

.legal-hero-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 24px 0;
}

.driivo-legal .legal-hero-desc {
  max-width: 620px;
  font-size: 16px;
}

.driivo-legal .legal-hero-meta {
  letter-spacing: .5px;
  line-height: 1.8;
}

.driivo-legal .legal-nav-inner {
  max-width: 1440px;
  margin: auto;
  padding-inline: var(--page-gutter);
}

.driivo-legal .legal-body {
  max-width: 1160px;
}

.driivo-legal .legal-section {
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 32px;
}

.driivo-legal .legal-section-title {
  font-family: var(--font-title-major);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.25;
  margin-bottom: 24px;
}

.driivo-legal .legal-section-content p,
.driivo-legal .legal-list li {
  font-size: 15px;
  color: #bcbcbc;
}

.driivo-legal .legal-contact-grid {
  grid-template-columns: 1fr;
}

.driivo-legal .legal-section-content,
.legal-contact-item>div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.driivo-legal .legal-nav a:focus-visible,
.driivo-legal .legal-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.admin-bar .legal-nav {
  top: 112px;
}

@media (max-width: 768px) {
  .driivo-legal .legal-hero-content {
    padding-top: 120px;
    padding-bottom: 40px;
  }

  .driivo-legal .legal-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .driivo-legal .legal-nav-inner {
    padding-block: 0;
  }

  .driivo-legal .legal-divider {
    margin: 40px 0;
  }

  .admin-bar .legal-nav {
    top: 114px;
  }
}

@media (max-width: 600px) {
  .admin-bar .legal-nav {
    top: 68px;
  }
}