﻿/* wwwroot/css/site.css */
:root {
    --bs-primary: #6f4e37;
    --bs-primary-rgb: 111, 78, 55;
    --bs-secondary: #c3a27b;
    --bs-secondary-rgb: 195, 162, 123;
    --bs-body-bg: #faf5f0;
    --bs-body-color: #3b2f2f;
    --bs-link-color: #6f4e37;
    --bs-link-hover-color: #9c6644;
    --bs-border-color: rgba(111, 78, 55, .15);
}

/* Màu base cho nav-link */
.navbar .nav-link {
    color: #555555;
    font-weight: 500;
}

    /* Trạng thái hover (chuột) – nhẹ nhàng, không quá gắt */
    .navbar .nav-link:hover {
        color: #3b2a1f;
    }

/* ===== ACTIVE DESKTOP MENU ===== */
.navbar .nav-item.active {
    border-radius: 999px;
    background-color: #f4e8dd; /* nền nhạt, vẫn contrast tốt với text */
}

.navbar .nav-item.active > .nav-link {
    color: #2b1c12 !important; /* chữ đậm, contrast cao với nền trắng & nền nhạt */
    font-weight: 600;
    position: relative;
}

.off-link.active {
    font-weight: 600;
    background-color: #fff7ec;
    padding-left: 12px;
    border-radius: 6px;
}



/* Trạng thái focus cho accessibility (tab bằng bàn phím) */
.navbar .nav-link:focus-visible {
    outline: 2px solid #c46a18;
    outline-offset: 2px;
    border-radius: 999px;
}


.donate-floating-btn {
    position: fixed;
    bottom: 142px;
    right: 20px;
    z-index: 9999;
    background: #f4b056;
    border: none;
    color: black;
    font-weight: 600;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    cursor: pointer;
    transition: all .2s ease-in-out;
    font-size: 25px;
    height: 50px;
    width: 50px;
}

.donate-floating-btn:hover {
    background: #dc9a42;
    transform: translateY(-2px);
}

/* Nút về đầu trang */
.scroll-top-btn {
    position: fixed;
    bottom: 82px; /* nằm cao hơn nút donate */
    right: 20px;
    z-index: 9999;
    height: 50px;
    width: 50px;
    background: #f4b056;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: none;
    border: none;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    transition: opacity .2s ease-in-out, transform .2s;
}

.scroll-top-btn:hover {
    background: #A16A08 !important;
    color: white;
    transform: translateY(-2px);
}

/* Header */
header.navbar {
    background-color: #fffaf5;
    border-bottom: 1px solid rgba(111, 78, 55, .1);
}

/* Footer */
footer {
    background-color: #f1e8e2;
    color: #3b2f2f;
}

/* Buttons */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #5a3e2c;
    border-color: #5a3e2c;
}

/* Card */
.card {
    background-color: #fffdf9;
    border-color: rgba(111, 78, 55, .15);
}
.navbar-brand span {
    color: #A16A08 !important;
    font-weight: 700;
}

.card-title {
    color: var(--bs-primary);
}

/* Links, headings */
a {
    color: var(--bs-link-color);
}

a:hover {
    color: var(--bs-link-hover-color);
    text-decoration: none;
}

/* Optional background subtle */
body {
    background: radial-gradient(circle at 10% 10%, #faf5f0 0%, #f7f1e8 100%);
    font-family: 'Be Vietnam Pro', sans-serif;
}


body {
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bs-body-bg);
}

main.container {
    max-width: 1140px;
}

.win-surface,
.card-surface {
    background: var(--surface);
    border-radius: 0.5rem;
    border: 1px solid lightgray;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.02);
}

a {
    text-decoration: none;
}

main {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #adb5bd transparent;
}

main::-webkit-scrollbar {
    width: 8px;
}

main::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,.2);
    border-radius: 4px;
}

main::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0,0,0,.3);
}

.icon-16 {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    vertical-align: -0.125em;
    pointer-events: none;
}

.icon-18 {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
    vertical-align: -0.125em;
    pointer-events: none;
}

.nav-link {
    color: #444; /* màu chữ mặc định */
    text-decoration: none !important;
    transition: color 0.2s ease;
    font-weight: 600;
}

.nav-link:hover,
.nav-link:focus {
    color: #ea9224 !important; /* màu nâu cà phê khi hover */
    text-decoration: none !important;
}

.text-gray {
    color: #444 !important;
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Logo text */
.logo-text-main {
    color: black !important; /* nâu đậm */
    font-weight: 700;
    font-size: 1.05rem;
}

.logo-text-accent {
    color: #A16A08; /* vàng nâu, đủ contrast */
    font-weight: 700;
    margin-left: 3px;
    font-size: 1.05rem;
}

/* Nav & hover */
.navbar .nav-link {
    color: #4b3832;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
    border-radius: .5rem;
    padding: .4rem .75rem;
}

.navbar .nav-link:hover, .navbar .nav-link:focus {
    color: #fff;
    /*background-color: #6f4e37;*/
}

/* Mega dropdown desktop */
.dropdown-mega {
    position: static;
}

.mega-menu {
    border-radius: 0.2rem;
    background: white;
    border: 1px solid rgba(111,78,55,.12);
}

.mega-menu .dropdown-item {
    border-radius: .2rem;
    padding: 0.2rem;
    margin: 0.2rem 0.2rem;
    font-weight: 600;
}

.mega-menu .dropdown-item:hover {
    background-color: rgba(111,78,55,.08);
    color: #6f4e37;
}


@media (min-width: 992px) {
    .navbar .dropdown-mega {
        position: static;
    }

    .navbar .dropdown:not(.dropdown-mega):hover > .dropdown-menu {
        display: block;
    }

    /* chỉ mega mới static */
    .navbar .dropdown-mega .mega-menu {
        max-width: 400px;
        margin-top: .75rem;
        border-radius: 1rem;
        border: 1px solid rgba(111,78,55,.12);
    }

    .navbar .dropdown-mega:hover > .dropdown-menu {
        display: block;
    }
}
/* Layout offcanvas */
.offcanvas {
    display: flex;
    flex-direction: column;
}
/* để footer dính đáy */
.offcanvas-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.offcanvas-sticky-top {
    z-index: 2;
}
/* search luôn trên */
.offcanvas-menu {
    flex: 1 1 auto;
    overflow-y: auto;
}
/* CHỈ menu cuộn */

/* Menu 1 cột: KHÔNG dùng .nav (tránh flex-row mặc định) */
.off-link {
    display: block;
    color: #4b3832;
    padding: .65rem .85rem;
    border-radius: .5rem;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
}

.off-link:hover, .off-link:focus {
    color: #6f4e37;
    background: rgba(111,78,55,.08);
}

/* Accordion giống link */
.off-acc {
    margin-top: .25rem;
}

.off-acc-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    position: relative;
    padding-right: 2rem;
}

.off-acc-btn::after {
    content: "";
    position: absolute;
    right: .6rem;
    top: 50%;
    width: .5rem;
    height: .5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(135deg);
    opacity: .6;
    transition: transform .2s ease, opacity .2s ease;
}

.off-acc-btn:not(.collapsed)::after {
    transform: translateY(-60%) rotate(-45deg);
    opacity: .85;
}

/* Sub list */
.off-sub {
    padding-left: .5rem;
    margin: .25rem 0 .5rem .25rem;
    border-left: 2px solid rgba(111,78,55,.12);
}

.off-sub .off-link {
    padding: .5rem .75rem;
    border-radius: .45rem;
}

/* Footer */
.offcanvas-footer svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(234,146,36,.1);
    color: #6f4e37;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.social-link:hover {
    background: #ea9224;
    color: #fff;
    transform: translateY(-2px);
}

/* Dropdown thường: luôn neo dưới trigger, không full-width */
/* chỉ mega dùng rộng */
.navbar .dropdown-mega {
    position: static;
}

.navbar .dropdown-mega .mega-menu {
    width: 100%;
    max-width: 980px;
}


/* --- Comment look --- */
.cmt {
    display: flex;
    gap: .6rem;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
    animation: fadeIn .2s ease both
}

    .cmt:last-child {
        border-bottom: none
    }

.cmt-av {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4efe9;
    color: #8a623f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700
}

.cmt-main {
    flex: 1
}

.cmt-name {
    font-weight: 700;
    color: #2b2118;
    line-height: 1
}

.cmt-row {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: .2rem
}

.cmt-text {
    font-size: .95rem;
    line-height: 1.5;
    color: #222;
    background: #f8f6f3;
    padding: .45rem .6rem;
    border-radius: 10px;
    max-width: 100%
}

.cmt-time {
    font-size: .8rem;
    color: #9c8d7c
}

.cmt-actions {
    margin-top: .25rem
}

    .cmt-actions .cmt-reply {
        background: none;
        border: none;
        color: #8a623f;
        font-weight: 600;
        padding: 0;
        cursor: pointer
    }

        .cmt-actions .cmt-reply:hover {
            text-decoration: underline
        }

/* Replies nhô vào + đường dẫn thị giác */
.cmt-children {
    margin-top: .4rem;
    border-left: 2px solid #efe8e1;
    padding-left: .8rem
}

.comment-reply-form {
    margin-top: .5rem;
    border: 1px solid #efe8e1;
    border-radius: 8px;
    padding: .75rem;
    background: #fffdfb;
    animation: fadeIn .2s ease both;
}

    .comment-reply-form .form-control-sm {
        font-size: .9rem;
        padding: .35rem .5rem;
    }

    .comment-reply-form textarea {
        resize: vertical;
        font-size: .9rem;
        border-radius: 6px;
    }


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}




