/* ==========================================================================
   CUSTOM.CSS — Pokój Młodzieżowy | Theme-Specific Styles
   Design: Newspaper/Forcast (byteflows.net)
   Author: Damian Zięba | SEMTAK | https://semtak.pl
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOPBAR
   -------------------------------------------------------------------------- */
.stb-topbar {
    background-color: var(--color-surface);
    height: 36px;
    font-family: var(--font-body);
    font-size: 12px;
    color: #666666;
    display: flex;
    align-items: center;
}

.stb-topbar .stb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stb-topbar-date,
.stb-topbar-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stb-topbar a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.stb-topbar-social svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   2. HEADER MAIN
   -------------------------------------------------------------------------- */
.stb-header-main,
.stb-header-logo {
    padding: 5px 0;
    text-align: center;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stb-header-logo-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stb-site-title,
.stb-logo-text {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-block;
}

.stb-site-title:hover,
.stb-logo-text:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.stb-site-logo img,
.stb-logo img,
.stb-logo a img {
    max-height: 60px;
    width: auto;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   3. NAV ROW
   -------------------------------------------------------------------------- */
.stb-navbar {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stb-navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stb-navbar .stb-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stb-nav-list {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.stb-nav-list li {
    position: relative;
}

.stb-nav-list a {
    display: block;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.stb-nav-list a:hover,
.stb-nav-list .current-menu-item > a,
.stb-nav-list .current_page_item > a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    text-decoration: none;
}

/* Dropdown submenu */
.stb-nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1001;
}

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

.stb-nav-list .sub-menu a {
    padding: 10px 16px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    border-left: 3px solid transparent;
}

.stb-nav-list .sub-menu a:hover {
    background-color: var(--color-surface);
    border-left-color: var(--color-primary);
}

/* Nav actions (search button) */
.stb-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stb-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px;
    color: var(--color-text);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    position: absolute;
    right: 16px;
}

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

.stb-search-btn svg {
    width: 18px;
    height: 18px;
}

/* Hamburger — hidden on desktop */
.stb-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-text);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

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

/* --------------------------------------------------------------------------
   4. SEARCH OVERLAY
   -------------------------------------------------------------------------- */
.stb-search-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    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 form {
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
}

.stb-search-overlay input[type="search"],
.stb-search-overlay input[type="text"] {
    width: 100%;
    font-family: var(--font-heading);
    font-size: 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #ffffff;
    color: #ffffff;
    padding: 16px 0;
    outline: none;
}

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

.stb-search-overlay form button[type="submit"] {
    position: absolute;
    right: 24px;
    bottom: 50%;
    transform: translateY(50%);
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.2s ease;
}

.stb-search-overlay form button[type="submit"]:hover {
    opacity: 0.7;
}

.stb-search-overlay-form {
    position: relative;
}

.stb-search-overlay-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #ffffff;
    background: transparent;
    border: none;
    font-size: 32px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.stb-search-overlay-close:hover {
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   5. OFFCANVAS MENU (Mobile)
   -------------------------------------------------------------------------- */
.stb-offcanvas {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 2001;
    transition: transform 0.3s ease;
    padding: 24px;
    overflow-y: auto;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
}

.stb-offcanvas.active {
    transform: translateX(300px);
}

.stb-offcanvas-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stb-offcanvas-nav li {
    border-bottom: 1px solid var(--color-border);
}

.stb-offcanvas-nav a {
    display: block;
    padding: 12px 0;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

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

.stb-offcanvas-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* --------------------------------------------------------------------------
   6. HERO GRID
   -------------------------------------------------------------------------- */
.stb-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4px;
    height: 500px;
    margin-bottom: 32px;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px;
}

/* Big hero (left column) */
.stb-hero-big {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: #222;
}

.stb-hero-big:hover {
    opacity: 0.95;
}

.stb-hero-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Small posts grid (right column, 2x2) */
.stb-hero-small-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.stb-hero-small {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: #222;
}

.stb-hero-small:hover {
    opacity: 0.95;
}

/* Overlay gradient */
.stb-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.stb-hero-small .stb-hero-overlay {
    padding: 16px;
}

.stb-hero-overlay .stb-cat-badge {
    margin-bottom: 10px;
    align-self: flex-start;
}

/* Hero titles */
.stb-hero-title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    margin: 0 0 8px;
    line-height: 1.2;
}

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

/* Hero meta */
.stb-hero-meta {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 12px;
    display: flex;
    gap: 12px;
}

.stb-hero-meta .stb-meta-sep {
    color: rgba(255, 255, 255, 0.5);
}

/* Hero responsive */
@media (max-width: 768px) {
    .stb-hero-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .stb-hero-big {
        min-height: 300px;
    }

    .stb-hero-small-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stb-hero-small {
        min-height: 180px;
    }

    .stb-hero-title {
        font-size: 22px;
    }

    .stb-hero-title--sm {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stb-hero-small-grid {
        grid-template-columns: 1fr;
    }

    .stb-hero-small {
        min-height: 200px;
    }

    .stb-hero-overlay {
        padding: 16px;
    }

    .stb-hero-title {
        font-size: 20px;
    }
}

/* --------------------------------------------------------------------------
   7. SINGLE PAGE
   -------------------------------------------------------------------------- */
.stb-single-header,
.stb-article-header {
    margin-bottom: 32px;
}

.stb-single-title,
.stb-article-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 12px 0 16px;
    color: var(--color-text);
}

.stb-single-meta,
.stb-article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.stb-single-meta span,
.stb-single-meta time,
.stb-article-meta span,
.stb-article-meta time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stb-single-meta a,
.stb-article-meta a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.stb-single-meta a:hover,
.stb-article-meta a:hover {
    color: var(--color-primary);
}

.stb-featured-image,
.stb-article-thumbnail {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

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

/* Single content typography */
.stb-single-content,
.stb-entry-content {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
}

.stb-single-content p,
.stb-entry-content p {
    margin-bottom: 1.5em;
}

.stb-single-content h2,
.stb-entry-content h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 2em 0 1em;
    color: var(--color-text);
}

.stb-single-content h3,
.stb-entry-content h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 1.5em 0 0.8em;
    color: var(--color-text);
}

.stb-single-content img,
.stb-entry-content img {
    border-radius: var(--radius);
    height: auto;
}

.stb-single-content blockquote,
.stb-entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1.5em 0;
    padding: 16px 24px;
    background-color: var(--color-surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: #555555;
}

.stb-single-content ul,
.stb-single-content ol,
.stb-entry-content ul,
.stb-entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.stb-single-content li,
.stb-entry-content li {
    margin-bottom: 0.5em;
}

/* Tags */
.stb-tags {
    margin-top: 32px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stb-tags a {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stb-tags a:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   8. ARCHIVE
   -------------------------------------------------------------------------- */
.stb-archive-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.stb-archive-desc {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 14px;
    max-width: 600px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   9. FOOTER
   -------------------------------------------------------------------------- */
.stb-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 60px 0 0;
    border-top: 1px solid var(--color-border);
    margin-top: 10px;
}

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

.stb-footer-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

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

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

.stb-footer p {
    margin-bottom: 0.8em;
    line-height: 1.6;
}

.stb-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stb-footer-links li {
    margin-bottom: 10px;
}

.stb-footer-links a {
    font-size: 14px;
}

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

/* Footer social */
.stb-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

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

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

.stb-footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Footer description */
.stb-footer-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* Footer popular posts */
.stb-footer-post {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.stb-footer-post:last-child {
    margin-bottom: 0;
}

.stb-footer-post-thumb {
    flex-shrink: 0;
}

.stb-footer-post-thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.stb-footer-post-info {
    flex: 1;
    min-width: 0;
}

.stb-footer-post-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

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

.stb-footer-post-date {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-top: 4px;
    display: block;
}

/* Footer bottom bar */
.stb-footer-bottom {
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.stb-footer-bottom a {
    color: var(--color-text-secondary);
}

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

/* Footer responsive */
@media (max-width: 768px) {
    .stb-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stb-footer {
        padding: 40px 0 0;
    }
}

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

/* --------------------------------------------------------------------------
   10. CONTACT PAGE
   -------------------------------------------------------------------------- */
.stb-contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.stb-form-group {
    margin-bottom: 20px;
}

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

.stb-form-group input,
.stb-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stb-form-group input:focus,
.stb-form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 115, 2, 0.1);
}

.stb-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.stb-btn-submit {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.stb-form-message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 16px;
    font-size: 14px;
}

.stb-form-success,
.stb-form-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stb-form-error,
.stb-form-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stb-btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

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

/* --------------------------------------------------------------------------
   11. RELATED POSTS
   -------------------------------------------------------------------------- */
.stb-related,
.stb-related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--color-border);
}

.stb-related .stb-section-title,
.stb-related-posts .stb-section-title {
    font-size: 22px;
}

/* --------------------------------------------------------------------------
   12. AUTHOR BIO
   -------------------------------------------------------------------------- */
.stb-author-box,
.stb-author-bio {
    display: flex;
    gap: 20px;
    padding: 24px;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    margin-top: 32px;
}

.stb-author-avatar,
.stb-author-bio-avatar {
    flex-shrink: 0;
}

.stb-author-avatar img,
.stb-author-bio-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.stb-author-info,
.stb-author-bio-info {
    flex: 1;
}

.stb-author-bio-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 4px;
}

.stb-author-name,
.stb-author-bio-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--color-text);
}

.stb-author-name a,
.stb-author-bio-name a {
    color: var(--color-text);
    text-decoration: none;
}

.stb-author-name a:hover,
.stb-author-bio-name a:hover {
    color: var(--color-primary);
}

.stb-author-bio-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Author box responsive */
@media (max-width: 480px) {
    .stb-author-box,
    .stb-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   13. MOBILE NAV RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .stb-hamburger {
        display: flex;
    }

    .stb-nav-list {
        display: none;
    }

    .stb-topbar {
        display: none;
    }

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

    .stb-single-meta {
        font-size: 12px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .stb-header-main {
        padding: 12px 0;
    }

    .stb-site-title,
    .stb-logo-text {
        font-size: 24px;
    }

    .stb-hero-overlay {
        padding: 16px;
    }

    .stb-hero-item:first-child .stb-hero-title {
        font-size: 20px;
    }

    .stb-single-title {
        font-size: 22px;
    }
}
