/* General Resets and Base Styles */
body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    /* Clean, modern font */
    line-height: 1.6;
    color: #1c1c1c;
    /* Dark text for readability */
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    /* Light grey background */
}

a {
    color: #0070c9;
    /* Apple-style blue link color */
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* HEADER STYLING */
.page-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 30px 5vw;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1c1c1c;
    margin-bottom: 5px;
}

.update-date {
    font-size: 0.9rem;
    color: #666;
}

/* MAIN LAYOUT (Similar to Google/Amazon Two-Column) */
.legal-container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    /* Padding for desktop view */
}

/* SIDE NAVIGATION (Table of Contents) */
.side-nav {
    width: 250px;
    flex-shrink: 0;
    /* Prevents it from shrinking */
    padding: 20px 0;
    position: sticky;
    /* Makes the menu stick as you scroll */
    top: 20px;
    /* Space from the top of the viewport */
    height: fit-content;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.side-nav h2 {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0 20px;
    margin-top: 0;
    color: #1c1c1c;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.nav-list li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #555;
    border-left: 3px solid transparent;
}

.nav-list li a:hover {
    background-color: #f0f4f7;
    border-left: 3px solid #0070c9;
    text-decoration: none;
    color: #1c1c1c;
}

/* MAIN CONTENT STYLING */
.main-content {
    flex-grow: 1;
    margin-left: 40px;
    padding: 20px 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.intro-text {
    font-size: 1.1rem;
    padding: 15px;
    border-left: 4px solid #0070c9;
    background-color: #f0f4f7;
    margin-bottom: 30px;
    border-radius: 4px;
}

.terms-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e0e0e0;
}

.terms-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1c1c1c;
    margin-top: 0;
    margin-bottom: 20px;
}

.terms-section p {
    margin-bottom: 15px;
    color: #333;
}

/* PAYMENT POLICY SPECIFIC STYLING (To separate the sub-sections) */
.payment-section h3 {
    font-size: 1.15rem;
    color: #0070c9;
    margin-top: 25px;
    margin-bottom: 5px;
}

.payment-point {
    margin-bottom: 20px;
    padding: 10px;
    border-left: 3px solid #f0f4f7;
}

/* Refund and Revision Box Styling */
.refund-box,
.revision-box {
    background-color: #f0f4f7;
    /* Light blue background for clarity */
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.refund-box h3,
.revision-box h3 {
    color: #1c1c1c;
}

.refund-box ul,
.revision-box ul {
    list-style-type: none;
    padding-left: 0;
}

.refund-box li,
.revision-box li {
    margin-bottom: 8px;
}

.refund-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

/* Highlight for Limitation of Liability */
.legal-warning {
    background-color: #fff8f8;
    /* Light Red/Warning Background */
    border: 1px solid #ffcccc;
    padding: 20px;
    margin-top: 20px;
    border-radius: 6px;
}

.legal-warning h2 {
    color: #c93d3d;
    /* Red highlight for key legal sections */
    text-transform: uppercase;
}

.legal-warning p {
    font-weight: 600;
    /* Bold text to draw attention */
    color: #333;
    line-height: 1.8;
}

/* FOOTER STYLING */
.legal-footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    background-color: #ffffff;
}

/* MEDIA QUERIES for Mobile Responsiveness */
@media (max-width: 992px) {
    .legal-container {
        flex-direction: column;
        /* Stack the columns on smaller screens */
        padding: 0 10px;
    }

    .side-nav {
        position: static;
        /* Remove sticky position on mobile */
        width: 100%;
        margin-bottom: 20px;
        box-shadow: none;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Keep the navigation hidden on mobile by default to save space */
    .side-nav h2 {
        cursor: pointer;
        padding: 10px 20px;
        display: block;
        background-color: #f0f0f0;
        border-radius: 4px;
    }

    .nav-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-top: 1px solid #e0e0e0;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        box-shadow: none;
    }

    .page-header {
        padding: 20px 10px;
    }
}