/* ═══════════════════════════════════════════════════════════════
   custom.css — sofy-do-salonu.pl
   Site-specific Jinko 1.1.6 replica overrides:
   header, offcanvas, search overlay, featured hero, homepage
   masonry, archive list, single post, footer dark, 404,
   contact, back-to-top, cookie bar, breadcrumbs context.
   Mobile-first breakpoints (min-width).

   @author  Damian Zieba | https://semtak.pl | biuro@semtak.pl
   ═══════════════════════════════════════════════════════════════ */


/* ─── Header — white, box-shadow, logo left, nav center, search right ── */

.stb-header {
    background: var(--color-header-bg);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.stb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    gap: 8px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Logo in header */
.stb-header .stb-logo {
    flex-shrink: 0;
    min-width: 0;
}

/* Actions group (search icon) — right side */
.stb-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Logo */
.stb-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-header-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

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

.stb-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-header-text);
    margin: 0;
}

.stb-logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.stb-logo img,
.stb-logo-image {
    max-width: 135px;
    max-height: 77px;
    width: auto;
    height: auto;
}

/* Desktop navigation — hidden on mobile, visible on desktop */
.stb-nav {
    display: none;
}

.stb-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.stb-nav a {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-title);
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 0;
    position: relative;
    transition: opacity 0.2s ease;
}

.stb-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.stb-nav a:hover {
    opacity: 0.75;
}

.stb-nav a:hover::after {
    width: 100%;
}

.stb-nav li.current-menu-item > a,
.stb-nav li.current_page_item > a,
.stb-nav li.current-menu-ancestor > a {
    color: var(--color-accent);
}

.stb-nav li.current-menu-item > a::after,
.stb-nav li.current_page_item > a::after,
.stb-nav li.current-menu-ancestor > a::after {
    width: 100%;
}

/* Hamburger button — visible on mobile, hidden on desktop */
.stb-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-header-text);
    transition: color 0.2s ease;
}

.stb-hamburger svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Search toggle button */
.stb-search-toggle {
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-header-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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


/* ─── Offcanvas (Slide-out sidebar panel — left) ─────────────── */

.stb-slide-out {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.stb-slide-out.active {
    transform: translateX(0);
    visibility: visible;
}

.stb-slide-out-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    min-height: 64px;
}

.stb-slide-out-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.stb-slide-out-close:hover {
    color: var(--color-accent);
}

.stb-slide-out-logo {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-title);
    text-decoration: none;
}

.stb-slide-out-logo:hover {
    color: var(--color-accent);
}

.stb-slide-out-nav {
    padding: 0;
}

.stb-nav-list {
    list-style: none;
    margin: 0;
    padding: 20px;
}

.stb-nav-list li {
    border-bottom: 1px solid var(--color-very-light-grey);
}

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

.stb-nav-list a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
    min-height: 44px;
    line-height: 1.4;
}

.stb-nav-list a:hover {
    color: var(--color-accent);
}

/* Overlay behind offcanvas */
.stb-slide-out-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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


/* ─── Search Overlay (full-screen, dark) ─────────────────────── */

.stb-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1100;
    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: 90%;
    max-width: 600px;
    position: relative;
}

.stb-search-overlay-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: #fff;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease;
}

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

.stb-search-form-overlay {
    display: flex;
    width: 100%;
}

.stb-search-overlay input {
    width: 100%;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    color: #fff;
    padding: 16px 0;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

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

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


/* ─── Featured Hero (Jinko grid-offset-half) ─────────────────── */

.sds-featured-section {
    background: var(--color-bg);
}

.sds-featured-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

/* Main (big) cover card */
.sds-featured-main {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: var(--color-dark-grey);
}

.sds-featured-main-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.05) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: #fff;
}

.sds-featured-main-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.sds-featured-main-meta .stb-badge {
    font-size: 0.6875rem;
}

.sds-featured-date,
.sds-featured-reading {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sds-featured-main-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 4px 0;
    color: #fff;
}

.sds-featured-main-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sds-featured-main-title a:hover {
    color: #fff;
    text-decoration: underline;
}

.sds-featured-main-excerpt {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
    max-width: 500px;
}

/* Small cards grid (4 posts, 2x2) */
.sds-featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.sds-featured-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 150px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-dark-grey);
}

.sds-featured-card-link {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0) 60%);
    display: flex;
    align-items: flex-end;
    padding: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.sds-featured-card-link:hover {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1) 60%);
}

.sds-featured-card-title {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}


/* ─── Homepage Section ───────────────────────────────────────── */

.sds-homepage-section {
    padding: 48px 0;
}

.sds-homepage-section .stb-section-header {
    margin-bottom: 32px;
}

.sds-homepage-section .stb-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.sds-homepage-section .stb-section-title em {
    font-style: normal;
    font-weight: 700;
    color: var(--color-accent);
}

/* Category sections spacing — tight gap after billboard ads */
.sds-cat-section {
    margin-top: 0;
    padding-top: 10px;
}

.stb-billboard-ad + .sds-cat-section {
    padding-top: 10px;
}

.sds-cat-section .stb-section-title {
    font-size: 1.375rem;
}

/* Kreacja break between grid blocks */
.sds-kreacja-break {
    margin: 1.5rem 0;
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}


/* ─── Billboard Ad (CB) ──────────────────────────────────────── */

.stb-billboard-ad {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 15px 16px;
}




/* ─── Single Article ─────────────────────────────────────────── */

.stb-single-article {
    margin-bottom: 32px;
}

.stb-single-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .stb-single-title {
        font-size: 2.2rem;
    }
}

.stb-single-header .stb-badge {
    margin-bottom: 8px;
}



/* ─── Related Posts ──────────────────────────────────────────── */

.sds-related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.sds-related h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.sds-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .sds-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sds-related-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.2s ease;
}

.sds-related-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sds-related-card-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: var(--radius);
    overflow: hidden;
}

.sds-related-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sds-related-card-body {
    min-width: 0;
}

.sds-related-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.sds-related-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--color-title);
}

/* ─── Sidebar "Hey Jinko" About Widget ───────────────────────── */

.stb-widget-about {
    text-align: center;
}

.stb-widget-about .stb-widget-title {
    text-align: left;
}

.stb-widget-about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    background: var(--color-accent);
}

.stb-widget-about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stb-widget-about p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}


/* ─── Sidebar Category Tag Cloud (Browse Categories) ─────────── */

.stb-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stb-tag-cloud a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--color-very-light-grey);
    color: var(--color-text);
    border-radius: 50px;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

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


/* ─── Sidebar Comments Widget ────────────────────────────────── */

.stb-recent-comment {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

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

.stb-recent-comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stb-recent-comment strong {
    color: var(--color-text);
    font-weight: 600;
}

.stb-recent-comment a {
    color: var(--color-accent);
}

.stb-recent-comment a:hover {
    opacity: 0.8;
}


/* ─── Footer ─────────────────────────────────────────────────── */

.stb-footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0 24px;
    margin-top: 48px;
}

.stb-footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: 12px;
}

.stb-footer-categories {
    margin-bottom: 24px;
}

.stb-footer-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.stb-footer-cat-list a {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.stb-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.stb-footer-copy {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.stb-footer-copy strong {
    color: var(--color-title);
    font-weight: 700;
}

.stb-footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.stb-footer-legal a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.stb-footer-sep {
    color: var(--color-light-grey);
}


/* ─── Contact Page ───────────────────────────────────────────── */

.sds-contact {
    max-width: 700px;
    margin: 48px auto;
}

.sds-contact h1 {
    margin-bottom: 16px;
}

.sds-contact p {
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.sds-form-group {
    margin-bottom: 24px;
}

.sds-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.sds-form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.sds-success {
    background: #d4edda;
    color: #155724;
}

.sds-error {
    background: #f8d7da;
    color: #721c24;
}


/* ─── 404 Page ───────────────────────────────────────────────── */

.sds-404 {
    text-align: center;
    padding: 80px 24px;
}

.sds-404 h1 {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 16px;
    line-height: 1.1;
}

.sds-404 p {
    font-size: 1.125rem;
    margin-bottom: 32px;
    color: var(--color-text-secondary);
}

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

.sds-404-link {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    background: var(--color-accent-hover);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background 0.2s ease;
    min-height: 48px;
    line-height: 1.5;
}

.sds-404-link:hover {
    background: var(--color-accent);
    color: #fff;
}


/* Breadcrumbs dark/light context — defined in base.css (single source of truth) */


/* ─── Cookie bar adjustments ─────────────────────────────────── */
/* CookieSEM bar z Content Bridge — nadpisanie pozycji */

.cookie-consent-bar,
.cs-cookie-bar {
    z-index: 9999 !important;
}


/* Back to Top — defined in base.css (single source of truth) */


/* ─── WordPress widgets defaults ─────────────────────────────── */

.widget_archive ul,
.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_archive li,
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.widget_archive li:last-child,
.widget_categories li:last-child {
    border-bottom: none;
}

.widget_archive a,
.widget_categories a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.widget_archive a:hover,
.widget_categories a:hover {
    color: var(--color-accent);
}


/* ═══════════════════════════════════════════════════════════════
   Responsive — Mobile-first (min-width)
   Base = mobile 360px+
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tablet: 768px+ ─────────────────────────────────────────── */

@media (min-width: 768px) {

    /* Header: hide hamburger, show desktop nav */
    .stb-hamburger {
        display: none;
    }

    .stb-nav {
        display: flex;
    }

    /* Featured Hero: 1 big left (55%) + 4 small right (2x2) */
    .sds-featured-inner {
        grid-template-columns: 55% 1fr;
        gap: 4px;
    }

    .sds-featured-main {
        min-height: 420px;
    }

    .sds-featured-main-overlay {
        padding: 32px;
    }

    .sds-featured-main-title {
        font-size: 1.75rem;
    }

    .sds-featured-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 4px;
    }

    .sds-featured-card {
        min-height: 0;
    }

    .sds-featured-card-title {
        font-size: 0.9375rem;
    }

    .sds-homepage-section .stb-section-title {
        font-size: 1.75rem;
    }

    /* Archive grid: 2 columns */
    /* Billboard Ad */
    .stb-billboard-ad {
        padding: 32px 24px;
    }

}


/* ─── Desktop: 1024px+ ───────────────────────────────────────── */

@media (min-width: 1024px) {

    /* Featured Hero — bigger */
    .sds-featured-inner {
        grid-template-columns: 58% 1fr;
    }

    .sds-featured-main {
        min-height: 500px;
    }

    .sds-featured-main-title {
        font-size: 2.2rem;
    }

    .sds-featured-main-excerpt {
        font-size: 1rem;
    }

    .sds-featured-card-title {
        font-size: 1rem;
    }

    /* Related Posts: 2 columns (prev/next) */
    .sds-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 404 page */
    .sds-404 h1 {
        font-size: 6rem;
    }
}


/* ─── Large Desktop: 1200px+ ─────────────────────────────────── */

@media (min-width: 1200px) {

    /* Featured Hero — widest */
    .sds-featured-inner {
        grid-template-columns: 60% 1fr;
    }

    .sds-featured-main {
        min-height: 520px;
    }

    .sds-featured-main-title {
        font-size: 2.4rem;
    }

    .sds-featured-main-overlay {
        padding: 40px;
    }
}
