:root {
    --thm-bg: #f3f5ef;
    --thm-card: #ffffff;
    --thm-text: #111827;
    --thm-muted: #6b7280;
    --thm-accent: #294c39;
    --thm-accent-soft: #e9f0ea;
    --thm-border: #e5e7eb;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "DM Sans", Inter, Arial, sans-serif;
    background: var(--thm-bg);
    color: var(--thm-text);
}
.thm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.thm-container { width: min(1200px, 92vw); margin: 0 auto; }
.thm-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .06);
    backdrop-filter: blur(14px);
}
.thm-header-top .thm-container { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; min-height: 76px; }
.thm-brand a { font-weight: 800; text-decoration: none; color: var(--thm-text); font-size: 1.4rem; }
.thm-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-height: 58px;
}
.thm-brand .custom-logo {
    width: auto;
    max-width: 260px;
    max-height: 58px;
    height: auto;
    object-fit: contain;
}
.thm-burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--thm-border);
    border-radius: 12px;
    background: #fff;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .08);
    position: relative;
}
.thm-burger span {
    position: absolute;
    left: 11px;
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--thm-accent);
    transform-origin: center;
    transition: transform .22s ease, opacity .18s ease, top .22s ease;
}
.thm-burger span:nth-child(1) { top: 14px; }
.thm-burger span:nth-child(2) { top: 21px; }
.thm-burger span:nth-child(3) { top: 28px; }
.thm-burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.thm-burger.is-open span:nth-child(2) { opacity: 0; }
.thm-burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.thm-main-nav { margin-left: auto; min-width: 0; }
.thm-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: .28rem; min-height: 52px; align-items: center; }
.thm-nav-list li { position: relative; list-style: none; }
.thm-nav-list a { color: var(--thm-text); text-decoration: none; font-weight: 700; }
.thm-nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 .85rem;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.thm-nav-list > li > a:hover,
.thm-nav-list > li:focus-within > a {
    background: var(--thm-accent-soft);
    color: var(--thm-accent);
    transform: translateY(-1px);
}
.thm-nav-list > .menu-item-has-children > a::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .65;
    transition: transform .2s ease;
}
.thm-nav-list > .menu-item-has-children:hover > a::after,
.thm-nav-list > .menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translateY(-1px);
}
.thm-nav-list > .menu-item-has-children {
    padding-bottom: 14px;
    margin-bottom: -14px;
}
.thm-nav-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--thm-border);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(17, 24, 39, .14);
    padding: .55rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 80;
}
.thm-nav-list .sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}
.thm-nav-list .sub-menu li { width: 100%; }
.thm-nav-list .sub-menu a {
    display: block;
    min-height: auto;
    border-radius: 10px;
    padding: .62rem .85rem;
    font-weight: 650;
    white-space: normal;
    transition: background .2s ease, color .2s ease, padding-left .2s ease;
}
.thm-nav-list .sub-menu a:hover,
.thm-nav-list .sub-menu li:focus-within > a {
    background: var(--thm-accent-soft);
    color: var(--thm-accent);
    padding-left: 1rem;
}
.thm-nav-list li:hover > .sub-menu,
.thm-nav-list li:focus-within > .sub-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
@media (min-width: 992px) {
    .thm-header-layout-centered .thm-header-top .thm-container {
        flex-direction: column;
        justify-content: center;
        gap: .45rem;
        min-height: 118px;
        padding-top: .75rem;
        padding-bottom: .65rem;
    }
    .thm-header-layout-centered .thm-brand {
        width: 100%;
        text-align: center;
    }
    .thm-header-layout-centered .thm-brand .custom-logo-link {
        justify-content: center;
    }
    .thm-header-layout-centered .thm-main-nav {
        width: 100%;
        margin-left: 0;
    }
    .thm-header-layout-centered .thm-nav-list {
        justify-content: center;
        flex-wrap: wrap;
        min-height: 44px;
    }
}
.thm-main { padding: 1.75rem 0 2rem; }
.thm-layout, .thm-home-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.thm-home-main { min-width: 0; }
.thm-content, .thm-sidebar, .thm-card { min-width: 0; }
.thm-sidebar { position: sticky; top: 110px; }
.thm-single .thm-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
.thm-single .thm-content {
    min-width: 0;
    flex: 1 1 auto;
}
.thm-single .thm-sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    position: sticky;
    top: 110px;
    align-self: start;
}
.thm-single .thm-single-content img,
.thm-single .thm-single-content iframe,
.thm-single .thm-single-content table {
    max-width: 100%;
}
.thm-widget {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .06);
}
.thm-widget-title {
    margin: 0 0 .9rem;
    font-size: 1.05rem;
    color: var(--thm-accent);
}
.thm-widget-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-top: .4rem;
    border-radius: 999px;
    background: var(--thm-accent);
}
.thm-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.thm-widget li {
    border-bottom: 1px solid rgba(229, 231, 235, .8);
    padding: .52rem 0;
    color: var(--thm-muted);
    font-size: .94rem;
}
.thm-widget li:last-child { border-bottom: 0; }
.thm-widget a {
    color: var(--thm-text);
    text-decoration: none;
    font-weight: 650;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.thm-widget a:hover { color: var(--thm-accent); }
.widget_search .search-form {
    display: flex;
    gap: .55rem;
    align-items: center;
}
.widget_search .search-form label {
    flex: 1 1 auto;
}
.widget_search .search-field {
    width: 100%;
    border: 1px solid var(--thm-border);
    border-radius: 11px;
    background: #f9fafb;
    color: var(--thm-text);
    padding: .68rem .78rem;
    outline: 0;
    font-size: .95rem;
}
.widget_search .search-field:focus {
    border-color: var(--thm-accent);
    box-shadow: 0 0 0 3px rgba(41, 76, 57, .15);
    background: #fff;
}
.widget_search .search-submit {
    border: 0;
    border-radius: 11px;
    background: var(--thm-accent);
    color: #fff;
    font-weight: 700;
    padding: .68rem .9rem;
    cursor: pointer;
}
.widget_search .search-submit:hover {
    filter: brightness(1.06);
}
.widget_categories > ul,
.thm-sidebar .widget_categories ul,
.thm-widget.widget_categories ul,
.thm-sidebar .wp-block-categories-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: .7rem;
    row-gap: .1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.widget_categories li,
.thm-sidebar .widget_categories li,
.thm-sidebar .wp-block-categories-list li {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: .35rem;
    border-bottom: 0;
    padding: .4rem 0;
    width: 100%;
}
.widget_categories li a,
.thm-sidebar .widget_categories li a,
.thm-sidebar .wp-block-categories-list li a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    line-height: 1.25;
    min-width: 0;
}
.widget_categories li a::before,
.thm-sidebar .widget_categories li a::before,
.thm-sidebar .wp-block-categories-list li a::before {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--thm-accent);
    opacity: .8;
}
.widget_categories .children,
.thm-sidebar .widget_categories .children {
    display: none;
}
.thm-sidebar .pfy-cate-item-wrap.cat-style1 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem;
    margin: 0 !important;
}
.thm-sidebar .pfy-cate-item-wrap.cat-style1 .pfy-cat-item-col {
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}
.thm-sidebar .pfy-cate-item-wrap.cat-style1 .pfy-cat-item a {
    padding: .65rem .45rem;
    font-size: .78rem;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.2;
}
.thm-sidebar .pfy-cate-item-wrap.cat-style1 .pfy-cat-item {
    margin-bottom: 0;
    border-radius: 12px;
}
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tagcloud a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--thm-border);
    border-radius: 999px;
    background: var(--thm-accent-soft);
    color: var(--thm-accent) !important;
    padding: .38rem .68rem;
    font-size: .84rem !important;
    line-height: 1.1;
    text-decoration: none;
    font-weight: 750;
}
.tagcloud a:hover {
    background: var(--thm-accent);
    border-color: var(--thm-accent);
    color: #fff !important;
    transform: translateY(-1px);
}
.tagcloud .tag-link-count { opacity: .72; margin-left: .18rem; }
.thm-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 992px) {
    .home.thm-home-grid-2 .thm-home-main .thm-post-grid:not(.thm-post-grid--featured):not(.thm-post-grid--archive) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home.thm-home-grid-3 .thm-home-main .thm-post-grid:not(.thm-post-grid--featured):not(.thm-post-grid--archive) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.thm-section { margin-bottom: 1.35rem; }
.thm-home-featured {
    margin-top: 1rem;
    margin-bottom: .5rem;
}
.thm-section-title {
    margin: 0 0 .9rem;
    font-size: 1.45rem;
    line-height: 1.1;
    color: var(--thm-accent);
}
.thm-section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--thm-accent);
    border-radius: 999px;
    margin-top: .45rem;
}
/* Homepage: optionally hide featured section title */
.home.thm-hide-featured-title .thm-home-featured .thm-section-title {
    display: none;
}
.thm-post-grid--featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.thm-post-grid--featured .thm-card:first-child,
.thm-post-grid--featured .thm-card:nth-child(2) {
    grid-column: span 2;
}
.thm-post-grid--featured .thm-card:first-child .thm-card-link,
.thm-post-grid--featured .thm-card:nth-child(2) .thm-card-link {
    min-height: 330px;
}
.thm-archive-head {
    margin-bottom: 1rem;
}
.thm-archive-title {
    margin: 0;
    color: var(--thm-accent);
    font-size: clamp(1.5rem, 2vw, 2rem);
}
.thm-archive-description {
    margin-top: .55rem;
    color: var(--thm-muted);
}
.thm-empty-state {
    background: #fff;
    border: 1px solid var(--thm-border);
    border-radius: 12px;
    padding: .9rem 1rem;
    color: var(--thm-muted);
}
.thm-load-more-wrap { text-align: center; margin-top: 1rem; }
.thm-load-more-btn {
    border: 0;
    background: var(--thm-accent);
    color: #fff;
    border-radius: 999px;
    padding: .72rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
}
.thm-post-grid--archive {
    margin-bottom: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Archive/search/listing with sidebar: never squeeze 3 cards beside sidebar on desktop */
.thm-layout .thm-content > .thm-post-grid--archive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.thm-card {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--thm-card);
    box-shadow: 0 12px 28px rgba(17, 24, 39, .08);
}
.thm-card-link {
    position: relative;
    display: flex;
    min-height: 245px;
    align-items: flex-end;
    text-decoration: none;
    color: inherit;
    isolation: isolate;
}
.thm-card img,
.thm-card-placeholder {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.thm-card-placeholder {
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.26), transparent 26%),
        radial-gradient(circle at 82% 14%, rgba(255,255,255,.18), transparent 24%),
        linear-gradient(135deg, var(--thm-accent), #6f8f78 58%, var(--thm-accent-soft));
}
.thm-card-placeholder::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 14px;
}
.thm-card-placeholder::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,.55);
    box-shadow: inset 0 -18px 0 rgba(255,255,255,.16);
    transform: translate(-50%, -50%) rotate(-4deg);
}
.thm-card--image-missing img {
    display: none;
}
.thm-card--image-missing .thm-card-link {
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.26), transparent 26%),
        radial-gradient(circle at 82% 14%, rgba(255,255,255,.18), transparent 24%),
        linear-gradient(135deg, var(--thm-accent), #6f8f78 58%, var(--thm-accent-soft));
}
.thm-card-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.18) 62%, rgba(0,0,0,.05));
}
.thm-card:hover img { transform: scale(1.04); }
/* Portrait / full image modes on cards */
.thm-card.thm-img-mode-portrait .thm-card-link {
    min-height: auto;
    aspect-ratio: 5 / 6;
    align-items: flex-end;
    background: #e8ece6;
}
.thm-card.thm-img-mode-portrait .thm-card img,
.thm-card.thm-img-mode-full .thm-card img {
    object-fit: contain;
    background: #e8ece6;
}
.thm-card.thm-img-mode-full .thm-card-link {
    min-height: auto;
    aspect-ratio: 4 / 5;
    align-items: flex-end;
    background: #e8ece6;
}
.thm-card.thm-img-mode-portrait:hover img,
.thm-card.thm-img-mode-full:hover img {
    transform: scale(1.02);
}
.thm-post-grid--featured .thm-card.thm-img-mode-portrait:first-child .thm-card-link,
.thm-post-grid--featured .thm-card.thm-img-mode-portrait:nth-child(2) .thm-card-link,
.thm-post-grid--featured .thm-card.thm-img-mode-full:first-child .thm-card-link,
.thm-post-grid--featured .thm-card.thm-img-mode-full:nth-child(2) .thm-card-link {
    min-height: auto;
    aspect-ratio: 5 / 6;
}
.thm-card-content { display: block; width: 100%; padding: 1rem; color: #fff; }
.thm-card-category {
    display: inline-flex;
    margin-bottom: .5rem;
    border-radius: 999px;
    background: var(--thm-accent);
    padding: .25rem .6rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.thm-legacy-cat {
    display: inline-flex;
    border-radius: 999px;
    background: var(--thm-accent-soft);
    color: var(--thm-accent);
    padding: .2rem .55rem;
    font-size: .72rem;
    font-weight: 700;
}
.thm-legacy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .55rem;
}
.thm-legacy-badge {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    color: #fff;
    padding: .22rem .58rem;
    font-size: .72rem;
    font-weight: 700;
}
.thm-card h2,
.thm-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.25;
    text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.thm-post-grid--featured .thm-card:first-child h3,
.thm-post-grid--featured .thm-card:nth-child(2) h3 {
    font-size: clamp(1.35rem, 2vw, 2rem);
}
.thm-post-grid--archive .thm-card-link {
    min-height: 280px;
}
.thm-post-grid--archive .thm-card h2 {
    font-size: 1.12rem;
    line-height: 1.3;
}
.thm-post-grid--archive .thm-card-content,
.thm-post-grid--archive .thm-card h2 {
    padding: 1.05rem;
}
.thm-post-grid--archive .thm-card h2 {
    margin: 0;
}
.thm-post-grid--archive .thm-card-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0));
    z-index: -1;
}
.thm-content .pagination,
.thm-content .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: 1.2rem;
}
.thm-content .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--thm-border);
    background: #fff;
    color: var(--thm-text);
    text-decoration: none;
    font-weight: 700;
    padding: 0 .7rem;
}
.thm-content .page-numbers.current {
    background: var(--thm-accent);
    color: #fff;
    border-color: var(--thm-accent);
}
.thm-content .page-numbers:hover {
    border-color: var(--thm-accent);
    color: var(--thm-accent);
}
.thm-single-hero { position: relative; margin-bottom: 1.25rem; min-height: 360px; display: flex; align-items: end; }
.thm-single-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thm-single-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.2)); }
.thm-single-hero-inner { position: relative; z-index: 1; padding-bottom: 2rem; }
.thm-single-hero h1 { color: #fff; margin: 0; max-width: 800px; }
.thm-single.thm-img-mode-portrait .thm-single-hero,
.thm-single.thm-img-mode-full .thm-single-hero {
    min-height: 0;
    display: block;
    background: var(--thm-bg);
    margin-bottom: 1rem;
}
.thm-single.thm-img-mode-portrait .thm-single-hero-bg,
.thm-single.thm-img-mode-full .thm-single-hero-bg {
    position: relative;
    width: min(100%, 560px);
    margin: 0 auto;
    background: #e8ece6;
    border-radius: 14px;
    overflow: hidden;
}
.thm-single.thm-img-mode-portrait .thm-single-hero-bg {
    aspect-ratio: 5 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thm-single.thm-img-mode-full .thm-single-hero-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: min(78vh, 860px);
}
.thm-single.thm-img-mode-portrait .thm-single-hero-bg img,
.thm-single.thm-img-mode-full .thm-single-hero-bg img {
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.thm-single.thm-img-mode-full .thm-single-hero-bg img {
    max-height: min(78vh, 860px);
}
.thm-single.thm-img-mode-portrait .thm-single-hero-overlay,
.thm-single.thm-img-mode-full .thm-single-hero-overlay {
    display: none;
}
.thm-single.thm-img-mode-portrait .thm-single-hero-inner,
.thm-single.thm-img-mode-full .thm-single-hero-inner {
    padding: 1rem 0 0;
}
.thm-single.thm-img-mode-portrait .thm-single-hero h1,
.thm-single.thm-img-mode-full .thm-single-hero h1 {
    color: var(--thm-text);
}
.thm-single.thm-img-mode-portrait .thm-single-meta,
.thm-single.thm-img-mode-full .thm-single-meta {
    color: var(--thm-muted);
}
.thm-single-meta { margin-top: .75rem; color: rgba(255,255,255,.9); display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; }
.thm-single-meta-dot { opacity: .8; }
.thm-single-content { background: #fff; border: 1px solid var(--thm-border); border-radius: 12px; padding: 1.25rem; }
.thm-single-content a:not(.wp-block-button__link):not(.button),
.thm-page-body a:not(.wp-block-button__link):not(.button) {
    color: var(--thm-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(41, 76, 57, .35);
    font-weight: 650;
    transition: color .2s ease, text-decoration-color .2s ease;
}
.thm-single-content a:not(.wp-block-button__link):not(.button):hover,
.thm-page-body a:not(.wp-block-button__link):not(.button):hover,
.thm-single-content a:not(.wp-block-button__link):not(.button):focus-visible,
.thm-page-body a:not(.wp-block-button__link):not(.button):focus-visible {
    color: #1f3a2c;
    text-decoration-color: var(--thm-accent);
}
.thm-page-head { margin-bottom: 1rem; }
.thm-page-title {
    margin: 0;
    color: var(--thm-accent);
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    line-height: 1.15;
}
.thm-page-body { margin-top: 0; }
.thm-page-content { min-width: 0; }
.thm-related-posts { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--thm-border); }
.thm-related-posts h2 { margin: 0 0 .9rem; color: var(--thm-accent); }
.thm-footer { background: linear-gradient(180deg, #13201a 0%, #0f1713 100%); color: #e5e7eb; margin-top: 2.4rem; }
.thm-footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 2rem 2.4rem;
    align-items: start;
    padding: 2.4rem 0 2rem;
}
.thm-footer-grid--no-widgets {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}
.thm-footer-brand {
    padding: 0;
}
.thm-footer-logo .custom-logo-link {
    display: inline-flex;
    max-width: 100%;
}
.thm-footer-logo .custom-logo,
.thm-footer-logo .thm-footer-custom-logo {
    width: auto;
    max-width: 240px;
    max-height: 120px;
    height: auto;
    object-fit: contain;
    display: block;
}
.thm-footer-logo-fallback .custom-logo {
    filter: brightness(0) invert(1);
}
.thm-footer-site-name {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
}
.thm-footer-tagline {
    margin: .85rem 0 0;
    color: rgba(229, 231, 235, .82);
    font-size: .95rem;
    line-height: 1.55;
    max-width: 28ch;
}
.thm-footer-links {
    min-width: 0;
}
.thm-footer-links-title {
    margin: 0 0 .85rem;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: .01em;
}
.thm-footer-links-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    background: rgba(255,255,255,.35);
    border-radius: 999px;
    margin-top: .45rem;
}
.thm-footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem 1.25rem;
}
.thm-footer-links-list a {
    color: rgba(229, 231, 235, .92);
    text-decoration: none;
    font-size: .94rem;
    line-height: 1.45;
    display: block;
    padding: .28rem 0;
    transition: color .2s ease, transform .2s ease;
}
.thm-footer-links-list a:hover {
    color: #fff;
    transform: translateX(2px);
}
.thm-footer-widgets {
    display: grid;
    gap: 1rem;
    min-width: 0;
}
.thm-footer-widget-col {
    min-width: 0;
}
.thm-footer .thm-widget {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.thm-footer .widget_media_image {
    display: none;
}
.thm-footer .thm-widget-title {
    color: #fff;
    font-size: 1rem;
    margin-bottom: .65rem;
}
.thm-footer .thm-widget-title::after {
    background: rgba(255,255,255,.35);
}
.thm-footer .thm-widget li {
    border-bottom-color: rgba(255,255,255,.1);
    color: rgba(229, 231, 235, .75);
    padding: .46rem 0;
}
.thm-footer .thm-widget a { color: #e5e7eb; }
.thm-footer .thm-widget a:hover { color: #fff; }
.thm-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: .95rem 0 1.1rem;
}
.thm-footer-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
}
.thm-copyright {
    color: rgba(229, 231, 235, .78);
    font-size: .88rem;
    text-align: center;
}
.thm-mobile-nav { display: none; }
.thm-mobile-overlay { display: none; }

@media (max-width: 991px) {
    .thm-layout, .thm-home-wrap { grid-template-columns: 1fr; }
    .thm-sidebar { position: static; }
    .thm-post-grid,
    .thm-post-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .thm-post-grid--featured .thm-card:first-child,
    .thm-post-grid--featured .thm-card:nth-child(2) { grid-column: span 1; }
    .thm-burger { display: inline-block; flex: 0 0 auto; }
    .thm-main-nav { display: none; }
    .thm-single .thm-layout { display: block; }
    .thm-single .thm-sidebar { position: static; }
    .thm-footer-grid,
    .thm-footer-grid--no-widgets {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .thm-footer-links-list {
        grid-template-columns: 1fr;
    }
    .thm-footer-tagline {
        max-width: none;
    }
    .thm-mobile-close {
        border: 0;
        background: transparent;
        color: #111;
        font-size: 1.1rem;
        font-weight: 700;
        cursor: pointer;
        float: right;
        margin-bottom: .5rem;
    }
    .thm-mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
        z-index: 55;
        border: 0;
        padding: 0;
    }
    .thm-mobile-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    .thm-mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -290px;
        width: 280px;
        height: 100%;
        background: #fff;
        border-left: 1px solid var(--thm-border);
        box-shadow: -18px 0 40px rgba(17, 24, 39, .16);
        transition: right .25s ease;
        z-index: 60;
        padding: 1rem;
        overflow-y: auto;
    }
    .thm-mobile-nav.is-open { right: 0; }
    .thm-mobile-list { list-style: none; margin: 1rem 0 0; padding: 0; clear: both; }
    .thm-mobile-list li { margin: .38rem 0; }
    .thm-mobile-list a {
        display: block;
        border-radius: 10px;
        padding: .55rem .65rem;
        text-decoration: none;
        color: var(--thm-text);
        font-weight: 700;
    }
    .thm-mobile-list a:hover {
        background: var(--thm-accent-soft);
        color: var(--thm-accent);
    }
    .thm-mobile-list .sub-menu {
        list-style: none;
        margin: .45rem 0 .6rem .8rem;
        padding: 0;
    }
}

@media (min-width: 641px) and (max-width: 991px) {
    .thm-latest-feed.thm-latest-feed--preload-balance > .thm-card:last-child:nth-child(odd) {
        display: none;
    }
}

body.thm-no-scroll {
    overflow: hidden;
}

@media (max-width: 640px) {
    .thm-post-grid,
    .thm-post-grid--featured { grid-template-columns: 1fr; }
    .thm-footer-grid { grid-template-columns: 1fr; }
    .thm-footer-bottom-row { justify-content: center; }
    .widget_search .search-form { flex-direction: column; align-items: stretch; }
}
