/**
 * Terms of Service Page Styles
 * Lucky Logistics Platform
 * Last updated: 2025-01-01
 */

/* Container */
.legal-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.terms-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header */
.legal-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 60px 40px;
    text-align: center;
}

.header-badge {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.header-badge i {
    font-size: 36px;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.legal-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.legal-version {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Important Notice */
.important-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 24px 30px;
    margin: 0;
    border-left: 4px solid #f59e0b;
}

.notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.notice-content h3 {
    color: #92400e;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.notice-content p {
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

/* Table of Contents */
.toc-section {
    padding: 40px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.toc-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.toc-section h2 i {
    color: #3b82f6;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: none;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    background: #e0e7ff;
    color: #3730a3;
}

/* Legal Sections */
.legal-sections {
    padding: 0 40px 40px;
}

.legal-section {
    padding: 40px 0;
    border-bottom: 1px solid #e2e8f0;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.section-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

.legal-section h3 {
    color: #334155;
    font-size: 1.15rem;
    margin: 28px 0 16px;
    padding-left: 12px;
    border-left: 3px solid #3b82f6;
}

.legal-section p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* Definition Grid */
.definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.definition-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.def-term {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.def-term i {
    color: #3b82f6;
}

.def-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Service Cards */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.service-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 24px;
}

.service-card h4 {
    color: #1e293b;
    margin-bottom: 8px;
}

.service-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Styled Lists */
.styled-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.styled-list li {
    position: relative;
    padding: 12px 12px 12px 32px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 8px;
    color: #475569;
    line-height: 1.6;
}

.styled-list li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 18px;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.styled-list.check-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    background: none;
    color: #10b981;
    font-size: 12px;
    top: 14px;
    left: 10px;
}

.styled-list.warning-list li::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    background: none;
    color: #f59e0b;
    font-size: 10px;
    top: 15px;
    left: 10px;
}

/* Prohibited Items Grid */
.prohibited-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.prohibited-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fef2f2;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #fecaca;
}

.prohibited-item i {
    color: #dc2626;
    font-size: 20px;
}

.prohibited-item span {
    color: #991b1b;
    font-size: 0.95rem;
}

/* Info & Warning Boxes */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #eff6ff;
    padding: 20px 24px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    margin: 20px 0;
}

.info-box > i {
    color: #3b82f6;
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    color: #1e40af;
}

.info-box ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.info-box ul li {
    color: #1e40af;
    margin-bottom: 4px;
}

.info-box.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.info-box.warning i {
    color: #f59e0b;
}

.info-box.warning p {
    color: #92400e;
}

.warning-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    margin: 20px 0;
}

.warning-icon {
    width: 56px;
    height: 56px;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}

.warning-content h4 {
    color: #991b1b;
    margin: 0 0 4px;
}

.warning-content p {
    color: #b91c1c;
    margin: 0;
    font-size: 0.95rem;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #fbbf24;
    margin: 20px 0;
}

.highlight-box h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    margin: 0 0 16px;
}

.highlight-box h4 i {
    color: #f59e0b;
}

.highlight-box p {
    color: #78350f;
    margin-bottom: 12px;
}

.highlight-box ul {
    margin: 0;
    padding-left: 20px;
}

.highlight-box ul li {
    color: #78350f;
    margin-bottom: 6px;
}

/* Calculation Box */
.calculation-box {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #86efac;
    margin: 20px 0;
}

.calculation-box h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #166534;
    margin: 0 0 16px;
}

.calculation-box h4 i {
    color: #22c55e;
}

.calc-formula {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.calc-formula p {
    margin: 0 0 10px;
    color: #15803d;
}

.calc-formula p:last-child {
    margin-bottom: 0;
}

.calc-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed #86efac;
    margin-top: 12px !important;
    font-weight: 500;
}

.calc-note i {
    color: #22c55e;
}

/* Tables */
.terms-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.terms-table thead th {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
}

.terms-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.terms-table tbody tr:last-child td {
    border-bottom: none;
}

.terms-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.terms-table tbody tr:hover {
    background: #f1f5f9;
}

/* Timeline */
.timeline-box {
    position: relative;
    padding-left: 30px;
    margin: 24px 0;
}

.timeline-box::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    margin-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.timeline-content h4 {
    color: #1e293b;
    margin: 0 0 8px;
}

.timeline-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.process-steps.horizontal {
    flex-direction: row;
    justify-content: space-between;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    flex: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    color: #1e293b;
    margin: 0 0 6px;
}

.step-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 48px 40px;
}

.contact-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.contact-section h2 i {
    color: #60a5fa;
}

.contact-section > p {
    color: #94a3b8;
    margin-bottom: 32px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-item > i {
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.contact-item p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.service-hours i {
    color: #60a5fa;
}

/* Agreement Section */
.agreement-section {
    padding: 32px 40px;
    background: #f8fafc;
}

.agreement-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 12px;
    border: 1px solid #86efac;
}

.agreement-box i {
    color: #22c55e;
    font-size: 24px;
}

.agreement-box p {
    color: #166534;
    margin: 0;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-container {
        padding: 20px 16px;
    }
    
    .legal-header {
        padding: 40px 24px;
    }
    
    .legal-header h1 {
        font-size: 1.8rem;
    }
    
    .important-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .toc-section,
    .legal-sections {
        padding: 24px;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
    }
    
    .definition-grid,
    .service-cards,
    .prohibited-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps.horizontal {
        flex-direction: column;
    }
    
    .timeline-box {
        padding-left: 20px;
    }
    
    .timeline-item {
        margin-left: 15px;
    }
    
    .timeline-icon {
        display: none;
    }
    
    .contact-section {
        padding: 32px 24px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .agreement-section {
        padding: 24px;
    }
    
    .agreement-box {
        flex-direction: column;
        text-align: center;
    }
    
    .terms-table {
        font-size: 0.9rem;
    }
    
    .terms-table thead th,
    .terms-table tbody td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .header-badge {
        width: 64px;
        height: 64px;
    }
    
    .header-badge i {
        font-size: 28px;
    }
    
    .legal-header h1 {
        font-size: 1.5rem;
    }
    
    .section-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .legal-container {
        max-width: none;
        padding: 0;
    }
    
    .terms-content {
        box-shadow: none;
    }
    
    .legal-header {
        background: #2563eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .toc-section a {
        color: #000 !important;
    }
    
    .contact-section {
        background: #1e293b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
