/* ============================================================
   BASE.CSS — meble-dla-dziecka.pl (Pixwell Mom 1:1)
   Core styles: reset, layout, header, cards, sidebar, footer, responsive

   @author  Damian Zięba | https://semtak.pl
   @version 2.0.0
   ============================================================ */

/* ─── 1. CSS Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--color-link-hover); }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.25;
}
p { margin-bottom: 16px; line-height: 1.7; }
p:last-child { margin-bottom: 0; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ─── 2. Base Typography ─── */
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

/* ─── 3. Layout ─── */
.stb-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.stb-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    padding-top: 32px;
    padding-bottom: 48px;
}

.stb-main { min-width: 0; }

/* ─── 4. Skip Link ─── */
.screen-reader-text,
.sr-only {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.stb-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--color-primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
}

.stb-skip-link:focus {
    top: 8px;
    color: #fff;
}

/* ─── Focus Styles ─── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ─── 5. Header ─── */
.stb-header {
    background: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.stb-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.stb-header-logo {
    flex-shrink: 0;
}

.stb-header-logo .custom-logo {
    max-height: 60px;
    width: auto;
}

.stb-logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-header-text);
    white-space: nowrap;
}

.stb-logo-text:hover {
    color: var(--color-primary);
}

/* Navigation */
.stb-nav {
    display: none;
}

.stb-menu {
    display: flex;
    gap: 24px;
    list-style: none;
}

.stb-menu > li {
    position: relative;
}

.stb-menu > li > a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-header-text);
    padding: 24px 0;
    display: block;
    position: relative;
    transition: color .25s ease;
}

.stb-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 18px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width .3s ease;
}

.stb-menu > li > a:hover::after,
.stb-menu > li.current-menu-item > a::after,
.stb-menu > li.current-menu-parent > a::after {
    width: 100%;
}

.stb-menu > li > a:hover,
.stb-menu > li.current-menu-item > a,
.stb-menu > li.current-menu-parent > a {
    color: var(--color-primary);
}

/* Dropdown */
.stb-menu > li > .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .25s ease;
    z-index: 1001;
    border-top: 2px solid var(--color-primary);
}

.stb-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.stb-menu .sub-menu li a {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text);
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid var(--color-border);
    transition: color .2s, background .2s;
}

.stb-menu .sub-menu li:last-child a {
    border-bottom: none;
}

.stb-menu .sub-menu li a:hover {
    color: var(--color-primary);
    background: #f9f9f9;
}

/* Header Actions */
.stb-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stb-header-social {
    display: none;
    gap: 8px;
    align-items: center;
}

.stb-header-social a {
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    transition: color .2s;
}

.stb-header-social a:hover {
    color: var(--color-primary);
}

.stb-search-toggle,
.stb-hamburger {
    color: var(--color-header-text);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: color .2s;
}

.stb-search-toggle:hover,
.stb-hamburger:hover {
    color: var(--color-primary);
}

/* ─── 6. Offcanvas Mobile Menu ─── */
.stb-offcanvas {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
}

.stb-offcanvas.stb-active {
    pointer-events: auto;
}

.stb-offcanvas-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity .3s ease;
}

.stb-offcanvas.stb-active .stb-offcanvas-overlay {
    opacity: 1;
}

.stb-offcanvas-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #fff;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    padding: 24px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.stb-offcanvas.stb-active .stb-offcanvas-panel {
    transform: translateX(0);
}

.stb-offcanvas-close {
    color: var(--color-text);
    margin-bottom: 24px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.stb-offcanvas-close:hover {
    color: var(--color-primary);
}

.stb-offcanvas-menu li a {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text);
    padding: 14px 0;
    display: block;
    border-bottom: 1px solid var(--color-border);
    transition: color .2s;
}

.stb-offcanvas-menu li a:hover {
    color: var(--color-primary);
}

.stb-offcanvas-menu .sub-menu {
    padding-left: 16px;
}

.stb-offcanvas-menu .sub-menu a {
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
}

/* ─── 7. Search Overlay ─── */
.stb-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
}

.stb-search-overlay.stb-active {
    opacity: 1;
    visibility: visible;
}

.stb-search-overlay-inner {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.stb-search-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: #fff;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    transition: color .2s;
}

.stb-search-close:hover {
    color: var(--color-primary);
}

.stb-search-form-overlay input {
    width: 100%;
    padding: 16px 20px;
    font-size: 20px;
    border: none;
    border-bottom: 2px solid var(--color-primary);
    background: transparent;
    color: #fff;
    outline: none;
}

.stb-search-form-overlay input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.stb-search-form-overlay input::placeholder {
    color: #888;
}

/* ─── 8. Breadcrumbs — pastelowe tło z dekoracjami ─── */
.stb-breadcrumbs-bar {
    background: var(--color-cta-bg);
    padding: 16px 0;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.stb-breadcrumbs-bar::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(173, 216, 230, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.stb-breadcrumbs-bar::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 10%;
    width: 70px;
    height: 70px;
    background: rgba(255, 182, 193, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.stb-breadcrumbs {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-secondary);
    position: relative;
    z-index: 1;
}

.stb-breadcrumbs a {
    color: var(--color-text);
    font-weight: 500;
    transition: color .2s;
}

.stb-breadcrumbs a:hover {
    color: var(--color-primary);
}

.stb-breadcrumbs-sep {
    margin: 0 6px;
    color: var(--color-primary);
    opacity: 0.6;
}

/* ─── 9. Card — Horizontal (stb-hcard) ─── */
.stb-hcard {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.stb-hcard:first-child {
    padding-top: 0;
}

.stb-hcard:last-child {
    border-bottom: none;
}

.stb-hcard-inner {
    display: flex;
    gap: 0;
}

.stb-hcard-thumb {
    flex-shrink: 0;
    width: 40%;
    overflow: hidden;
    border-radius: var(--radius);
}

.stb-hcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.stb-hcard:hover .stb-hcard-img {
    transform: scale(1.05);
}

.stb-hcard-placeholder {
    width: 100%;
    padding-bottom: 66%;
    background: var(--color-border);
}

.stb-hcard-content {
    flex: 1;
    padding: 0 0 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.stb-hcard-cat {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: 6px;
    display: inline-block;
}

.stb-hcard-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.stb-hcard-title a {
    color: var(--color-heading);
}

.stb-hcard-title a:hover {
    color: var(--color-primary);
}

.stb-hcard-excerpt {
    font-family: var(--font-body);
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.stb-hcard-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
    text-transform: uppercase;
}

.stb-hcard-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.stb-hcard-sep {
    color: var(--color-meta);
}

/* ─── 10. Card — Grid / Vertical (stb-vcard) ─── */
.stb-vcard {
    position: relative;
}

.stb-vcard-thumb {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 16px;
    aspect-ratio: 3 / 2;
}

.stb-vcard-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.stb-vcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.stb-vcard:hover .stb-vcard-img {
    transform: scale(1.05);
}

.stb-vcard-placeholder {
    width: 100%;
    padding-bottom: 66%;
    background: var(--color-border);
}

.stb-vcard-thumb .stb-cat-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.stb-vcard-content {
    padding: 0 12px;
}

.stb-vcard-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.stb-vcard-title a {
    color: var(--color-heading);
}

.stb-vcard-title a:hover {
    color: var(--color-primary);
}

.stb-vcard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stb-vcard-author {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
}

.stb-vcard-more {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stb-vcard-more:hover {
    color: var(--color-primary-hover);
}

/* ─── 11. Card — Featured Overlay ─── */
.stb-featured-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.stb-featured-card-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.stb-featured-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.stb-featured-card:hover .stb-featured-card-img {
    transform: scale(1.05);
}

.stb-featured-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-border);
}

.stb-featured-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.stb-featured-card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-top: 8px;
}

.stb-featured-card-excerpt {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-top: 8px;
}

.stb-featured-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.stb-featured-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.stb-featured-card-sep {
    color: rgba(255, 255, 255, 0.5);
}

.stb-featured-card-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-top: 12px;
    transition: color .2s;
}

.stb-featured-card-more:hover {
    color: var(--color-primary);
}

/* Size variants */
.stb-featured-card--large {
    aspect-ratio: 3 / 2;
}

.stb-featured-card--small {
    aspect-ratio: 16 / 9;
}

.stb-featured-card--large .stb-featured-card-title {
    font-size: 28px;
}

/* ─── 12. Card — Trending ─── */
.stb-trending-item {
    flex-shrink: 0;
}

.stb-trending-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stb-trending-thumb {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
}

.stb-trending-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.stb-trending-item:hover .stb-trending-img {
    transform: scale(1.05);
}

.stb-trending-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-border);
    border-radius: 8px;
}

.stb-trending-info {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.stb-trending-number {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    flex-shrink: 0;
}

.stb-trending-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-heading);
}

.stb-trending-item:hover .stb-trending-title {
    color: var(--color-primary);
}

/* ─── 13. Card — Dark ─── */
.stb-dark-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
}

.stb-dark-card:last-child {
    border-bottom: none;
}

.stb-dark-card-link {
    display: flex;
    gap: 16px;
    align-items: center;
}

.stb-dark-card-thumb {
    flex-shrink: 0;
    width: 94px;
    height: 70px;
    overflow: hidden;
    border-radius: var(--radius);
}

.stb-dark-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s;
}

.stb-dark-card:hover .stb-dark-card-img {
    opacity: 0.85;
}

.stb-dark-card-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.stb-dark-card-info {
    flex: 1;
    min-width: 0;
}

.stb-dark-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 4px;
}

.stb-dark-card:hover .stb-dark-card-title {
    color: var(--color-primary);
}

.stb-dark-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ─── 14. Sidebar ─── */
.stb-sidebar {
    position: static;
}

.stb-widget {
    background: var(--color-card-bg);
    padding: 20px;
    margin-bottom: 32px;
    border-radius: var(--radius);
}

.stb-widget:first-child {
    margin-top: 0;
}

.stb-widget-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-heading);
    position: relative;
    padding-bottom: 12px;
}

.stb-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--color-primary);
}

/* Sidebar Tabs */
.stb-widget-tabs {
    padding: 0;
    background: transparent;
}

.stb-widget-tabs .stb-tab-content {
    background: var(--color-card-bg);
    padding: 16px;
}

.stb-tab-nav {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid var(--color-border);
}

.stb-tab-nav li {
    flex: 1;
}

.stb-tab-nav a {
    display: block;
    text-align: center;
    padding: 12px 16px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-meta);
    border-bottom: 2px solid transparent;
    transition: border-color .2s, color .2s, background .2s;
}

.stb-tab-nav a.stb-tab-active {
    border-bottom-color: var(--color-primary);
    color: var(--color-heading);
    background: #fff;
}

.stb-tab-nav a:hover {
    color: var(--color-primary);
}

.stb-tab-content {
    display: none;
}

.stb-tab-content.stb-tab-active {
    display: block;
}

/* Sidebar Post Item */
.stb-sidebar-post {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.stb-sidebar-post:last-child {
    border-bottom: none;
}

.stb-sidebar-post-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 50%;
    display: block;
}

.stb-sidebar-post-img img,
.stb-sidebar-thumb-circle {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stb-sidebar-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-border);
    border-radius: 50%;
}

.stb-sidebar-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stb-sidebar-post-meta {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-meta);
    margin-bottom: 4px;
}

.stb-sidebar-post-meta a {
    color: var(--color-meta);
    font-weight: 400;
}

.stb-sidebar-post-meta a:hover {
    color: var(--color-primary);
}

.stb-sidebar-post-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.stb-sidebar-post-title a {
    color: var(--color-heading);
}

.stb-sidebar-post-title a:hover {
    color: var(--color-primary);
}

/* Category List (sidebar) */
.stb-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted var(--color-border);
    font-size: 15px;
}

.stb-cat-list li:last-child {
    border-bottom: none;
}

.stb-cat-list a {
    color: var(--color-text);
    font-weight: 400;
    transition: color .2s;
}

.stb-cat-list a:hover {
    color: var(--color-primary);
}

.stb-cat-count {
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ─── Category Badge (shared) ─── */
.stb-cat-badge {
    display: inline-block;
    width: auto;
    max-width: fit-content;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1.4;
    transition: background .2s;
    text-decoration: none;
}

.stb-cat-badge:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

/* ─── 15. Pagination ─── */
.stb-pagination {
    margin-top: 32px;
    text-align: center;
}

.stb-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: var(--color-card-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    transition: background .2s, color .2s, border-color .2s;
}

.stb-pagination .page-numbers.current,
.stb-pagination .page-numbers:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ─── 16. Footer ─── */
.stb-footer {
    background: var(--color-footer-bg);
    text-align: center;
    padding: 48px 0 0;
    color: var(--color-footer-text);
}

.stb-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-bottom: 32px;
}

.stb-footer-logo {
    margin-bottom: 0;
}

.stb-footer-logo .custom-logo,
.stb-footer-logo-img {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.stb-footer-logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.stb-footer-logo-text:hover {
    color: var(--color-primary);
}

.stb-footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.stb-footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: border-color .2s, color .2s, background .2s;
}

.stb-footer-social a:hover {
    border-color: var(--color-primary);
    color: #fff;
    background: var(--color-primary);
}

.stb-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.stb-footer-nav a {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    transition: color .2s;
}

.stb-footer-nav a:hover {
    color: #fff;
}

.stb-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5px;
    padding: 16px 0;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
}

/* ─── 17. Back to Top ─── */
.stb-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s, visibility .3s, transform .3s, background .2s;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stb-back-to-top.stb-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.stb-back-to-top:hover {
    background: var(--color-primary-hover);
}

/* ─── 18. Forms ─── */
.stb-search-form {
    display: flex;
    gap: 0;
}

.stb-search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: 22px 0 0 22px;
    outline: none;
    font-size: 14px;
}

.stb-search-form input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.stb-search-form button {
    padding: 12px 24px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 0 22px 22px 0;
    transition: background .2s;
}

.stb-search-form button:hover {
    background: var(--color-primary-hover);
}

/* Contact Form */
.stb-contact-form .stb-form-group {
    margin-bottom: 20px;
}

.stb-contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--color-text);
}

.stb-required {
    color: var(--color-primary);
}

.stb-contact-form input,
.stb-contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
    font-size: 15px;
    transition: border-color .2s;
}

.stb-contact-form input:focus,
.stb-contact-form textarea:focus {
    border-color: var(--color-primary);
}

.stb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: background .2s, transform .1s;
    min-height: 44px;
}

.stb-btn:active {
    transform: scale(0.98);
}

.stb-btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.stb-btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.stb-form-status {
    margin-top: 12px;
    font-size: 14px;
}

.stb-form-status.stb-success { color: #38a169; }
.stb-form-status.stb-error { color: #e53e3e; }

/* ─── 19. Single Post ─── */
.stb-article {
    background: var(--color-card-bg);
    padding: 32px;
    margin-bottom: 32px;
    border-radius: var(--radius);
}

.stb-article-header {
    margin-bottom: 24px;
}

.stb-article-header .stb-cat-badge {
    margin-bottom: 12px;
}

.stb-article-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-heading);
    margin-bottom: 12px;
}

.stb-article-lead {
    margin-bottom: 16px;
}

.stb-article-lead p {
    font-family: var(--font-body);
    font-size: 19px;
    color: #555;
    line-height: 1.6;
    font-style: italic;
}

.stb-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.stb-article-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stb-article-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.stb-article-author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stb-article-author-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-heading);
}

.stb-article-meta-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
}

.stb-meta-sep {
    color: var(--color-meta);
}

.stb-article-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-meta);
}

/* Featured Image */
.stb-article-featured-image {
    margin: 0 -32px 24px;
}

.stb-article-featured-image img {
    width: 100%;
    height: auto;
}

.stb-article-caption {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
    padding: 8px 32px 0;
    font-style: italic;
}

/* Article Content */
.stb-article-content {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text);
}

.stb-article-content h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--color-heading);
}

.stb-article-content h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--color-heading);
}

.stb-article-content p {
    margin-bottom: 16px;
}

.stb-article-content ul,
.stb-article-content ol {
    margin: 0 0 16px 24px;
    list-style: disc;
}

.stb-article-content ol {
    list-style: decimal;
}

.stb-article-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.stb-article-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: #f9f9f9;
    font-style: italic;
    border-radius: var(--radius);
}

.stb-article-content img {
    border-radius: var(--radius);
    margin: 16px 0;
}

.stb-article-content a {
    color: var(--color-primary);
}

.stb-article-content a:hover {
    color: var(--color-primary-hover);
}

/* Tags */
.stb-article-tags {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.stb-tag {
    display: inline-block;
    background: #f5f5f5;
    color: var(--color-text);
    padding: 6px 14px;
    margin: 4px 4px 4px 0;
    font-size: 13px;
    font-weight: 400;
    border-radius: 16px;
    transition: background .2s, color .2s;
}

.stb-tag:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Author Box */
.stb-author-box {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    padding: 24px;
    background: #f9f9f9;
    border-radius: var(--radius);
}

.stb-author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stb-author-box-info {
    flex: 1;
    min-width: 0;
}

.stb-author-box-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    display: block;
    margin-bottom: 4px;
}

.stb-author-box-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.stb-author-box-bio {
    font-family: var(--font-body);
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* TOC */
.stb-toc {
    background: #f9f9f9;
    border: 1px solid var(--color-border);
    padding: 24px;
    margin: 24px 0;
    border-radius: var(--radius);
}

.stb-toc-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-heading);
}

.stb-toc-list {
    list-style: decimal;
    margin-left: 20px;
}

.stb-toc-list li {
    margin-bottom: 8px;
}

.stb-toc-list a {
    color: var(--color-text);
    font-size: 15px;
    transition: color .2s;
}

.stb-toc-list a:hover {
    color: var(--color-primary);
}

.stb-toc-sub {
    margin-left: 16px;
}

/* ─── 20. Archive Header ─── */
.stb-archive-header {
    background: var(--color-cta-bg);
    padding: 16px 0;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
}

.stb-archive-header::before {
    content: '';
    position: absolute;
    top: -20px;
    right: 5%;
    width: 60px;
    height: 60px;
    background: rgba(173, 216, 230, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.stb-archive-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 8%;
    width: 50px;
    height: 50px;
    background: rgba(200, 170, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.stb-archive-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.stb-archive-header .stb-archive-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
    padding: 0;
}

.stb-archive-header .stb-breadcrumbs {
    font-size: 12px;
}

@media (max-width: 767px) {
    .stb-archive-header-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}


.stb-archive-desc {
    color: var(--color-text-secondary);
    font-size: 15px;
    margin-top: 4px;
}

/* ─── Related Posts ─── */
.stb-related {
    margin-top: 32px;
}

.stb-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

.stb-related-card {
    position: relative;
}

.stb-related-card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.stb-related-card-img {
    width: 100%;
    height: auto;
    transition: transform .4s ease;
}

.stb-related-card:hover .stb-related-card-img {
    transform: scale(1.05);
}

.stb-related-card-placeholder {
    width: 100%;
    padding-bottom: 66%;
    background: var(--color-border);
}

.stb-related-card-thumb .stb-cat-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
}

.stb-related-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.stb-related-card-title a {
    color: var(--color-heading);
}

.stb-related-card-title a:hover {
    color: var(--color-primary);
}

/* ─── 21. Utilities ─── */
.stb-section-header {
    text-align: center;
    margin-bottom: 16px;
}

.stb-section-header--centered .stb-section-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-heading);
    text-transform: uppercase;
}

.stb-section-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-heading);
}

/* Billboard / Ad */
.stb-billboard {
    padding: 20px 16px;
}

.stb-ad-between {
    margin: 24px 0;
}

/* ─── Legacy FlexMag homepage classes (front-page.php) ─── */
.stb-featured-section {
    overflow: hidden;
    margin: 16px 0;
}

.stb-featured-grid {
    display: flex;
    width: 100%;
    gap: 2px;
}

.stb-featured-item {
    flex: 1;
    position: relative;
    height: 420px;
    overflow: hidden;
}

.stb-featured-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.stb-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity .4s, transform .5s;
}

.stb-featured-link:hover .stb-featured-img {
    opacity: 1;
    transform: scale(1.03);
}

.stb-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    color: #fff;
}

.stb-featured-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 8px;
    color: #fff;
}

.stb-featured-meta {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #fff;
}

.stb-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Content Blocks (front-page category sections) */
.stb-content-block {
    background: var(--color-card-bg);
    margin-bottom: 32px;
    padding: 24px;
    border-radius: var(--radius);
}

.stb-block-header {
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.stb-block-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-heading);
}

.stb-block-title a {
    color: var(--color-heading);
}

.stb-block-title a:hover {
    color: var(--color-primary);
}

/* Big Post */
.stb-post-big {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.stb-post-big-img {
    display: block;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: var(--radius);
    line-height: 0;
}

.stb-post-big-img img {
    width: 100%;
    height: auto;
    transition: transform .4s ease;
}

.stb-post-big-img:hover img {
    transform: scale(1.03);
}

.stb-post-big .stb-cat-badge {
    margin-bottom: 8px;
}

.stb-post-big-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.stb-post-big-title a {
    color: var(--color-heading);
}

.stb-post-big-title a:hover {
    color: var(--color-primary);
}

.stb-post-meta {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
    margin-bottom: 8px;
}

.stb-post-meta a {
    color: var(--color-meta);
    font-weight: 400;
}

.stb-post-excerpt {
    font-family: var(--font-body);
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* Small Post */
.stb-post-small {
    border-bottom: 1px solid var(--color-border);
}

.stb-post-small:last-child {
    border-bottom: none;
}

.stb-post-small-link {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    align-items: center;
    font-weight: 400;
}

.stb-post-small-img {
    flex-shrink: 0;
    width: 94px;
    height: 70px;
    overflow: hidden;
    border-radius: var(--radius);
    line-height: 0;
}

.stb-post-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s;
}

.stb-post-small:hover .stb-post-small-img img {
    opacity: 0.85;
}

.stb-post-small-text {
    flex: 1;
    min-width: 0;
}

.stb-post-small-text h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-heading);
    margin-bottom: 4px;
}

.stb-post-small:hover .stb-post-small-text h4 {
    color: var(--color-primary);
}

/* ─── Content None ─── */
.stb-content-none {
    background: var(--color-card-bg);
    padding: 48px 32px;
    text-align: center;
    border-radius: var(--radius);
}

.stb-content-none h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 16px;
}

.stb-content-none p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.stb-content-none .stb-search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ─── 404 ─── */
.stb-404 {
    text-align: center;
}

.stb-404 .stb-search-form {
    max-width: 400px;
    margin: 0 auto;
}

.stb-404 .stb-card-grid {
    text-align: left;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    margin-top: 24px;
}

/* ─── 22. Responsive ─── */

/* Tablet and up */
@media (min-width: 768px) {
    .stb-container {
        padding: 0 24px;
    }

    .stb-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stb-article-title {
        font-size: 36px;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .stb-layout {
        grid-template-columns: 1fr var(--sidebar-width);
    }

    .stb-nav {
        display: block;
        flex: 1;
        margin: 0 32px;
    }

    .stb-hamburger {
        display: none;
    }

    .stb-header-social {
        display: flex;
    }
}

/* Small screens */
@media (max-width: 1024px) {
    .stb-featured-grid {
        flex-wrap: wrap;
    }

    .stb-featured-item {
        flex: 1 1 48%;
        height: 280px;
    }
}

@media (max-width: 767px) {
    .stb-featured-item {
        flex: 1 1 100%;
        height: 240px;
    }

    .stb-featured-title {
        font-size: 17px;
    }

    .stb-hcard-inner {
        flex-direction: column;
    }

    .stb-hcard-thumb {
        width: 100%;
    }

    .stb-hcard-content {
        padding: 16px 0 0;
    }

    .stb-hcard-title {
        font-size: 18px;
    }

    .stb-article {
        padding: 20px 16px;
    }

    .stb-article-title {
        font-size: 24px;
    }

    .stb-article-featured-image {
        margin: 0 -16px 20px;
    }

    .stb-article-caption {
        padding: 8px 16px 0;
    }

    .stb-author-box {
        flex-direction: column;
        text-align: center;
    }

    .stb-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stb-404 .stb-card-grid {
        grid-template-columns: 1fr;
    }

    .stb-content-block {
        padding: 16px;
    }

    .stb-post-big-title {
        font-size: 18px;
    }

    .stb-footer-nav {
        flex-direction: column;
        gap: 12px;
    }

    body {
        font-size: 16px;
    }
}

@media (max-width: 479px) {
    .stb-container {
        padding: 0 16px;
    }

    .stb-offcanvas-panel {
        width: 280px;
    }

    .stb-featured-item {
        height: 200px;
    }

    .stb-featured-title {
        font-size: 15px;
    }
}

/* ─── Print ─── */
@media print {
    .stb-header, .stb-nav,
    .stb-sidebar, .stb-footer,
    .stb-search-overlay, .stb-offcanvas,
    .stb-back-to-top, .stb-breadcrumbs-bar,
    .stb-archive-header, .stb-featured-section,
    .stb-ad-between, .stb-billboard,
    .stb-cta-section { display: none; }

    .stb-layout { grid-template-columns: 1fr; }
    .stb-article { padding: 0; box-shadow: none; }
}
