﻿/* ================================================================
   iFile.cloud - Legal & Content Pages Stylesheet
   Modern, clean design for Privacy, Terms, About, and Data pages
   Targets existing .custom-page-body structure
   ================================================================ */
/* ----------------------------------------------------------------
   ALL PAGE Content Navigation body scroll under the head navbar
   ---------------------------------------------------------------- */
#root .bg.text-main.border-b.h-64.py-8.sticky.top-0.flex-shrink-0 {
    z-index: 1;
}
/* ----------------------------------------------------------------
   Page Container & Layout
   ---------------------------------------------------------------- */
.custom-page-body {
    max-width: 850px !important;
    margin: 3rem auto !important;
    padding: 0 !important;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------------------
   Page Title (H1)
   ---------------------------------------------------------------- */
.custom-page-body h1 {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 2rem 0 !important;
    padding: 0 !important;
    letter-spacing: -0.02em;
    text-align: center;
    position: relative;
}

    .custom-page-body h1::after {
        content: '';
        display: block;
        width: 80px;
        height: 4px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        margin: 1rem auto 0;
        border-radius: 2px;
    }

.dark .custom-page-body h1 {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

    .dark .custom-page-body h1::after {
        background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    }

/* ----------------------------------------------------------------
   Content Wrapper
   ---------------------------------------------------------------- */
.custom-page-body .whitespace-pre-wrap {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    line-height: 1.8;
}

.dark .custom-page-body .whitespace-pre-wrap {
    background: rgba(30, 30, 47, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ----------------------------------------------------------------
   Section Headings (H2)
   ---------------------------------------------------------------- */
.custom-page-body h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 2.5rem 0 1.25rem 0 !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 3px solid transparent !important;
    background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box !important;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1 !important;
    position: relative;
}

.dark .custom-page-body h2 {
    color: #f7fafc !important;
    background: linear-gradient(rgba(30, 30, 47, 0.6), rgba(30, 30, 47, 0.6)) padding-box, linear-gradient(135deg, #818cf8 0%, #a78bfa 100%) border-box !important;
    border-image: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%) 1 !important;
}

.custom-page-body h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-radius: 2px;
}

.dark .custom-page-body h2::after {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
}

/* ----------------------------------------------------------------
   Subsection Headings (H3)
   ---------------------------------------------------------------- */
.custom-page-body h3 {
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #667eea !important;
    margin: 2rem 0 1rem 0 !important;
    position: relative;
    padding-left: 1rem;
}

    .custom-page-body h3::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0.3em;
        width: 4px;
        height: 1.2em;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 2px;
    }

.dark .custom-page-body h3 {
    color: #a78bfa !important;
}

    .dark .custom-page-body h3::before {
        background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    }

/* ----------------------------------------------------------------
   Bullet Points (targeting existing • bullets)
   ---------------------------------------------------------------- */
.custom-page-body p {
    margin: 1.25rem 0 !important;
    font-size: 1rem !important;
    color: #4a5568 !important;
    line-height: 1.8 !important;
    position: relative;
}

    /* Style paragraphs that start with bullet points */
    .custom-page-body p:has(strong:first-child)::before,
    .custom-page-body p:first-of-type::before {
        display: none;
    }

.dark .custom-page-body p {
    color: #cbd5e0 !important;
}

/* Enhanced bullet styling using gradient */
.custom-page-body .whitespace-pre-wrap > p {
    padding-left: 0;
}

/* Add gradient to bullet character */
.custom-page-body p::first-line {
    font-weight: inherit;
}

/* ----------------------------------------------------------------
   Links
   ---------------------------------------------------------------- */
.custom-page-body a {
    color: #667eea !important;
    text-decoration: none !important;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

    .custom-page-body a:hover {
        color: #764ba2 !important;
        border-bottom-color: #764ba2 !important;
        background: rgba(102, 126, 234, 0.05);
        padding: 0 0.25rem;
        margin: 0 -0.25rem;
    }

.dark .custom-page-body a {
    color: #a78bfa !important;
    border-bottom-color: rgba(167, 139, 250, 0.3) !important;
}

    .dark .custom-page-body a:hover {
        color: #c4b5fd !important;
        border-bottom-color: #c4b5fd !important;
        background: rgba(167, 139, 250, 0.1);
    }

/* ----------------------------------------------------------------
   Strong & Emphasis
   ---------------------------------------------------------------- */
.custom-page-body strong {
    font-weight: 700 !important;
    color: #1a202c !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .custom-page-body strong {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ----------------------------------------------------------------
   Special Styling for Last Updated
   ---------------------------------------------------------------- */
.custom-page-body p:last-child {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    margin-top: 3rem !important;
    font-size: 0.95rem !important;
}

.dark .custom-page-body p:last-child {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    border-color: rgba(167, 139, 250, 0.3);
}

/* ----------------------------------------------------------------
   Responsive Design
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
    .custom-page-body {
        margin: 2rem auto !important;
    }

        .custom-page-body h1 {
            font-size: 2rem !important;
        }

        .custom-page-body .whitespace-pre-wrap {
            padding: 2rem 1.5rem;
            border-radius: 0.75rem;
        }

        .custom-page-body h2 {
            font-size: 1.5rem !important;
        }

        .custom-page-body h3 {
            font-size: 1.2rem !important;
        }

        .custom-page-body p {
            font-size: 0.95rem !important;
        }
}

@media (max-width: 480px) {
    .custom-page-body {
        margin: 1rem 0.5rem !important;
    }

        .custom-page-body h1 {
            font-size: 1.75rem !important;
        }

        .custom-page-body .whitespace-pre-wrap {
            padding: 1.5rem 1rem;
            border-radius: 0.5rem;
        }

        .custom-page-body h2 {
            font-size: 1.35rem !important;
            margin: 2rem 0 1rem 0 !important;
        }

        .custom-page-body h3 {
            font-size: 1.1rem !important;
        }
}

/* ----------------------------------------------------------------
   Print Styles
   ---------------------------------------------------------------- */
@media print {
    .custom-page-body .whitespace-pre-wrap {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .custom-page-body h1::after {
        display: none;
    }

    .custom-page-body a {
        color: #000 !important;
        border-bottom: none !important;
        text-decoration: underline !important;
    }
}

/* ----------------------------------------------------------------
   Accessibility
   ---------------------------------------------------------------- */
.custom-page-body a:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
    border-radius: 2px;
}

.dark .custom-page-body a:focus {
    outline-color: #a78bfa;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

.custom-page-body :target {
    scroll-margin-top: 2rem;
    animation: highlight 2s ease-out;
}

@keyframes highlight {
    0% {
        background-color: rgba(102, 126, 234, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

/* ----------------------------------------------------------------
   Visual Enhancements
   ---------------------------------------------------------------- */

/* Add subtle animation to headings on scroll */
.custom-page-body h2,
.custom-page-body h3 {
    transition: transform 0.3s ease, color 0.3s ease;
}

    .custom-page-body h2:hover,
    .custom-page-body h3:hover {
        transform: translateX(5px);
    }

/* Improve readability */
.custom-page-body .whitespace-pre-wrap {
    position: relative;
}

    /* Add a subtle top gradient for depth */
    .custom-page-body .whitespace-pre-wrap::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 200px;
        background: radial-gradient(ellipse at top, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
        pointer-events: none;
        border-radius: 1rem 1rem 0 0;
    }

.dark .custom-page-body .whitespace-pre-wrap::before {
    background: radial-gradient(ellipse at top, rgba(129, 140, 248, 0.05) 0%, transparent 70%);
}
