/* ==========================================================================
   CUSTOM CSS — salon-z-meblami.pl
   Design: Soledad Gaming News 1:1 — DARK MODE
   Soledad: accent #d90251 → nasz accent #fb303f
   ========================================================================== */

/* === HEADER — dark bg image/gradient, full-width === */
.stb-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 5px rgba(190,190,190,.46);
    transition: all 0.3s;
}
.stb-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 15px;
}

/* Sticky: white bg, smaller line-height */
.stb-header.stb-header--scrolled {
    background: #fff;
    box-shadow: 0 1px 5px rgba(190,190,190,.46);
}
.stb-header.stb-header--scrolled .stb-nav-link,
.stb-header.stb-header--scrolled .stb-nav-list > li > a {
    line-height: 58px;
}

/* Logo */
.stb-logo { flex: 0 0 auto; margin-right: 10px; }
.stb-logo .custom-logo { max-height: 40px; width: auto; }
.stb-logo-text { font-family: var(--font-heading); font-size: 28px; font-weight: 800; color: var(--color-heading); }
.stb-logo-link { color: var(--color-heading); }
.stb-logo-link:hover { color: var(--color-accent); }

/* Desktop Nav — Soledad: text-transform none, white, underline hover */
.stb-nav { flex: 1; display: flex; justify-content: flex-start; }
.stb-nav-list { display: flex; gap: 0; }
.stb-nav-item, .stb-nav-list > li { position: static; margin-right: 30px; }
.stb-nav-item:last-child, .stb-nav-list > li:last-child { margin-right: 0; }
.stb-nav-link, .stb-nav-list > li > a {
    display: block; padding: 0;
    font-family: var(--font-menu); font-size: 15px; font-weight: 700;
    text-transform: none; line-height: 80px; color: var(--color-heading); letter-spacing: 0;
    transition: color 0.2s; position: relative;
}
.stb-nav-link:hover, .stb-nav-list > li > a:hover,
.stb-nav-list > li.current-menu-item > a { color: var(--color-accent); }

/* Animated underline */
.stb-nav-link::before, .stb-nav-list > li > a::before {
    content: ''; position: absolute;
    bottom: calc(50% - 14px); left: 50%;
    width: 0; height: 2px; background: var(--color-accent);
    transition: all 0.25s;
}
.stb-nav-link:hover::before, .stb-nav-list > li:hover > a::before,
.stb-nav-list > li.current-menu-item > a::before { left: 0; width: 100%; }

/* Header Actions */
.stb-header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.stb-search-btn { background: none; border: none; cursor: pointer; color: var(--color-heading); padding: 8px; transition: color 0.2s; }
.stb-search-btn svg { width: 16px; height: 16px; }
.stb-search-btn:hover { color: var(--color-accent); }

/* Subscribe/Kontakt button */
.stb-subscribe-btn {
    display: inline-block; padding: 8px 18px;
    border: 1px solid var(--color-heading); color: var(--color-heading);
    font-size: 13px; font-weight: 700; font-family: var(--font-heading);
    transition: all 0.3s;
}
.stb-subscribe-btn:hover { background: var(--color-heading); color: #fff; }

/* Hamburger — hidden desktop */
.stb-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px 4px; background: none; border: none; cursor: pointer; color: var(--color-heading); }
.stb-hamburger-line { display: block; width: 20px; height: 2px; background: currentColor; }

/* === MEGA MENU — full-width, 3D animation === */
.stb-mega-menu {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: #1a1a1a; border-top: 1px solid #313131;
    box-shadow: 0 8px 20px rgba(0,0,0,.5); padding: 20px 30px;
    transform: rotateX(-90deg); transform-origin: 0 0;
    opacity: 0; visibility: hidden;
    transition: transform 0.27s ease-in-out, opacity 0.27s, visibility 0.27s;
    z-index: 999;
}
.stb-nav-item:hover > .stb-mega-menu, .stb-nav-list > li:hover > .stb-mega-menu {
    transform: rotateX(0); opacity: 1; visibility: visible;
}
.stb-mega-menu-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.stb-mega-item { text-align: center; padding: 0 10px; margin-bottom: 15px; }
.stb-mega-thumb { display: block; overflow: hidden; margin-bottom: 10px; }
.stb-mega-thumb img { width: 100%; height: auto; transition: opacity 0.3s; }
.stb-mega-item:hover .stb-mega-thumb img { opacity: 0.85; }
.stb-mega-title { font-size: 13px; font-weight: 700; font-family: var(--font-heading); line-height: 1.35; text-align: center; }
.stb-mega-title a { color: rgba(255,255,255,0.9); }
.stb-mega-title a:hover { color: var(--color-accent); }
.stb-mega-date { font-size: 12px; color: #999; text-align: center; }

/* Dropdown submenu */
.stb-nav-item > .sub-menu, .stb-nav-list > li > .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: #1a1a1a; box-shadow: 0 8px 20px rgba(0,0,0,.5);
    border-top: 1px solid #313131;
    transform: rotateX(-90deg); transform-origin: 0 0;
    opacity: 0; visibility: hidden;
    transition: transform 0.27s ease-in-out, opacity 0.27s, visibility 0.27s; z-index: 999;
}
.stb-nav-item:hover > .sub-menu, .stb-nav-list > li:hover > .sub-menu { transform: rotateX(0); opacity: 1; visibility: visible; }
.sub-menu li a { display: block; padding: 12px 20px; font-size: 14px; font-weight: 700; color: #fff; background: #1a1a1a; border-bottom: 1px solid #313131; font-family: var(--font-heading); }
.sub-menu li a:hover { color: var(--color-accent); }

/* === SEARCH OVERLAY === */
.stb-search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s; }
.stb-search-overlay.active { opacity: 1; visibility: visible; }
.stb-search-overlay-close { position: absolute; top: 30px; right: 30px; background: none; border: none; color: #fff; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.stb-search-overlay-close:hover { opacity: 1; }
.stb-search-overlay-form { display: flex; width: 60%; max-width: 700px; border-bottom: 2px solid rgba(255,255,255,0.3); }
.stb-search-overlay-form input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 28px; font-family: var(--font-heading); padding: 16px 0; }
.stb-search-overlay-form input::placeholder { color: rgba(255,255,255,0.4); }
.stb-search-overlay-form button { background: none; border: none; color: #fff; cursor: pointer; padding: 16px; opacity: 0.6; }
.stb-search-overlay-form button:hover { opacity: 1; }

/* === OFFCANVAS MENU (dark) === */
.stb-offcanvas-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.3s; }
.stb-offcanvas-overlay.active { opacity: 1; visibility: visible; }
.stb-offcanvas { position: fixed; top: 0; right: -320px; width: 320px; height: 100%; background: #1a1a1a; z-index: 9999; transition: right 0.3s; overflow-y: auto; }
.stb-offcanvas.active { right: 0; }
.stb-offcanvas-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #313131; }
.stb-offcanvas-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: #fff; }
.stb-offcanvas-close { background: none; border: none; cursor: pointer; color: #fff; }
.stb-offcanvas-body { padding: 16px 20px; }
.stb-offcanvas-nav li { border-bottom: 1px solid #313131; }
.stb-offcanvas-nav a { display: block; padding: 12px 0; font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: #fff; }
.stb-offcanvas-nav a:hover { color: var(--color-accent); }
.stb-offcanvas-nav .sub-menu { padding-left: 16px; }
.stb-offcanvas-nav .sub-menu a { font-size: 13px; font-weight: 500; }

/* === BIG GRID (4-col overlay) === */
.stb-big-grid--4col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-bottom: 0; }
.stb-bgrid-item { position: relative; overflow: hidden; aspect-ratio: 1/1; }
.stb-bgrid-link { display: block; width: 100%; height: 100%; }
.stb-bgrid-img { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.5s ease; }
.stb-bgrid-item:hover .stb-bgrid-img { transform: scale(1.08); }
.stb-bgrid-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 60%, transparent 100%); display: flex; align-items: flex-end; padding: 20px; }
.stb-bgrid-content { color: #fff; }
.stb-bgrid-cats { margin-bottom: 8px; display: flex; gap: 4px; }
.stb-bgrid-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.35; margin-bottom: 6px; text-transform: uppercase; }
.stb-bgrid-date { font-size: 11px; color: rgba(255,255,255,0.7); }

/* === FEATURED SECTION (Full slider + thumbs + nav) === */
.stb-section { padding: 30px 0; }
.stb-section--featured { padding-top: 30px; }

/* Slider nav — miniaturka + tytuł per post, pod sliderem */
.stb-slider-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-top: 2px;
}
.stb-slider-nav-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s;
    overflow: hidden;
}
.stb-slider-nav-item:hover {
    opacity: 0.85;
}
.stb-slider-nav-item--active {
    border-bottom-color: var(--color-accent);
}
.stb-slider-nav-thumb {
    display: block;
    width: 100%;
    overflow: hidden;
}
.stb-slider-nav-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    transition: opacity 0.3s;
}
.stb-slider-nav-item:hover .stb-slider-nav-thumb img {
    opacity: 0.8;
}
.stb-slider-nav-info {
    padding: 8px 10px 10px;
}
.stb-slider-nav-cat {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 3px;
}
.stb-slider-nav-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-heading);
}

/* Slider — Soledad: centered content, overlay, 70% aspect */
.stb-slider { position: relative; overflow: hidden; }
.stb-slider-track { display: flex; transition: transform 0.6s ease; }
.stb-slider-slide { flex: 0 0 100%; position: relative; }
.stb-slider-link { display: block; position: relative; overflow: hidden; padding-top: 70%; }
.stb-slider-link img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.stb-slider-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px; text-align: center;
}
.stb-slider-cats { margin-bottom: 10px; display: flex; gap: 4px; justify-content: center; }
.stb-slider-title { font-size: 24px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 8px; max-width: 480px; }
.stb-slider-meta { font-size: 12px; color: #bcbcbc; }
.stb-slider-prev, .stb-slider-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: #fff; border: none;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: background 0.2s;
}
.stb-slider-prev:hover, .stb-slider-next:hover { background: var(--color-accent); }
.stb-slider-prev { left: 10px; } .stb-slider-next { right: 10px; }

/* Small List (legacy, kept for sidebar/archive use) */
.stb-slist-item { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.stb-slist-item:first-child { padding-top: 0; }
.stb-slist-item:last-child { border-bottom: none; }
.stb-slist-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 6px 0 4px; }
.stb-slist-title a { color: var(--color-heading); }
.stb-slist-title a:hover { color: var(--color-accent); }
.stb-slist-meta { font-size: 11px; color: var(--color-text-meta); }

/* === 3-COL GRID — vertical dividers === */
.stb-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stb-grid3-item { padding: 0 20px; border-right: 1px solid var(--color-border); }
.stb-grid3-item:first-child { padding-left: 0; }
.stb-grid3-item:last-child { border-right: none; padding-right: 0; }
.stb-grid3-thumb { display: block; overflow: hidden; margin-bottom: 12px; }
.stb-grid3-thumb img { width: 100%; height: auto; transition: all 0.35s ease; }
.stb-grid3-item:hover .stb-grid3-thumb img { opacity: 0.85; }
.stb-grid3-content { padding: 4px 0; }
.stb-grid3-title { font-size: 18px; font-weight: 600; margin: 8px 0 6px; line-height: 1.35; color: var(--color-heading); }
.stb-grid3-title a { color: var(--color-heading); }
.stb-grid3-title a:hover { color: var(--color-accent); }
.stb-grid3-date { font-size: 11px; color: var(--color-text-meta); }

/* === POPULAR TOPICS — darker overlay === */
.stb-topics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stb-topic-item { position: relative; overflow: hidden; aspect-ratio: 3/2; display: block; }
.stb-topic-img { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.5s ease; }
.stb-topic-item:hover .stb-topic-img { transform: scale(1.08); }
.stb-topic-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: background 0.3s; }
.stb-topic-item:hover .stb-topic-overlay { background: rgba(0,0,0,0.78); }
.stb-topic-name { color: #fff; font-family: var(--font-heading); font-size: 16px; font-weight: 700; text-align: center; }
.stb-topic-count { color: rgba(255,255,255,0.6); font-size: 12px; margin-top: 4px; }

/* === LATEST POSTS — full-width 3-col === */
.stb-section--latest { padding-bottom: 40px; }
.stb-latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stb-latest-grid .stb-card--large { grid-column: 1 / -1; }

/* Heading z tabs inline — Soledad style */
.stb-heading-with-tabs { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.stb-heading-with-tabs .stb-heading-inner { flex-shrink: 0; }
.stb-heading-with-tabs .stb-filter-tabs { margin-bottom: 0; margin-left: auto; }

/* CB KREACJE FULL-WIDTH */
.stb-cb-fullwidth { margin: 24px auto; padding: 0; }

/* Filter Tabs — Soledad: 14px */
.stb-filter-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 24px; }
.stb-filter-tab {
    padding: 0 12px; background: transparent; border: none; cursor: pointer;
    font-family: var(--font-heading); font-size: 14px; font-weight: 700;
    text-transform: uppercase; color: var(--color-text-meta);
    letter-spacing: 0.5px; transition: all 0.2s; position: relative; line-height: 2;
}
.stb-filter-tab:hover, .stb-filter-tab--active { color: var(--color-heading); }

/* === CTA SECTION — dark bg, big icon === */
.stb-cta-section { position: relative; background: #000; padding: 90px 30px 60px; text-align: center; overflow: hidden; }
.stb-cta-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,26,46,0.8) 0%, rgba(0,0,0,0.6) 100%); z-index: 0; }
.stb-cta-shape { position: absolute; top: -1px; left: 0; right: 0; height: 40px; z-index: 1; }
.stb-cta-shape svg { width: 100%; height: 100%; display: block; }
.stb-cta-inner { position: relative; z-index: 2; }
.stb-cta-heading { font-family: var(--font-heading); font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 12px; text-transform: uppercase; }
.stb-cta-desc { color: rgba(255,255,255,0.7); font-size: 15px; margin-bottom: 32px; max-width: 540px; margin-left: auto; margin-right: auto; line-height: 1.4; }
.stb-cta-btn { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #fff; border: none; cursor: pointer; transition: all 0.3s; padding: 0; }
.stb-cta-btn svg { width: 48px; height: 48px; }
.stb-cta-btn:hover { color: var(--color-accent); }
.stb-cta-btn span { display: none; }

/* === CONTACT POPUP === */
.stb-contact-popup { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s; }
.stb-contact-popup.active { opacity: 1; visibility: visible; }
.stb-contact-popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.stb-contact-popup-content { position: relative; background: #fff; padding: 40px; max-width: 500px; width: 90%; z-index: 1; }
.stb-contact-popup-x { position: absolute; top: 12px; right: 12px; background: none; border: none; cursor: pointer; color: var(--color-text-meta); }
.stb-contact-popup-title { font-size: 22px; margin-bottom: 20px; color: #313131; }

/* === FOOTER — #000 bg === */
.stb-cb-wrapper { padding: 20px 0; }
.stb-footer { background: #000; color: var(--color-footer-text); }
.stb-footer a { color: var(--color-footer-text); }
.stb-footer a:hover { color: #fff; }
.stb-footer-top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stb-footer-logo-img { max-height: 40px; width: auto; filter: brightness(0) invert(1); }
.stb-footer-logo-text { font-family: var(--font-heading); font-size: 24px; font-weight: 800; color: #fff; }
.stb-footer-menu { display: flex; gap: 0; }
.stb-footer-menu li + li::before { content: '/'; display: inline-block; margin: 0 12px; color: #444; transform: skewX(-20deg); }
.stb-footer-menu a { font-size: 13px; font-weight: 600; text-transform: uppercase; color: #fff; }
.stb-footer-menu a:hover { color: var(--color-accent); }
.stb-footer-bottom { padding: 20px 0; }
.stb-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; }
.stb-footer-copyright { font-size: 13px; color: #bcbcbc; }
/* Social icons — filled circles */
.stb-footer-social { display: flex; gap: 10px; }
.stb-footer-social a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #313131; border: none; color: #fff; transition: background 0.3s; }
.stb-footer-social a:hover { background: var(--color-accent); color: #fff; }

/* === BACK TO TOP === */
.stb-back-to-top { position: fixed; bottom: 30px; right: 30px; width: 42px; height: 42px; background: var(--color-accent); color: #fff; border: none; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 100; display: flex; align-items: center; justify-content: center; }
.stb-back-to-top.visible { opacity: 1; visibility: visible; }
.stb-back-to-top:hover { background: var(--color-accent-hover); transform: translateY(-3px); }
.stb-back-to-top svg { width: 20px; height: 20px; }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .stb-big-grid--4col { grid-template-columns: repeat(2, 1fr); }
    .stb-topics-grid { grid-template-columns: repeat(2, 1fr); }
    .stb-mega-menu-inner { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
    .stb-featured-row { flex-direction: column; }
    .stb-grid3 { grid-template-columns: repeat(2, 1fr); }
    .stb-grid3-item { border-right: none; padding: 0; margin-bottom: 24px; }
    .stb-latest-grid { grid-template-columns: repeat(2, 1fr); }
    .stb-section-heading { font-size: 20px; }
}
@media (max-width: 768px) {
    .stb-header-inner { padding: 10px 16px; gap: 12px; }
    .stb-nav { display: none; }
    .stb-subscribe-btn { display: none; }
    .stb-hamburger { display: flex; }
    .stb-logo .custom-logo { max-height: 30px; }
    .stb-logo-text { font-size: 18px; }
    .stb-big-grid--4col { grid-template-columns: 1fr 1fr; }
    .stb-bgrid-title { font-size: 13px; }
    .stb-bgrid-overlay { padding: 12px; }
    .stb-slider-title { font-size: 18px; }
    .stb-slider-nav { grid-template-columns: repeat(3, 1fr); }
    .stb-slider-nav-item:nth-child(n+4) { display: none; }
    .stb-grid3 { grid-template-columns: 1fr; }
    .stb-grid3-item { border-right: none; padding: 0; }
    .stb-latest-grid { grid-template-columns: 1fr; }
    .stb-topics-grid { grid-template-columns: repeat(2, 1fr); }
    .stb-filter-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .stb-filter-tab { white-space: nowrap; }
    .stb-footer-top { flex-direction: column; gap: 16px; text-align: center; }
    .stb-footer-menu { flex-wrap: wrap; justify-content: center; }
    .stb-footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
    .stb-mega-menu { display: none; }
    .stb-cta-heading { font-size: 22px; }
    .stb-cta-section { padding: 60px 20px 40px; }
    .stb-slist-title { font-size: 16px; }
}
@media (max-width: 480px) {
    .stb-big-grid--4col { grid-template-columns: 1fr; }
    .stb-bgrid-item { aspect-ratio: 16/9; }
    .stb-slider-prev, .stb-slider-next { width: 32px; height: 32px; }
    .stb-topic-name { font-size: 13px; }
}
