/* ===== TRANG ĐIỀU KHOẢN SỬ DỤNG ===== */
/* Phong cách: Chuyên nghiệp, Rõ ràng, Dễ đọc - ĐÃ FIX MOBILE */
/* Phiên bản: 1.1.0 - Mobile Optimized */

/* Biến màu sắc cho trang điều khoản */
:root {
    --legal-blue: #0066cc;
    --legal-dark: #1a2b4d;
    --legal-light: #4d6589;
    --legal-border: #e8edf5;
    --legal-bg: #f9fafc;
}

/* Reset cho mobile */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 0 30px;
    text-align: center;
    border-bottom: 1px solid var(--legal-border);
    position: relative;
}

@media (min-width: 768px) {
    .page-hero {
        padding: 60px 0 50px;
    }
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--legal-dark);
    margin-bottom: 12px;
    line-height: 1.3;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
        padding: 0;
    }
}

@media (min-width: 992px) {
    .page-title {
        font-size: 3rem;
    }
}

.page-subtitle {
    font-size: 1rem;
    color: var(--legal-light);
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.5;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .page-subtitle {
        font-size: 1.2rem;
        line-height: 1.6;
        padding: 0;
    }
}

.breadcrumb {
    font-size: 0.85rem;
    color: #6c757d;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .breadcrumb {
        font-size: 0.95rem;
        padding: 0;
    }
}

.breadcrumb a {
    color: var(--legal-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--legal-dark);
    text-decoration: underline;
}

/* Main Container */
.site-main {
    overflow-x: hidden;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    .page-container {
        padding: 0 20px;
    }
}

/* Terms Container */
.terms-page-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px 15px;
}

@media (min-width: 992px) {
    .terms-page-container {
        flex-direction: row;
        gap: 50px;
        padding: 60px 0;
    }
}

/* Sidebar Mobile - Điều chỉnh cho mobile */
.terms-sidebar {
    width: 100%;
    order: 2;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .terms-sidebar {
        width: 300px;
        order: 1;
        margin-top: 0;
        position: sticky;
        top: 100px;
        height: fit-content;
        flex-shrink: 0;
    }
}

/* Mobile Navigation - Hiển thị tốt trên mobile */
.terms-nav {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--legal-border);
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

@media (min-width: 992px) {
    .terms-nav {
        padding: 30px;
    }
}

.terms-nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--legal-dark);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--legal-border);
}

@media (min-width: 768px) {
    .terms-nav-title {
        font-size: 1.3rem;
    }
}

.terms-nav-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 5px;
}

/* Custom scrollbar cho mobile */
.terms-nav-list::-webkit-scrollbar {
    width: 4px;
}

.terms-nav-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.terms-nav-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.terms-nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--legal-light);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

@media (min-width: 768px) {
    .terms-nav-link {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

.terms-nav-link:hover {
    background: rgba(0, 102, 204, 0.08);
    color: var(--legal-blue);
}

.terms-nav-link.active {
    background: rgba(0, 102, 204, 0.12);
    color: var(--legal-blue);
    font-weight: 600;
    border-left-color: var(--legal-blue);
}

/* Touch-friendly cho mobile */
.terms-nav-link {
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.1);
}

/* Industries Tags - Căn chỉnh mobile */
.terms-industries {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--legal-border);
    margin-bottom: 20px;
}

.industries-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .industries-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}

.industry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.industry-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@media (min-width: 768px) {
    .industry-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

.tag-construction {
    background: rgba(0, 102, 204, 0.1);
    color: var(--legal-blue);
    border: 1px solid rgba(0, 102, 204, 0.2);
}

.tag-transport {
    background: rgba(0, 168, 168, 0.1);
    color: #00a8a8;
    border: 1px solid rgba(0, 168, 168, 0.2);
}

.tag-cleaning {
    background: rgba(212, 175, 55, 0.1);
    color: #b8941b;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Update Card */
.terms-update {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--legal-border);
}

.update-card {
    text-align: center;
}

.update-card i {
    font-size: 2rem;
    color: var(--legal-blue);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .update-card i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
}

.update-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .update-card h5 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
}

.update-card p {
    color: var(--legal-light);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .update-card p {
        font-size: 0.95rem;
    }
}

/* Main Content */
.terms-content {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--legal-border);
    order: 1;
    width: 100%;
}

@media (min-width: 768px) {
    .terms-content {
        padding: 35px 30px;
        border-radius: 15px;
    }
}

@media (min-width: 992px) {
    .terms-content {
        order: 2;
        flex: 1;
        padding: 50px;
    }
}

.terms-intro {
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--legal-border);
}

.terms-intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--legal-light);
}

@media (min-width: 768px) {
    .terms-intro p {
        font-size: 1.1rem;
        line-height: 1.7;
    }
}

/* Sections - Mobile optimization */
.terms-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--legal-border);
    position: relative;
    scroll-margin-top: 20px;
}

.terms-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.terms-section-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--legal-border);
}

@media (min-width: 768px) {
    .terms-section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
}

.terms-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--legal-dark);
    margin: 0;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .terms-section-title {
        font-size: 1.6rem;
    }
}

@media (min-width: 992px) {
    .terms-section-title {
        font-size: 1.8rem;
    }
}

.section-number {
    width: 40px;
    height: 40px;
    background: var(--legal-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    order: -1;
}

@media (min-width: 768px) {
    .section-number {
        order: 2;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

.terms-section-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

@media (min-width: 768px) {
    .terms-section-content {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

/* Definition List - Mobile fix */
.definition-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.definition-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .definition-list li {
        font-size: 1.05rem;
    }
}

.definition-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--legal-blue);
    font-weight: bold;
    font-size: 1.2rem;
}

.definition-list strong {
    color: var(--legal-dark);
    font-weight: 700;
}

/* Services Grid - Mobile layout */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 25px 0;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        margin: 30px 0;
    }
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--legal-bg);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--legal-border);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .service-card {
        padding: 25px;
        border-radius: 12px;
    }
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: var(--legal-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--legal-blue);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
}

.service-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .service-card h4 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

.service-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.service-card li {
    padding: 6px 0;
    color: var(--legal-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .service-card li {
        padding: 8px 0;
        font-size: 1rem;
    }
}

.service-card li::before {
    content: '✓';
    color: var(--legal-blue);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Rights & Obligations - Mobile layout */
.rights-obligations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 25px 0;
}

@media (min-width: 768px) {
    .rights-obligations {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        margin: 30px 0;
    }
}

.rights-card {
    background: var(--legal-bg);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--legal-border);
}

@media (min-width: 768px) {
    .rights-card {
        padding: 25px;
        border-radius: 12px;
    }
}

.rights-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .rights-card h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

.rights-card i {
    color: var(--legal-blue);
    font-size: 1.2rem;
}

.rights-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.rights-card li {
    padding: 8px 0;
    color: var(--legal-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.rights-card li:last-child {
    border-bottom: none;
}

.rights-card li::before {
    content: '•';
    color: var(--legal-blue);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Payment Terms - Mobile layout */
.payment-terms {
    display: grid;
    gap: 30px;
}

.payment-methods h3,
.payment-schedule h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .payment-methods h3,
    .payment-schedule h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .methods-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

.method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--legal-bg);
    border-radius: 8px;
    border: 1px solid var(--legal-border);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .method {
        padding: 15px;
        gap: 12px;
    }
}

.method:hover {
    border-color: var(--legal-blue);
    background: rgba(0, 102, 204, 0.05);
}

.method i {
    color: var(--legal-blue);
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .method i {
        font-size: 1.3rem;
    }
}

.method span {
    font-weight: 500;
    color: var(--legal-dark);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .method span {
        font-size: 1rem;
    }
}

.payment-schedule ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.payment-schedule li {
    padding: 10px 0;
    color: var(--legal-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    line-height: 1.5;
}

.payment-schedule li:last-child {
    border-bottom: none;
}

.payment-schedule strong {
    color: var(--legal-dark);
}

/* Contact Card - Mobile layout */
.contact-card {
    background: var(--legal-bg);
    border-radius: 10px;
    padding: 25px 20px;
    margin-bottom: 25px;
    border: 1px solid var(--legal-border);
}

@media (min-width: 768px) {
    .contact-card {
        padding: 30px;
        border-radius: 12px;
        margin-bottom: 30px;
    }
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .contact-card h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}

.contact-info p {
    padding: 8px 0;
    color: var(--legal-light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .contact-info p {
        padding: 10px 0;
        font-size: 1.05rem;
    }
}

.contact-info i {
    color: var(--legal-blue);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 1rem;
}

.final-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--legal-border);
    font-style: italic;
    color: var(--legal-light);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .final-note {
        margin-top: 20px;
        padding-top: 20px;
        font-size: 1rem;
    }
}

/* Acceptance Box - Mobile layout */
.acceptance-box {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 168, 168, 0.1));
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    border: 1px solid var(--legal-blue);
    margin: 30px 0;
}

@media (min-width: 768px) {
    .acceptance-box {
        padding: 30px;
        border-radius: 12px;
    }
}

.acceptance-box i {
    font-size: 2.5rem;
    color: var(--legal-blue);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .acceptance-box i {
        font-size: 3rem;
        margin-bottom: 20px;
    }
}

.acceptance-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--legal-dark);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .acceptance-box h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
}

.acceptance-box p {
    color: var(--legal-light);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .acceptance-box p {
        font-size: 1.05rem;
    }
}

.update-info {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--legal-blue);
    margin-top: 10px;
}

@media (min-width: 768px) {
    .update-info {
        font-size: 0.95rem;
    }
}

/* Terms Actions - Mobile buttons */
.terms-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--legal-border);
}

@media (min-width: 768px) {
    .terms-actions {
        flex-direction: row;
        gap: 15px;
        margin-top: 50px;
        padding-top: 30px;
    }
}

.btn {
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.1);
}

@media (min-width: 768px) {
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

.btn-primary {
    background: var(--legal-blue);
    color: white;
    order: 1;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--legal-blue);
    border-color: var(--legal-blue);
    order: 2;
}

.btn-secondary:hover {
    background: var(--legal-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-tertiary {
    background: var(--legal-bg);
    color: var(--legal-dark);
    border-color: var(--legal-border);
    order: 3;
}

.btn-tertiary:hover {
    background: var(--legal-border);
    transform: translateY(-2px);
}

/* Touch-friendly adjustments */
@media (max-width: 767px) {
    .btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    /* Tăng kích thước tap target */
    .terms-nav-link,
    .method,
    .industry-tag {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Tăng khoảng cách giữa các phần tử có thể chạm */
    .terms-nav-link {
        margin-bottom: 8px;
    }
    
    /* Giảm padding để tiết kiệm không gian */
    .terms-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    /* Đảm bảo text không bị tràn */
    .terms-section-content,
    .definition-list li,
    .rights-card li,
    .payment-schedule li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Cải thiện hiển thị danh sách */
    .definition-list li,
    .rights-card li {
        padding-right: 10px;
    }
}

/* Điều chỉnh cho tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .terms-page-container {
        gap: 40px;
    }
    
    .terms-sidebar {
        width: 250px;
    }
    
    .terms-content {
        padding: 30px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Prevent text size adjustment on mobile */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Improve scrolling on mobile */
.terms-content,
.terms-nav-list {
    -webkit-overflow-scrolling: touch;
}

/* Fix cho iOS Safari */
@supports (-webkit-touch-callout: none) {
    .terms-nav-list {
        overscroll-behavior: contain;
    }
    
    .btn {
        -webkit-appearance: none;
    }
}