/**
 * Custom styling for the Legal & Policies template
 * Designed to prioritize reading comfort, trust, and neatness.
 */

:root {
    --legal-bg: #F7F4EE;         /* Calm Warm Ivory Background */
    --legal-text: #3C352E;       /* Warm Espresso Gray Body Text (highly legible) */
    --legal-accent: #C49A35;     /* Traditional Gold Accent */
    --legal-font-serif: 'Josefin Sans', serif;
    --legal-font-sans: 'Outfit', sans-serif;
}



/* Base resets & layout */
.legal-brand-page {
    background-color: var(--legal-bg);
    color: var(--legal-text);
    min-height: 100vh;
    font-family: var(--legal-font-sans);
    -webkit-font-smoothing: antialiased;
}

/* Page Intro/Hero (Minimalist editorial design) */
.legal-hero {
    padding: 180px 0 80px 0;
    text-align: center;
    background-color: var(--legal-bg);
}

.legal-hero .section-label {
    /* Uses the global .section-label styles with custom branding gold color */
    color: var(--legal-accent);
}

.legal-hero h1 {
    font-family: var(--legal-font-serif);
    font-size: clamp(38px, 5.5vw, 68px);
    font-weight: 400;
    color: var(--text);
    line-height: 1.15;
    margin: 15px auto 0;
    max-width: 900px;
}

/* Content Layout (Centered reading container) */
.legal-content-section {
    padding-bottom: 140px;
    background-color: var(--legal-bg);
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* Introduction Paragraph Block */
.legal-intro-block {
    margin-bottom: 70px;
    border-bottom: 1px solid rgba(196, 154, 53, 0.12);
    padding-bottom: 50px;
}

.legal-intro-block p {
    font-size: clamp(17px, 2.2vw, 19px);
    line-height: 1.85;
    font-weight: 400;
    color: var(--legal-text);
    margin-bottom: 24px;
}

.legal-intro-block p:last-child {
    margin-bottom: 0;
}

/* Policy Sections (Separators & anchors) */
.policy-section {
    padding: 70px 0;
    border-bottom: 1px solid rgba(196, 154, 53, 0.12);
    scroll-margin-top: 130px; /* Ensures anchor links clear the sticky global header */
}

.policy-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* Section Headings */
.policy-section h2 {
    font-family: var(--legal-font-serif);
    font-size: clamp(28px, 3.8vw, 42px);
    font-weight: 400;
    color: var(--text);
    margin: 0 0 35px 0;
    line-height: 1.25;
}

/* Sub-sections & Hierarchy */
.policy-subsection {
    margin-top: 40px;
}

.policy-subsection h3 {
    font-family: var(--legal-font-serif);
    font-size: clamp(20px, 2.5vw, 25px);
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px 0;
    line-height: 1.35;
}

/* Paragraph spacing & sizing */
.policy-section p,
.policy-subsection p {
    font-size: clamp(16.5px, 2vw, 17.5px);
    line-height: 1.85;
    color: var(--legal-text);
    margin: 0 0 20px 0;
    font-weight: 400;
}

.policy-section p:last-child,
.policy-subsection p:last-child {
    margin-bottom: 0;
}

/* Address details block */
.legal-address-block {
    margin-top: 24px;
    font-size: clamp(16.5px, 2vw, 17.5px);
    line-height: 1.85;
    color: var(--legal-text);
    font-style: normal;
}

.legal-address-block a {
    color: var(--legal-accent);
    text-decoration: none;
    font-weight: 600;
}

.legal-address-block a:hover {
    text-decoration: underline;
}

/* Semantic list styling */
.policy-section ul,
.policy-subsection ul {
    margin: 15px 0 25px 24px;
    padding: 0;
    list-style: none;
}

.policy-section li,
.policy-subsection li {
    font-size: clamp(16px, 1.9vw, 17px);
    line-height: 1.8;
    color: var(--legal-text);
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    font-weight: 400;
}

.policy-section li::before,
.policy-subsection li::before {
    content: "•";
    color: var(--legal-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.policy-section li:last-child,
.policy-subsection li:last-child {
    margin-bottom: 0;
}

/* Closing statement styling */
.legal-closing-statement {
    margin-top: 80px;
    padding-top: 50px;
    border-top: 1px solid rgba(196, 154, 53, 0.12);
}

.legal-closing-statement p {
    font-size: clamp(16.5px, 2vw, 17.5px);
    line-height: 1.85;
    color: var(--legal-text);
    margin-bottom: 20px;
}

.legal-closing-statement a {
    color: var(--legal-accent);
    text-decoration: none;
    font-weight: 600;
}

.legal-closing-statement a:hover {
    text-decoration: underline;
}

/* Desktop-only Sticky Navigation (Sidebar layout) */
@media (min-width: 1200px) {
    .legal-content-wrap {
        display: flex;
        gap: 80px;
        align-items: flex-start;
    }
    
    .legal-content-main {
        flex: 1;
        max-width: 820px;
    }
    
    .legal-sidebar-nav {
        width: 250px;
        position: sticky;
        top: 140px; /* Accounts for global header position */
        display: block;
        padding-left: 20px;
        border-left: 1px solid rgba(196, 154, 53, 0.15);
    }
    
    .legal-sidebar-title {
        font-family: var(--legal-font-sans);
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--legal-accent);
        margin-bottom: 20px;
    }
    
    .legal-sidebar-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .legal-sidebar-item {
        margin-bottom: 16px;
    }
    
    .legal-sidebar-item:last-child {
        margin-bottom: 0;
    }
    
    .legal-sidebar-link {
        font-family: var(--legal-font-sans);
        font-size: 14px;
        font-weight: 500;
        color: rgba(60, 53, 46, 0.65);
        text-decoration: none;
        transition: color 0.3s ease, padding-left 0.3s ease;
        display: inline-block;
    }
    
    .legal-sidebar-link:hover,
    .legal-sidebar-link.active {
        color: var(--legal-accent);
        padding-left: 4px;
    }

    .legal-sidebar-link.active {
        font-weight: 600;
    }
}

/* Tablet & Mobile responsive hides for sidebar */
@media (max-width: 1199px) {
    .legal-sidebar-nav {
        display: none; /* Hide on smaller screens to maintain generous container width */
    }
    .legal-hero {
        padding: 150px 0 60px 0;
    }
    .legal-content-section {
        padding-bottom: 100px;
    }
}
