/**
 * Hoàng Vũ Auto Client - Policy Pages Stylesheet
 * Dedicated styles for policy-detail.php & policy.php (Light Theme & Pure Vanilla CSS)
 */

/* 1. Page Wrap with Fixed Navbar Clearance */
.policy-page-wrap {
    background-color: #f8fafc;
    min-height: 85vh;
    padding-top: 120px;
    padding-bottom: 4rem;
}

@media (max-width: 768px) {
    .policy-page-wrap {
        padding-top: 100px;
        padding-bottom: 2.5rem;
    }
}

/* 2. Breadcrumb Navigation */
.policy-breadcrumb {
    margin-bottom: 1.5rem;
}

.policy-breadcrumb .breadcrumb {
    margin-bottom: 0;
}

.policy-breadcrumb .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.policy-breadcrumb .breadcrumb-item a:hover {
    color: #00B140;
}

.policy-breadcrumb .breadcrumb-item.active {
    color: #0f172a;
    font-weight: 700;
}

/* Mobile-only breadcrumb single row with ellipsis */
@media (max-width: 768px) {
    .policy-breadcrumb .breadcrumb {
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .policy-breadcrumb .breadcrumb-item {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .policy-breadcrumb .breadcrumb-item.active {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 180px;
        vertical-align: bottom;
        flex-shrink: 1;
    }
}

@media (max-width: 480px) {
    .policy-breadcrumb .breadcrumb-item.active {
        max-width: 135px;
    }
}

/* 3. Main Policy Detail Card */
.policy-main-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .policy-main-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
}

/* 4. Meta Bar & Badges */
.policy-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.policy-meta-tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.policy-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #dcfce7; color: #166534;
    color: #00b140;
    font-size: 1.25rem;
}

.policy-badge-primary {
    background-color: #dcfce7; color: #166534;
    color: #00b140;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.2px;
}

.policy-badge-secondary {
    background-color: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.2px;
}

.policy-meta-date {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: auto;
}

@media (max-width: 576px) {
    .policy-meta-bar {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.4rem 0.75rem;
        align-items: center;
    }
    .policy-icon-circle {
        grid-row: 1 / 3;
    }
    .policy-meta-tags {
        grid-column: 2;
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .policy-meta-date {
        grid-column: 2;
        margin-left: 0;
        font-size: 0.76rem;
    }
}

/* 5. Policy Title & Summary */
.policy-detail-title {
    color: #0f172a;
    font-weight: 600;
    font-size: 1.95rem;
    line-height: 1.35;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .policy-detail-title {
        font-size: 1.5rem;
    }
}

.policy-summary-box {
    background-color: #f1f5f9;
    border-left: 4px solid #00B140;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    color: #334155;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.policy-summary-icon {
    color: #00B140;
    margin-right: 0.5rem;
    opacity: 0.8;
}

/* 6. Rich Content Typography */
.policy-rich-body {
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.9;
}

.policy-rich-body h2,
.policy-rich-body h3,
.policy-rich-body h4 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

.policy-rich-body h2 { font-size: 1.5rem; }
.policy-rich-body h3 { font-size: 1.28rem; }
.policy-rich-body h4 { font-size: 1.12rem; }

.policy-rich-body p {
    margin-bottom: 1.15rem;
    color: #334155;
}

.policy-rich-body ul,
.policy-rich-body ol {
    padding-left: 1.75rem;
    margin-bottom: 1.35rem;
}

.policy-rich-body li {
    margin-bottom: 0.6rem;
    color: #334155;
    line-height: 1.8;
}

.policy-rich-body strong,
.policy-rich-body b {
    color: #0f172a;
    font-weight: 700;
}

.policy-rich-body a {
    color: #00B140;
    text-decoration: underline;
    font-weight: 600;
}

.policy-rich-body a:hover {
    color: #009636;
}

.policy-rich-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.25rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* 7. Guarantee Footer */
.policy-guarantee-bar {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.policy-guarantee-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.88rem;
}

/* 8. Sidebar Cards & Navigation */
.policy-sidebar-sticky {
    position: sticky;
    top: 100px;
}

.policy-sidebar-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.policy-sidebar-heading {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.policy-sidebar-heading i {
    color: #00B140;
}

.policy-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.policy-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s ease;
}

.policy-nav-link i {
    font-size: 1.1rem;
    color: #64748b;
    flex-shrink: 0;
}

.policy-nav-link-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.policy-nav-link:hover {
    background-color: #dcfce7; color: #166534;
    border-color: #86efac;
    color: #00b140;
    transform: translateX(3px);
}

.policy-nav-link:hover i,
.policy-nav-link:hover .policy-nav-link-title {
    color: #00b140;
}

.policy-nav-link.active {
    background-color: #dcfce7; color: #166534;
    border-color: #4ade80;
    color: #00b140;
    font-weight: 700;
}

.policy-nav-link.active i,
.policy-nav-link.active .policy-nav-link-title {
    color: #00b140;
    font-weight: 700;
}

/* 9. Sidebar Support Box */
.policy-support-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #dcfce7; color: #166534;
    color: #00b140;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.policy-support-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.policy-support-desc {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.policy-hotline-btn {
    background-color: #00B140;
    color: #ffffff !important;
    border-radius: 9999px;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.policy-hotline-btn:hover {
    background-color: #009636;
}

/* 10. Policy List Grid (policy.php) */
.policy-grid-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.policy-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(211, 47, 47, 0.08);
    border-color: #86efac;
}

.policy-grid-title {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.policy-grid-desc {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
