/* ═══════════════════════════════════════════
   SHIPWISH LEGAL PAGES — SHARED STYLESHEET
   Used by: privacy-policy.php, terms-and-conditions.php, refund-policy.php
   Inherits design system from shipwish-index.php
═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   ROOT VARIABLES
═══════════════════════════════════════════ */
:root {
  --primary:     #0f2b5b;
  --primary-lt:  #1a4080;
  --accent:      #f5a800;
  --accent-hov:  #ffbb1a;
  --green:       #00c897;
  --light:       #f7f9ff;
  --white:       #ffffff;
  --dark:        #0a1628;
  --text:        #2e3d5b;
  --muted:       #7a8aaa;
  --border:      #e4eaf6;
  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   22px;
  --shadow-sm:   0 4px 16px rgba(15,43,91,.08);
  --shadow:      0 8px 40px rgba(15,43,91,.12);
  --shadow-lg:   0 20px 60px rgba(15,43,91,.20);
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  line-height: 1.2;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul { list-style: none; }

/* ═══════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════
   NAVBAR (matches index)
═══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 66px;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 168, 0, 0.15);
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--white);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo .logo-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-cta {
  background: var(--accent);
  color: var(--dark);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: background 0.2s, transform 0.15s;
}
.nav-links .nav-cta:hover {
  background: var(--accent-hov);
  color: var(--dark);
  transform: translateY(-1px);
}

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 66px; left: 0; right: 0; bottom: 0;
  background: var(--dark);
  z-index: 999;
  flex-direction: column;
  padding: 24px 20px;
  gap: 4px;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  font-weight: 600;
  font-family: 'Syne', sans-serif;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: block;
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav .mob-cta {
  margin-top: 16px;
  background: var(--accent);
  color: var(--dark);
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  border-bottom: none;
}
.mobile-nav .mob-cta:hover { background: var(--accent-hov); color: var(--dark); }

/* ═══════════════════════════════════════════
   LEGAL HERO
═══════════════════════════════════════════ */
.legal-hero {
  background: linear-gradient(140deg, var(--dark) 0%, #0f2b5b 50%, #173570 100%);
  padding-top: 66px;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  background: radial-gradient(circle, rgba(245,168,0,0.10) 0%, transparent 68%);
  pointer-events: none;
}
.legal-hero::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -10%;
  width: min(400px, 60vw);
  height: min(400px, 60vw);
  background: radial-gradient(circle, rgba(0,200,151,0.08) 0%, transparent 68%);
  pointer-events: none;
}
.legal-hero-inner {
  position: relative;
  z-index: 2;
  padding: 60px 0 56px;
  max-width: 680px;
}
.legal-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.legal-hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.legal-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-meta-item {
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  font-weight: 500;
}
.legal-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════
   LEGAL CONTENT
═══════════════════════════════════════════ */
.legal-content {
  padding: 60px 0 80px;
}
.legal-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Table of Contents ── */
.legal-toc {
  position: sticky;
  top: 86px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.legal-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.legal-toc-list {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}
.legal-toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 4px;
}
.legal-toc-list li a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1.35;
}
.legal-toc-list li a::before {
  content: counter(toc-counter) ".";
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  min-width: 20px;
  flex-shrink: 0;
}
.legal-toc-list li a:hover {
  background: rgba(15,43,91,0.04);
  color: var(--primary);
}

/* ── Article Body ── */
.legal-article {
  min-width: 0;
}
.legal-section {
  margin-bottom: 48px;
}
.legal-section:last-child {
  margin-bottom: 0;
}
.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.legal-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 14px;
}
.legal-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}
.legal-section ul li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.legal-section ul li strong {
  color: var(--primary);
  font-weight: 600;
}
.legal-section a {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px solid rgba(15,43,91,0.2);
  transition: border-color 0.2s, color 0.2s;
}
.legal-section a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Cards ── */
.legal-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.legal-card:hover {
  box-shadow: var(--shadow-sm);
}
.legal-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.legal-card ul {
  margin-bottom: 0;
}
.legal-card.legal-card-green {
  border-color: rgba(0,200,151,0.3);
  background: linear-gradient(135deg, rgba(0,200,151,0.04) 0%, var(--white) 100%);
}
.legal-card.legal-card-green h4 {
  color: #00a87a;
}

/* ── Callout ── */
.legal-callout {
  background: rgba(15,43,91,0.04);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 16px 0;
}
.legal-callout strong {
  color: var(--primary);
}
.legal-callout p {
  margin-bottom: 10px;
}
.legal-callout ul {
  margin-bottom: 0;
}
.legal-callout-warning {
  background: rgba(245,168,0,0.06);
  border-left-color: var(--accent);
}

/* ── Highlight Box ── */
.legal-highlight {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0,200,151,0.08) 0%, rgba(0,200,151,0.02) 100%);
  border: 1.5px solid rgba(0,200,151,0.25);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0;
}
.legal-highlight-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0,200,151,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.legal-highlight strong {
  color: #00a87a;
  font-weight: 700;
}

/* ── Steps ── */
.legal-steps {
  margin: 20px 0;
}
.legal-step {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.legal-step:last-child {
  border-bottom: none;
}
.legal-step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-lt));
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.legal-step-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.legal-step-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* ── Table ── */
.legal-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.legal-table thead {
  background: linear-gradient(135deg, var(--primary), var(--primary-lt));
}
.legal-table th {
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  text-align: left;
  white-space: nowrap;
}
.legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.legal-table tbody tr:last-child td {
  border-bottom: none;
}
.legal-table tbody tr:nth-child(even) {
  background: rgba(15,43,91,0.02);
}
.legal-table tbody tr:hover {
  background: rgba(245,168,0,0.04);
}
.legal-note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

/* ── Contact Card ── */
.legal-contact-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 0;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.legal-contact-row {
  display: flex;
  align-items: flex-start;
  padding: 11px 24px;
  border-bottom: 1px solid rgba(228,234,246,0.6);
}
.legal-contact-row:last-child {
  border-bottom: none;
}
.legal-contact-label {
  flex-shrink: 0;
  width: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-contact-value {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--primary);
}
.legal-contact-value a {
  color: var(--primary);
  border-bottom: 1px solid rgba(15,43,91,0.2);
}
.legal-contact-value a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════
   FOOTER (matches index)
═══════════════════════════════════════════ */
footer {
  background: var(--dark);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.8fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-logo span { color: var(--accent); }
.footer-desc {
  color: rgba(255,255,255,0.5);
  font-size: 0.87rem;
  line-height: 1.75;
}
.footer-col h5 {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: rgba(255,255,255,0.62);
  font-size: 0.87rem;
  transition: color 0.2s;
  border-bottom: none;
}
.footer-links a:hover { color: var(--accent); }
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 0.86rem;
  margin-bottom: 10px;
  line-height: 1.5;
}
.footer-contact-list a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  border-bottom: none;
}
.footer-contact-list a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p {
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
}
.footer-bottom a {
  color: var(--accent);
  border-bottom: none;
}

/* ═══════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════ */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 800;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  box-shadow: 0 4px 18px rgba(15,43,91,0.35);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.back-top:hover {
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.88rem; }
  .legal-body { gap: 32px; }
  .legal-toc { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* Large phone / small tablet */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .legal-hero-inner { padding: 40px 0 44px; }
  .legal-hero-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  .legal-body {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .legal-toc {
    position: static;
    margin-bottom: 36px;
  }

  .legal-contact-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 20px;
  }
  .legal-contact-label {
    width: auto;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Phone */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .navbar .container { padding: 0 16px; }
  .nav-logo { font-size: 1.35rem; }

  .legal-hero-inner { padding: 32px 0 36px; }
  .legal-hero-title { font-size: clamp(1.4rem, 7vw, 1.9rem); }
  .legal-hero-sub { font-size: 0.95rem; }

  .legal-content { padding: 40px 0 60px; }

  .legal-section h2 { font-size: 1.2rem; }

  .legal-card { padding: 18px 16px; }

  .legal-step { gap: 12px; }
  .legal-step-num { width: 36px; height: 36px; font-size: 0.9rem; }

  .legal-table th,
  .legal-table td { padding: 10px 12px; font-size: 0.82rem; }

  .back-top { width: 40px; height: 40px; font-size: 1rem; right: 14px; }
}
