/* ============================================================
   Policy Pages Shared Stylesheet
   Used by: terms-and-conditions.html, privacy-policy.html, refund-policy.html
   ============================================================ */

/* Reuse the same CSS variables and base reset as styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4caf50;
    --secondary-color: #2196f3;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Navigation (same as main site) ── */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.nav-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-back-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-back-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ── Page Hero Banner ── */
.policy-hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    padding: 60px 0 48px;
    text-align: center;
    border-bottom: 1px solid #dcedc8;
}

.policy-hero-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.policy-hero h1 {
    font-size: 2.4rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.policy-hero p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
}

.policy-hero .last-updated {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-light);
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.25);
    padding: 0.35rem 1rem;
    border-radius: 50px;
}

/* ── Layout ── */
.policy-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
    padding: 56px 0 80px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Sticky Table of Contents (sidebar) ── */
.policy-toc {
    position: sticky;
    top: 80px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.policy-toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.policy-toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.55rem;
}

.policy-toc li::before {
    content: counter(toc-counter) ".";
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.4rem;
}

.policy-toc a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.88rem;
    transition: var(--transition);
}

.policy-toc a:hover {
    color: var(--primary-color);
}

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

.policy-section {
    margin-bottom: 2.8rem;
    padding-bottom: 2.8rem;
    border-bottom: 1px solid #eee;
}

.policy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.policy-section h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.policy-section h2 .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.policy-section h3 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 1.4rem 0 0.6rem;
}

.policy-section p {
    color: var(--text-light);
    margin-bottom: 0.9rem;
    line-height: 1.8;
}

.policy-section ul,
.policy-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.policy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

/* Highlight / info boxes */
.policy-note {
    background: #e8f5e9;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.policy-note p {
    margin: 0;
    color: #2e7d32;
    font-size: 0.93rem;
}

.policy-warning {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.policy-warning p {
    margin: 0;
    color: #795548;
    font-size: 0.93rem;
}

/* Contact info card inside policy */
.policy-contact-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
    margin-top: 1.25rem;
    box-shadow: var(--shadow);
}

.policy-contact-card p {
    margin: 0.3rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.policy-contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.policy-contact-card a:hover {
    text-decoration: underline;
}

/* ── Footer (matches main site) ── */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-section p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a.active-policy {
    color: var(--primary-color);
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .policy-layout {
        grid-template-columns: 1fr;
        padding: 36px 0 60px;
    }

    .policy-toc {
        position: static;
    }

    .policy-hero h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .policy-hero {
        padding: 40px 0 32px;
    }

    .policy-hero h1 {
        font-size: 1.5rem;
    }

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