/* ========================================
   Retention Systems Legal Pages - Brand-Consistent Styling
   Mobile-First Design with High Contrast & Professional Appearance
   Uses Retention Systems Color Palette & Typography
   ======================================== */

/* ========================================
   CSS Variables - Matching Main Site Palette
   ======================================== */

:root {
    /* Primary Colors - Matching Main Site */
    --navy-blue: #0047BB;
    --white: #FFFFFF;

    /* Secondary Colors */
    --bright-blue: #00A4E4;
    --dark-navy: #003057;

    /* Accent Colors */
    --sunshine-yellow: #FFC845;
    --coral: #FF6B6B;
    --teal: #00C9A7;

    /* Background Colors */
    --light-blue-bg: #E6F2FF;
    --light-gray-bg: #F8F9FA;

    /* Typography - Matching Main Site */
    --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing & Layout */
    --container-max-width: 800px;
    --section-spacing: 40px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 71, 187, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 71, 187, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 71, 187, 0.15);
}

/* ========================================
   Base Styles & Reset
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-navy);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Container & Layout
   ======================================== */

.legalDocument {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 20px;
    background: var(--white);
}

/* ========================================
   Typography - Mobile First
   ======================================== */

.legalTitle {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-blue);
    line-height: 1.2;
    margin-bottom: 8px;
}

.legalHeading {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-blue);
    line-height: 1.3;
    margin-top: 32px;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--navy-blue);
    padding-bottom: 8px;
}

.legalSubheading {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-navy);
    line-height: 1.4;
    margin-top: 24px;
    margin-bottom: 12px;
}

.legalText {
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark-navy);
    margin-bottom: 16px;
}

.legalBrand {
    font-weight: 700;
    color: var(--navy-blue);
}

.legalEntity {
    font-weight: 600;
    color: var(--navy-blue);
}

.legalMeta {
    font-size: 14px;
    color: var(--dark-navy);
    margin-bottom: 24px;
}

.legalIntro {
    font-size: 18px;
    font-weight: 500;
    color: var(--dark-navy);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ========================================
   Header Styles
   ======================================== */

.legalHeader {
    text-align: center;
    margin-bottom: var(--section-spacing);
    padding-bottom: 24px;
    border-bottom: 2px solid var(--light-blue-bg);
}

.legalHeader .legalTitle {
    margin-bottom: 12px;
}

.legalHeader .legalBrand {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-navy);
    margin-top: 8px;
}

/* ========================================
   Section Styles
   ======================================== */

.legalSection {
    margin-bottom: var(--section-spacing);
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--light-blue-bg);
    box-shadow: var(--shadow-sm);
}

.legalSection:last-of-type {
    margin-bottom: 60px;
}

/* Special section colors for different types */
.legalIntro {
    background: var(--light-blue-bg);
    border-color: var(--navy-blue);
}

.legalDefinitions {
    background: var(--light-gray-bg);
}

.legalRoles {
    background: linear-gradient(135deg, var(--light-blue-bg) 0%, rgba(255, 200, 69, 0.05) 100%);
    border-color: var(--sunshine-yellow);
}

.legalSecurity,
.legalRetention {
    background: rgba(0, 201, 167, 0.03);
    border-color: var(--teal);
}

.legalContact {
    background: var(--navy-blue);
    color: var(--white);
    border-color: var(--navy-blue);
}

.legalContact .legalText,
.legalContact .legalLink {
    color: var(--white);
}

.legalContact .legalAddress {
    color: var(--white);
}

.legalContact .legalHeading {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* ========================================
   Lists & Definitions
   ======================================== */

.legalList {
    margin: 16px 0;
}

.legalListBulleted {
    list-style: none;
    padding-left: 0;
}

.legalListBulleted .legalListItem {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.legalListBulleted .legalListItem::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--navy-blue);
    font-weight: bold;
    font-size: 20px;
}

.legalListNumbered {
    list-style: decimal;
    padding-left: 20px;
    margin: 16px 0;
}

.legalListNumbered .legalListItem {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Definition Lists */
.legalDefinitionList {
    margin: 20px 0;
}

.legalDefinitionItem {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--navy-blue);
    box-shadow: var(--shadow-sm);
}

.legalDefinitionTerm {
    font-weight: 700;
    color: var(--navy-blue);
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
}

.legalDefinitionText {
    color: var(--dark-navy);
    line-height: 1.5;
}

/* ========================================
   Links & Special Elements
   ======================================== */

.legalLink {
    color: var(--bright-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.legalLink:hover {
    color: var(--navy-blue);
    text-decoration: underline;
}

/* ========================================
   Dividers & Separators
   ======================================== */

.legalDivider {
    height: 3px;
    background: linear-gradient(90deg, var(--navy-blue) 0%, var(--sunshine-yellow) 50%, var(--teal) 100%);
    margin: 40px 0;
    border-radius: var(--radius-sm);
}

/* ========================================
   Special Content Blocks
   ======================================== */

.legalAddress {
    font-style: normal;
    line-height: 1.8;
}

.legalAddress .legalText {
    margin-bottom: 8px;
}

/* ========================================
   Footer
   ======================================== */

.legalFooter {
    text-align: center;
    padding: 30px 20px;
    background: var(--navy-blue);
    color: var(--white);
    margin-top: 40px;
    border-radius: var(--radius-lg);
}

.legalFooterText {
    font-size: 14px;
    color: var(--white);
    opacity: 0.9;
}

/* ========================================
   Responsive Design - Tablet & Up
   ======================================== */

@media (min-width: 768px) {
    .legalDocument {
        padding: 40px 40px;
    }

    .legalTitle {
        font-size: 36px;
    }

    .legalHeading {
        font-size: 28px;
    }

    .legalSubheading {
        font-size: 20px;
    }

    .legalText {
        font-size: 17px;
    }

    .legalIntro {
        font-size: 20px;
    }

    .legalSection {
        padding: 32px;
        margin-bottom: 48px;
    }

    .legalDefinitionItem {
        padding: 20px;
    }

    .legalDefinitionTerm {
        font-size: 17px;
    }

    /* Two-column layout for definitions on larger screens */
    .legalDefinitionList {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
    }
}

/* ========================================
   Desktop Styles
   ======================================== */

@media (min-width: 1024px) {
    .legalDocument {
        padding: 60px 60px;
    }

    .legalTitle {
        font-size: 42px;
    }

    .legalHeading {
        font-size: 32px;
    }

    .legalSubheading {
        font-size: 22px;
    }

    .legalText {
        font-size: 18px;
    }

    .legalIntro {
        font-size: 22px;
    }

    .legalSection {
        padding: 40px;
    }

    /* Enhanced shadows on larger screens */
    .legalSection {
        box-shadow: var(--shadow-md);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .legalSection:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .legalDocument {
        max-width: none;
        padding: 0;
        box-shadow: none;
    }

    .legalSection {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }

    .legalLink {
        color: inherit;
        text-decoration: underline;
    }

    .legalFooter {
        background: white !important;
        color: black !important;
        border-top: 1px solid #ccc;
    }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* Focus states */
.legalLink:focus {
    outline: 3px solid var(--bright-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .legalSection {
        border: 2px solid var(--navy-blue);
    }

    .legalHeading {
        border-bottom: 4px solid var(--navy-blue);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .legalSection {
        transition: none;
    }

    .legalLink {
        transition: none;
    }
}

/* ========================================
   Dark Mode Support (Future Enhancement)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Can be enabled later if needed */
    /* :root {
        --dark-navy: #E6F2FF;
        --white: #003057;
        --light-blue-bg: #001122;
    } */
}

/* ========================================
   Final Polish - Brand Consistency
   ======================================== */

/* Ensure legal pages integrate seamlessly with main brand */
.legalDocument {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
}
