/* ==================== TERMS HERO ==================== */
.terms-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
    border-radius: 18px;
    padding: 50px 40px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.terms-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -150px;
    right: -80px;
}
.terms-hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -100px;
    left: -60px;
}
.terms-hero-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    font-size: 20px;
    backdrop-filter: blur(10px);
    vertical-align: middle;
    margin-inline-end: 8px;
}
.terms-hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.terms-hero > p {
    font-size: 15px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}
.terms-hero-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.terms-hero-meta span {
    font-size: 13px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== TERMS LAYOUT ==================== */
.terms-layout {
    display: block;
    max-width: 900px;
    margin: 0 auto 50px;
}

/* ==================== SIDEBAR / TOC ==================== */
.terms-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.toc-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #eee;
    overflow: hidden;
}
.toc-header {
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    background: linear-gradient(90deg, #fafbff, #fff);
}
.toc-header i {
    color: #2563eb;
}
.toc-nav {
    padding: 10px 0;
    max-height: 65vh;
    overflow-y: auto;
}
.toc-nav::-webkit-scrollbar { width: 4px; }
.toc-nav::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: 0.2s;
    border-inline-start: 3px solid transparent;
}
.toc-link:hover {
    background: #f8f9fc;
    color: #2563eb;
}
.toc-link.active {
    background: #eff4ff;
    color: #2563eb;
    font-weight: 600;
    border-inline-start-color: #2563eb;
}
.toc-num {
    width: 22px;
    height: 22px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}
.toc-link.active .toc-num {
    background: #2563eb;
    color: white;
}

.toc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toc-action-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 500;
    transition: 0.2s;
}
.toc-action-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f0f7ff;
}
.toc-action-btn i {
    color: #2563eb;
}

/* ==================== TERMS CONTENT ==================== */
.terms-content {
    min-width: 0;
}

/* Notice */
.terms-notice {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 25px;
}
.terms-notice-icon {
    width: 42px;
    height: 42px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.terms-notice strong {
    display: block;
    font-size: 15px;
    color: #92400e;
    margin-bottom: 4px;
}
.terms-notice p {
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
}

/* ==================== SECTION ==================== */
.terms-section {
    background: white;
    border-radius: 14px;
    border: 1px solid #eee;
    margin-bottom: 20px;
    overflow: hidden;
    transition: 0.2s;
}
.terms-section:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.terms-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(90deg, #fafbff, #ffffff);
}
.terms-section-num {
    width: 36px;
    height: 36px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.terms-section-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}
.terms-section-body {
    padding: 25px;
}
.terms-section-body p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}
.terms-section-body p:last-child {
    margin-bottom: 0;
}
.terms-section-body a {
    color: #2563eb;
    text-decoration: underline;
}
.terms-section-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 22px 0 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.terms-section-body h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ==================== TERMS LIST ==================== */
.terms-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
.terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.terms-list-exclude li i {
    color: #ef4444;
}
.terms-list li i {
    color: #10b981;
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 14px;
}

/* ==================== HIGHLIGHT BOX ==================== */
.terms-highlight {
    background: linear-gradient(135deg, #eff4ff, #f0f7ff);
    border: 1px solid #dde5f7;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 18px 0;
    border-inline-start: 4px solid #2563eb;
}
.terms-highlight > i {
    color: #2563eb;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}
.terms-highlight strong {
    display: block;
    font-size: 13px;
    color: #1e3a8a;
    margin-bottom: 4px;
}
.terms-highlight p {
    font-size: 13px !important;
    color: #3b5998 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

.terms-highlight.warning {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border-color: #fde68a;
    border-inline-start-color: #f59e0b;
}
.terms-highlight.warning > i { color: #d97706; }
.terms-highlight.warning strong { color: #92400e; }
.terms-highlight.warning p { color: #78350f !important; }

/* ==================== TERMS TABLE ==================== */
.terms-table-wrap {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.terms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.terms-table thead {
    background: linear-gradient(90deg, #f8f9fc, #fff);
}
.terms-table th {
    text-align: start;
    padding: 12px 16px;
    font-weight: 600;
    color: #1a1a2e;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.terms-table td {
    padding: 11px 16px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}
.terms-table tbody tr:last-child td {
    border-bottom: none;
}
.terms-table tbody tr:hover {
    background: #fafbff;
}

/* ==================== TERMS GRID ==================== */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.terms-grid-item {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    border: 1px solid #eee;
    transition: 0.2s;
}
.terms-grid-item:hover {
    border-color: #dde5f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.terms-grid-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eff4ff, #dbeafe);
    color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 12px;
}
.terms-grid-item strong {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #1a1a2e;
}
.terms-grid-item p {
    font-size: 12px !important;
    color: #888 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ==================== PAYMENT ICONS ROW ==================== */
.payment-icons-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 15px 0;
}
.payment-icon-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}
.payment-icon-item i {
    font-size: 22px;
    color: #666;
}

/* ==================== PROHIBITED GRID ==================== */
.prohibited-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.prohibited-item {
    background: linear-gradient(135deg, #fef2f2, #fff5f5);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: 0.2s;
}
.prohibited-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239,68,68,0.1);
}
.prohibited-item i {
    font-size: 24px;
    color: #ef4444;
    margin-bottom: 10px;
}
.prohibited-item strong {
    display: block;
    font-size: 13px;
    color: #991b1b;
    margin-bottom: 6px;
}
.prohibited-item p {
    font-size: 11px !important;
    color: #b91c1c !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ==================== CTA BOX ==================== */
.terms-cta-box {
    background: linear-gradient(135deg, #eff4ff, #f0f7ff);
    border: 1.5px solid #dde5f7;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.terms-cta-box > i {
    font-size: 32px;
    color: #2563eb;
    flex-shrink: 0;
}
.terms-cta-box div {
    flex: 1;
    min-width: 150px;
}
.terms-cta-box strong {
    display: block;
    font-size: 15px;
    color: #1e3a8a;
    margin-bottom: 4px;
}
.terms-cta-box p {
    font-size: 13px !important;
    color: #3b5998 !important;
    margin: 0 !important;
}
.terms-cta-btn {
    background: #2563eb;
    color: white !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    white-space: nowrap;
}
.terms-cta-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37,99,235,0.3);
}

/* ==================== CONTACT GRID ==================== */
.terms-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.terms-contact-item {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: 0.2s;
}
.terms-contact-item:hover {
    border-color: #dde5f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.terms-contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eff4ff, #dbeafe);
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px;
}
.terms-contact-item strong {
    display: block;
    font-size: 14px;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.terms-contact-item p {
    font-size: 12px !important;
    color: #888 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* ==================== AGREEMENT BOX ==================== */
.terms-agreement {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #bbf7d0;
    border-radius: 18px;
    padding: 35px;
    text-align: center;
    margin: 30px 0;
}
.terms-agreement-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 15px;
}
.terms-agreement h3 {
    font-size: 20px;
    color: #064e3b;
    margin-bottom: 8px;
}
.terms-agreement > p {
    font-size: 14px;
    color: #166534;
    margin-bottom: 22px;
    line-height: 1.6;
}
.terms-agreement-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-agree {
    background: #059669;
    color: white;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-agree:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5,150,105,0.3);
}
.btn-question {
    background: white;
    color: #059669;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #a7f3d0;
    transition: 0.2s;
}
.btn-question:hover {
    background: #f0fdf4;
    border-color: #059669;
    transform: translateY(-2px);
}

/* ==================== RELATED DOCUMENTS ==================== */
.terms-related {
    margin-bottom: 30px;
}
.terms-related h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1a1a2e;
}
.terms-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.terms-related-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    text-decoration: none;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.terms-related-item:hover {
    border-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.1);
}
.terms-related-item i {
    font-size: 28px;
    color: #2563eb;
    margin-bottom: 4px;
}
.terms-related-item strong {
    font-size: 14px;
    color: #1a1a2e;
}
.terms-related-item small {
    font-size: 12px;
    color: #888;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .terms-layout {
        grid-template-columns: 1fr;
    }
    .terms-sidebar {
        position: static;
        order: -1;
    }
    .toc-nav {
        max-height: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .toc-link {
        border-inline-start: none;
        border-bottom: 1px solid #f0f0f0;
    }
    .toc-link.active {
        border-inline-start: none;
        background: #eff4ff;
    }
}

@media (max-width: 768px) {
    .terms-hero {
        padding: 35px 25px;
    }
    .terms-hero h1 { font-size: 24px; }
    .terms-hero-meta { gap: 15px; }
    .terms-hero-meta span { font-size: 12px; }

    .terms-section-header { padding: 16px 18px; }
    .terms-section-body { padding: 18px; }
    .terms-section-num { width: 30px; height: 30px; font-size: 12px; }
    .terms-section-header h2 { font-size: 15px; }

    .toc-nav {
        grid-template-columns: 1fr;
    }

    .terms-contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .prohibited-grid {
        grid-template-columns: 1fr 1fr;
    }
    .terms-agreement { padding: 25px; }
}

@media (max-width: 576px) {
    .terms-hero { padding: 28px 18px; border-radius: 14px; }
    .terms-hero h1 { font-size: 20px; }
    .terms-hero-icon-inline { width: 38px; height: 38px; font-size: 16px; }

    .terms-notice { flex-direction: column; text-align: center; }
    .terms-highlight { flex-direction: column; }

    .terms-grid { grid-template-columns: 1fr; }
    .prohibited-grid { grid-template-columns: 1fr; }
    .terms-contact-grid { grid-template-columns: 1fr; }

    .terms-cta-box { flex-direction: column; text-align: center; }

    .terms-agreement-actions { flex-direction: column; }
    .btn-agree, .btn-question { width: 100%; justify-content: center; }

    .payment-icons-row { gap: 8px; }
    .payment-icon-item { padding: 6px 10px; font-size: 11px; }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .top-bar, .header, .main-nav, .terms-sidebar,
    .terms-hero, .footer, .scroll-top, .breadcrumb,
    .terms-agreement-actions, .toc-actions { display: none !important; }

    .terms-layout { grid-template-columns: 1fr !important; }

    .terms-section {
        break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 15px;
    }

    body { font-size: 12px; }
}