.terms-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        display: none;
        font-display: swap; /* Added for performance */
    }
    
    .terms-popup__content {
        background-color: white;
        padding: 2rem;
        border-radius: 8px;
        max-width: 500px;
        text-align: center;
    }
    
    .terms-popup__content h3 {
        margin-bottom: 1rem;
        color: var(--text-dark); /* Using global variable */
    }
    
    .terms-popup__content p {
        margin-bottom: 1.5rem;
        color: var(--text-medium); /* Using global variable */
    }
    
    .terms-popup__buttons {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }

/* Styles specific to policy and terms pages (moved from policy.html) */
.policy-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.policy-header {
    text-align: center;
    margin-bottom: 40px;
}

.policy-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
}

.policy-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.policy-section p,
.policy-section ul li,
.policy-section ol li { /* Added ol li for ordered lists */
    display: block; /* Ensure block-level behavior for distinct cards */
    background-color: #f0f2f5; /* A slightly more distinct light grey for card background */
    padding: 15px 20px; /* Adjusted padding for better appearance */
    border-radius: 10px; /* Slightly more rounded corners */
    margin-bottom: 15px; /* Space between cards */
    line-height: 1.7;
    color: #333; /* Darker text for readability on light background */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* More prominent shadow for card effect */
    border: 1px solid #e0e0e0; /* Subtle border */
}

.policy-section ul,
.policy-section ol { /* Added ol for ordered lists */
    list-style: none; /* Remove default list styling */
    padding-left: 0; /* Remove default padding for ul/ol */
    margin-left: 0; /* Remove default margin for ul/ol */
}

.policy-section ul li,
.policy-section ol li { /* Ensure list items align with paragraphs */
    margin-left: 0;
}

.policy-section ul li:last-child,
.policy-section ol li:last-child { /* No bottom margin for the last list item in a section */
    margin-bottom: 0;
}

.warning-box {
    background-color: var(--warning-light);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.consent-highlight {
    background-color: var(--success-light);
    border-left: 4px solid var(--success-color);
    padding: 15px;
    margin: 15px 0;
}

ul {
    margin-left: 20px;
    margin-top: 10px;
}

li {
    margin-bottom: 10px;
}

.contact-info {
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 8px;
}

/* Responsive adjustments for policy and terms pages */
@media (max-width: 768px) {
    .policy-container,
    .terms-container {
        padding: 80px 15px 30px; /* Adjust padding for smaller screens */
    }

    .policy-header h1,
    .terms-header h1 {
        font-size: 2em;
    }

    .policy-section,
    .terms-section {
        padding: 20px;
    }

    .policy-section h2,
    .terms-section h2 {
        font-size: 1.3rem;
    }

    .warning-box,
    .consent-highlight,
    .consent-section,
    .acceptance-box {
        padding: 15px;
        margin: 15px 0;
    }

    .warning-box p,
    .consent-highlight p,
    .consent-section p,
    .acceptance-box p,
    .policy-section p,
    .terms-section p,
    ul li {
        font-size: 0.95rem;
    }
}

@media (max-width: 600px) {
    .policy-container,
    .terms-container {
        padding: 70px 12px 25px; /* Adjust padding for screens below 600px */
    }

    .policy-header h1,
    .terms-header h1 {
        font-size: 1.8em; /* Adjust heading size */
    }

    .policy-section,
    .terms-section {
        padding: 18px;
        margin-bottom: 25px;
    }

    .policy-section h2,
    .terms-section h2 {
        font-size: 1.2rem; /* Adjust subheading size */
        margin-bottom: 18px;
        padding-bottom: 9px;
    }

    .warning-box,
    .consent-highlight,
    .consent-section,
    .acceptance-box {
        padding: 12px;
        margin: 12px 0;
        font-size: 0.9em;
    }

    .warning-box p,
    .consent-highlight p,
    .consent-section p,
    .acceptance-box p,
    .policy-section p,
    .terms-section p,
    ul li {
        font-size: 0.9em; /* Adjust paragraph and list item font sizes */
        margin-bottom: 10px;
    }

    ul {
        margin-left: 18px;
    }

    .contact-info p {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
}

@media (max-width: 300px) {
    .policy-container,
    .terms-container {
        padding: 50px 8px 15px; /* Further reduce padding for very small screens */
    }

    .policy-header h1,
    .terms-header h1 {
        font-size: 1.3em; /* Further adjust heading size */
    }

    .policy-section,
    .terms-section {
        padding: 12px; /* Further reduce section padding */
        margin-bottom: 15px;
    }

    .policy-section h2,
    .terms-section h2 {
        font-size: 1em; /* Further adjust subheading size */
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .warning-box,
    .consent-highlight,
    .consent-section,
    .acceptance-box {
        padding: 8px;
        margin: 8px 0;
        font-size: 0.8em;
    }

    .warning-box p,
    .consent-highlight p,
    .consent-section p,
    .acceptance-box p,
    .policy-section p,
    .terms-section p,
    ul li {
        font-size: 0.8em; /* Further adjust paragraph and list item font sizes */
        margin-bottom: 6px;
    }

    ul {
        margin-left: 12px;
    }

    .contact-info p {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
}

@media (max-width: 300px) {
    .policy-container,
    .terms-container {
        padding: 60px 10px 20px; /* Further reduce padding for very small screens */
    }

    .policy-header h1,
    .terms-header h1 {
        font-size: 1.5em; /* Adjust heading size */
    }

    .policy-section,
    .terms-section {
        padding: 15px; /* Further reduce section padding */
        margin-bottom: 20px;
    }

    .policy-section h2,
    .terms-section h2 {
        font-size: 1.1rem; /* Adjust subheading size */
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .warning-box,
    .consent-highlight,
    .consent-section,
    .acceptance-box {
        padding: 10px;
        margin: 10px 0;
        font-size: 0.85rem;
    }

    .warning-box p,
    .consent-highlight p,
    .consent-section p,
    .acceptance-box p,
    .policy-section p,
    .terms-section p,
    ul li {
        font-size: 0.85rem; /* Adjust paragraph and list item font sizes */
        margin-bottom: 8px;
    }

    ul {
        margin-left: 15px;
    }

    .contact-info p {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
}

/* Styles specific to terms page (moved from terms.html) */
.terms-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.terms-header {
    text-align: center;
    margin-bottom: 40px;
}

.terms-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
}

.terms-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.terms-section p,
.terms-section ul li,
.terms-section ol li { /* Added ol li for ordered lists */
    display: block; /* Ensure block-level behavior for distinct cards */
    background-color: #f0f2f5; /* A slightly more distinct light grey for card background */
    padding: 15px 20px; /* Adjusted padding for better appearance */
    border-radius: 10px; /* Slightly more rounded corners */
    margin-bottom: 15px; /* Space between cards */
    line-height: 1.7;
    color: #333; /* Darker text for readability on light background */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* More prominent shadow for card effect */
    border: 1px solid #e0e0e0; /* Subtle border */
}

.terms-section ul,
.terms-section ol { /* Added ol for ordered lists */
    list-style: none; /* Remove default list styling */
    padding-left: 0; /* Remove default padding for ul/ol */
    margin-left: 0; /* Remove default margin for ul/ol */
}

.terms-section ul li,
.terms-section ol li { /* Ensure list items align with paragraphs */
    margin-left: 0;
}

.terms-section ul li:last-child,
.terms-section ol li:last-child { /* No bottom margin for the last list item in a section */
    margin-bottom: 0;
}

.warning-box {
    background-color: var(--warning-light);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.consent-section {
    background-color: var(--success-light);
    border-left: 4px solid var(--success-color);
    padding: 20px;
    margin: 20px 0;
}

.acceptance-box {
    background-color: var(--success-light);
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    margin: 30px 0;
}

ul {
    margin-left: 20px;
    margin-top: 10px;
}

li {
    margin-bottom: 10px;
}

.contact-info {
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 8px;
}
