/* ======================================= */
/* LEGAL PAGES STYLES (ToS, Privacy, etc.) */
/* ======================================= */

/* --- Biến màu và layout chung --- */
:root {
    --page-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-color: #002147; /* USPortLine Navy Blue */
    --link-color: #0d6efd;
    --header-bg: #111827;
    --header-text: #e5e7eb;
    --header-text-hover: #ffffff;
    --primary-blue: #0d6efd;
}

body { 
    margin: 0;
}
/* --- Thiết lập Body --- */
body.legal-page {
    background-color: var(--page-bg);
}

/* --- Container chính của trang --- */
.legal-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

/* --- Header của trang --- */
.legal-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
}
.legal-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.legal-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* --- Nội dung chính --- */
.legal-content {
    line-height: 1.7;
    font-size: 1.05rem;
    color: #343a40;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content strong {
    color: var(--text-primary);
}

.legal-content a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* === HEADER CHUYÊN NGHIỆP === */
.main-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--header-text-hover);
    text-decoration: none;
}

/* Navigation cho Desktop */
.header-nav.desktop-nav {
    display: none; /* Ẩn trên mobile */
}
@media (min-width: 992px) {
    .header-nav.desktop-nav {
        display: flex;
        align-items: center;
    }
}
.header-nav a {
    text-decoration: none;
    color: var(--header-text);
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.2s ease;
}
.header-nav a:hover {
    color: var(--header-text-hover);
}
.header-nav a.btn {
    border-color: var(--header-text);
    color: var(--header-text);
}
.header-nav a.btn:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Nút Hamburger cho Mobile */
.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.5rem;
    cursor: pointer;
}
@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none;
    }
}

/* Navigation cho Mobile (Menu trượt ra) */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Ẩn bên ngoài màn hình */
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--header-bg);
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}
.mobile-nav.is-active {
    right: 0; /* Hiện ra */
}
.mobile-nav a {
    color: var(--header-text);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid #374151;
}
.mobile-nav a.btn {
    margin-top: 2rem;
    text-align: center;
    background-color: var(--primary-blue);
    color: white;
    border: none;
}
.mobile-nav .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
}

.main-header {
    position: sticky; top: 0; z-index: 1000; /* đảm bảo nổi trên content */
    backdrop-filter: saturate(180%) blur(6px); /* cảm giác “glass” nhẹ như B2B */
}
  
.main-header .nav a {
    transition: color .2s ease, opacity .2s ease;
}
.main-header .nav a:hover { opacity: .85; }
  
.mobile-nav {
    transition: transform .28s ease-in-out, opacity .28s ease-in-out;
}
.mobile-nav.is-active { transform: translateX(0); }
  
.mobile-nav .panel {
    width: 320px; max-width: 86vw;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
  
.mobile-nav .backdrop {
    background: rgba(0,0,0,.5);
    transition: opacity .28s ease-in-out;
}
  
/* Ẩn nút hamburger trên desktop, đồng bộ breakpoint với B2B */
@media (min-width: 992px) {
    .mobile-nav-toggle { display: none !important; }
}