/* FAME Blog — blog list cards, sidebar widgets, pagination + post detail.
   Loaded by the blog/sidebar elements and the post-detail page. */

.fame-blog-list, .fame-blog-widget, .fame-post-detail { --fb-blue: var(--fame-blue, #0566E3); }
.fame-blog-list *, .fame-blog-widget *, .fame-post-detail * { box-sizing: border-box; }

/* ---- Blog list grid + cards ---------------------------------------------- */
.fame-blog-grid {
    display: grid;
    gap: 30px 24px;
}
.fame-blog-grid.fame-blog-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fame-blog-grid.fame-blog-cols-3 { grid-template-columns: repeat(3, 1fr); }

.fame-blog-card {
    display: flex;
    width: 100%;
    position: relative;
}
.fame-blog-card-wrp {
    display: flex;
    width: 100%;
    flex-direction: column;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 2px 2px 25px rgba(8, 20, 102, 0.08);
    border-radius: 20px;
    overflow: hidden;
    gap: 18px;
    text-align: left;
}
.fame-bc-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.fame-bc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}
.fame-bc-stats-ctwrp {
    display: flex;
    width: 100%;
    justify-content: space-between;
}
.fame-bc-cat {
    background-color: #EAF4FF;
    color: var(--fb-blue);
    padding: 4px 12px;
    border-radius: 5px;
    letter-spacing: .02em;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 22px;
}
.fame-bc-stats {
    display: flex;
    gap: 15px;
}
.fame-bc-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #121F3E;
}
.fame-bc-stat svg {
    width: 18px;
}
.fame-bc-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1 1 auto;
}
.fame-bc-title {
    margin: 0;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 26px;
}
.fame-bc-title a { color: #121F3E; text-decoration: none; }
.fame-bc-title a:hover { color: var(--fb-blue); }
.fame-bc-excerpt {
    margin: 0;
    color: #656D7F;
    flex: 1 1 auto;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
}
.fame-bc-foot {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fame-bc-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    position: relative;
    padding-right: 8px;
}
.fame-bc-author:after {
    content: '';
    position: absolute;
    right: 0;
    top: 11px;
    background-color: #656D7F;
    width: 1px;
    height: 16px;
}
.fame-bc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #dbe4f0;
    flex: 0 0 auto;
}
.fame-bc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fame-bc-authorname {
    color: #121F3E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
}
.fame-bc-date {
    color: #656D7F;
    white-space: nowrap;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 26px;
}

.fame-blog-empty { padding: 40px; text-align: center; color: #6d7688; background: #fff; border-radius: 16px; }

/* ---- Pagination ----------------------------------------------------------- */
.fame-blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}
.fame-bp-num, .fame-bp-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 50%;
    background-color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(8, 20, 102, .05);
    border: 1px solid rgba(32, 33, 36, 0.1);
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    color: #656D7F;
}
.fame-bp-arrow {
    font-size: 16px;
}
.fame-bp-arrow.fame-bp-arrow-previous {
    font-size: 15px;
}
.fame-bp-arrow.fame-bp-arrow-previous i {
    -webkit-transform: scale(-1);
    -moz-transform: scale(-1);
    -ms-transform: scale(-1);
    -o-transform: scale(-1);
    transform: scale(-1);
}
.fame-bp-num:hover, .fame-bp-arrow:hover { color: var(--fb-blue); }
.fame-bp-num.is-active { background: var(--fb-blue); color: #fff; }
.fame-bp-arrow.is-disabled { opacity: .4; pointer-events: none; }
.fame-bp-gap { color: #98a1b3; padding: 0 2px; }

/* ---- Search widget -------------------------------------------------------- */
.fame-blog-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}
.fame-blog-search input {
    width: 100%;
    border: 0;
    border-radius: 80px;
    padding: 14px 52px 14px 20px;
    background-color: #ffffff;
    color: #B6B9C0;
    height: 60px;
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 24px;
    box-shadow: 0px 4px 25px rgba(9, 105, 195, 0.05);
}
.fame-blog-search input::placeholder {
    color: #B6B9C0;
}
.fame-blog-search input:focus {
    outline: none;
    box-shadow: none;
}
.fame-blog-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 100%;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fame-blue, #0566E3);
}
.fame-blog-search button:hover {
    opacity: 0.90;
}

/* ---- Sidebar widget cards ------------------------------------------------- */
.fame-blog-widget {
    margin-bottom: 38px;
    position: relative;
    display: flex;
    width: 100%;
}
.fame-blog-widget-mnwrp {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 2px 2px 25px rgba(8, 20, 102, 0.08);
    border-radius: 20px;
    text-align: left;
    gap: 20px;
}
.fame-bw-title {
    margin: 0;
    width: 100%;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 32px;
    color: #121F3E;
}

.fame-bw-catlist {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}
.fame-bw-catlist li + li { border-top: 1px solid #F7F7F5; }
.fame-bw-catlist li + li a { padding-top: 11px; }
.fame-bw-catlist a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 0 11px 0;
    text-decoration: none;
    color: #33384a;
}
.fame-bw-catico {
    width: 30px;
    height: 30px;
    border-radius: 100px;
    background-color: #eaf1fd;
    color: var(--fb-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: 0 0 auto;
}
.fame-bw-catname {
    flex: 1 1 auto;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: #656D7F;
}
.fame-bw-catlist a:hover .fame-bw-catname { color: var(--fb-blue); }
.fame-bw-catcount {
    color: #656D7F;
    background-color: #F5F8F9;
    border-radius: 10px;
    padding: 2px 12px;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
}
.fame-bw-more { display: inline-block; margin-top: 10px; color: var(--fb-blue); font-weight: 600; font-size: 14px; text-decoration: none; }
.fame-bw-more:hover { text-decoration: underline; }

ul.fame-bw-trendlist {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fame-bw-trendlist li {
    width: 100%;
}
.fame-bw-trendlist a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    align-items: center;
}
.fame-bw-trendthumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #e6ecf5;
    flex: 0 0 auto;
}
.fame-bw-trendthumb img { width: 100%; height: 100%; object-fit: cover; }
.fame-bw-trendtext {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fame-bw-trendtitle {
    color: var(--fb-blue);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}
.fame-bw-trendsub {
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    color: #656D7F;
}

.fame-bw-taglist { display: flex; flex-wrap: wrap; gap: 10px; }
.fame-bw-tag {
    display: inline-block;
    padding: 6px 30px;
    background-color: #ffffff;
    color: #121F3E;
    text-decoration: none;
    border: 1px solid #DAE4EF;
    border-radius: 28px;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 32px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.fame-bw-tag:hover { background: var(--fb-blue); color: #fff; border-color: var(--fb-blue); }

/* ---- Post detail ---------------------------------------------------------- */
.fame-post-detail .fame-pd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
}
.fame-post-detail.fame-pd-left .fame-pd-grid { grid-template-columns: 340px minmax(0, 1fr); }
.fame-post-detail.fame-pd-left .fame-pd-main { order: 2; }
.fame-post-detail.fame-pd-left .fame-pd-sidebar { order: 1; }
.fame-pd-main {
    background-color: #ffffff;
    box-shadow: 2px 2px 25px rgba(8, 20, 102, 0.08);
    border-radius: 20px;
    padding: 10px;
}
.fame-post-detail.fame-pd-full .fame-pd-grid, .fame-post-detail:not(.fame-pd-has-sidebar) .fame-pd-grid { grid-template-columns: minmax(0, 1fr); }

.fame-pd-hero { position: relative; }
.fame-pd-heroimg { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 18px; display: block; }
.fame-pd-titlecard {
    position: relative; margin: -70px 24px 0; z-index: 2;
    background: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(8, 20, 102, .1); padding: 24px 26px;
}
.fame-pd-cat {
    display: inline-block;
    color: var(--fb-blue);
    padding: 3px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: rgba(5, 102, 227, .06);
    border: 1px solid var(--fb-blue);
    border-radius: 10px;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 28px;
}
.fame-pd-title {
    margin: 0 0 16px;
    color: #121F3E;
    font-style: normal;
    font-weight: 800;
    font-size: 30px;
    line-height: 36px;
}
.fame-pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.fame-pd-metaitem {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.fame-pd-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #F7F7F5;
    flex: 0 0 auto;
}
.fame-pd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fame-pd-metaico {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #F7F7F5;
    color: var(--fb-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.fame-pd-metaico svg,
.fame-pd-metaico i {
    color: #656D7F;
    font-size: 20px;
    width: 20px;
}
.fame-pd-metatext { display: flex; flex-direction: column; line-height: 1.25; }
.fame-pd-metatext small {
    color: #656D7F;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}
.fame-pd-metatext b {
    color: #121F3E;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 22px;
}
.fame-pd-body { margin-top: 28px; color: #3a4356; font-size: 15.5px; line-height: 1.8; }
.fame-pd-body h1, .fame-pd-body h2, .fame-pd-body h3, .fame-pd-body h4 {
    margin: 26px 0 12px;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 26px;
    color: #121F3E;
}
.fame-pd-body p {
    margin: 0 0 16px;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    color: #656D7F;
}
.fame-pd-body ul, .fame-pd-body ol { margin: 0 0 16px; padding-left: 22px; }
.fame-pd-body img { max-width: 100%; height: auto; border-radius: 12px; }

.fame-pd-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 20px; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 991px) {
    .fame-post-detail .fame-pd-grid,
    .fame-post-detail.fame-pd-left .fame-pd-grid { grid-template-columns: minmax(0, 1fr); }
    .fame-post-detail.fame-pd-left .fame-pd-main,
    .fame-post-detail.fame-pd-left .fame-pd-sidebar { order: initial; }
    .fame-pd-sidebar { position: static; }
    .fame-blog-grid.fame-blog-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .fame-blog-grid.fame-blog-cols-2, .fame-blog-grid.fame-blog-cols-3 { grid-template-columns: 1fr; }
    .fame-pd-title { font-size: 21px; }
    .fame-pd-titlecard { margin: -50px 12px 0; padding: 18px; }
    .fame-pd-meta { gap: 14px; }
}

/* ---- Post detail: share bar + comments wrapper (list/form css = fame-reviews) */
.fame-pd-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    background-color: #EAF4FF;
    border-radius: 14px;
    padding: 20px 22px;
    margin-top: 32px;
}
.fame-pd-share-label,
.fame-pd-share-tagslabel {
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    color: #121F3E;
}
.fame-pd-share-icons { display: inline-flex; gap: 10px; }
.fame-pd-share-icons a { width: 34px; height: 34px; border-radius: 50%; background: var(--fb-blue, #0566E3); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; text-decoration: none; }
.fame-pd-share-icons a:hover { opacity: .88; color: #fff; }
.fame-pd-share-tags { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-left: auto; }

.fame-pd-share-tag {
    background-color: #ffffff;
    color: #121F3E;
    border-radius: 22px;
    padding: 7px 25px;
    text-decoration: none;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 32px;
}
.fame-pd-share-tag:hover { background: var(--fb-blue, #0566E3); color: #fff; }
.fame-post-comments { margin-top: 30px; }
@media (max-width: 575px) { .fame-pd-share-tags { margin-left: 0; } }

/* ---- Category / tag filtering -------------------------------------------- */
/* Icons are inline SVG (no icon font is loaded on the frontend), so size them
   here instead of relying on font-size. */
.fame-bw-catico svg { width: 17px; height: 17px; }

/* Active = the category/tag currently filtering the list. Clicking it clears. */
.fame-bw-catlist li.is-active a { color: var(--fb-blue); font-weight: 600; }
.fame-bw-catlist li.is-active .fame-bw-catico { background: var(--fb-blue); color: #fff; }
.fame-bw-tag.is-active { background: var(--fb-blue); color: #fff; border-color: var(--fb-blue); }

/* Banner above the grid naming the active filter. */
.fame-blog-filter {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    margin: 0 0 20px; padding: 11px 16px;
    background: #eaf1fd; border-radius: 10px;
    font-size: 14px; color: #33384a;
}
.fame-blog-filter strong { color: #121F3E; }
.fame-blog-filter-clear {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--fb-blue); font-weight: 600; text-decoration: none;
}
.fame-blog-filter-clear:hover { text-decoration: underline; }
.fame-blog-filter-clear svg { width: 14px; height: 14px; }
