/* ==========================================================================
   idbabamotel.com - Privacy Policy page
   Uses the shared design tokens from style.css (navbar, footer, modal,
   badges and gradients come straight from the main site).
   ========================================================================== */

/* Sticky TOC needs ancestors that do not clip overflow */
html.privacy-html {
  overflow: visible;
}

body.privacy-page {
  position: relative;
  overflow-x: clip;
  background-color: var(--color-bg-section);
  min-height: 100vh;
}

.privacy-ambient-glow {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  max-width: 100%;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(241, 90, 38, 0.12) 0%,
    rgba(247, 143, 31, 0.06) 45%,
    transparent 70%
  );
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.privacy-hero {
  position: relative;
  padding: calc(var(--nav-height) + 56px) 0 40px;
  text-align: center;
  z-index: 1;
}

.privacy-hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.privacy-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(22, 47, 81, 0.06);
  color: var(--color-brand-primary);
  font-family: var(--font-family-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-hero-title {
  margin-bottom: 20px;
  color: var(--color-brand-dark);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.privacy-hero-title .text-gradient {
  background: linear-gradient(135deg, #162f51 0%, #f78f1f 50%, #f15a26 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.privacy-hero-desc {
  max-width: 720px;
  margin: 0 auto 32px;
  color: var(--color-text-body);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.7;
}

.privacy-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 36px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.privacy-meta strong {
  margin-left: 8px;
  color: var(--color-brand-primary);
  font-family: var(--font-family-heading);
}

/* --------------------------------------------------------------------------
   Layout: sticky contents + document card
   -------------------------------------------------------------------------- */
.privacy-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  max-width: 1240px;
  margin: 24px auto 90px;
}

.privacy-toc,
.privacy-document {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.privacy-toc {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow: auto;
  padding: 22px 16px;
}

.privacy-toc h2 {
  margin: 0 0 14px 9px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.privacy-toc ol {
  display: grid;
  gap: 2px;
  list-style: none;
}

.privacy-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-body);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.privacy-toc a:hover {
  background: var(--color-brand-mint-light);
  color: var(--color-brand-primary);
}

.privacy-toc a span {
  margin-right: 8px;
  color: var(--color-brand-accent);
  font-family: var(--font-family-heading);
  font-size: 0.7rem;
  font-weight: 800;
}

.privacy-document {
  min-width: 0;
  padding: clamp(24px, 5vw, 56px);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.privacy-document .policy-section {
  margin: 0 0 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-border-subtle);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.privacy-document .policy-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.privacy-document .policy-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--color-brand-dark);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.privacy-document .policy-section h2 .sec-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  background: var(--color-brand-mint-bg);
  border: 1px solid rgba(247, 143, 31, 0.2);
  border-radius: var(--radius-pill);
  color: var(--color-brand-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.privacy-document .policy-section p {
  margin: 0 0 14px;
  color: var(--color-text-body);
  font-size: 0.96rem;
  line-height: 1.8;
}

.privacy-document .policy-section p:last-child {
  margin-bottom: 0;
}

.privacy-document a {
  color: var(--color-brand-accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(241, 90, 38, 0.35);
  text-underline-offset: 3px;
}

.privacy-document a:hover {
  color: var(--color-brand-accent);
  text-decoration-color: currentColor;
}

.privacy-document strong {
  color: var(--color-brand-primary);
}

/* Table */
.privacy-document .policy-section table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 4px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-collapse: separate;
  border-spacing: 0;
}

.privacy-document .policy-section thead,
.privacy-document .policy-section tbody {
  display: table;
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

.privacy-document .policy-section th,
.privacy-document .policy-section td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.86rem;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

.privacy-document .policy-section th {
  background: var(--color-brand-mint-light);
  color: var(--color-brand-primary);
  font-family: var(--font-family-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-document .policy-section td {
  color: var(--color-text-body);
}

.privacy-document .policy-section tbody tr:last-child td {
  border-bottom: 0;
}

.privacy-document .policy-section tbody tr:hover td {
  background: var(--color-bg-soft);
}

/* Ordered step lists (e.g. "How to request a return or refund") */
.privacy-document .policy-section ol {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: policy-step;
}

.privacy-document .policy-section ol li {
  position: relative;
  padding: 14px 18px 14px 58px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: var(--color-text-body);
  font-size: 0.94rem;
  line-height: 1.7;
  counter-increment: policy-step;
}

.privacy-document .policy-section ol li::before {
  content: counter(policy-step, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  background: var(--color-brand-mint-bg);
  border: 1px solid rgba(247, 143, 31, 0.2);
  border-radius: var(--radius-pill);
  color: var(--color-brand-primary);
  font-family: var(--font-family-heading);
  font-size: 0.7rem;
  font-weight: 800;
}

/* Highlighted notice box */
.privacy-document .notice {
  margin: 18px 0 4px;
  padding: 18px 20px 18px 22px;
  background: var(--color-brand-mint-light);
  border: 1px solid var(--color-border-accent);
  border-left: 4px solid var(--color-brand-accent);
  border-radius: var(--radius-md);
}

.privacy-document .notice b {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--color-brand-dark);
  font-family: var(--font-family-heading);
  font-size: 0.95rem;
  font-weight: 800;
}

.privacy-document .notice b::before {
  content: "!";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-brand-accent);
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.privacy-document .policy-section .notice p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Back link to the policy library */
.legal-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto 18px;
  color: var(--color-text-muted);
  font-family: var(--font-family-heading);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.legal-back-link:hover {
  color: var(--color-brand-accent);
}

.legal-back-link svg {
  transition: transform 0.2s ease;
}

.legal-back-link:hover svg {
  transform: translateX(-3px);
}

/* --------------------------------------------------------------------------
   Contact panel
   -------------------------------------------------------------------------- */
.privacy-document .contact-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-top: 44px;
  padding: 28px;
  background: linear-gradient(135deg, #fff 0%, var(--color-brand-mint-light) 100%);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.privacy-document .contact-panel h3 {
  margin: 0 0 10px;
  color: var(--color-brand-dark);
  font-size: 1.35rem;
  font-weight: 800;
}

.privacy-document .contact-panel p {
  color: var(--color-text-body);
  font-size: 0.92rem;
  line-height: 1.75;
}

.privacy-document .contact-panel dl {
  margin: 0;
}

.privacy-document .contact-panel dt {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-document .contact-panel dd {
  margin: 0 0 14px;
  color: var(--color-brand-primary);
  font-size: 0.92rem;
  font-weight: 600;
}

.privacy-document .contact-panel dd:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Legal hub (legal.html): policy library
   -------------------------------------------------------------------------- */
.legal-hub-hero .privacy-hero-title {
  color: var(--color-brand-dark);
}

.legal-hub-meta strong {
  margin: 0 6px 0 0;
}

.legal-library {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 24px auto 90px;
}

.legal-library-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 40px;
  margin-bottom: 28px;
}

.legal-library-heading h2 {
  color: var(--color-brand-dark);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal-library-heading p {
  max-width: 560px;
  color: var(--color-text-body);
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.legal-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 250px;
  padding: 28px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.legal-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-card-hover);
}

.legal-card-num {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 5px 12px;
  background: var(--color-brand-mint-bg);
  border: 1px solid rgba(247, 143, 31, 0.2);
  border-radius: var(--radius-pill);
  color: var(--color-brand-primary);
  font-family: var(--font-family-heading);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.legal-card h3 {
  margin-bottom: 10px;
  color: var(--color-brand-dark);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.legal-card p {
  color: var(--color-text-body);
  font-size: 0.92rem;
  line-height: 1.7;
}

.legal-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-brand-accent-dark);
  font-family: var(--font-family-heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.legal-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-brand-mint-light);
  border-radius: 50%;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.legal-card:hover .legal-card-arrow {
  background: var(--color-brand-accent);
  color: #fff;
  transform: rotate(-45deg);
}

.legal-library-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  margin-top: 28px;
  padding: 26px 30px;
  background: linear-gradient(135deg, #fff 0%, var(--color-brand-mint-light) 100%);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.legal-library-cta p {
  max-width: 640px;
  color: var(--color-text-body);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .legal-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .privacy-layout {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .privacy-toc {
    position: static;
    max-height: none;
  }

  .privacy-toc ol {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }
}

@media (max-width: 560px) {
  .privacy-hero {
    padding-top: calc(var(--nav-height) + 36px);
  }

  .privacy-meta {
    border-radius: var(--radius-md);
    padding: 14px 20px;
  }

  .privacy-document .policy-section h2 {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .privacy-document .contact-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

  .legal-card {
    min-height: 0;
    padding: 24px;
  }

  .legal-library-cta {
    padding: 22px;
  }

  .legal-library-cta .btn {
    width: 100%;
  }
}

@media print {
  .navbar,
  .privacy-toc,
  .legal-back-link,
  .footer,
  .scroll-progress-bar,
  .privacy-ambient-glow,
  .modal-backdrop {
    display: none !important;
  }

  .privacy-hero {
    padding: 20px 0;
  }

  .privacy-layout {
    display: block;
    margin: 0;
  }

  .privacy-document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
