body {
    background-color: #fff8f3;
    color: #2b1810;
}

main > .container, main > .container-fluid
{
    padding: 90px 15px 40px;
}

/* ---- Branded navbar ---- */
.navbar.bg-dark {
    background-color: #fff !important;
    border-bottom: 1px solid #f0e3d9;
    box-shadow: 0 2px 12px rgba(217, 119, 87, 0.06);
}
.navbar.bg-dark .navbar-brand {
    color: #D97757 !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.navbar.bg-dark .nav-link {
    color: #5a3a28 !important;
    font-weight: 500;
}
.navbar.bg-dark .nav-link:hover,
.navbar.bg-dark .nav-link.active {
    color: #D97757 !important;
}
.navbar.bg-dark .navbar-toggler {
    border-color: #f0e3d9;
}
.navbar.bg-dark .navbar-toggler-icon {
    filter: invert(50%) sepia(40%) saturate(500%) hue-rotate(340deg);
}
.navbar-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 4px;
}
.navbar-brand-img {
    height: 42px;
    width: auto;
}
.navbar.bg-dark form > button.logout,
.navbar.bg-dark .btn-link.login {
    color: #D97757 !important;
    font-weight: 500;
}
.navbar.bg-dark form > button.logout:hover,
.navbar.bg-dark .btn-link.login:hover {
    color: #c05f3f !important;
}

.footer {
    background-color: transparent;
    border-top: 1px solid #f0e3d9;
    font-size: .9em;
    height: 60px;
    color: #8a6a5a;
}

.footer > .container, .footer > .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
}

/* Feed tabs */
.feed-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #f0e3d9;
}
.feed-tab {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    color: #8a6a5a;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.feed-tab:hover {
    color: var(--hbg);
}
.feed-tab--active {
    color: var(--hbg);
    border-bottom-color: var(--hbg);
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.navbar form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .navbar form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar form > button.logout:focus,
.navbar form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.navbar form > button.logout:focus {
    outline: none;
}

/* style breadcrumb widget as in previous bootstrap versions */
.breadcrumb {
    background-color: var(--bs-gray-200);
    border-radius: .25rem;
    padding: .75rem 1rem;
}

.breadcrumb-item > a
{
    text-decoration: none;
}

/* ========================================================================
   Brand color utilities
   ======================================================================== */
:root {
    --hbg: #D97757;
    --hbg-dark: #c05f3f;
    --hbg-soft: #fbe6dc;
    --hbg-bg: #fff8f3;
}

.btn-hbg {
    background-color: var(--hbg);
    border-color: var(--hbg);
    color: #fff;
}
.btn-hbg:hover, .btn-hbg:focus {
    background-color: var(--hbg-dark);
    border-color: var(--hbg-dark);
    color: #fff;
}
.btn-outline-hbg {
    background-color: transparent;
    border: 1.5px solid var(--hbg);
    color: var(--hbg);
    font-weight: 600;
}
.btn-outline-hbg:hover, .btn-outline-hbg:focus {
    background-color: var(--hbg-soft);
    color: var(--hbg-dark);
    border-color: var(--hbg-dark);
}

/* Tint Bootstrap primary to brand on frontend so the built-in
   signup/login/reset-password forms match without extra edits. */
.btn-primary {
    background-color: var(--hbg);
    border-color: var(--hbg);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--hbg-dark) !important;
    border-color: var(--hbg-dark) !important;
}
a { color: var(--hbg); }
a:hover { color: var(--hbg-dark); }
.form-control:focus {
    border-color: var(--hbg);
    box-shadow: 0 0 0 .2rem rgba(217, 119, 87, 0.15);
}

/* Notification items */
.notification-item {
    color: inherit;
    border-bottom: 1px solid #f7ece4;
    transition: background .15s;
}
.notification-item:hover {
    background: var(--hbg-soft);
    color: inherit;
}
.notification-item--unread {
    background: #fff;
    border-left: 3px solid var(--hbg);
}
.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.notification-message {
    font-size: 14px;
    color: #2b1810;
    line-height: 1.4;
}
.notification-snippet {
    font-size: 13px;
    color: #8a6a5a;
    font-style: italic;
    margin-top: 2px;
}
.notification-time {
    font-size: 12px;
    color: #b89e91;
    margin-top: 4px;
}
.notification-dot {
    width: 10px;
    height: 10px;
    background: var(--hbg);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.notification-badge {
    font-size: 10px;
    padding: 2px 6px;
    position: relative;
    top: -1px;
}

/* User profile avatar */
.user-avatar-lg {
    width: 56px;
    height: 56px;
    background: var(--hbg);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
    background: var(--hbg);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Post image gallery */
.post-images {
    display: grid;
    gap: 4px;
    border-radius: 12px;
    overflow: hidden;
}
.post-images--1 { grid-template-columns: 1fr; }
.post-images--2 { grid-template-columns: 1fr 1fr; }
.post-images--grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
.post-images__item {
    display: block;
    overflow: hidden;
    background: #f0e3d9;
}
.post-images__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 120px;
    max-height: 300px;
    transition: transform .2s;
}
.post-images--1 .post-images__item img {
    max-height: 400px;
}
.post-images__item:hover img {
    transform: scale(1.02);
}

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* Image upload preview */
.img-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--hbg-soft);
}

/* Feed cards: soft warm shadow */
.post-card {
    border: 1px solid #f0e3d9;
    box-shadow: 0 4px 16px rgba(217, 119, 87, 0.06) !important;
}
.post-card strong {
    color: #2b1810;
}

/* Sidebar "top posts" cards */
.sidebar-card {
    border: 1px solid #f0e3d9;
    box-shadow: 0 4px 16px rgba(217, 119, 87, 0.06) !important;
}
.sidebar-card .card-header {
    background: transparent !important;
    font-size: 14px;
    color: #2b1810;
    padding-top: 14px;
}
.sidebar-list {
    list-style: none;
    counter-reset: hbg-rank;
    margin: 0;
    padding: 0;
}
.sidebar-list__item {
    counter-increment: hbg-rank;
    padding: 10px 0;
    border-bottom: 1px solid #f7ece4;
}
.sidebar-list__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sidebar-list__link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}
.sidebar-list__link::before {
    content: counter(hbg-rank);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--hbg-soft);
    color: var(--hbg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}
.sidebar-list__body {
    font-size: 13px;
    color: #3a2419;
    line-height: 1.4;
}
.sidebar-list__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: #8a6a5a;
}
.sidebar-list__author {
    font-weight: 500;
}
.sidebar-list__count {
    color: var(--hbg);
    font-weight: 600;
}
.sidebar-list__link:hover .sidebar-list__body {
    color: var(--hbg-dark);
}

/* ========================================================================
   Landing page
   ======================================================================== */
.landing-body {
    margin: 0;
    background: var(--hbg-bg);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.landing {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    min-height: 100vh;
}

.landing__left {
    position: relative;
    padding: 40px 60px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

.landing__right {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    border-left: 1px solid rgba(0,0,0,.05);
    box-shadow: -10px 0 40px rgba(217, 119, 87, 0.08);
}

.landing__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.landing__logo {
    width: 48px;
    height: 48px;
    background: var(--hbg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(217, 119, 87, 0.3);
}
.landing__logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(217, 119, 87, 0.3);
}
.landing__brand-img {
    height: 52px;
    width: auto;
}

.landing__brand-name {
    font-weight: 700;
    font-size: 16px;
    color: #2b1810;
    letter-spacing: -0.01em;
}

.landing__tagline {
    font-size: clamp(42px, 6vw, 84px);
    font-weight: 800;
    line-height: 0.95;
    color: var(--hbg);
    letter-spacing: -0.03em;
    z-index: 10;
    margin-bottom: 12px;
}
.landing__tagline div:nth-child(2) {
    color: #2b1810;
}

/* ---- Decorative illustration ---- */
.landing__illustration {
    position: relative;
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 520px;
    height: 420px;
}

.float-card {
    position: absolute;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(217, 119, 87, 0.18), 0 4px 12px rgba(0,0,0,0.04);
    width: 260px;
    transition: transform .3s ease;
}

.float-card--1 {
    top: 10px;
    left: 40px;
    transform: rotate(-4deg);
    z-index: 3;
}
.float-card--2 {
    top: 120px;
    right: 0;
    transform: rotate(3deg);
    z-index: 2;
    width: 240px;
}
.float-card--3 {
    bottom: 20px;
    left: 80px;
    transform: rotate(-2deg);
    z-index: 1;
    width: 230px;
}

.float-card__head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.float-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D97757, #e89878);
    flex-shrink: 0;
}
.float-card__avatar--2 {
    background: linear-gradient(135deg, #6B8E23, #9bb86d);
}
.float-card__avatar--3 {
    background: linear-gradient(135deg, #4A6FA5, #7fa5d6);
}
.float-card__name {
    font-weight: 600;
    font-size: 14px;
    color: #2b1810;
    line-height: 1.2;
}
.float-card__time {
    font-size: 11px;
    color: #999;
}
.float-card__body {
    font-size: 14px;
    color: #3a2419;
    margin: 0 0 10px;
    line-height: 1.4;
}
.float-card__reactions {
    display: flex;
    gap: 8px;
}
.reaction-pill {
    font-size: 12px;
    background: var(--hbg-soft);
    color: var(--hbg-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.reaction-pill--ghost {
    background: #f3ebe5;
    color: #8a6a5a;
}

.accent {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 10px 25px rgba(217, 119, 87, 0.2);
    animation: float 6s ease-in-out infinite;
}
.accent--heart { top: 0; right: 60px; animation-delay: 0s; }
.accent--star  { top: 80px; right: -20px; animation-delay: 1s; background: var(--hbg); color: #fff; }
.accent--praying { bottom: 40px; right: 30px; animation-delay: 2s; width: 64px; height: 64px; font-size: 32px; }
.accent--moon  { bottom: 120px; left: 0; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---- Login box ---- */
.landing-right-box {
    width: 100%;
    max-width: 380px;
}
.login-box__title {
    font-size: 18px;
    font-weight: 600;
    color: #2b1810;
    margin-bottom: 18px;
}
.login-input {
    border-radius: 10px;
    border: 1.5px solid #e9d7cd;
    padding: 14px 16px;
    font-size: 15px;
    margin-bottom: 12px;
    background: #fff;
}
.login-input:focus {
    border-color: var(--hbg);
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
    outline: none;
}
.login-error {
    margin-top: -8px;
    margin-bottom: 10px;
}
.btn-lg.btn-hbg {
    border-radius: 10px;
    font-weight: 600;
    padding: 14px;
    font-size: 15px;
}
.btn-lg.btn-outline-hbg {
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
}
.login-link {
    color: var(--hbg);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.login-link:hover {
    color: var(--hbg-dark);
    text-decoration: underline;
}
.login-box__meta {
    margin-top: 24px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .landing {
        grid-template-columns: 1fr;
    }
    .landing__left {
        padding: 24px 24px 40px;
        min-height: auto;
    }
    .landing__right {
        padding: 40px 24px;
        box-shadow: none;
        border-left: none;
        border-top: 1px solid rgba(0,0,0,.05);
    }
    .landing__illustration {
        height: 360px;
        max-width: 420px;
    }
    .landing__tagline {
        text-align: center;
        margin-top: 30px;
    }
}

@media (max-width: 520px) {
    .landing__illustration {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        max-width: 100%;
    }
    .float-card {
        position: static;
        width: 100%;
        max-width: 300px;
        transform: none;
    }
    .float-card--1 { transform: rotate(-2deg); }
    .float-card--2 { transform: rotate(1.5deg); }
    .float-card--3 { transform: rotate(-1deg); }
    .accent {
        display: none;
    }
}
