﻿/* ================================================================
   WENGS LEGAL PAGES - Universal CSS Framework
   For: Privacy Policy, Service Agreement, Refund Policy
   ================================================================ */

/* Legal Page Container */
.legal-page {
    width: 100%;
    overflow-x: hidden;
}

/* Legal Hero Section */
.legal-hero {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    padding: calc(var(--nav-h) + 60px) var(--sp-6) 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .legal-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 70%);
        pointer-events: none;
    }

    .legal-hero h1 {
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 700;
        color: #fff;
        margin-bottom: 16px;
        letter-spacing: -0.02em;
        position: relative;
        z-index: 1;
    }

    .legal-hero .last-updated {
        display: inline-block;
        font-size: 13px;
        color: rgba(255,255,255,0.8);
        background: rgba(255,255,255,0.15);
        padding: 6px 14px;
        border-radius: 30px;
        margin-top: 12px;
        position: relative;
        z-index: 1;
    }

/* Legal Content Container */
.legal-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px var(--sp-6) 80px;
}

/* Sections */
.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
}

    .legal-section h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--n-900);
        margin-bottom: 16px;
        padding-bottom: 8px;
        border-bottom: 2px solid var(--brand-blue);
        display: inline-block;
    }

    .legal-section p {
        font-size: 1rem;
        line-height: 1.7;
        color: var(--n-600);
        margin-bottom: 16px;
    }

    .legal-section .intro-text {
        font-size: 1.05rem;
        color: var(--n-700);
        background: var(--n-50);
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 24px;
    }

/* Highlight Boxes */
.highlight-box {
    background: var(--n-50);
    border-left: 4px solid var(--brand-blue);
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
}

    .highlight-box p {
        margin-bottom: 10px;
    }

        .highlight-box p:last-child {
            margin-bottom: 0;
        }

    .highlight-box strong {
        color: var(--brand-blue);
    }

/* Lists */
.legal-list {
    margin: 16px 0;
    padding-left: 24px;
}

    .legal-list li {
        font-size: 1rem;
        line-height: 1.7;
        color: var(--n-600);
        margin-bottom: 10px;
        position: relative;
        padding-left: 20px;
    }

        .legal-list li::before {
            content: '•';
            position: absolute;
            left: 0;
            color: var(--brand-blue);
            font-weight: bold;
            font-size: 1.2rem;
        }

/* Numbered List */
.legal-numbered-list {
    margin: 16px 0;
    padding-left: 24px;
    list-style-type: none;
    counter-reset: legal-counter;
}

    .legal-numbered-list li {
        counter-increment: legal-counter;
        font-size: 1rem;
        line-height: 1.7;
        color: var(--n-600);
        margin-bottom: 10px;
        position: relative;
        padding-left: 28px;
    }

        .legal-numbered-list li::before {
            content: counter(legal-counter) ".";
            position: absolute;
            left: 0;
            color: var(--brand-blue);
            font-weight: 600;
        }

/* Grid Layout for Contact Info */
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.legal-contact-card {
    background: var(--n-0);
    border: 1px solid var(--n-200);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

    .legal-contact-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--brand-blue-light);
    }

    .legal-contact-card i {
        font-size: 32px;
        color: var(--brand-blue);
        margin-bottom: 12px;
        display: inline-block;
    }

    .legal-contact-card h4 {
        font-size: 14px;
        font-weight: 600;
        color: var(--n-500);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .legal-contact-card p {
        font-size: 14px;
        color: var(--n-700);
        margin: 0;
        word-break: break-word;
    }

    .legal-contact-card a {
        color: var(--n-700);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .legal-contact-card a:hover {
            color: var(--brand-blue);
        }

/* Table of Contents */
.legal-toc {
    background: var(--n-50);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 48px;
}

    .legal-toc h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--n-900);
        margin-bottom: 16px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--n-200);
    }

.legal-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .legal-toc-list li {
        margin: 0;
    }

    .legal-toc-list a {
        display: inline-block;
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 500;
        color: var(--n-600);
        background: var(--n-0);
        border: 1px solid var(--n-200);
        border-radius: 30px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

        .legal-toc-list a:hover {
            background: var(--brand-blue);
            color: #fff;
            border-color: var(--brand-blue);
        }

/* Print Styles */
@media print {
    .legal-hero {
        background: var(--brand-blue);
        padding: 20px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .legal-toc,
    .legal-contact-card {
        break-inside: avoid;
    }

    .legal-contact-card {
        border: 1px solid #ddd;
    }

    .legal-section {
        break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-hero {
        padding: calc(var(--nav-h) + 40px) var(--sp-4) 40px;
    }

        .legal-hero h1 {
            font-size: 1.8rem;
        }

    .legal-content {
        padding: 40px var(--sp-4) 60px;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

    .legal-section p,
    .legal-list li,
    .legal-numbered-list li {
        font-size: 0.95rem;
    }

    .highlight-box {
        padding: 16px;
    }

    .legal-contact-grid {
        gap: 16px;
    }

    .legal-contact-card {
        padding: 16px;
    }

    .legal-toc-list {
        gap: 8px;
    }

        .legal-toc-list a {
            padding: 4px 12px;
            font-size: 12px;
        }
}

@media (max-width: 480px) {
    .legal-hero h1 {
        font-size: 1.5rem;
    }

    .legal-hero .last-updated {
        font-size: 11px;
    }

    .legal-section h2 {
        font-size: 1.2rem;
    }

    .legal-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-section {
    animation: fadeIn 0.5s ease forwards;
}

/* Table Styles (if needed) */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

    .legal-table th,
    .legal-table td {
        border: 1px solid var(--n-200);
        padding: 12px;
        text-align: left;
        font-size: 14px;
    }

    .legal-table th {
        background: var(--n-50);
        font-weight: 600;
        color: var(--n-900);
    }

    .legal-table td {
        color: var(--n-600);
    }

@media (max-width: 600px) {
    .legal-table {
        display: block;
        overflow-x: auto;
    }
}

/* Definition List */
.legal-definition {
    margin: 20px 0;
}

    .legal-definition dt {
        font-weight: 700;
        color: var(--n-900);
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .legal-definition dd {
        color: var(--n-600);
        margin-bottom: 16px;
        padding-left: 20px;
        font-size: 0.95rem;
        line-height: 1.6;
    }

/* Notice Box */
.legal-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
}

    .legal-notice p {
        margin: 0;
        color: #856404;
    }

    .legal-notice strong {
        color: #856404;
    }
