/*
=============================================================
 HOME THEME - GIAO DIỆN PUBLIC
 Áp dụng cho các View trong WebFlat/Views/Home
=============================================================

Tone hiện tại:
- Xanh dương nhạt khoảng 60% so với bản xanh đậm ban đầu.
- Đỏ và vàng dùng làm màu nhấn.
- Toàn bộ màu chung được quản lý tại :root.
*/

:root {
    /* Bảng màu nền tảng */
    --home-blue-950: #8b650f;
    --home-blue-900: #9b7319;
    --home-blue-800: #aa8228;
    --home-blue-700: #b79035;
    --home-blue-600: #c4a052;
    --home-blue-500: #d3b774;
    --home-blue-200: #eadbb4;
    --home-blue-100: #f5ecd4;
    --home-blue-50: #fffaf0;
    --home-red: #d54932;
    --home-red-dark: #b73524;
    --home-yellow: #f0cb55;
    --home-white: #fffdf8;
    --home-text: #5a4829;
    --home-text-muted: #806f52;
    --home-border: #e3d4b2;
    --home-shadow: rgba(120, 88, 20, 0.12);
    /* Màu theo từng khu vực của layout public */
    --home-page-background: linear-gradient(180deg, #f5ecd4 0%, #fffaf0 48%, #eadbb4 100%);
    --home-wrapper-background: #fffdf8;
    --home-header-background: #fffdf8;
    --home-header-text: #6f5114;
    --home-header-subtext: #8a6925;
    --home-header-watermark: rgba(139, 101, 15, 0.05);
    --home-header-border: #d7b55c;
    --home-menu-background: linear-gradient(90deg, #926812 0%, #ad8124 50%, #926812 100%);
    --home-menu-text: #ffffff;
    --home-menu-divider: rgba(255, 255, 255, 0.28);
    --home-menu-hover: #c43d2a;
    --home-menu-shadow: rgba(111, 81, 20, 0.20);
    --home-ticker-background: linear-gradient(90deg, #fff8e8 0%, #fffdf8 50%, #fff8e8 100%);
    --home-ticker-text: #77591d;
    --home-ticker-border: #eadbb4;
    --home-footer-background: #fff9eb;
    --home-footer-text: #5d4925;
    --home-footer-muted: #756344;
    --home-footer-title: #6f5114;
    --home-footer-divider: rgba(139, 101, 15, 0.22);
    --home-footer-map-background: rgba(255, 255, 255, 0.72);
    --home-footer-map-border: rgba(139, 101, 15, 0.24);
    --home-footer-address-background: rgba(145, 104, 18, 0.94);
    --home-footer-bottom-background: linear-gradient(90deg, #8f6511 0%, #aa7f24 50%, #8f6511 100%);
    --home-footer-bottom-text: #ffffff;
    --home-footer-bottom-divider: rgba(255, 255, 255, 0.25);
    /* Gradient dùng trong nội dung */
    --home-gradient-primary: linear-gradient(90deg, #926812 0%, #ad8124 52%, #926812 100%);
    --home-gradient-section: linear-gradient(90deg, #9a7018 0%, #b68d38 100%);
    --home-gradient-soft: linear-gradient(180deg, #fffdf8 0%, #fff8e9 100%);
    --home-radius-sm: 6px;
    --home-radius-md: 10px;
    --home-radius-lg: 14px;
    --home-transition: all 0.2s ease;
}

/* =========================================================
   NỀN VÀ KHUNG CHUNG
========================================================= */

.home-page {
    color: var(--home-text);
    background: var(--home-white);
}

    .home-page a {
        transition: var(--home-transition);
    }

    .home-page img {
        max-width: 100%;
    }

/* =========================================================
   TIÊU ĐỀ CHUYÊN MỤC
========================================================= */

.home-section-heading {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0 0 16px;
    padding: 9px 16px 9px 22px;
    overflow: hidden;
    color: var(--home-white);
    background: var(--home-gradient-section);
    border-radius: var(--home-radius-md) var(--home-radius-md) 0 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    text-transform: uppercase;
}

    .home-section-heading::before {
        content: "";
        position: absolute;
        left: 10px;
        top: 11px;
        bottom: 11px;
        width: 4px;
        background: var(--home-yellow);
        border-radius: 99px;
    }

    .home-section-heading::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3px;
        background: var(--home-red);
    }

.home-content-title {
    color: var(--home-blue-900);
    font-weight: 800;
    line-height: 1.45;
}

    .home-content-title:hover {
        color: var(--home-red);
    }

/* =========================================================
   CARD
========================================================= */

.home-card {
    overflow: hidden;
    background: var(--home-white);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-md);
    box-shadow: 0 4px 14px var(--home-shadow);
    transition: var(--home-transition);
}

    .home-card:hover {
        border-color: var(--home-blue-500);
        box-shadow: 0 8px 22px rgba(63, 112, 156, 0.20);
        transform: translateY(-2px);
    }

.home-card-soft {
    background: var(--home-gradient-soft);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-md);
}

/* =========================================================
   NÚT BẤM
========================================================= */

.home-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    color: var(--home-white);
    background: var(--home-blue-800);
    border: 1px solid var(--home-blue-800);
    border-radius: var(--home-radius-sm);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: var(--home-transition);
}

    .home-btn-primary:hover,
    .home-btn-primary:focus {
        color: var(--home-white);
        background: var(--home-red);
        border-color: var(--home-red);
        text-decoration: none;
    }

.home-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    color: var(--home-blue-900);
    background: var(--home-white);
    border: 1px solid var(--home-blue-700);
    border-radius: var(--home-radius-sm);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: var(--home-transition);
}

    .home-btn-outline:hover,
    .home-btn-outline:focus {
        color: var(--home-white);
        background: var(--home-blue-800);
        text-decoration: none;
    }

/* =========================================================
   NHÃN VÀ THÔNG TIN PHỤ
========================================================= */

.home-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    color: var(--home-blue-900);
    background: var(--home-blue-100);
    border: 1px solid var(--home-blue-200);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.home-badge-danger {
    color: var(--home-white);
    background: var(--home-red);
    border-color: var(--home-red);
}

.home-meta {
    color: var(--home-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

    .home-meta i {
        margin-right: 4px;
        color: var(--home-blue-700);
    }

/* =========================================================
   KHỐI THÔNG BÁO / TÓM TẮT
========================================================= */

.home-alert {
    padding: 14px 16px;
    color: var(--home-text);
    background: var(--home-blue-50);
    border: 1px solid var(--home-blue-200);
    border-left: 4px solid var(--home-red);
    border-radius: var(--home-radius-sm);
}

.home-summary {
    padding: 16px 18px;
    color: var(--home-text);
    background: var(--home-blue-50);
    border-left: 4px solid var(--home-blue-700);
    border-radius: var(--home-radius-sm);
    font-weight: 600;
    line-height: 1.75;
}

/* =========================================================
   FORM CONTROL
========================================================= */

.home-page .form-control,
.home-page .form-select {
    color: var(--home-text);
    border-color: var(--home-border);
    border-radius: var(--home-radius-sm);
}

    .home-page .form-control:focus,
    .home-page .form-select:focus {
        border-color: var(--home-blue-500);
        box-shadow: 0 0 0 0.2rem rgba(127, 169, 207, 0.18);
    }

/* =========================================================
   PHÂN TRANG
========================================================= */

.home-page .pagination {
    gap: 4px;
}

.home-page .page-link {
    min-width: 36px;
    color: var(--home-blue-900);
    background: var(--home-white);
    border-color: var(--home-border);
    border-radius: var(--home-radius-sm);
    text-align: center;
}

    .home-page .page-link:hover {
        color: var(--home-white);
        background: var(--home-blue-700);
        border-color: var(--home-blue-700);
    }

.home-page .page-item.active .page-link {
    color: var(--home-white);
    background: var(--home-red);
    border-color: var(--home-red);
}

.home-page .page-item.disabled .page-link {
    color: var(--home-text-muted);
    background: var(--home-blue-50);
}

/* =========================================================
   BẢNG
========================================================= */

.home-page .table thead th {
    color: var(--home-white);
    background: var(--home-blue-800);
    border-color: rgba(255, 255, 255, 0.18);
}

.home-page .table tbody tr:hover {
    background: var(--home-blue-50);
}

/* =========================================================
   NỘI DUNG BÀI VIẾT
========================================================= */

.home-article-content {
    color: var(--home-text);
    font-size: 15px;
    line-height: 1.85;
}

    .home-article-content h1,
    .home-article-content h2,
    .home-article-content h3,
    .home-article-content h4,
    .home-article-content h5,
    .home-article-content h6 {
        color: var(--home-blue-900);
        font-weight: 800;
    }

    .home-article-content a {
        color: var(--home-blue-700);
    }

        .home-article-content a:hover {
            color: var(--home-red);
        }

    .home-article-content blockquote {
        margin: 18px 0;
        padding: 14px 18px;
        color: var(--home-text);
        background: var(--home-blue-50);
        border-left: 4px solid var(--home-blue-700);
    }

    .home-article-content img {
        height: auto;
        border-radius: var(--home-radius-sm);
    }

/* =========================================================
   SIDEBAR
========================================================= */

.home-sidebar-title {
    position: relative;
    margin: 0;
    padding: 11px 14px 11px 20px;
    color: var(--home-white);
    background: var(--home-gradient-section);
    border-radius: var(--home-radius-md) var(--home-radius-md) 0 0;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

    .home-sidebar-title::before {
        content: "";
        position: absolute;
        left: 9px;
        top: 12px;
        bottom: 12px;
        width: 4px;
        background: var(--home-yellow);
        border-radius: 99px;
    }

.home-sidebar-body {
    padding: 14px;
    background: var(--home-white);
    border: 1px solid var(--home-border);
    border-top: 0;
    border-radius: 0 0 var(--home-radius-md) var(--home-radius-md);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .home-section-heading {
        min-height: 40px;
        padding: 9px 12px 9px 20px;
        font-size: 14px;
    }

    .home-content-title {
        font-size: 17px;
    }

    .home-card:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .home-btn-primary,
    .home-btn-outline {
        width: 100%;
    }
}
