/* =============================================================
   legal.css
   -------------------------------------------------------------
   Shared page-level styling for C2G Logistics legal documents:
     • terms-and-conditions.html
     • refund-policy.html
     • shipping-policy.html
   These rules mirror the inline styles used by privacy-policy.html
   so every legal page has an identical, hero + sticky-TOC layout
   and parity with the rest of the site (index.css / dark-mode.css).
   ============================================================= */

/* ---------- Hero ---------- */
.policy-hero {
    position: relative;
    /* Site-wide navbar is position:fixed with height:var(--header-height)
       (70px). Mirror the pattern other heroes use so the first line of the
       hero never hides behind the navbar. */
    padding: calc(var(--header-height, 70px) + 60px) 0 56px;
    background: linear-gradient(135deg, #0052FF 0%, #0033A0 100%);
    color: #ffffff;
    overflow: hidden;
}

.policy-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08), transparent 50%);
    pointer-events: none;
}

.policy-hero .container {
    position: relative;
    z-index: 1;
}

.policy-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.policy-crumb i {
    font-size: 0.72rem;
}

.policy-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 14px;
    color: #ffffff;
}

.policy-hero p {
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 22px;
}

.policy-effective {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.policy-effective strong {
    font-weight: 700;
}

/* ---------- Body layout ---------- */
.policy-section {
    padding: 60px 0 80px;
    background: var(--bg-body);
}

.policy-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

/* Sticky table of contents on desktop */
.policy-toc {
    position: sticky;
    top: 96px;
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

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

.policy-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.policy-toc li {
    counter-increment: toc;
    margin: 0;
}

.policy-toc a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.35;
    transition: background 0.18s ease, color 0.18s ease;
}

.policy-toc a::before {
    content: counter(toc) ".";
    flex-shrink: 0;
    width: 22px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
}

.policy-toc a:hover,
.policy-toc a.active {
    background: rgba(0, 82, 255, 0.08);
    color: var(--primary-blue);
}

.policy-toc a:hover::before,
.policy-toc a.active::before {
    color: var(--primary-blue);
}

/* ---------- Main content ---------- */
.policy-content {
    min-width: 0;
}

.policy-intro {
    padding: 22px 24px;
    background: rgba(0, 82, 255, 0.05);
    border-left: 4px solid var(--primary-blue);
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 40px;
}

.policy-intro p {
    margin: 0 0 10px;
}

.policy-intro p:last-child {
    margin: 0;
}

.policy-article {
    margin-bottom: 44px;
    scroll-margin-top: 96px;
}

.policy-article h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.policy-article h2 .num {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0052FF 0%, #0033A0 100%);
    color: #ffffff;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.22);
}

.policy-article h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 22px 0 8px;
}

.policy-article p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
    margin: 0 0 14px;
}

.policy-article ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.policy-article ul li {
    position: relative;
    padding: 6px 0 6px 26px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.policy-article ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-blue);
    opacity: 0.85;
}

.policy-article strong {
    color: var(--text-dark);
}

.policy-article a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 82, 255, 0.35);
    transition: border-color 0.18s ease, color 0.18s ease;
}

.policy-article a:hover {
    color: #0033A0;
    border-bottom-color: #0033A0;
}

/* ---------- Callout box (warning / info variant) ---------- */
/* Used by Terms §7 "Prohibited Items" and similar blocks where we
   want to draw extra attention without the full article chrome. */
.policy-callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-left: 4px solid #dc2626;
    border-radius: 12px;
    margin: 16px 0 8px;
}

.policy-callout .callout-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-top: 2px;
}

.policy-callout .callout-body {
    flex: 1 1 auto;
    color: var(--text-dark);
    font-size: 0.98rem;
    line-height: 1.65;
}

.policy-callout .callout-body strong {
    color: #b91c1c;
}

.policy-callout--info {
    background: rgba(0, 82, 255, 0.05);
    border-color: rgba(0, 82, 255, 0.2);
    border-left-color: var(--primary-blue);
}

.policy-callout--info .callout-icon {
    background: rgba(0, 82, 255, 0.12);
    color: var(--primary-blue);
}

.policy-callout--info .callout-body strong {
    color: #0033A0;
}

/* ---------- Shipping method cards (used by shipping-policy) ---------- */
.policy-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 18px 0 8px;
}

.policy-method-card {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.policy-method-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(0, 82, 255, 0.25);
}

.policy-method-card .m-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0052FF 0%, #0033A0 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 1.15rem;
    box-shadow: 0 6px 14px rgba(0, 82, 255, 0.25);
}

.policy-method-card h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.policy-method-card .m-eta {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(0, 82, 255, 0.1);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.policy-method-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- Contact card (final section) ---------- */
.policy-contact-card {
    margin-top: 16px;
    padding: 22px 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.policy-contact-card h4 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.policy-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.policy-contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: var(--text-dark);
    font-size: 0.96rem;
}

.policy-contact-list li::before {
    display: none;
}

.policy-contact-list .c-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 255, 0.1);
    color: var(--primary-blue);
    border-radius: 10px;
    font-size: 0.95rem;
}

.policy-contact-list a {
    border-bottom: none;
    color: var(--text-dark);
    font-weight: 500;
}

.policy-contact-list a:hover {
    color: var(--primary-blue);
}

/* ---------- Cross-link footer of the doc ---------- */
.policy-footer-note {
    margin-top: 48px;
    padding: 22px;
    background: rgba(0, 82, 255, 0.04);
    border: 1px dashed rgba(0, 82, 255, 0.25);
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.policy-footer-note a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.policy-footer-note a:hover {
    text-decoration: underline;
}

/* ---------- Related-docs grid ---------- */
/* Bottom of each legal page: cross-links to the other documents
   so users never hit a dead end. */
.policy-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.policy-related a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.policy-related a:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 82, 255, 0.3);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.policy-related a .r-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 255, 0.1);
    color: var(--primary-blue);
    border-radius: 10px;
    font-size: 0.95rem;
}

.policy-related a .r-label {
    flex: 1 1 auto;
    min-width: 0;
}

.policy-related a .r-label small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.policy-related a .r-arrow {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .policy-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .policy-toc {
        position: static;
        top: auto;
    }

    .policy-hero {
        padding: calc(var(--header-height, 70px) + 32px) 0 44px;
    }
}

@media (max-width: 560px) {
    .policy-article h2 {
        font-size: 1.3rem;
        gap: 10px;
    }

    .policy-article h2 .num {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .policy-section {
        padding: 44px 0 60px;
    }

    .policy-intro {
        padding: 18px 20px;
    }

    .policy-callout {
        padding: 16px;
    }

    .policy-method-card {
        padding: 16px;
    }
}

/* ---------- Dark mode ---------- */
body.dark-mode .policy-section {
    background: transparent;
}

body.dark-mode .policy-toc {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

body.dark-mode .policy-toc a {
    color: #e2e8f0;
}

body.dark-mode .policy-toc a:hover,
body.dark-mode .policy-toc a.active {
    background: rgba(77, 141, 255, 0.15);
    color: #60a5fa;
}

body.dark-mode .policy-toc a:hover::before,
body.dark-mode .policy-toc a.active::before {
    color: #60a5fa;
}

body.dark-mode .policy-intro {
    background: rgba(77, 141, 255, 0.08);
    border-left-color: #4d8dff;
    color: #e2e8f0;
}

body.dark-mode .policy-article h2 {
    color: #f1f5f9;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .policy-article h3,
body.dark-mode .policy-article strong {
    color: #f1f5f9;
}

body.dark-mode .policy-article p,
body.dark-mode .policy-article ul li {
    color: #cbd5e1;
}

body.dark-mode .policy-article a {
    color: #60a5fa;
    border-bottom-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .policy-callout {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
    border-left-color: #f87171;
}

body.dark-mode .policy-callout .callout-icon {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

body.dark-mode .policy-callout .callout-body {
    color: #f1f5f9;
}

body.dark-mode .policy-callout .callout-body strong {
    color: #fca5a5;
}

body.dark-mode .policy-callout--info {
    background: rgba(77, 141, 255, 0.08);
    border-color: rgba(77, 141, 255, 0.3);
    border-left-color: #4d8dff;
}

body.dark-mode .policy-callout--info .callout-icon {
    background: rgba(77, 141, 255, 0.18);
    color: #60a5fa;
}

body.dark-mode .policy-callout--info .callout-body strong {
    color: #93c5fd;
}

body.dark-mode .policy-method-card {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

body.dark-mode .policy-method-card:hover {
    border-color: rgba(96, 165, 250, 0.35);
}

body.dark-mode .policy-method-card h4 {
    color: #f1f5f9;
}

body.dark-mode .policy-method-card p {
    color: #cbd5e1;
}

body.dark-mode .policy-method-card .m-eta {
    background: rgba(77, 141, 255, 0.18);
    color: #93c5fd;
}

body.dark-mode .policy-contact-card {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

body.dark-mode .policy-contact-card h4,
body.dark-mode .policy-contact-list li {
    color: #f1f5f9;
}

body.dark-mode .policy-contact-list .c-icon {
    background: rgba(77, 141, 255, 0.18);
    color: #60a5fa;
}

body.dark-mode .policy-contact-list a {
    color: #f1f5f9;
}

body.dark-mode .policy-footer-note {
    background: rgba(77, 141, 255, 0.06);
    border-color: rgba(77, 141, 255, 0.3);
    color: #cbd5e1;
}

body.dark-mode .policy-footer-note a {
    color: #60a5fa;
}

body.dark-mode .policy-related a {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

body.dark-mode .policy-related a:hover {
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.dark-mode .policy-related a .r-icon {
    background: rgba(77, 141, 255, 0.18);
    color: #60a5fa;
}

body.dark-mode .policy-related a .r-label small {
    color: #94a3b8;
}

body.dark-mode .policy-related a .r-arrow {
    color: #94a3b8;
}
