/* --- Legal Common Styling (Based on Blog/Detail) --- */

.legal-section {
    padding: 0 0 60px;
    overflow: visible !important;
}

.legal-section .custom-container {
    max-width: 1410px;
    margin: 0 auto;
    padding: 0 12px;
    overflow: visible !important;
}

.legal-section .custom-container.legal-container-narrow {
    max-width: 900px;
}

/* --- Back Button --- */
.legal-detail-back {
    margin-bottom: 10px;
    text-align: right;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8105BD;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.back-link:hover {
    color: #6d0499;
}

.back-icon {
    font-size: 20px;
    font-weight: bold;
}

/* --- Title & Header --- */
.legal-header {
    margin-bottom: 20px;
    padding-bottom: 30px;
    border-bottom: 2px solid #EEE3F8;
}

.legal-title {
    font-size: 64px;
    font-weight: 800;
    color: #F72585;
    /* Pink color like Blog Detail */
    line-height: 1.2;
    text-align: inherit;
}

.legal-sub-title {
    font-size: 32px;
    font-weight: 700;
    color: #011212;
    margin-top: 40px;
    margin-bottom: 20px;
}

.legal-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-data {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    width: 24px;
    height: 24px;
}

.meta-value {
    font-size: 14px;
    color: #2E2E2E;
    font-weight: 500;
}

/* --- Content Body --- */
.legal-body,
.legal-flat-content,
.legal-answer-content {
    font-size: 19px;
    line-height: 1.8;
    color: #2E2E2E;
}

.legal-body h1,
.legal-body h2,
.legal-body h3,
.legal-body h4,
.legal-body h5,
.legal-body h6 {
    color: #2E2E2E;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

.legal-body h2,
.legal-flat-content h2,
.legal-answer-content h2 {
    font-size: 32px;
}

.legal-body h3,
.legal-flat-content h3,
.legal-answer-content h3 {
    font-size: 28px;
}

.legal-body h4,
.legal-flat-content h4,
.legal-answer-content h4 {
    font-size: 24px;
}

.legal-body h5,
.legal-flat-content h5,
.legal-answer-content h5 {
    font-size: 22px;
}

.legal-body p {
    margin-bottom: 20px;
}

.legal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.legal-body ul,
.legal-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.legal-bullet-list {
    list-style-type: disc;
    padding-left: 30px;
    margin-bottom: 20px;
}

.legal-body li,
.legal-bullet-list li {
    margin-bottom: 15px;
}

.legal-body a {
    color: #8105BD;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-body a:hover {
    color: #6d0499;
    text-decoration: underline;
}

/* --- Layout: Sidebar + Content --- */
.legal-page-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    margin-top: 40px;
    overflow: visible !important;
    position: relative;
}

/* --- Left Sidebar: Navigation --- */
.legal-sidebar {
    flex: 0 0 300px;
    max-width: 300px;
    min-width: 300px;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 140px;
    height: fit-content;
    z-index: 10;
}

.legal-sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: #8105BD;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #EEE3F8;
    display: block;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 10px;
}

.sidebar-item:last-child {
    margin-bottom: 0;
}

.sidebar-link {
    display: block;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #EEE3F8;
    text-decoration: none;
    color: #2E2E2E;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: transparent;
}

.sidebar-link:hover {
    background-color: #EEE3F8;
    color: #8105BD;
    border-color: #d8b4fe;
}

.sidebar-item.active .sidebar-link {
    background-color: #8105BD;
    color: #ffffff;
    border-color: #8105BD;
}

/* --- Content Area --- */
.legal-content-area {
    flex: 1 1 auto;
    min-width: 0;
}

/* --- Accordion Legal --- */
.legal-list {
    max-width: 1100px;
    margin: 40px auto 0;
}

.legal-page-layout .legal-list {
    margin-top: 0;
    max-width: 100%;
}

.legal-item {
    margin-bottom: 20px;
}

.legal-question {
    background: #fff;
    border: 1px solid #979797;
    height: 64px;
    border-radius: 24px;
    padding: 12px 20px 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-question:hover {
    border-color: #000;
}

.legal-item.active .legal-question {
    border-color: #000;
}

.legal-question-text {
    font-size: 20px;
    font-weight: 600;
    color: #011212;
}

.legal-answer {
    display: none;
    margin-top: 10px;
}

.legal-answer-content {
    background-color: #F5F5FA;
    padding: 30px 40px;
    border-radius: 24px;
    color: #011212;
}

.legal-answer-content h4 {
    font-size: 32px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #011212;
}

.legal-answer-content p {
    margin-bottom: 20px;
    color: #333;
}

.legal-answer-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #011212;
}

.legal-answer-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.legal-answer-content li {
    margin-bottom: 0.8rem;
    position: relative;
    list-style-type: disc;
}

.legal-answer-content li::marker {
    color: #2F5FF4;
}

.legal-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0 2rem;
    border-radius: 12px;
    border: 1px solid #EEE3F8;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 18px;
}

.legal-table th,
.legal-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #EEE3F8;
}

.legal-table th {
    background-color: #f7f7f7;
    font-weight: 700;
    color: #011212;
}

.toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.legal-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* --- Responsive Styling --- */
@media (max-width: 1024px) {
    .legal-sidebar {
        display: none !important;
    }

    .legal-content-area {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .legal-section {
        padding: 0 0 10px;
    }

    .legal-title {
        font-size: 32px;
    }

    .legal-question-text {
        font-size: 18px;
    }

    .sidebar-link {
        font-size: 14px;
        padding: 10px 15px;
    }

    .legal-question {
        padding: 10px 15px;
        min-height: 50px;
        height: auto;
        border-radius: 16px;
    }

    .legal-answer-content {
        font-size: 16px;
        padding: 15px 12px;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .legal-title {
        font-size: 28px;
    }

    .sidebar-item {
        flex: 1 1 100%;
    }

    .legal-body h2,
    .legal-flat-content h2,
    .legal-answer-content h2 {
        font-size: 26px;
    }
}