/* ----------------------------------------------------
   DESIGN SYSTEM & VARIABLES
   ---------------------------------------------------- */
:root {
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Layout */
    --header-height: 80px;
    --max-width: 1200px;
    --radius-sm: 4px; /* Slightly sharper corners to match original site style */
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* Dark Mode Theme Variables (Maverick & Max Brand Palette) */
body.dark-mode {
    --bg-primary: hsl(235, 33%, 8%);
    --bg-secondary: hsl(235, 33%, 11%);
    --bg-tertiary: hsl(235, 33%, 15%);
    --card-bg: hsl(235, 33%, 10%);
    --text-primary: hsl(0, 0%, 98%);
    --text-secondary: hsl(235, 10%, 75%);
    --text-muted: hsl(235, 10%, 55%);
    
    --accent: hsl(37, 86%, 50%); /* Gold #ED9914 */
    --accent-gradient: linear-gradient(135deg, hsl(37, 86%, 50%), hsl(235, 33%, 35%));
    --border-color: hsl(235, 20%, 18%);
    --glow-color: rgba(237, 153, 20, 0.1);
    
    --info-bg: rgba(237, 153, 20, 0.08);
    --info-border: rgba(237, 153, 20, 0.2);
    --info-text: hsl(37, 86%, 60%);
    
    --warning-bg: rgba(237, 153, 20, 0.08);
    --warning-border: rgba(237, 153, 20, 0.2);
    --warning-text: hsl(37, 86%, 60%);
}

/* Light Mode Theme Variables (Maverick & Max Brand Palette - default) */
body.light-mode {
    --bg-primary: hsl(0, 0%, 100%); /* White */
    --bg-secondary: hsl(235, 45%, 98%); /* Soft Violet-Blue Tint */
    --bg-tertiary: hsl(235, 40%, 95%);
    --card-bg: hsl(0, 0%, 100%);
    --text-primary: hsl(235, 33%, 18%); /* Deep Blue #1F223E */
    --text-secondary: hsl(235, 20%, 35%);
    --text-muted: hsl(235, 15%, 55%);
    
    --accent: hsl(37, 86%, 50%); /* Gold #ED9914 */
    --accent-gradient: linear-gradient(135deg, hsl(37, 86%, 50%), hsl(235, 33%, 22%));
    --border-color: hsl(235, 30%, 92%);
    --glow-color: rgba(31, 34, 62, 0.05);
    
    --info-bg: rgba(31, 34, 62, 0.04);
    --info-border: rgba(31, 34, 62, 0.15);
    --info-text: hsl(235, 33%, 25%);
    
    --warning-bg: rgba(237, 153, 20, 0.05);
    --warning-border: rgba(237, 153, 20, 0.15);
    --warning-text: hsl(37, 86%, 45%);
}

/* ----------------------------------------------------
   BASE STYLES
   ---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

/* ----------------------------------------------------
   GLOW EFFECTS & DECORATIONS
   ---------------------------------------------------- */
.radial-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 80% 20%, var(--glow-color) 0%, transparent 60%);
    pointer-events: none;
    z-index: -2;
}

.glow-sphere {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--accent-gradient);
    filter: blur(120px);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.entry-glow {
    top: -50px;
    left: -50px;
}

/* ----------------------------------------------------
   HEADER & NAVIGATION
   ---------------------------------------------------- */
.main-header {
    height: var(--header-height);
    border-bottom: 2px solid var(--accent); /* Brand accent border */
    background-color: var(--text-primary); /* Dark violet header (#1F223E is text-primary in light mode) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
}

/* Adjust header background depending on theme */
body.dark-mode .main-header {
    background-color: var(--bg-secondary);
}

body.light-mode .main-header {
    background-color: hsl(235, 33%, 18%); /* Hardcoded Brand Violet for light mode header */
}

.header-container {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
}

/* Hero Logo styles */
.hero-logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    height: 100px;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition-bounce);
}

body.dark-mode .hero-logo {
    background-color: white;
    padding: 12px 32px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-logo:hover {
    transform: scale(1.03);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

body.light-mode .icon-btn {
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.icon-sun {
    display: none;
}

body.light-mode .icon-moon {
    display: none;
}

body.light-mode .icon-sun {
    display: block;
}

.accent-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent);
    color: hsl(235, 33%, 18%); /* Dark text on gold */
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 10px rgba(237, 153, 20, 0.2);
}

.accent-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(237, 153, 20, 0.4);
    background-color: hsl(37, 86%, 55%);
}

.accent-btn:active {
    transform: translateY(0);
}

/* ----------------------------------------------------
   PAGE CONTAINER & HERO
   ---------------------------------------------------- */
.page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 50px) 24px 60px 24px;
}

.hero-section {
    text-align: center;
    padding: 30px 0 20px 0;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--accent);
    color: hsl(235, 33%, 18%); /* Dark on gold background */
    margin-bottom: 20px;
}

body.dark-mode .badge {
    color: white;
}

.hero-title {
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ----------------------------------------------------
   SEARCH CONTAINER
   ---------------------------------------------------- */
.search-container {
    margin: 20px auto 40px auto;
    max-width: 680px;
    width: 100%;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

#policy-search {
    width: 100%;
    padding: 16px 20px 16px 54px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

#policy-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(237, 153, 20, 0.15);
}

.clear-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    transition: var(--transition-smooth);
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* ----------------------------------------------------
   CONTENT GRID LAYOUT (TOC + ARTICLE)
   ---------------------------------------------------- */
.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
    position: relative;
}

/* Sidebar / Table of Contents */
.sidebar-toc {
    position: sticky;
    top: calc(var(--header-height) + 40px);
    max-height: calc(100vh - var(--header-height) - 80px);
    overflow-y: auto;
    padding-right: 10px;
}

.toc-wrapper {
    border-left: 2px solid var(--border-color);
    padding-left: 16px;
}

.toc-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toc-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: block;
    position: relative;
    padding: 2px 0;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--accent);
    border-radius: 0;
    transition: var(--transition-smooth);
}

.toc-link:hover {
    color: var(--text-primary);
}

.toc-link.active {
    color: var(--accent);
    font-weight: 700;
}

.toc-link.active::before {
    height: 16px;
}

/* Article & Content Styling */
.policy-article {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.policy-section {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

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

.section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--accent); /* Maverick & Max style accent border */
    padding-left: 14px;
}

.policy-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.policy-section p strong {
    color: var(--text-primary);
}

/* Highlights */
mark {
    background-color: rgba(237, 153, 20, 0.25);
    color: var(--text-primary);
    border-radius: 2px;
    padding: 0 4px;
}

/* Info Box / Alerts */
.info-alert {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-sm);
    background-color: var(--info-bg);
    border: 1px solid var(--info-border);
    margin: 24px 0;
}

.alert-icon {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 2px;
}

.alert-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.alert-content strong {
    color: var(--text-primary);
}

/* Warning Box */
.data-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-sm);
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    margin: 24px 0;
}

.warning-icon {
    font-size: 1.3rem;
    color: var(--accent);
    margin-top: 2px;
}

.warning-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.warning-content strong {
    color: var(--text-primary);
}

/* Lists */
.styled-list {
    list-style: none;
    margin: 20px 0 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.styled-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-secondary);
}

.styled-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent);
    font-size: 0.9rem;
}

/* Grid Data Cards */
.data-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.data-card {
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.data-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.data-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.data-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.secondary-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Security Features List */
.security-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}

.security-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.security-item:hover {
    border-color: var(--accent);
}

.security-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 4px;
}

.security-item h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.security-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Accordion for User Rights */
.rights-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
}

.rights-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.rights-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
    user-select: none;
}

.rights-header:hover {
    background-color: var(--bg-tertiary);
}

.rights-header span {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.rights-header span i {
    color: var(--accent);
}

.rights-header .arrow {
    transition: var(--transition-bounce);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rights-card.open {
    border-color: var(--accent);
}

.rights-card.open .rights-header {
    background-color: var(--bg-tertiary);
}

.rights-card.open .arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

.rights-body {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0, 1, 0, 1);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.rights-card.open .rights-body {
    padding: 0 24px 20px 24px;
    max-height: 200px;
    transition: all 0.3s cubic-bezier(1, 0, 1, 0);
}

/* Contact Info Card */
.contact-card {
    padding: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.98rem;
}

.contact-label {
    width: 120px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-label i {
    color: var(--accent);
    font-size: 0.95rem;
}

.contact-value {
    color: var(--text-secondary);
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
    border-bottom: 1px dashed transparent;
    font-weight: 600;
}

.text-link:hover {
    border-bottom-color: var(--accent);
}

.complaint-note {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* ----------------------------------------------------
   FOOTER
   ---------------------------------------------------- */
.main-footer {
    border-top: 2px solid var(--accent);
    background-color: hsl(235, 33%, 18%); /* Matches Brand Violet footer background */
    padding: 40px 24px;
    margin-top: 60px;
    color: white;
}

body.dark-mode .main-footer {
    background-color: var(--bg-secondary);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.main-footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    text-decoration: none;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: white;
}

.active-footer {
    color: var(--accent);
    font-weight: 700;
}

/* ----------------------------------------------------
   RESPONSIVE DESIGN
   ---------------------------------------------------- */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sidebar-toc {
        display: none;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .accent-btn span {
        display: none;
    }
    
    .accent-btn {
        padding: 10px;
        border-radius: var(--radius-sm);
    }
    
    .page-container {
        padding: calc(var(--header-height) + 20px) 16px 40px 16px;
    }
    
    .policy-article {
        padding: 24px;
        border-radius: var(--radius-sm);
    }
    
    .hero-title {
        font-size: 2.1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
        padding-left: 10px;
    }
    
    .contact-label {
        width: 100%;
        margin-bottom: 2px;
    }
}

/* ----------------------------------------------------
   PRINT LAYOUT
   ---------------------------------------------------- */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    body.dark-mode, body.light-mode {
        --bg-primary: white;
        --text-primary: black;
        --text-secondary: #333;
        --border-color: #ddd;
        --card-bg: white;
        --bg-secondary: #f9f9f9;
        --accent: #000;
    }
    
    .radial-gradient-bg,
    .glow-sphere,
    .main-header,
    .search-container,
    .sidebar-toc,
    .main-footer,
    #print-btn,
    #theme-toggle-btn {
        display: none !important;
    }
    
    .page-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    .policy-article {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    .policy-section {
        page-break-inside: avoid;
    }
    
    .rights-body {
        max-height: none !important;
        padding: 10px 0 !important;
        display: block !important;
    }
    
    .rights-card {
        border: 1px solid #ccc !important;
        margin-bottom: 10px !important;
    }
    
    .rights-header .arrow {
        display: none !important;
    }
}
