/* ================================================================
   WENGS LEGAL PAGES - Universal CSS Framework
   For: Service Agreement, Privacy Policy, Refund Policy, NDA, AMC
   Version: 2.1
   ================================================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Colors */
    --brand-blue: #1a237e;
    --brand-blue-dark: #0d1555;
    --brand-blue-light: #3949ab;
    /* Neutrals */
    --n-0: #ffffff;
    --n-50: #f8f9fa;
    --n-100: #f5f5f5;
    --n-200: #e0e0e0;
    --n-300: #cccccc;
    --n-400: #b3b3b3;
    --n-500: #9e9e9e;
    --n-600: #666666;
    --n-700: #444444;
    --n-800: #333333;
    --n-900: #1a1a1a;
    /* Spacing */
    --sp-2: 8px;
    --sp-4: 16px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    /* Navigation Height - adjust to match your site */
    --nav-h: 70px;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ===== BASE ===== */
.legal-page {
    width: 100%;
    overflow-x: hidden;
}

/* ===== 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-hero .agreement-badge {
        display: inline-block;
        background: rgba(255,255,255,0.12);
        padding: 6px 20px;
        border-radius: 30px;
        font-size: 14px;
        color: rgba(255,255,255,0.9);
        margin-top: 12px;
        position: relative;
        z-index: 1;
    }

/* ===== CONTENT ===== */
.legal-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px var(--sp-6) 80px;
}

/* ===== SECTIONS ===== */
.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
    animation: fadeIn 0.5s ease forwards;
}

    .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 h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--n-800);
        margin: 20px 0 10px 0;
    }

    .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 24px;
        border-radius: var(--radius-md);
        margin-bottom: 24px;
        border-left: 4px solid var(--brand-blue);
    }

/* ===== HIGHLIGHT BOX ===== */
.highlight-box,
.legal-highlight {
    background: var(--n-50);
    border-left: 4px solid var(--brand-blue);
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .highlight-box i,
    .legal-highlight i {
        font-size: 20px;
        color: var(--brand-blue);
        margin-top: 2px;
        flex-shrink: 0;
    }

    .highlight-box p,
    .legal-highlight p {
        margin-bottom: 0;
    }

    .highlight-box strong,
    .legal-highlight 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;
        }

.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;
        }

/* ===== TABLE OF CONTENTS ===== */
.legal-toc {
    background: var(--n-50);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    margin-bottom: 48px;
    border: 1px solid var(--n-200);
}

    .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: 8px 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .legal-toc-list li {
        margin: 0;
    }

    .legal-toc-list a {
        display: inline-block;
        padding: 6px 16px;
        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);
            transform: translateY(-2px);
        }

/* ===== CONTACT GRID ===== */
.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: var(--radius-md);
    padding: 24px 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);
        }

/* ===== LEGAL ACTIONS ===== */
.legal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

    .legal-actions button {
        padding: 8px 20px;
        border: 1px solid var(--n-200);
        border-radius: var(--radius-sm);
        background: var(--n-0);
        cursor: pointer;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        font-family: inherit;
    }

        .legal-actions button:hover {
            background: var(--n-50);
            border-color: var(--n-400);
            transform: translateY(-1px);
        }

    .legal-actions .btn-print {
        background: var(--n-50);
    }

    .legal-actions .btn-pdf {
        background: #e53935;
        color: white;
        border-color: #e53935;
    }

        .legal-actions .btn-pdf:hover {
            background: #c62828;
        }

/* ===== BACK TO TOP ===== */
.legal-back-top {
    text-align: center;
    margin: 40px 0 20px;
    padding: 20px 0;
    border-top: 1px solid var(--n-200);
}

.back-to-top {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .back-to-top:hover {
        color: var(--brand-blue-dark);
        transform: translateY(-3px);
    }

/* ===== SIGNATURE SECTIONS (NDA & AMC) ===== */
.nda-signature-section,
.amc-signature-section {
    background: var(--n-50);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-top: 40px;
    border: 1px solid var(--n-200);
}

    .nda-signature-section h3,
    .amc-signature-section h3 {
        color: var(--brand-blue);
        margin-bottom: 20px;
        font-size: 1.4rem;
    }

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.signature-field {
    margin-bottom: 15px;
}

    .signature-field label {
        display: block;
        font-weight: 600;
        margin-bottom: 5px;
        color: var(--n-700);
        font-size: 14px;
    }

        .signature-field label .required {
            color: #e53935;
        }

    .signature-field input,
    .signature-field select,
    .signature-field textarea {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid var(--n-200);
        border-radius: var(--radius-sm);
        font-size: 14px;
        transition: all 0.3s ease;
        font-family: inherit;
        background: var(--n-0);
    }

        .signature-field input:focus,
        .signature-field select:focus,
        .signature-field textarea:focus {
            border-color: var(--brand-blue);
            outline: none;
            box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
        }

    .signature-field textarea {
        min-height: 80px;
        resize: vertical;
    }

/* ===== CHECKBOXES ===== */
.nda-checkbox,
.amc-checklist {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 15px 0;
    padding: 15px 18px;
    background: var(--n-0);
    border-radius: var(--radius-sm);
    border: 1px solid var(--n-200);
    transition: border-color 0.3s ease;
}

    .nda-checkbox:hover,
    .amc-checklist:hover {
        border-color: var(--brand-blue-light);
    }

    .nda-checkbox input[type="checkbox"],
    .amc-checklist input[type="checkbox"] {
        margin-top: 3px;
        width: 18px;
        height: 18px;
        cursor: pointer;
        flex-shrink: 0;
        accent-color: var(--brand-blue);
    }

    .nda-checkbox label,
    .amc-checklist label {
        cursor: pointer;
        font-size: 14px;
        color: var(--n-600);
        line-height: 1.5;
    }

        .nda-checkbox label strong,
        .amc-checklist label strong {
            color: var(--n-900);
        }

/* ===== BUTTONS ===== */
.btn-accept-nda {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn-accept-nda:hover {
        background: var(--brand-blue-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .btn-accept-nda:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-accept-amc {
    background: #00c853;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn-accept-amc:hover {
        background: #00b248;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
    }

    .btn-accept-amc:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* ===== SUCCESS MESSAGES ===== */
.success-message,
.success-message-amc {
    display: none;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

    .success-message.show,
    .success-message-amc.show {
        display: block;
    }

    .success-message i,
    .success-message-amc i {
        font-size: 24px;
        margin-right: 10px;
        color: #28a745;
    }

    .success-message strong,
    .success-message-amc strong {
        color: #155724;
    }

    .success-message p,
    .success-message-amc p {
        margin-top: 10px;
        margin-bottom: 0;
        color: #155724;
    }

/* ===== AMC PRICING ===== */
.amc-pricing-box {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius-md);
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

    .amc-pricing-box .pricing-item {
        padding: 20px;
        background: rgba(255,255,255,0.1);
        border-radius: var(--radius-sm);
        transition: all 0.3s ease;
    }

        .amc-pricing-box .pricing-item:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-5px);
        }

        .amc-pricing-box .pricing-item .amount {
            font-size: 32px;
            font-weight: 700;
            display: block;
            margin: 10px 0;
        }

        .amc-pricing-box .pricing-item .label {
            font-size: 14px;
            opacity: 0.9;
        }

        .amc-pricing-box .pricing-item.featured {
            background: rgba(255,255,255,0.2);
            border: 2px solid #ffd600;
        }

/* ===== AMC FEATURES ===== */
.amc-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.amc-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--n-50);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .amc-feature-item:hover {
        background: #e8eaf6;
        border-color: var(--brand-blue-light);
        transform: translateX(5px);
    }

    .amc-feature-item i {
        color: var(--brand-blue);
        font-size: 18px;
        width: 24px;
        text-align: center;
    }

/* ===== BADGES ===== */
.legal-badge-nda {
    display: inline-block;
    background: var(--brand-blue);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-transform: uppercase;
}

.coverage-badge {
    display: inline-block;
    background: #00c853;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exclusion-badge {
    display: inline-block;
    background: #e53935;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version {
    background: rgba(255,255,255,0.2);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
}

/* ===== TABLES ===== */
.legal-table,
.amc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

    .legal-table th,
    .legal-table td,
    .amc-table th,
    .amc-table td {
        padding: 12px 15px;
        border: 1px solid var(--n-200);
        text-align: left;
    }

    .legal-table th,
    .amc-table th {
        background: var(--brand-blue);
        color: white;
        font-weight: 600;
    }

    .legal-table tr:nth-child(even),
    .amc-table tr:nth-child(even) {
        background: var(--n-50);
    }

    .legal-table tr:hover,
    .amc-table tr:hover {
        background: #e8eaf6;
    }

/* ===== DEFINITION LISTS ===== */
.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;
    }

/* ===== NOTICES ===== */
.legal-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

    .legal-notice p {
        margin: 0;
        color: #856404;
    }

    .legal-notice strong {
        color: #856404;
    }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .legal-hero {
        background: var(--brand-blue) !important;
        padding: 30px 20px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

        .legal-hero h1 {
            color: #fff !important;
        }

        .legal-hero .last-updated {
            color: rgba(255,255,255,0.8) !important;
        }

    .legal-actions {
        display: none !important;
    }

    .legal-toc,
    .legal-contact-card,
    .nda-signature-section,
    .amc-signature-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .legal-contact-card {
        border: 1px solid #ddd !important;
    }

    .legal-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .legal-highlight {
        border: 1px solid #ddd !important;
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .btn-accept-nda,
    .btn-accept-amc,
    .back-to-top,
    .legal-actions button {
        display: none !important;
    }

    .amc-pricing-box {
        background: #1a237e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

        .amc-pricing-box .pricing-item {
            background: rgba(255,255,255,0.1) !important;
        }
}

/* ================================================================
   PDF MODAL & TOAST STYLES
   ================================================================ */

/* PDF Modal */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

    .pdf-modal.active {
        display: flex;
    }

.pdf-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.pdf-modal-content .modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

    .pdf-modal-content .modal-icon .fa-file-pdf {
        color: #e53935;
    }

.pdf-modal-content h2 {
    color: var(--n-900);
    margin-bottom: 10px;
}

.pdf-modal-content p {
    color: var(--n-600);
    margin-bottom: 20px;
    line-height: 1.6;
}

.pdf-modal-content .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

    .pdf-modal-content .btn-group button {
        padding: 12px 30px;
        border-radius: var(--radius-sm);
        border: none;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

.pdf-modal-content .btn-download-pdf {
    background: #e53935;
    color: white;
}

    .pdf-modal-content .btn-download-pdf:hover {
        background: #c62828;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    }

.pdf-modal-content .btn-close-modal {
    background: var(--n-50);
    color: var(--n-700);
}

    .pdf-modal-content .btn-close-modal:hover {
        background: var(--n-200);
    }

.pdf-modal-content .loading-spinner {
    display: none;
    margin: 15px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

    .pdf-modal-content .loading-spinner.show {
        display: block;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--brand-blue);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideUp 0.4s ease;
    max-width: 400px;
}

    .toast-notification.show {
        display: flex;
    }

    .toast-notification i {
        font-size: 24px;
    }

    .toast-notification .toast-close {
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.3s;
        margin-left: 10px;
    }

        .toast-notification .toast-close:hover {
            opacity: 1;
        }

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Badge on PDF Button */
.legal-actions .btn-pdf {
    position: relative;
}

    .legal-actions .btn-pdf .badge-new {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #ff6f00;
        color: white;
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
        font-weight: 700;
        text-transform: uppercase;
    }

/* Copy Link Button */
.legal-actions .btn-copy {
    background: var(--n-0);
    border: 1px solid var(--n-200);
}

    .legal-actions .btn-copy:hover {
        background: var(--n-50);
        border-color: var(--n-400);
    }

/* Responsive */
@media (max-width: 480px) {
    .pdf-modal-content {
        padding: 25px 20px;
    }

        .pdf-modal-content .btn-group {
            flex-direction: column;
        }

            .pdf-modal-content .btn-group button {
                width: 100%;
                justify-content: center;
            }

    .toast-notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .legal-content {
        padding: 50px var(--sp-4) 70px;
    }
}

@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;
    }

    .legal-toc {
        padding: 20px;
    }

    .legal-toc-list {
        gap: 6px 12px;
    }

        .legal-toc-list a {
            font-size: 12px;
            padding: 4px 12px;
        }

    .legal-contact-grid {
        gap: 16px;
    }

    .legal-contact-card {
        padding: 16px;
    }

    .highlight-box,
    .legal-highlight {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .signature-grid {
        grid-template-columns: 1fr;
    }

    .amc-pricing-box {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .amc-features-grid {
        grid-template-columns: 1fr;
    }

    .nda-signature-section,
    .amc-signature-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: calc(var(--nav-h) + 30px) var(--sp-4) 30px;
    }

        .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;
    }

    .legal-actions {
        flex-direction: column;
    }

        .legal-actions button {
            width: 100%;
            justify-content: center;
        }

    .signature-field input,
    .signature-field select,
    .signature-field textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .btn-accept-nda,
    .btn-accept-amc {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .legal-toc-list a {
        font-size: 11px;
        padding: 3px 10px;
    }

    .amc-pricing-box .pricing-item .amount {
        font-size: 28px;
    }

    .nda-checkbox,
    .amc-checklist {
        padding: 12px 14px;
    }

    .success-message,
    .success-message-amc {
        padding: 16px;
    }

    .legal-table,
    .amc-table {
        display: block;
        overflow-x: auto;
    }
}
