/* =====================================================================
   Forum (community) module - modern skin
   Loaded only by the forum pages. Every rule is scoped under .ihf
   (added to the forum page wrapper) so nothing else on the site changes.
   Palette follows the site brand: navy header rgb(9 31 51), royal blue
   accent band (#2A46FF), marigold highlight (#FFC300), Poppins body,
   Playfair Display for display type.
   ===================================================================== */

.ihf {
    --fm-navy: #091F33;
    --fm-navy-2: #14324F;
    --fm-ink: #1B2733;
    --fm-muted: #586879;
    --fm-line: #E3E8EF;
    --fm-mist: #F4F6FA;
    --fm-royal: #2A46FF;
    --fm-royal-deep: #1C33D1;
    --fm-royal-tint: #EEF1FF;
    --fm-marigold: #FFC300;
    --fm-teal: #0B7A72;
    --fm-radius-lg: 18px;
    --fm-radius: 12px;
    --fm-radius-sm: 8px;
    --fm-shadow: 0 1px 2px rgba(9, 31, 51, .06), 0 4px 14px rgba(9, 31, 51, .05);
    --fm-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --fm-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-family: var(--fm-body);
    color: var(--fm-ink);
}

.ihf *, .ihf *::before, .ihf *::after { box-sizing: border-box; }

/* ---------- focus + links ---------- */
.ihf a:focus-visible,
.ihf button:focus-visible,
.ihf summary:focus-visible,
.ihf input:focus-visible,
.ihf textarea:focus-visible,
.ihf select:focus-visible {
    outline: 3px solid var(--fm-royal);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- page frame ---------- */
.ihf .forum {
    padding: 18px 28px 40px;
}

.ihf .breadcrumb-container .breadcrumb {
    margin-bottom: 6px;
}

.ihf .breadcrumb-container li,
.ihf .breadcrumb-container li a {
    font-size: 13px;
    color: var(--fm-muted);
}

.ihf .breadcrumb-container li:last-child {
    color: var(--fm-ink);
    font-weight: 500;
}

.ihf .breadcrumb-container li a:hover { color: var(--fm-royal); }

/* Page title: editorial serif, no pill */
.ihf .page-title {
    background: none;
    color: var(--fm-navy);
    height: auto;
    width: auto;
    border-radius: 0;
    padding: 0;
    margin: 8px auto 26px;
    display: block;
    text-align: center;
    font-family: var(--fm-display);
    font-weight: 700;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -.01em;
    max-width: 22ch;
}

    .ihf .page-title::after {
        content: "";
        display: block;
        width: 56px;
        height: 4px;
        border-radius: 4px;
        background: var(--fm-marigold);
        margin: 14px auto 0;
    }

/* Three-column grid; let the middle column shrink properly */
.ihf .forum-layout {
    gap: 28px;
    align-items: start;
}

.ihf .forum-center,
.ihf .form-left,
.ihf .forum-right { min-width: 0; }

/* ---------- section headers ---------- */
.ihf .center-header {
    border-bottom: 1px solid var(--fm-line);
    padding-bottom: 12px;
    margin: 22px 0 18px;
}

    .ihf .center-header::before {
        width: 48px;
        height: 3px;
        left: 0;
        right: auto;
        transform: none;
        bottom: -2px;
        border-radius: 3px;
        background: var(--fm-royal);
    }

    .ihf .center-header .center-title {
        text-align: left;
        padding: 0;
        font-family: var(--fm-body);
        font-size: 22px !important;
        line-height: 1.3 !important;
        font-weight: 600;
        color: var(--fm-navy);
        margin: 0;
    }

.ihf .center-header.inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* topic page h1 lives in .center-header */
.ihf h1.center-title,
.ihf .detail-forum-layout .center-header h1.center-title {
    font-family: var(--fm-display) !important;
    font-size: 30px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-align: left;
    flex: 1 1 320px;
}

/* ---------- tab bar (Recent / Last 30 days / Members) ---------- */
.ihf .forum-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    height: auto;
    padding: 6px;
    background: var(--fm-mist);
    border: 1px solid var(--fm-line);
    border-radius: 999px;
    width: fit-content;
    max-width: 100%;
}

    .ihf .forum-filters .filter-tab {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        line-height: 1.2;
        padding: 8px 18px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--fm-ink);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        text-decoration: none;
        transition: background-color .2s, color .2s;
    }

        .ihf .forum-filters .filter-tab:hover {
            background: #fff;
            color: var(--fm-royal);
        }

        .ihf .forum-filters .filter-tab.active {
            background: var(--fm-navy);
            color: #fff;
            box-shadow: 0 2px 6px rgba(9, 31, 51, .25);
        }

/* ---------- buttons ---------- */
.ihf .fm-btn,
.ihf .ask-btn,
.ihf .btn-new-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--fm-royal);
    color: #fff;
    font-family: var(--fm-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(42, 70, 255, .25);
    transition: background-color .2s, box-shadow .2s;
}

    .ihf .fm-btn:hover,
    .ihf .ask-btn:hover,
    .ihf .ask-btn:focus,
    .ihf .btn-new-post:hover {
        background: var(--fm-royal-deep);
        color: #fff;
        text-decoration: none;
    }

    .ihf .ask-btn .icon {
        width: 22px;
        height: 22px;
        display: inline-flex;
        background: none;
    }

        .ihf .ask-btn .icon img {
            width: 100%;
            filter: brightness(0) invert(1);
        }

.ihf .fm-btn--ghost {
    background: #fff;
    color: var(--fm-navy);
    border-color: var(--fm-navy);
    box-shadow: none;
}

    .ihf .fm-btn--ghost:hover {
        background: var(--fm-navy);
        color: #fff;
    }

.ihf .main-btn.btn-dark,
.ihf .icon-btn.btn-dark {
    background: var(--fm-royal);
    color: #fff;
    border-radius: 999px;
    min-height: 42px;
    height: auto;
    padding: 10px 22px;
    font-weight: 600;
}

    .ihf .main-btn.btn-dark:hover,
    .ihf .icon-btn.btn-dark:hover {
        background: var(--fm-royal-deep);
    }

/* ---------- sidebar cards ---------- */
.ihf .forum-card {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 0;
    margin-bottom: 22px;
    box-shadow: var(--fm-shadow);
    overflow: hidden !important;
}

    .ihf .forum-card::before { display: none; }

    .ihf .forum-card .card-title {
        margin: 0;
        padding: 14px 16px;
        border-radius: 0;
        background: var(--fm-navy);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        gap: 10px;
    }

        .ihf .forum-card .card-title > span:first-child {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .ihf .forum-card .card-title .icon {
            width: 32px;
            height: 32px;
            flex: none;
            padding: 5px;
        }

        .ihf .forum-card .card-title .view-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .12);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 7px;
            margin-left: auto;
        }

            .ihf .forum-card .card-title .view-icon:hover { background: rgba(255, 255, 255, .25); }

            .ihf .forum-card .card-title .view-icon img { filter: brightness(0) invert(1); }

    .ihf .forum-card .card-body {
        margin: 0;
        border-radius: 0;
        padding: 6px 0;
        background: #fff;
    }

/* Hot & Trending list */
.ihf .custom-list .trending-list { margin: 0; padding: 0; list-style: none; }

    .ihf .custom-list .trending-list li { border-bottom: 1px solid var(--fm-line); }

        .ihf .custom-list .trending-list li a {
            font-size: 13.5px;
            line-height: 1.45;
            padding: 11px 16px 11px 34px;
            color: var(--fm-ink);
        }

            .ihf .custom-list .trending-list li a::before { top: 16px; left: 16px; }

            .ihf .custom-list .trending-list li a:hover,
            .ihf .custom-list .trending-list li a.active {
                background: var(--fm-royal-tint);
                color: var(--fm-royal-deep);
            }

                .ihf .custom-list .trending-list li a:hover::before,
                .ihf .custom-list .trending-list li a.active::before { filter: none; }

/* Explore by theme list */
.ihf .forum-card .rules-list.icon-list {
    margin: 0;
    padding: 0 8px;
    list-style: none;
}

    .ihf .forum-card .rules-list.icon-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 6px 8px;
        margin: 0;
        border-radius: var(--fm-radius-sm);
    }

        .ihf .forum-card .rules-list.icon-list li:hover { background: var(--fm-mist); }

        .ihf .forum-card .rules-list.icon-list li .icon {
            width: 36px;
            height: 36px;
            flex: none;
            border-radius: 10px;
            border: 0;
            background: #FFF1F0;
            padding: 7px;
        }

        .ihf .forum-card .rules-list.icon-list li .text a {
            color: var(--fm-ink);
            font-size: 14px;
            line-height: 1.35;
        }

            .ihf .forum-card .rules-list.icon-list li .text a:hover { color: var(--fm-royal); }

        .ihf .forum-card .rules-list.icon-list .topic-count {
            margin-left: 6px;
            font-size: 12px;
            font-weight: 600;
            color: var(--fm-muted);
            background: var(--fm-mist);
            border-radius: 999px;
            padding: 1px 8px;
        }

/* Tag cloud */
.ihf .tag-wrap { padding: 12px 14px !important; gap: 6px; }

    .ihf .tag-wrap .tag {
        border: 1px solid var(--fm-line);
        border-radius: 999px;
        padding: 0;
        background: #fff;
    }

        .ihf .tag-wrap .tag a {
            display: inline-block;
            padding: 4px 11px;
            font-size: 12.5px;
            color: var(--fm-ink);
        }

        .ihf .tag-wrap .tag:hover {
            background: var(--fm-royal-tint);
            border-color: #C9D1FF;
        }

/* ---------- discussion cards (home, profile) ---------- */
.ihf .post-card {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 20px 22px;
    gap: 18px;
    margin-bottom: 14px;
    box-shadow: var(--fm-shadow);
    transition: border-color .2s, box-shadow .2s;
}

    .ihf .post-card:hover {
        border-color: #C9D1FF;
        box-shadow: 0 6px 22px rgba(9, 31, 51, .08);
    }

    .ihf .post-card .profile {
        width: 84px;
        flex: none;
    }

    .ihf .post-card .avatar {
        width: 44px;
        height: 44px;
        overflow: hidden;
        background: var(--fm-mist);
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px var(--fm-line);
    }

    /* no photo and no gender on file: show a neutral placeholder, not an empty circle */
    .ihf .post-card .avatar:not(:has(img)),
    .ihf .post-card .avatar a:not(:has(img)),
    .ihf .comment-section .avatar:not(:has(img)) {
        background: #DCE3EC url(../images/icons/male-user.svg) center / cover no-repeat;
    }

    .ihf .post-card .avatar a { display: block; width: 100%; height: 100%; }

    .ihf .post-card .profile .author {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--fm-ink);
        margin: 6px 0 0;
    }

    .ihf .post-card .profile .duration {
        font-size: 12px;
        color: var(--fm-muted);
        margin: 2px 0 0;
    }

    .ihf .post-card .post-title {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin: 0;
        font-size: 18px;
        line-height: 1.4;
        font-weight: 600;
        color: var(--fm-navy);
    }

        .ihf .post-card .post-title .icon {
            width: 18px;
            flex: none;
            margin-top: 4px;
            opacity: .55;
        }

        .ihf .post-card .post-title a { color: var(--fm-navy); }

            .ihf .post-card .post-title a:hover { color: var(--fm-royal); }

    .ihf .post-card .desc {
        color: #3C4A57;
        font-size: 14px;
        line-height: 1.65;
        margin: 8px 0 14px;
        overflow-wrap: anywhere;
    }

    .ihf .post-card hr {
        margin: 0 0 12px;
        border: 0;
        border-top: 1px solid var(--fm-line);
    }

    /* the four counters: compact meta chips instead of big tiles */
    .ihf .post-card .post-right {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
    }

        .ihf .post-card .post-right .stat-box,
        .ihf .post-card .post-right .stat-box button {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            width: auto;
            height: auto;
            min-height: 34px;
            padding: 5px 12px 5px 6px;
            margin: 0;
            border-radius: 999px;
            background: var(--fm-mist);
            border: 0;
            text-align: left;
            box-shadow: none;
        }

        .ihf .post-card .post-right .stat-box button { padding: 0; background: none; cursor: pointer; }

        .ihf .post-card .post-right .stat-box .icon {
            width: 24px;
            height: 24px;
            padding: 5px;
            margin: 0;
            flex: none;
            border-radius: 50%;
            background: var(--fm-marigold);
        }

        .ihf .post-card .post-right .stat-box .num {
            margin: 0;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.2;
            color: var(--fm-ink);
        }

        .ihf .post-card .post-right .stat-box p {
            margin: 0;
            font-size: 12.5px;
            line-height: 1.2;
            color: var(--fm-muted);
        }

        .ihf .post-card .post-right .stat-box.active .icon,
        .ihf .post-card .post-right .stat-box button.active .icon { background: var(--fm-royal); }

/* status badges */
.ihf .icon-wrap-2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.ihf .fm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--fm-mist);
    color: var(--fm-ink);
}

    .ihf .fm-badge img {
        width: 12px !important;
        height: 12px;
        flex: none;
    }

.ihf .fm-badge--hot { background: #FFEDE6; color: #A2340F; }
.ihf .fm-badge--solved { background: #E3F5EF; color: #0B6B4E; }
.ihf .fm-badge--closed { background: #ECEFF3; color: #3E4C5A; }
.ihf .fm-badge--private { background: #EFEAFB; color: #523A9E; }

/* ---------- pagination / top panel ---------- */
.ihf .top-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.ihf .entries-info { color: var(--fm-muted); }

.ihf .pagination-container { margin-top: 0; width: auto; }

    .ihf .pagination-container .pagination {
        gap: 4px;
        padding: 4px;
        margin: 0;
        border: 1px solid var(--fm-line);
        border-radius: 999px;
        background: #fff;
        flex-wrap: wrap;
    }

    .ihf .pagination-container .page,
    .ihf .pagination-container .arrow-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        width: auto;
        padding: 0 12px;
        border-radius: 999px;
        background: transparent;
        color: var(--fm-ink);
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
    }

        .ihf .pagination-container .page:hover,
        .ihf .pagination-container .arrow-btn:hover { background: var(--fm-mist); color: var(--fm-royal); }

        .ihf .pagination-container .page.active {
            background: var(--fm-navy);
            color: #fff;
            padding: 0 12px;
            border-radius: 999px;
        }

        .ihf .pagination-container .arrow-btn.disabled {
            color: #A7B1BC;
            pointer-events: none;
        }

    .ihf .pagination-container .dots { min-width: 20px; padding: 0 4px; color: var(--fm-muted); }

/* search */
.ihf .search-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ihf .search-label { font-size: 13px; color: var(--fm-muted); }

.ihf .search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--fm-line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
    padding: 0 4px 0 0;
}

    .ihf .search-box input {
        border: 0;
        outline: 0;
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
        background: transparent;
        min-width: 0;
    }

    .ihf .search-box:focus-within { border-color: var(--fm-royal); box-shadow: 0 0 0 3px rgba(42, 70, 255, .15); }

    .ihf .search-box button {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--fm-navy);
        flex: none;
        order: 2;
        padding: 8px;
    }

/* ---------- topic tables (theme, tag, search, all themes) ---------- */
.ihf .forum-wrapper {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    box-shadow: var(--fm-shadow);
    padding: 0;
}

.ihf .forum-table { margin: 0; border-collapse: collapse; width: 100%; }

    .ihf .forum-table thead th {
        background: var(--fm-mist);
        color: var(--fm-muted);
        font-size: 12.5px;
        font-weight: 600;
        border: 0;
        border-bottom: 1px solid var(--fm-line);
        padding: 12px 16px;
    }

.ihf .topics-section table th:nth-child(odd),
.ihf .topics-section table th:nth-child(even) { border-bottom: 1px solid var(--fm-line) !important; }

.ihf .forum-table tbody td {
    border: 0;
    border-bottom: 1px solid var(--fm-line);
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 14px;
}

.ihf .forum-table tbody tr:last-child td { border-bottom: 0; }

.ihf .forum-table tbody tr:hover { background: #FAFBFD; }

.ihf .forum-table .group-name a {
    color: var(--fm-navy);
    font-weight: 500;
    line-height: 1.45;
}

    .ihf .forum-table .group-name a:hover { color: var(--fm-royal); }

.ihf .forum-table .group-icon {
    border-radius: 10px;
    background: #FFF1F0;
}

.ihf .forum-table .last-reply .user { display: inline-flex; align-items: center; gap: 10px; color: var(--fm-ink); }

.ihf .forum-table .last-reply img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

.ihf .forum-table .reply-name { font-weight: 600; font-size: 13px; }

.ihf .forum-table .reply-time { color: var(--fm-muted); font-size: 12px; }

/* ---------- topic detail ---------- */
.ihf .detail-forum-layout .grp-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin: 0 0 16px;
    border-radius: var(--fm-radius);
    background: var(--fm-mist);
}

    .ihf .detail-forum-layout .grp-wrap .grp-title { margin: 0; font-size: 14px; color: var(--fm-muted); }

        .ihf .detail-forum-layout .grp-wrap .grp-title a { color: var(--fm-royal); font-weight: 600; }

    .ihf .detail-forum-layout .grp-wrap > a {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        padding: 6px 16px;
        border-radius: 999px;
        background: var(--fm-navy);
        color: #fff;
        font-size: 13.5px;
        font-weight: 600;
    }

        .ihf .detail-forum-layout .grp-wrap > a:hover { background: var(--fm-royal); text-decoration: none; }

.ihf .detail-forum-layout .post-card { display: block; padding: 22px; }

.ihf .topic-category .category-header .profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
    margin-bottom: 14px;
}

    .ihf .topic-category .category-header .profile .icon-wrap-2 { margin: 0 0 0 auto; }

.ihf .detail-forum-layout .post-card .post-left .profile .author { font-size: 15px; margin: 0; }

.ihf .topic-image-wrapper { border-radius: var(--fm-radius); max-width: 100%; }

    .ihf .topic-image-wrapper img { max-width: 100%; }

.ihf .detail-forum-layout .desc {
    font-size: 15px;
    line-height: 1.75;
    color: #2C3A47;
    overflow-wrap: anywhere;
}

    .ihf .detail-forum-layout .desc img,
    .ihf .detail-forum-layout .desc iframe,
    .ihf .detail-forum-layout .desc table { max-width: 100%; height: auto; }

.ihf .detail-forum-layout .post-card .post-right { margin-top: 14px; }

.ihf .post-card .tags span,
.ihf .tags span {
    border-radius: 999px;
    border-color: var(--fm-line);
}

.ihf .login-box {
    margin-top: 16px;
    padding: 16px;
    border: 1px dashed #C9D1FF;
    border-radius: var(--fm-radius);
    background: var(--fm-royal-tint);
    text-align: center;
}

    .ihf .login-box a { color: var(--fm-royal); font-weight: 600; text-decoration: underline; }

/* replies thread */
.ihf .comment-section {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 22px;
    box-shadow: var(--fm-shadow);
}

    .ihf .comment-section .comment,
    .ihf .comment-section .reply {
        gap: 14px;
        padding: 14px 0;
        margin: 0;
        border-bottom: 1px solid var(--fm-line);
    }

    .ihf .comment-section .reply { border-bottom: 0; padding-top: 10px; }

    .ihf .comment-section .avatar {
        flex: none;
        width: 42px;
        height: 42px;
        padding: 0;
        overflow: hidden;
        background: var(--fm-mist);
    }

        .ihf .comment-section .avatar img { width: 100%; height: 100%; object-fit: cover; }

    .ihf .comment-section .content { min-width: 0; }

    .ihf .comment-section .header { flex-wrap: wrap; gap: 4px 10px; }

        .ihf .comment-section .header .title { font-size: 15px; font-weight: 600; color: var(--fm-navy); }

        .ihf .comment-section .header .time { color: var(--fm-muted); font-size: 12.5px; }

    .ihf .comment-section p {
        font-size: 14.5px;
        line-height: 1.7;
        color: #2C3A47;
        overflow-wrap: anywhere;
    }

    .ihf .comment-section .replies {
        margin-left: 56px;
        padding-left: 16px;
        border-left: 2px solid var(--fm-line);
    }

    .ihf .comment-section .reply-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 34px;
        padding: 4px 14px;
        border-radius: 999px;
        background: var(--fm-mist);
        color: var(--fm-navy);
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
    }

        .ihf .comment-section .reply-btn:hover { background: var(--fm-royal-tint); color: var(--fm-royal); }

    .ihf .comment-section .action-icon { color: var(--fm-muted); padding: 6px; }

        .ihf .comment-section .action-icon:hover { color: var(--fm-royal); }

.ihf .comment-box {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius);
    padding: 16px;
}

.ihf .checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }

/* ---------- forms (create post, reply editor) ---------- */
.ihf .ask-quez,
.ihf .topics-section.ask-quez {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 24px;
    box-shadow: var(--fm-shadow);
}

.ihf .form-group label,
.ihf .form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--fm-navy);
    margin-bottom: 6px;
}

.ihf .form-control,
.ihf .ask-quez .form-control,
.ihf .custom_tags {
    min-height: 44px;
    border: 1px solid #CDD5DF;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14.5px;
    color: var(--fm-ink);
    background: #fff;
    box-shadow: none;
    min-width: 0 !important;
    max-width: 100%;
}

    .ihf .form-control:focus,
    .ihf .custom_tags:focus-within {
        border-color: var(--fm-royal);
        box-shadow: 0 0 0 3px rgba(42, 70, 255, .15);
        outline: 0;
    }

.ihf .form-text,
.ihf .char-counter { color: var(--fm-muted); font-size: 12.5px; }

.ihf .required { color: #C62828; }

.ihf .editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    border: 1px solid #CDD5DF;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--fm-mist);
}

    .ihf .editor-toolbar .editor-btn {
        min-width: 36px;
        min-height: 36px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--fm-ink);
    }

        .ihf .editor-toolbar .editor-btn:hover { background: #fff; color: var(--fm-royal); }

.ihf .file-upload-label {
    border: 1.5px dashed #B9C3CF;
    border-radius: var(--fm-radius);
    background: var(--fm-mist);
    color: var(--fm-muted);
}

    .ihf .file-upload-label:hover { border-color: var(--fm-royal); color: var(--fm-royal); }

.ihf .form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.ihf .preview-box {
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    background: #fff;
}

/* ---------- members ---------- */
.ihf .member-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.ihf .member-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 0 14px 16px;
    overflow: hidden;
    box-shadow: var(--fm-shadow);
    transition: border-color .2s, box-shadow .2s;
}

    .ihf .member-card:hover { border-color: #C9D1FF; box-shadow: 0 6px 22px rgba(9, 31, 51, .08); }

    .ihf .member-card .cover-bg {
        height: 64px;
        margin: 0 -14px;
        border-radius: 0;
        background: linear-gradient(120deg, var(--fm-navy) 0%, var(--fm-navy-2) 100%);
    }

    .ihf .member-card .profile-pic {
        width: 84px;
        height: 84px;
        margin: -42px auto 10px;
        border-radius: 50%;
        border: 4px solid #fff;
        background: var(--fm-mist);
        overflow: hidden;
        position: relative;
    }

        .ihf .member-card .profile-pic a { display: block; width: 100%; height: 100%; }

            /* members without a photo or gender get a neutral placeholder instead of an empty circle */
            .ihf .member-card .profile-pic a:not(:has(img)) {
                background: #DCE3EC url(../images/icons/male-user.svg) center / cover no-repeat;
            }

        .ihf .member-card .profile-pic img { width: 100%; height: 100%; object-fit: cover; }

    .ihf .member-card .user-name { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.35; }

        .ihf .member-card .user-name a { color: var(--fm-navy); }

    .ihf .member-card .user-handle {
        font-size: 12.5px;
        color: var(--fm-muted);
        margin: 2px 0 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ihf .member-card .duration {
        display: inline-block;
        font-size: 12px;
        color: var(--fm-muted);
        background: var(--fm-mist);
        border-radius: 12px;
        padding: 3px 10px;
        margin: 0;
    }

/* ---------- profile page ---------- */
.ihf .profile-card,
.ihf .menu-card,
.ihf .forum-profile-cards,
.ihf .stats-wrapper .stat-item {
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow);
}

.ihf .profile-card .user-name { color: var(--fm-navy); font-weight: 600; }

.ihf .profile-card .user-handle { color: var(--fm-muted); }

.ihf .round-btn {
    min-height: 40px;
    border-radius: 999px;
    background: var(--fm-royal);
    color: #fff;
    font-weight: 600;
}

.ihf .menu-card .menu-list li a { border-radius: 10px; min-height: 42px; }

.ihf .menu-card .menu-list li.active a,
.ihf .menu-card .menu-list li a:not(.active):hover {
    background: var(--fm-navy);
    color: #fff;
}

.ihf .menu-card .menu-list li:not(.active) a:not(:hover) { background: transparent; color: var(--fm-ink); }

/* one colour for the three profile counters instead of red / blue / teal */
.ihf .stats-wrapper .icon {
    background: var(--fm-navy) !important;
}

.ihf .stats-wrapper .text strong { color: var(--fm-navy); }

.ihf .profile-content,
.ihf .profile-container-2 {
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow);
}

/* ---------- forum info partial (recent posts page) ---------- */
.ihf .forum-info {
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius-lg);
    padding: 18px 20px;
    box-shadow: var(--fm-shadow);
}

    .ihf .forum-info .forum-stats { display: flex; flex-wrap: wrap; gap: 10px; }

    .ihf .forum-info .fi-stat {
        flex: 1 1 110px;
        background: var(--fm-mist);
        border-radius: var(--fm-radius);
        padding: 10px 14px;
    }

    .ihf .forum-info .fi-num { display: block; font-family: var(--fm-display); font-size: 24px; font-weight: 700; color: var(--fm-navy); }

    .ihf .forum-info .fi-label { font-size: 12.5px; color: var(--fm-muted); }

/* =====================================================================
   Community statistics - the one bold moment: a navy "ticket" with a
   perforated stub, numbers set large in Playfair.
   ===================================================================== */
.ihf .heading-md { margin-top: 44px; }

.ihf .stats-container.fm-stats {
    background: none;
    border: 0;
    padding: 0;
    margin-top: 18px;
    border-radius: 0;
}

.ihf .fm-stats-ticket {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    background: var(--fm-navy);
    color: #fff;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
}

    /* faint route line, a nod to a travel map */
    .ihf .fm-stats-ticket::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background:
            radial-gradient(120% 90% at 0% 0%, rgba(42, 70, 255, .35) 0%, rgba(42, 70, 255, 0) 55%),
            radial-gradient(80% 80% at 100% 100%, rgba(255, 195, 0, .10) 0%, rgba(255, 195, 0, 0) 60%);
    }

.ihf .fm-stats .top-stats {
    list-style: none;
    margin: 0;
    padding: 30px 32px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ihf .fm-stats .stat-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 12px 0 0;
    margin: 0;
    background: none;
    border: 0;
    width: auto;
    height: auto;
}

    .ihf .fm-stats .stat-box + .stat-box {
        padding-left: 18px;
        border-left: 1px solid rgba(255, 255, 255, .12);
    }

    .ihf .fm-stats .stat-box .icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .1);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

        .ihf .fm-stats .stat-box .icon img { filter: brightness(0) invert(1); opacity: .9; }

    .ihf .fm-stats .stat-box .content { display: flex; flex-direction: column; gap: 2px; }

    .ihf .fm-stats .stat-box .num {
        font-family: var(--fm-display);
        font-size: 44px;
        font-weight: 700;
        line-height: 1;
        color: #fff;
        font-variant-numeric: lining-nums tabular-nums;
    }

    .ihf .fm-stats .stat-box:first-child .num { color: var(--fm-marigold); }

    /* .label collides with the Bootstrap 3 badge class - reset it */
    .ihf .fm-stats .stat-box .label {
        display: block;
        padding: 0;
        border-radius: 0;
        font-weight: 400;
        text-align: left;
        white-space: normal;
        font-size: 13px;
        color: #B8C6D6;
        line-height: 1.35;
    }

/* the perforated stub */
.ihf .fm-stats .fm-stats-stub {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 22px 26px 22px 34px;
    margin: 0;
    border: 0;
    border-left: 2px dashed rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .04);
}

    .ihf .fm-stats .fm-stats-stub::before,
    .ihf .fm-stats .fm-stats-stub::after {
        content: "";
        position: absolute;
        left: -13px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #fff;
    }

    .ihf .fm-stats .fm-stats-stub::before { top: -12px; }
    .ihf .fm-stats .fm-stats-stub::after { bottom: -12px; }

    .ihf .fm-stats .fm-stats-stub .item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 12px;
        margin: 0 -12px;
        border-radius: 14px;
        color: #fff;
        text-decoration: none;
        transition: background-color .2s;
    }

        .ihf .fm-stats .fm-stats-stub .item:hover { background: rgba(255, 255, 255, .08); }

        .ihf .fm-stats .fm-stats-stub .item:focus-visible { outline-color: var(--fm-marigold); }

    .ihf .fm-stats .fm-initial,
    .ihf .fm-stats .fm-stats-stub .mini-icon {
        flex: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        padding: 0;
    }

    .ihf .fm-stats .fm-initial {
        background: var(--fm-marigold);
        color: var(--fm-navy);
        font-family: var(--fm-display);
        font-size: 20px;
        font-weight: 700;
    }

    .ihf .fm-stats .fm-stats-stub .mini-icon {
        background: rgba(255, 255, 255, .12);
        padding: 12px;
    }

        .ihf .fm-stats .fm-stats-stub .mini-icon img { filter: brightness(0) invert(1); }

    .ihf .fm-stats .fm-stats-stub .content { display: flex; flex-direction: column; min-width: 0; }

    .ihf .fm-stats .fm-kicker { font-size: 12px; color: #B8C6D6; line-height: 1.4; }

    .ihf .fm-stats .fm-value {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        color: #fff;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

/* footer row: legend + rules */
.ihf .fm-stats .fm-stats-foot {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    background: none;
    padding: 0;
    margin-top: 16px;
    border-radius: 0;
}

.ihf .fm-legend {
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-radius);
    background: #fff;
}

    .ihf .fm-legend summary {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 48px;
        padding: 12px 18px;
        cursor: pointer;
        list-style: none;
        font-size: 14px;
        font-weight: 600;
        color: var(--fm-navy);
    }

        .ihf .fm-legend summary::-webkit-details-marker { display: none; }

        .ihf .fm-legend summary::after {
            content: "";
            width: 8px;
            height: 8px;
            margin-left: auto;
            border-right: 2px solid currentColor;
            border-bottom: 2px solid currentColor;
            transform: rotate(45deg) translate(-2px, -2px);
            transition: transform .2s;
        }

    .ihf .fm-legend[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

    .ihf .fm-legend[open] summary { border-bottom: 1px solid var(--fm-line); }

    .ihf .fm-legend .block-wrap {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        gap: 18px;
        padding: 16px 18px 18px;
        margin: 0;
    }

    .ihf .fm-legend .fm-legend-title {
        margin: 0 0 10px;
        font-family: var(--fm-body);
        font-size: 12.5px;
        font-weight: 600;
        color: var(--fm-muted);
    }

    .ihf .fm-legend .inline-box,
    .ihf .fm-legend .topic-icons {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .ihf .fm-legend .inline-box { flex-direction: column; align-items: flex-start; }

        .ihf .fm-legend .inline-box .item,
        .ihf .fm-legend .topic-icons li {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px 4px 7px;
            border-radius: 999px;
            background: var(--fm-mist);
            font-size: 13px;
            color: var(--fm-ink);
            line-height: 1.4;
        }

            .ihf .fm-legend .inline-box .item img,
            .ihf .fm-legend .topic-icons li img { width: 15px; height: 15px; flex: none; }

.ihf .fm-rules {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px 20px;
    border: 0;
    border-left: 4px solid var(--fm-marigold);
    border-radius: var(--fm-radius);
    background: #FFF9E6;
}

    .ihf .fm-rules p {
        margin: 0;
        font-size: 13.5px;
        line-height: 1.6;
        color: #3A3220;
    }

    .ihf .fm-rules .fm-btn { min-height: 40px; padding: 8px 18px; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
    .ihf .fm-stats .stat-box .num { font-size: 38px; }
}

@media (max-width: 1080px) {
    .ihf .fm-stats-ticket,
    .ihf .fm-stats .fm-stats-foot { grid-template-columns: minmax(0, 1fr); }

    .ihf .fm-stats .fm-stats-stub {
        border-left: 0;
        border-top: 2px dashed rgba(255, 255, 255, .22);
        flex-direction: row;
        flex-wrap: wrap;
        padding: 18px 26px;
        gap: 8px 24px;
    }

        .ihf .fm-stats .fm-stats-stub .item { flex: 1 1 240px; margin: 0; }

        .ihf .fm-stats .fm-stats-stub::before,
        .ihf .fm-stats .fm-stats-stub::after { top: -13px; bottom: auto; }

        .ihf .fm-stats .fm-stats-stub::before { left: -12px; }
        .ihf .fm-stats .fm-stats-stub::after { left: auto; right: -12px; }
}

@media (max-width: 768px) {
    .ihf .forum { padding: 16px 14px 32px; }

    .ihf .page-title { font-size: 28px; margin-bottom: 20px; }

    .ihf h1.center-title,
    .ihf .detail-forum-layout .center-header h1.center-title { font-size: 24px !important; flex-basis: 100%; }

    .ihf .center-header .center-title { font-size: 19px !important; }

    .ihf .center-header.inline .ask-btn { width: 100%; }

    .ihf .forum-filters { width: 100%; border-radius: 16px; }

        .ihf .forum-filters .filter-tab { flex: 1 1 auto; justify-content: center; padding: 8px 12px; }

    .ihf .post-card { flex-direction: column; padding: 16px; gap: 10px; }

        .ihf .post-card .profile {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 10px;
            text-align: left !important;
        }

            .ihf .post-card .profile > a {
                display: flex;
                align-items: center;
                gap: 10px;
                min-width: 0;
            }

            .ihf .post-card .profile .avatar { margin: 0; flex: none; width: 36px; height: 36px; }

            .ihf .post-card .profile .author { margin: 0; white-space: nowrap; }

            .ihf .post-card .profile .duration { margin: 0; }

                .ihf .post-card .profile .duration::before { content: "\00B7"; margin-right: 8px; color: var(--fm-muted); }

            .ihf .post-card .profile .icon-wrap-2 { margin: 0; justify-content: flex-start; }

        .ihf .post-card .post-title { font-size: 16.5px; }

        .ihf .post-card .post-title .icon { display: none; }

        .ihf .post-card .post-right { gap: 6px; }

    .ihf .topic-category .category-header .profile .icon-wrap-2 { margin-left: 0; }

    .ihf .detail-forum-layout .post-card { padding: 16px; }

    .ihf .detail-forum-layout .desc { font-size: 14.5px; }

    .ihf .topic-image-wrapper { height: 200px; }

    .ihf .comment-section { padding: 14px; }

        .ihf .comment-section .replies { margin-left: 12px; padding-left: 12px; }

    .ihf .top-panel { flex-direction: column; align-items: stretch; }

    .ihf .pagination-container { justify-content: center; }

    .ihf .search-wrapper { flex-direction: column; align-items: stretch; }

    /* tables become stacked cards */
    .ihf .forum-wrapper { overflow: visible; }

    .ihf .forum-table thead { display: none; }

    .ihf .forum-table,
    .ihf .forum-table tbody,
    .ihf .forum-table tr,
    .ihf .forum-table td { display: block; width: 100%; }

        .ihf .forum-table tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--fm-line); }

            .ihf .forum-table tbody tr:last-child { border-bottom: 0; }

        .ihf .forum-table tbody td {
            border: 0;
            padding: 4px 0;
            text-align: left !important;
        }

            .ihf .forum-table tbody td::before { display: none; }

            .ihf .forum-table tbody td > *,
            .ihf .forum-table .group-name,
            .ihf .forum-table .last-reply {
                justify-content: flex-start;
                text-align: left;
            }

            .ihf .forum-table .group-name a { font-size: 15px; }

            .ihf .forum-table tbody td[data-label="Reply"],
            .ihf .forum-table tbody td[data-label="Replies"],
            .ihf .forum-table tbody td[data-label="Topics"] {
                display: inline-block;
                width: auto;
                margin-right: 14px;
                font-size: 12.5px;
                color: var(--fm-muted);
            }

                .ihf .forum-table tbody td[data-label="Topics"]::after { content: " topics"; }

                .ihf .forum-table tbody td[data-label="Reply"]::after,
                .ihf .forum-table tbody td[data-label="Replies"]::after { content: " replies"; }

    .ihf .member-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .ihf .fm-stats .top-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 22px 20px;
        gap: 18px 0;
    }

    .ihf .fm-stats .stat-box { flex-direction: row; align-items: center; gap: 12px; padding: 0 10px 0 0; }

        .ihf .fm-stats .stat-box + .stat-box { padding-left: 0; border-left: 0; }

        .ihf .fm-stats .stat-box:nth-child(even) { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .12); }

        .ihf .fm-stats .stat-box .num { font-size: 32px; }

        .ihf .fm-stats .stat-box .label { font-size: 12px; }

    .ihf .fm-stats .fm-stats-stub { padding: 16px 20px; }

        .ihf .fm-stats .fm-stats-stub .item { flex-basis: 100%; }

    .ihf .fm-legend .block-wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 400px) {
    .ihf .fm-stats .stat-box .icon { display: none; }

    .ihf .member-card .profile-pic { width: 72px; height: 72px; margin-top: -36px; }
}

@media (prefers-reduced-motion: reduce) {
    .ihf *, .ihf *::before, .ihf *::after { transition: none !important; }
}

/* ---------- List filters (community home Recent / Last 30 days, members) ---------- */
.ihf .ihf-filter {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px;
    margin: 0 0 14px; padding: 12px 14px;
    background: #fff; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); box-shadow: var(--fm-shadow);
}
.ihf .ihf-filter__field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; flex: 0 1 180px; margin: 0; }
.ihf .ihf-filter__field--grow { flex: 1 1 220px; }
.ihf .ihf-filter__label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fm-muted); }
.ihf .ihf-filter input, .ihf .ihf-filter select {
    width: 100%; height: 38px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--fm-ink);
    background: var(--fm-mist); border: 1px solid var(--fm-line); border-radius: var(--fm-radius-sm);
}
.ihf .ihf-filter input:focus, .ihf .ihf-filter select:focus { outline: none; border-color: var(--fm-royal); background: #fff; }
.ihf .ihf-filter__actions { display: flex; align-items: center; gap: 10px; }
.ihf .ihf-filter__btn {
    height: 38px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 600; color: #fff;
    background: var(--fm-royal); border: 0; border-radius: var(--fm-radius-sm); cursor: pointer;
}
.ihf .ihf-filter__btn:hover { background: var(--fm-royal-deep); }
.ihf .ihf-filter__reset { font-size: 13px; color: var(--fm-muted); text-decoration: underline; }
.ihf .ihf-filter__empty { padding: 18px; text-align: center; color: var(--fm-muted); background: var(--fm-mist); border-radius: var(--fm-radius); }
@media (max-width: 575px) {
    .ihf .ihf-filter__field, .ihf .ihf-filter__field--grow { flex: 1 1 100%; }
    .ihf .ihf-filter__actions { width: 100%; }
    .ihf .ihf-filter__btn { flex: 1; }
}

/* SEO-25: page titles promoted to h1/h2 keep their old h4/h2 look */
.ihf h1.user-name { font-size: 18px; margin-top: 10px; margin-bottom: 10px; line-height: 1.1; }
.ihf .member-card h2.user-name { font-size: 15px; margin: 0; line-height: 1.35; }
.ihf .center-header h1.center-title.fm-page-title { font-family: var(--fm-body) !important; font-size: 22px !important; line-height: 1.3 !important; font-weight: 600 !important; margin: 0; }
@media (max-width: 768px) { .ihf .center-header h1.center-title.fm-page-title { font-size: 19px !important; flex-basis: auto; } }
