/* ─── Top Bar ─────────────────────────────────────────────── */
.stb-topbar {
    background: var(--color-footer-bg);
    padding: 8px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.stb-topbar-date {
    text-transform: capitalize;
}

.stb-topbar-social {
    display: flex;
    gap: 12px;
}

.stb-topbar-social a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.stb-topbar-social a:hover {
    color: #fff;
}

@media (max-width: 640px) {
    .stb-topbar-date {
        display: none;
    }
}

/* ─── Header ─────────────────────────────────────────────── */
.stb-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 100;
}

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

/* Logo */
.stb-logo {
    flex-shrink: 0;
}

.stb-logo img,
.stb-logo .custom-logo {
    max-height: 45px;
    width: auto;
}

.stb-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    white-space: nowrap;
}

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

/* Navigation */
.stb-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.stb-nav-list {
    display: flex;
    gap: 0;
}

.stb-nav-list > li > a,
.stb-nav-list > li.cat-item > a {
    display: block;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 70px;
    color: var(--color-text);
    transition: color 0.2s ease;
}

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

/* Search Toggle */
.stb-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-text);
    transition: color 0.2s ease;
}

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

/* Hamburger */
.stb-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
}

.stb-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

.stb-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.stb-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.stb-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
    .stb-hamburger {
        display: flex;
    }

    .stb-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 999;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 24px 24px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .stb-nav.active {
        left: 0;
    }

    .stb-nav-list {
        flex-direction: column;
    }

    .stb-nav-list > li > a,
    .stb-nav-list > li.cat-item > a {
        line-height: 1.4;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .stb-search-toggle {
        display: none;
    }
}

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

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

.stb-search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
    position: relative;
}

.stb-search-form-overlay {
    display: flex;
    gap: 0;
}

.stb-search-form-overlay input {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    outline: none;
}

.stb-search-form-overlay input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.stb-search-form-overlay input:focus {
    border-bottom-color: var(--color-primary);
}

.stb-search-form-overlay button {
    padding: 16px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.stb-search-form-overlay button:hover {
    color: #fff;
}

.stb-search-close {
    position: absolute;
    top: -60px;
    right: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stb-search-close:hover {
    color: #fff;
}

/* ─── Hero Grid (Gillion 1 big + 4 small) ────────────────── */
.stb-hero-section {
    margin-bottom: 40px;
}

.stb-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 260px 260px;
    gap: 4px;
}

.stb-hero-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

/* Post 1 = CENTRAL (biggest, spans 2 rows, col 2) */
.stb-hero-item:nth-child(1) { grid-area: 1 / 2 / 3 / 3; }
/* Post 2 = top-left */
.stb-hero-item:nth-child(2) { grid-area: 1 / 1 / 2 / 2; }
/* Post 3 = top-right */
.stb-hero-item:nth-child(3) { grid-area: 1 / 3 / 2 / 4; }
/* Post 4 = bottom-left */
.stb-hero-item:nth-child(4) { grid-area: 2 / 1 / 3 / 2; }
/* Post 5 = bottom-right */
.stb-hero-item:nth-child(5) { grid-area: 2 / 3 / 3 / 4; }

.stb-hero-image {
    position: absolute;
    inset: 0;
}

.stb-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.stb-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    z-index: 2;
}

.stb-hero-content {
    padding: 20px;
    width: 100%;
}

.stb-hero-content .stb-badge-cat {
    margin-bottom: 8px;
}

.stb-hero-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

/* Central post gets bigger title */
.stb-hero-item:nth-child(1) .stb-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
}

.stb-hero-item:nth-child(1) .stb-hero-content {
    padding: 30px;
}

.stb-hero-title a {
    color: #fff;
}

.stb-hero-title a:hover {
    color: var(--color-accent);
}

.stb-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.stb-hero-meta .stb-avatar {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.stb-hero-meta .stb-meta-author {
    color: #fff;
}

@media (max-width: 1024px) {
    .stb-hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        height: auto;
    }
    .stb-hero-item:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: auto;
        min-height: 300px;
    }
    .stb-hero-item:nth-child(n+2) {
        grid-column: auto;
        grid-row: auto;
        min-height: 200px;
    }
}

@media (max-width: 640px) {
    .stb-hero-grid {
        grid-template-columns: 1fr;
    }
    .stb-hero-item:nth-child(1) {
        grid-column: 1;
        min-height: 280px;
    }
    .stb-hero-item:nth-child(n+2) {
        min-height: 200px;
    }
    .stb-hero-item:nth-child(1) .stb-hero-title {
        font-size: 1.2rem;
    }
}

/* ─── Featured Carousel ──────────────────────────────────── */
.stb-featured-section {
    padding: 40px 0;
    background: var(--color-surface);
}

.stb-featured-carousel {
    position: relative;
}

.stb-featured-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px;
}

.stb-featured-track::-webkit-scrollbar {
    display: none;
}

.stb-featured-card {
    scroll-snap-align: start;
    flex: 0 0 calc(25% - 15px);
    min-width: 260px;
}

.stb-featured-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 280px;
}

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

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

.stb-featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.stb-featured-card-overlay .stb-badge-cat {
    align-self: flex-start;
    margin-bottom: 8px;
}

.stb-featured-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

.stb-featured-card-title a {
    color: #fff;
}

.stb-featured-card-title a:hover {
    color: var(--color-accent);
}

.stb-featured-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Carousel Controls */
.stb-carousel-prev,
.stb-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: var(--color-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.stb-carousel-prev:hover,
.stb-carousel-next:hover {
    background: var(--color-primary);
    color: #fff;
}

.stb-carousel-prev {
    left: -16px;
}

.stb-carousel-next {
    right: -16px;
}

@media (max-width: 1024px) {
    .stb-featured-card {
        flex: 0 0 calc(50% - 10px);
    }
    .stb-carousel-prev { left: 8px; }
    .stb-carousel-next { right: 8px; }
}

@media (max-width: 640px) {
    .stb-featured-card {
        flex: 0 0 calc(100% - 8px);
    }
    .stb-featured-thumb {
        height: 220px;
    }
}

/* ─── Filter Tabs ────────────────────────────────────────── */
.stb-tabs-section {
    padding: 40px 0;
}

.stb-tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.stb-filter-tabs {
    display: flex;
    gap: 4px;
}

.stb-filter-tab {
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.stb-filter-tab:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.stb-filter-tab.stb-tab-active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.stb-tabs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 640px) {
    .stb-tabs-grid {
        grid-template-columns: 1fr;
    }
    .stb-filter-tabs {
        flex-wrap: wrap;
    }
}

/* ─── Newest Section ─────────────────────────────────────── */
.stb-newest-section {
    background: var(--color-surface);
    padding-bottom: 40px;
}

/* ─── Footer ─────────────────────────────────────────────── */
.stb-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 48px 0 0;
    margin-top: 40px;
}

.stb-footer a {
    color: var(--color-footer-text);
    transition: color 0.2s ease;
}

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

.stb-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stb-footer-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

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

.stb-footer-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

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

.stb-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-footer-text);
    transition: all 0.2s ease;
}

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

.stb-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stb-footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 0;
}

.stb-footer-links a:hover {
    color: var(--color-primary);
    padding-left: 4px;
}

/* Footer Posts */
.stb-footer-post {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stb-footer-post-thumb img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

.stb-footer-post-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

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

.stb-footer-post-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    display: block;
}

/* Footer Contact */
.stb-footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.stb-footer-contact svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.stb-footer-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
    margin-top: 16px;
    transition: background 0.2s ease;
}

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

/* Copyright */
.stb-copyright {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stb-copyright .stb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.stb-copyright p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.stb-copyright-links {
    display: flex;
    gap: 16px;
}

.stb-copyright-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

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

@media (max-width: 1024px) {
    .stb-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stb-footer-grid {
        grid-template-columns: 1fr;
    }
    .stb-copyright .stb-container {
        flex-direction: column;
        text-align: center;
    }
}

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

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

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

/* ─── Mobile Nav Overlay ─────────────────────────────────── */
.stb-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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