/**
 * Terms & Conditions Page - Homepage FAQ Style
 */

/* Main container */
.breadcrumb-container {
    background: #f8f9fa;
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    max-height: 50px;
}
.terms-page {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.terms-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Card wrapper */
.terms-card {
    max-width: 1400px;
    background-color: #fff;
    padding: 60px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Header section */
.terms-header {
    margin-bottom: 50px;
}

.terms-title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    margin: 0 0 20px 0;
}

/* Control buttons */
.terms-controls {
    text-align: left;
    margin-top: 20px;
}

.terms-controls button {
    background: #ffffff;
    color: #32cd33;
    border: 2px solid #32cd33;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terms-controls button:hover {
    background: #32cd33;
    color: #ffffff;
}

/* FAQ-style accordion sections */
.terms-section {
    background: #ffffff;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    overflow: hidden;
    position: relative;
}

/* Details/Summary styling matching FAQ */
.terms-section details {
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
}

/* Smooth accordion animation */
.terms-section details summary {
    transition: all 0.3s ease;
}


.terms-section details:not([open]) .terms-content {
    max-height: 0;
    padding: 0 30px;
}

.terms-section details[open] .terms-content {
    max-height: 2000px;
    padding: 20px 30px 25px 30px;
}

.terms-section summary {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 5px 30px 5px 55px;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-bottom 0.3s ease;
    list-style: none;
}

.terms-section summary::-webkit-details-marker {
    display: none;
}

/* Article number badge - positioned top-left */
.terms-section::before {
    content: attr(data-article);
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
}

/* Plus icon matching FAQ style */
.terms-section summary::after {
    content: '+';
    font-size: 28px;
    font-weight: 400;
    color: #32cd33;
    transition: transform 0.3s ease;
}

.terms-section details[open] summary::after {
    transform: rotate(45deg);
}

/* Content inside accordion */
.terms-content {
    font-size: 17px;
    line-height: 1.6;
    color: #000000;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.terms-content p {
    margin: 0 0 20px 0;
}

.terms-content p:last-child {
    margin-bottom: 0;
}

.terms-content ul,
.terms-content ol {
    margin: 16px 0;
    padding-left: 20px;
    padding-right:40px;
}

.terms-content li {
    margin: 12px 0;
    line-height: 1.6;
    padding-left: 0;
}

/* Special styling for definitions list */
.terms-section:first-of-type .terms-content ul {
    padding-left: 20px;
}

.terms-section:first-of-type .terms-content li {
    list-style-type: disc;
    margin: 8px 0;
    padding-left: 8px;
}

.terms-section:first-of-type .terms-content strong {
    margin-bottom: 4px;
}

.terms-content strong {
    color: #000000;
    font-weight: 600;
}

.terms-content a {
    color: #32cd33;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.terms-content a:hover {
    color: #666666;
    text-decoration: underline;
}

/* Company info special styling - Only when closed */
.terms-section#a2 details:not([open]) .terms-content {
    background: #f6f6f6;
    padding: 20px 30px 25px 30px;
    border-radius: 8px;
    border-left: 4px solid #14B473;
    font-weight: 500;
}

/* Remove any unwanted borders from definitions */
.terms-section:first-of-type .terms-content strong {
    border: none;
    background: none;
    padding: 0;
}

/* Footer */
.terms-footer {
    margin-top: 40px;
    text-align: center;
}

.terms-footer a {
    display: inline-block;
    background: #32cd33;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.terms-footer a:hover {
    background: #666666;
    color: #ffffff;
}

/* Mobile responsiveness matching FAQ */
@media (max-width: 768px) {
    .terms-page {
        padding: 60px 0;
    }

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

    .terms-card {
        padding: 40px 30px;
        border-radius: 10px;
    }

    .terms-title {
        font-size: 28px;
    }

    .terms-section summary {
        padding: 20px 25px;
        font-size: 16px;
    }

    .terms-content {
        padding: 0 25px 20px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .terms-container {
        padding: 0 15px;
    }

    .terms-card {
        padding: 30px 20px;
    }

    .terms-title {
        font-size: 24px;
    }
}

/* Focus styles for accessibility */
.terms-section summary:focus {
    border-bottom: 2px solid #32cd33;
}

/* Keep border when accordion is open */
.terms-section details[open] summary {
    border-bottom: 2px solid #32cd33;
}

/* Hide border when accordion is closed */
.terms-section details:not([open]) summary {
    border-bottom: none;
}
