/* ==========================================================================
   POLICY & CLIENT PRIVILEGES STYLES - TIỆM MAY ĐỎ
   Quy chuẩn: Tạp chí Sartorial cao cấp, Sticky Sidebar, Elegant Typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO BANNER
   -------------------------------------------------------------------------- */
.policy-hero {
    padding: 175px 0 65px;
    background: radial-gradient(circle at 50% 15%, #3d090a 0%, #1a0304 85%, #0d0102 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.policy-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
}

.policy-hero-tag {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #e5b2b4;
    display: inline-block;
    margin-bottom: 15px;
}

.policy-hero-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 3.3rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0 auto 18px;
    line-height: 1.25;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    max-width: 850px;
}

.policy-hero-desc {
    max-width: 680px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    line-height: 1.8;
    font-weight: 300;
}

/* --------------------------------------------------------------------------
   2. BỐ CỤC 2 CỘT TỔNG THỂ
   -------------------------------------------------------------------------- */
.policy-main-section {
    padding: 80px 0 130px;
    background-color: var(--bg-cream, #fcfbf9);
}

.policy-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 55px;
    align-items: start;
}

/* --------------------------------------------------------------------------
   3. CỘT TRÁI: MENU TAB STICKY CHUẨN CÔNG THÁI HỌC
   -------------------------------------------------------------------------- */
.policy-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 95px;
    z-index: 10;
}

.policy-sticky-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e6e2da);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.policy-nav-header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--border-color, #e6e2da);
    background: #fbf9f5;
}

.nav-title-label {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary, #8b1d24);
}

.policy-nav-list {
    display: flex;
    flex-direction: column;
}

.policy-tab-item {
    position: relative;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.policy-tab-item:last-child {
    border-bottom: none;
}

.tab-index {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.05rem;
    font-weight: 400;
    color: #a8a096;
    transition: color 0.3s ease;
}

.tab-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.tab-name {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark, #1c1917);
    transition: color 0.3s ease;
}

.tab-sub {
    font-size: 0.72rem;
    color: var(--text-muted, #7c746b);
    font-weight: 300;
}

.tab-indicator {
    width: 3px;
    height: 0;
    background-color: var(--primary, #8b1d24);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: height 0.3s ease;
}

/* Hover & Active Tab */
.policy-tab-item:hover {
    background-color: rgba(139, 29, 36, 0.03);
}

.policy-tab-item:hover .tab-name {
    color: var(--primary, #8b1d24);
}

.policy-tab-item.active {
    background-color: #faf6f3;
}

.policy-tab-item.active .tab-index {
    color: var(--primary, #8b1d24);
    font-weight: 600;
}

.policy-tab-item.active .tab-name {
    color: var(--primary, #8b1d24);
    font-weight: 600;
}

.policy-tab-item.active .tab-indicator {
    height: 100%;
}

/* Hộp liên hệ nhanh ở chân menu */
.policy-quick-contact {
    padding: 22px 24px;
    background-color: #191614;
    color: #ffffff;
    border-top: 1px solid var(--border-color, #e6e2da);
}

.qc-label {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e5b2b4;
    display: block;
    margin-bottom: 6px;
}

.qc-desc {
    font-size: 0.78rem;
    color: #a8a096;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 300;
}

.qc-hotline {
    display: inline-block;
    color: #ffffff;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.qc-hotline:hover {
    color: #e5b2b4;
}

/* --------------------------------------------------------------------------
   4. CỘT PHẢI: KHUNG VĂN BẢN TẠP CHÍ CAO CẤP
   -------------------------------------------------------------------------- */
.policy-content-area {
    background: #ffffff;
    border: 1px solid var(--border-color, #e6e2da);
    border-radius: 2px;
    padding: 55px 65px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    min-height: 650px;
}

.policy-pane {
    display: none;
}

.policy-pane.active {
    display: block;
    animation: editorialFadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes editorialFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pane-headline {
    border-bottom: 1px solid var(--border-color, #e6e2da);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

.pane-eyebrow {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary, #8b1d24);
    display: block;
    margin-bottom: 10px;
}

.pane-main-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--text-dark, #1c1917);
    margin: 0 0 14px;
    line-height: 1.3;
}

.pane-meta-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.78rem;
    color: var(--text-muted, #7c746b);
    letter-spacing: 0.5px;
}

.meta-dot {
    opacity: 0.4;
}

.editorial-body .lead-paragraph {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.15rem;
    line-height: 1.9;
    color: #38342e;
    margin-bottom: 35px;
    font-weight: 400;
}

.policy-section-block {
    margin-bottom: 35px;
}

.section-heading {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark, #1c1917);
    margin: 0 0 14px;
    line-height: 1.4;
}

.policy-section-block p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #544f47;
    margin-bottom: 14px;
    font-weight: 300;
}

.bullet-feature-list {
    margin: 0 0 18px 20px;
    padding: 0;
}

.bullet-feature-list li {
    font-size: 0.93rem;
    line-height: 1.85;
    color: #4a453e;
    margin-bottom: 10px;
    font-weight: 300;
}

.bullet-feature-list li strong {
    color: var(--text-dark, #1c1917);
    font-weight: 600;
}

.atelier-quote-card {
    background: #fbf9f6;
    border-left: 3px solid var(--primary, #8b1d24);
    padding: 24px 30px;
    margin: 35px 0 20px;
    border-radius: 0 2px 2px 0;
}

.atelier-quote-card p {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.75;
    color: var(--text-dark, #1c1917);
    margin: 0 0 10px;
}

.atelier-quote-card cite {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary, #8b1d24);
    font-style: normal;
    display: block;
}

.policy-warning-box {
    background: #fdf6f6;
    border: 1px solid rgba(139, 29, 36, 0.2);
    border-radius: 2px;
    padding: 18px 22px;
    margin: 25px 0;
    font-size: 0.9rem;
    line-height: 1.75;
    color: #4a3334;
}

.policy-warning-box strong {
    color: var(--primary, #8b1d24);
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE THIẾT KẾ ĐA THIẾT BỊ (TABLET & MOBILE)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .policy-layout {
        grid-template-columns: 260px 1fr;
        gap: 35px;
    }
    .policy-content-area {
        padding: 40px 35px;
    }
    .policy-hero-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 900px) {
    .policy-hero {
        padding: 130px 0 40px;
    }
    .policy-hero-title {
        font-size: 2rem;
    }
    .policy-hero-desc {
        font-size: 0.9rem;
    }

    .policy-main-section {
        padding: 20px 0 60px;
        overflow-x: hidden; /* Ngăn chặn tuyệt đối mọi hành vi tràn ngang */
    }

    /* Chuyển grid thành block trên mobile để loại bỏ lỗi min-width: auto */
    .policy-layout {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Thanh tabs bám dính dưới Navbar 64px, co giãn vừa vặn màn hình */
    .policy-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 64px;
        z-index: 90;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color, #e6e2da);
        margin: 0 0 15px 0;
    }

    .policy-sticky-card {
        border: none;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .policy-nav-header,
    .policy-quick-contact {
        display: none;
    }

    /* Khung cuộn ngang mượt mà, không làm nở bề rộng trang */
    .policy-nav-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #ffffff;
        padding: 8px 12px;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .policy-nav-list::-webkit-scrollbar {
        display: none;
    }

    .policy-tab-item {
        flex-shrink: 0;
        width: auto;
        padding: 8px 14px;
        border-radius: 2px;
        border: 1px solid var(--border-color, #e6e2da);
        background: #fbf9f6;
    }

    .tab-index,
    .tab-sub,
    .tab-indicator {
        display: none;
    }

    .tab-name {
        font-size: 0.78rem;
        white-space: nowrap;
        font-weight: 500;
        color: var(--text-dark, #1c1917);
    }

    .policy-tab-item.active {
        background: var(--primary, #8b1d24);
        border-color: var(--primary, #8b1d24);
    }

    .policy-tab-item.active .tab-name {
        color: #ffffff !important;
        font-weight: 600;
    }

    /* Khung nội dung vừa khít màn hình điện thoại */
    .policy-content-area {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 24px 16px;
        border-radius: 2px;
        margin-top: 5px;
    }

    .pane-main-title {
        font-size: 1.55rem;
        line-height: 1.35;
        word-break: break-word;
    }

    .editorial-body .lead-paragraph {
        font-size: 0.95rem;
        line-height: 1.75;
        margin-bottom: 22px;
    }

    .atelier-quote-card {
        padding: 16px 18px;
        margin: 22px 0 15px;
    }

    .atelier-quote-card p {
        font-size: 0.95rem;
    }

    .pane-meta-bar {
        flex-wrap: wrap;
        font-size: 0.72rem;
        gap: 6px;
    }
}