/* Terms & Conditions Section */
.terms-section {
    display: none;
    /* Hidden by default */
    background: #fff;
    color: #111;
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.terms-section.visible {
    display: block;
}

.terms-toggle {
    color: white;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    ;
}

.terms-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
    line-height: 1.7;
}

.terms-section h2 {
    color: var(--jd3-purple);
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.terms-section p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.terms-box {

    font-size: 18px;
    color: #111;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--jd3-purple);
    border-radius: 8px;
}

/* Terms content styling */
.terms-section strong {
    color: #111;
    font-weight: 600;
}

.terms-section .underline {
    text-decoration: underline;
    color: var(--primary-yellow);
    font-weight: 500;
}

/* Section numbering */
.terms-section h3 {
    color: #111;
    font-size: 1.4rem;
    margin: 40px 0 20px 0;
    font-weight: 600;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Sub-sections */
.terms-section h4 {
    color: #333;
    font-size: 1.2rem;
    margin: 30px 0 15px 0;
    font-weight: 600;
}

/* Lists within terms */
.terms-section ul {
    margin: 20px 0;
    padding-left: 30px;
}

.terms-section li {
    margin-bottom: 10px;
    color: #333;
}

/* Terms Toggle Button */
.terms-toggle-btn {
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-toggle-btn:hover {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.terms-toggle-btn.active {
    background: var(--primary-yellow);
    color: #000;
    border-color: var(--primary-yellow);
}

/* Close button for terms section */
.terms-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: #f5f5f5;
    border: none;
    color: #666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-close-btn:hover {
    background: #e0e0e0;
    color: #111;
}

/* Responsive design */
@media (max-width: 768px) {
    .terms-section {
        margin: 20px 0;
        border-radius: 0;
    }

    .terms-section .container {
        padding: 0 20px;
    }

    .terms-section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .terms-section p {
        font-size: 15px;
    }

    .terms-section p:first-of-type {
        font-size: 16px;
        padding: 15px;
    }

    .terms-close-btn {
        top: 15px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .terms-section h2 {
        font-size: 1.5rem;
    }

    .terms-section p {
        font-size: 14px;
    }

    .terms-section h3 {
        font-size: 1.2rem;
    }

    .terms-section h4 {
        font-size: 1.1rem;
    }

    .terms-toggle-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Animation for terms section reveal */
@keyframes termsSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-section.visible {
    animation: termsSlideIn 0.4s ease-out;
}