/* Privacy Policy Custom Styles */

/* 1. Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* 2. Smooth Scrolling Offset for Fixed Header */
.privacy-section {
    scroll-margin-top: 120px;
}

/* 3. Quick Links Active State - Desktop Only */
@media (min-width: 1024px) {
    .quick-link {
        position: relative;
        transition: all 0.3s ease;
        border-top-left-radius: 5px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        border-bottom-left-radius: 5px;
        display: flex;
        align-items: center;
        padding: 18px 8px;
    }

    .quick-link.active {
        color: #FFFFFF;
        font-weight: 600;
        background: linear-gradient(77.38deg, #6366F1 16.03%, #8B5CF6 84.79%);
    }

    .quick-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #FFFFFF;
        border-radius: 24px;
    }

    .quick-link:hover {
        color: #FFFFFF;
    }
}

/* Mobile Quick Links */
.quick-link-mobile.active {
    background: linear-gradient(78.26deg, #1162E1 -10.21%, #844BFB 76.67%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 4. Prose Styles for Content */
.prose {
    max-width: none;
}

.prose p {
    line-height: 1.75;
}

.prose strong {
    font-weight: 600;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #60A5FA;
}

/* 5. Mobile Menu Styles */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.show {
    display: block;
}

/* 6. Sticky Sidebar on Desktop */
@media (min-width: 1024px) {
    .sticky {
        position: sticky !important;
        top: 120px !important;
        /* Removed max-height and overflow-y to allow sidebar to extend naturally */
    }
}

/* 7. Header Scroll Effect */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    top: 16px;
}

header.scrolled nav {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 8. Smooth Reveal Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.privacy-section {
    animation: fadeInUp 0.6s ease-out;
}

/* 9. Link Underline Animation */
a {
    position: relative;
}

a.underline-animated {
    text-decoration: none;
}

a.underline-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #6B46C1);
    transition: width 0.3s ease;
}

a.underline-animated:hover::after {
    width: 100%;
}

/* 10. Card Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

/* 11. Gradient Background Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* 12. Accessibility - Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 4px;
    border-radius: 4px;
}

/* 13. Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 14. Responsive Table Styles */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 15. Print Styles */
@media print {
    header,
    footer,
    aside {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .privacy-section {
        page-break-inside: avoid;
    }
}

/* 16. Loading Animation */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 17. Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3B82F6, #6B46C1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* 18. Section Dividers */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 48px 0;
}

@media (min-width: 1024px) {
    .section-divider {
        margin: 64px 0;
    }
}

/* 19. Code Blocks (if needed) */
code {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre code {
    display: block;
    padding: 16px;
    overflow-x: auto;
    border-radius: 8px;
}

/* 20. Selection Styles */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #FFFFFF;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: #FFFFFF;
}

/* 21. Subsection Gradient Border */
.subsection-border {
    border: 1px solid #0066DD;
    border-radius: 32px;
    padding: 24px;
}

@media (min-width: 1024px) {
    .subsection-border {
        padding: 32px;
    }
}


/* 22. Privacy Content Section Toggle */
.privacy-content-section {
    display: none;
    margin: 0 !important;
}

.privacy-content-section.active {
    display: block;
    margin: 0 !important;
}
