/*
 * Privacy Policy Page Styles
 * Professional legal document layout matching ByteWave design system
 * Follows design specifications: Inter font, #4F46E5 primary, clean spacing
 */

/* ============================================
   HERO SECTION
   ============================================ */

.privacy-policy-page {
    background: #FFFFFF;
}

.privacy-hero {
    background: linear-gradient(180deg, #FAF7EF 0%, #FFFFFF 100%);
    padding: 80px 0 60px;
}

.privacy-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.privacy-label {
    display: inline-block;
    background: #4F46E5;
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-bottom: 20px;
}

.privacy-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.2;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.privacy-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #646570;
    margin-bottom: 24px;
}

.privacy-intro {
    font-size: 18px;
    line-height: 30px;
    color: #1F2937;
    margin-bottom: 0;
}

/* ============================================
   CONTENT SECTION WITH SIDEBAR LAYOUT
   ============================================ */

.privacy-content-section {
    padding: 80px 0;
    background: #FFFFFF;
}

.privacy-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* Main Content (Left Side) */
.privacy-content {
    max-width: 100%;
    margin: 0;
    min-width: 0; /* Prevents grid blowout */
}

/* Sidebar (Right Side) */
.privacy-sidebar {
    position: relative;
}

/* ============================================
   STICKY TABLE OF CONTENTS (Right Sidebar)
   ============================================ */

.sticky-toc {
    position: sticky;
    top: 90px; /* Account for header height + spacing */
    background: #F9FAFB;
    padding: 28px 24px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Custom scrollbar for TOC */
.sticky-toc::-webkit-scrollbar {
    width: 6px;
}

.sticky-toc::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.sticky-toc::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.sticky-toc::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4F46E5;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 8px;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list a {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    color: #646570;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
    border-left: 3px solid transparent;
}

.toc-list a::before {
    content: counter(toc-counter) ".";
    font-weight: 700;
    color: #4F46E5;
    margin-right: 10px;
    min-width: 20px;
    flex-shrink: 0;
}

.toc-list a:hover,
.toc-list a.active {
    background: #FFFFFF;
    border-left-color: #4F46E5;
    color: #1F2937;
    padding-left: 16px;
}

.toc-list a.active {
    font-weight: 600;
    color: #4F46E5;
}

.privacy-section {
    margin-bottom: 64px;
    scroll-margin-top: 90px; /* Account for sticky header */
}

.privacy-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.3;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    padding-bottom: 16px;
    border-bottom: 2px solid #4F46E5;
}

.subsection-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: #1F2937;
    margin-top: 32px;
    margin-bottom: 16px;
}

.privacy-section p {
    font-size: 16px;
    line-height: 28px;
    color: #1F2937;
    margin-bottom: 20px;
}

.privacy-section p:last-child {
    margin-bottom: 0;
}

/* Lists */
.privacy-list {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.privacy-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 26px;
    color: #1F2937;
}

.privacy-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: #4F46E5;
    border-radius: 50%;
}

/* Privacy Cards */
.privacy-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
}

.privacy-card:last-child {
    margin-bottom: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 16px;
}

.privacy-card .privacy-list {
    margin-top: 0;
    margin-bottom: 0;
}

/* Notice Box */
.privacy-notice {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 20px 24px;
    margin: 28px 0;
    border-radius: 6px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.notice-icon {
    flex-shrink: 0;
    color: #F59E0B;
    margin-top: 2px;
}

.privacy-notice p {
    margin: 0;
    font-size: 15px;
    line-height: 24px;
    color: #78350F;
}

.privacy-notice strong {
    color: #78350F;
}

/* ============================================
   RIGHTS GRID
   ============================================ */

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.right-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.right-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.right-icon {
    color: #4F46E5;
    margin-bottom: 16px;
}

.right-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.right-card p {
    font-size: 14px;
    line-height: 22px;
    color: #646570;
    margin: 0;
}

.rights-note {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 8px;
    padding: 20px;
    margin-top: 28px;
    font-size: 15px;
    line-height: 26px;
    color: #3730A3;
}

/* ============================================
   COOKIES SECTION
   ============================================ */

.cookie-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.cookie-type {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
}

.cookie-type h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.cookie-type p {
    font-size: 14px;
    line-height: 22px;
    color: #646570;
    margin: 0;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.privacy-contact {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAF7EF 100%);
    padding: 48px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
}

.contact-methods {
    display: grid;
    gap: 28px;
    margin: 32px 0;
}

.contact-method {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.contact-icon {
    flex-shrink: 0;
    color: #4F46E5;
}

.contact-method strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #646570;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.contact-method a {
    color: #4F46E5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-method a:hover {
    color: #4338CA;
    text-decoration: underline;
}

.data-protection-officer {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 8px;
    padding: 24px;
    margin-top: 32px;
}

.data-protection-officer .subsection-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
}

.data-protection-officer p {
    font-size: 15px;
    line-height: 24px;
    color: #1F2937;
}

.data-protection-officer a {
    color: #4F46E5;
    font-weight: 600;
}

/* ============================================
   CTA SECTION
   ============================================ */

.privacy-cta-section {
    padding: 80px 0;
    background: #4F46E5;
}

.privacy-cta {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.privacy-cta h2 {
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.3;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.privacy-cta p {
    font-size: 18px;
    line-height: 28px;
    color: #FFFFFF;
    margin-bottom: 32px;
}

.privacy-cta .btn {
    background: #FFFFFF;
    color: #4F46E5;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.privacy-cta .btn:hover {
    background: #F9FAFB;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet - Stack sidebar below content */
@media (max-width: 1024px) {
    .privacy-layout {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }

    .sticky-toc {
        padding: 24px 20px;
        font-size: 13px;
    }

    .toc-title {
        font-size: 16px;
    }

    .toc-list a {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* Mobile - Stack layout vertically */
@media (max-width: 768px) {
    .privacy-hero {
        padding: 60px 0 40px;
    }

    .privacy-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Move TOC to top on mobile */
    .privacy-sidebar {
        order: -1;
        margin-bottom: 40px;
    }

    .sticky-toc {
        position: relative;
        top: auto;
        max-height: none;
        padding: 24px 20px;
    }

    .toc-title {
        font-size: 18px;
        text-align: center;
    }

    .toc-list a {
        font-size: 14px;
        padding: 10px 12px;
    }

    .privacy-content-section {
        padding: 60px 0;
    }

    .privacy-section {
        margin-bottom: 48px;
    }

    .section-title {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .subsection-title {
        font-size: 18px;
        margin-top: 24px;
    }

    .privacy-card {
        padding: 20px 24px;
    }

    .rights-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cookie-types {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .privacy-contact {
        padding: 32px 24px;
    }

    .contact-method {
        flex-direction: column;
        gap: 12px;
    }

    .privacy-cta-section {
        padding: 60px 0;
    }

    .privacy-cta .btn {
        padding: 12px 28px;
    }
}

@media (max-width: 480px) {
    .privacy-hero {
        padding: 48px 0 32px;
    }

    .privacy-label {
        font-size: 11px;
        padding: 5px 10px;
    }

    .privacy-intro {
        font-size: 16px;
        line-height: 26px;
    }

    .privacy-toc {
        padding: 20px 16px;
    }

    .toc-title {
        font-size: 20px;
    }

    .privacy-content-section {
        padding: 48px 0;
    }

    .privacy-section p,
    .privacy-list li {
        font-size: 15px;
        line-height: 26px;
    }

    .privacy-list li {
        padding-left: 24px;
    }

    .privacy-card {
        padding: 16px 20px;
    }

    .privacy-notice {
        padding: 16px 20px;
        gap: 12px;
    }

    .privacy-contact {
        padding: 24px 20px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible states */
.toc-list a:focus-visible,
.contact-method a:focus-visible,
.privacy-cta .btn:focus-visible {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .privacy-card,
    .cookie-type,
    .contact-method {
        border-width: 2px;
    }

    .section-title {
        border-bottom-width: 3px;
    }
}

/* Print styles */
@media print {
    .privacy-hero {
        background: #FFFFFF;
        padding: 20px 0;
    }

    .privacy-label {
        background: #FFFFFF;
        color: #000000;
        border: 1px solid #000000;
    }

    .privacy-toc-section,
    .privacy-cta-section {
        display: none;
    }

    .privacy-section {
        page-break-inside: avoid;
    }

    .section-title {
        page-break-after: avoid;
    }
}

