/* ============================================================
   legal-pages.css — Unified Responsive Styling for Policy Pages
   Privacy Policy, Terms of Service, Refund, Shipping, Cookie
   ============================================================ */

.legal-hero {
    background: linear-gradient(135deg, #0e3722 0%, #1b4332 60%, #2d6a4f 100%);
    padding: 60px 20px 48px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #c8f7e1;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.legal-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
    line-height: 1.2;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.legal-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.98rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

.legal-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legal-meta span {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Main Layout ───────────────────────────────────────────── */
.legal-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding: 48px 0 80px;
    min-width: 0;
    max-width: 100%;
}

.legal-content {
    min-width: 0;
    max-width: 100%;
}

/* ── Table of Contents ─────────────────────────────────────── */
.legal-toc {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-color, #E5E7EB);
    border-radius: 18px;
    padding: 22px;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.legal-toc h3 {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted, #6B7280);
    margin-bottom: 14px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.toc-list a {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted, #4B5563);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1.4;
    font-weight: 500;
}

.toc-list a:hover {
    background: var(--bg-secondary, #F4EFEA);
    color: var(--primary, #1E4D38);
    padding-left: 15px;
}

/* ── Legal Content ─────────────────────────────────────────── */
.legal-content h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
    font-weight: 800;
    color: var(--text-main, #1F2937);
    margin: 36px 0 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #E5E7EB);
    scroll-margin-top: 100px;
}

.legal-content h2:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.legal-content h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-main, #1F2937);
    margin: 20px 0 8px;
}

.legal-content p {
    font-size: 0.95rem;
    color: var(--text-muted, #4B5563);
    line-height: 1.75;
    margin-bottom: 14px;
}

.legal-content ul, .legal-content ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.legal-content li {
    font-size: 0.95rem;
    color: var(--text-muted, #4B5563);
    line-height: 1.7;
    margin-bottom: 6px;
}

.legal-content strong {
    color: var(--text-main, #111827);
}

.legal-content a {
    color: #1E4D38;
    text-decoration: underline;
    font-weight: 600;
}

.info-box {
    background: rgba(45, 106, 79, 0.08);
    border: 1px solid rgba(45, 106, 79, 0.2);
    border-left: 4px solid #1E4D38;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 0.92rem;
    color: var(--text-muted, #374151);
    line-height: 1.65;
}

.warning-box {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-left: 4px solid #D97706;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 0.92rem;
    color: var(--text-muted, #374151);
    line-height: 1.65;
}

.contact-box {
    background: linear-gradient(135deg, #0e3722, #1b4332);
    border-radius: 18px;
    padding: 30px 24px;
    margin-top: 36px;
    color: white;
    text-align: center;
}

.contact-box h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: white;
}

.contact-box p {
    font-size: 0.92rem;
    opacity: 0.88;
    margin-bottom: 18px;
    color: #E2E8F0;
}

.contact-box a {
    color: #64e8a6 !important;
    text-decoration: underline;
    font-weight: 700;
}

/* ── Mobile Responsive (< 992px) ────────────────────────────── */
@media (max-width: 991px) {
    .legal-hero {
        padding: 38px 16px 30px;
    }

    .legal-hero h1 {
        font-size: 1.85rem;
    }

    .legal-meta {
        gap: 8px;
        margin-top: 14px;
    }

    .legal-meta span {
        font-size: 0.74rem;
        padding: 4px 10px;
    }

    .legal-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 24px 0 60px;
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .legal-content {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .legal-toc {
        position: static;
        width: 100%;
        max-height: none;
        padding: 14px 16px;
        border-radius: 14px;
        background: #FAF7F2;
        border: 1.5px solid #EADBCC;
        box-shadow: none;
    }

    .legal-toc h3 {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8rem;
        margin-bottom: 10px;
        color: #1E4D38;
    }

    .legal-toc h3::after {
        content: ' (Swipe →)';
        font-size: 0.72rem;
        font-weight: 500;
        color: #79685F;
        text-transform: none;
    }

    .toc-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .toc-list::-webkit-scrollbar {
        display: none;
    }

    .toc-list li {
        margin: 0;
        flex-shrink: 0;
    }

    .toc-list a {
        background: #FFFFFF;
        border: 1px solid #E0D4C5;
        font-size: 0.8rem;
        padding: 6px 13px;
        border-radius: 20px;
        white-space: nowrap;
        color: #1E4D38;
        font-weight: 600;
    }

    .toc-list a:hover {
        background: #1E4D38;
        color: #FFFFFF;
        border-color: #1E4D38;
        padding-left: 13px;
    }

    .legal-content h2 {
        font-size: 1.25rem;
        margin: 28px 0 10px;
        padding-top: 16px;
    }

    .legal-content p, .legal-content li {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .contact-box {
        padding: 24px 16px;
        border-radius: 14px;
    }
}

/* --- Refund Steps Grid --- */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.step-card {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-color, #E5E7EB);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.step-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1E4D38, #0a8042);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 auto 12px;
}
.step-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #1F2937);
    margin-bottom: 6px;
}
.step-card p {
    font-size: 0.83rem;
    color: var(--text-muted, #4B5563);
    line-height: 1.5;
    margin: 0;
}

/* --- Shipping Table Responsive --- */
.table-responsive {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid var(--border-color, #E5E7EB);
}
.shipping-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px;
}
.shipping-table th {
    background: linear-gradient(135deg, #1E4D38, #0a8042);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.shipping-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted, #4B5563);
    border-bottom: 1px solid var(--border-color, #E5E7EB);
}
.shipping-table tr:last-child td {
    border-bottom: none;
}
.shipping-table tr:nth-child(even) td {
    background: var(--bg-secondary, #F9FAFB);
}
.highlight-row td {
    background: rgba(45,106,79,0.06) !important;
    font-weight: 600;
    color: #1E4D38 !important;
}

/* --- Cookie Policy Cards --- */
.cookie-type-grid {
    display: grid;
    gap: 14px;
    margin: 20px 0;
}
.cookie-type-card {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-color, #E5E7EB);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.cookie-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.cookie-type-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #1F2937);
    margin-bottom: 4px;
}
.cookie-type-card p {
    font-size: 0.88rem;
    color: var(--text-muted, #4B5563);
    line-height: 1.6;
    margin: 0;
}
.cookie-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 700;
    margin-left: 8px;
}
.badge-required {
    background: rgba(45,106,79,0.15);
    color: #1E4D38;
}
.badge-optional {
    background: rgba(234,179,8,0.15);
    color: #b45309;
}

/* --- Contact Box Enhanced Pills --- */
.contact-box-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(100, 232, 166, 0.15);
    border: 1px solid rgba(100, 232, 166, 0.3);
    color: #64e8a6;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.contact-pills-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.contact-pill:hover {
    background: #64e8a6;
    color: #0e3722 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 232, 166, 0.4);
}
.contact-address-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 4px;
}
@media (max-width: 520px) {
    .contact-pill { width: 100%; justify-content: center; }
    .contact-address-card { border-radius: 14px; text-align: left; }
}
