/**
 * Łóżko Kontynentalne — custom.css
 * Foxiz parents specific: topbar, header, hero, CTA, footer, mega menu.
 */

/* === TOP BAR (foxiz announcement bar) === */
.lk-topbar {
    background: var(--color-topbar-bg);
    padding: 8px 0;
    text-align: center;
}

.lk-topbar-link {
    color: var(--color-topbar-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}

.lk-topbar-link:hover {
    opacity: 0.8;
    color: var(--color-topbar-text);
}

/* === HEADER (foxiz style: logo left, nav absolute-center, actions right) === */
.lk-header {
    background: var(--color-header-bg);
    border-bottom: none;
    position: relative;
    z-index: 1000;
}

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

.lk-header-logo {
    flex-shrink: 0;
    z-index: 2;
}

.lk-header-logo img {
    max-height: 34px;
    width: auto;
}

.lk-site-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-text);
    white-space: nowrap;
}

.lk-site-title:hover {
    color: var(--color-accent);
}

/* === NAV (foxiz style: absolute-centered, "/" separators, dropdown chevron) === */
.lk-header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    z-index: 1;
}

.lk-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.lk-menu .menu-item {
    position: relative;
}

.lk-menu .menu-item > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    transition: color 0.2s;
}

.lk-menu .menu-item > a:hover {
    color: var(--color-accent);
}

/* Dropdown chevron for items with sub-menu */
.lk-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 2px;
    margin-bottom: 2px;
    opacity: 0.6;
}

/* Slash separator between nav items */
.lk-menu .menu-item + .menu-item::before {
    content: '/';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-border);
    font-size: 0.9rem;
    font-weight: 400;
    pointer-events: none;
}

/* Dropdown */
.lk-menu .menu-item .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
    padding: 8px 0;
}

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

.lk-menu .sub-menu .menu-item::before {
    display: none;
}

.lk-menu .sub-menu a {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 400;
}

/* === HEADER ACTIONS === */
.lk-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    z-index: 2;
}

.lk-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 8px 16px;
    transition: all 0.2s;
}

.lk-subscribe-btn:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.lk-search-toggle {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.lk-search-toggle:hover {
    border-color: var(--color-text);
    color: var(--color-accent);
}

/* === HAMBURGER MENU === */
.stb-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.stb-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === SEARCH OVERLAY === */
.lk-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lk-search-overlay[hidden] {
    display: none;
}

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

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

.lk-search-input {
    flex: 1;
    padding: 16px 20px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    border: none;
    outline: none;
    background: #fff;
}

.lk-search-submit {
    padding: 16px 20px;
    background: var(--color-accent);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.lk-search-submit:hover {
    background: var(--color-accent-hover);
}

.lk-search-close {
    position: absolute;
    top: -48px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* === HERO SECTION (foxiz 2-column: large featured left, daily feed right) === */
.lk-hero {
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.lk-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: start;
}

.lk-hero-main {
    position: relative;
}

/* Progress bar above hero image */
.lk-hero-progress {
    width: 100%;
    height: 4px;
    background: var(--color-border);
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 2px;
}

.lk-hero-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.lk-hero-img-link {
    display: block;
    overflow: hidden;
    margin-bottom: 24px;
}

.lk-hero-img {
    width: 100%;
    aspect-ratio: 770 / 515;
    object-fit: cover;
    border-radius: var(--radius);
}

.lk-hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
}

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

.lk-hero-excerpt {
    color: var(--color-meta);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* === DAILY FEED (foxiz right column) === */
.lk-daily-feed {
    border-left: none;
    padding-left: 0;
}

/* "Daily Feed" / "Najnowsze" heading with line EXTENDING TO THE RIGHT */
.lk-daily-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 0;
    position: relative;
}

.lk-daily-title span {
    flex-shrink: 0;
    white-space: nowrap;
}

.lk-daily-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--color-accent);
}

.lk-daily-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lk-daily-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
}

.lk-daily-item:first-child {
    padding-top: 0;
}

.lk-daily-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lk-daily-content {
    flex: 1;
    min-width: 0;
}

.lk-daily-item-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.lk-daily-item-title a:hover {
    color: var(--color-accent);
}

.lk-daily-content time {
    font-size: 0.8rem;
    color: var(--color-meta);
}

/* Daily feed thumbnail - foxiz: larger, right side */
.lk-daily-thumb {
    flex-shrink: 0;
    width: 130px;
}

.lk-daily-thumb img {
    width: 130px;
    height: 92px;
    object-fit: cover;
    border-radius: var(--radius);
}

/* === POPULAR ITEM ACTIVE STATE === */
.lk-popular-item {
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}

.lk-popular-item:hover,
.lk-popular-item.lk-popular-active {
    background: var(--color-surface);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 4px;
}

.lk-popular-item.lk-popular-active .lk-daily-item-title a {
    color: var(--color-accent);
}

/* === CTA SECTIONS === */
.lk-cta-section {
    padding: 48px 0;
    margin: 32px 0;
}

.lk-cta-light {
    background: var(--color-bg);
}

.lk-cta-accent {
    background: transparent;
}

.lk-cta-inner {
    max-width: 640px;
}

.lk-cta-text h2 {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

.lk-cta-ad {
    margin-top: 24px;
}

/* === CATEGORY SECTIONS === */
.lk-category-section {
    padding: 48px 0;
}

/* === FOOTER === */
.lk-footer-wave {
    margin-bottom: -2px;
}

.lk-footer-wave svg {
    display: block;
    width: 100%;
    height: 100px;
}

.lk-footer {
    background: var(--color-accent);
}

.lk-footer-spacer {
    height: 0;
}

/* === FOOTER BOTTOM === */
.lk-footer-bottom {
    background: var(--color-bg);
    padding: 32px 0;
    text-align: center;
}

.lk-footer-links {
    margin-bottom: 16px;
}

.lk-footer-links a {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 600;
}

.lk-footer-links a:hover {
    color: var(--color-accent);
}

.lk-footer-sep {
    margin: 0 10px;
    color: var(--color-meta);
}

.lk-footer-legal {
    font-size: 0.8rem;
    color: var(--color-meta);
}

.lk-footer-legal p {
    margin-bottom: 4px;
}

.lk-footer-company {
    font-size: 0.75rem;
    color: var(--color-meta);
}

/* === SINGLE HEADER (foxiz style) === */
.lk-single-header {
    margin-bottom: 24px;
}

.lk-single-header .stb-post-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 12px 0;
}

.lk-single-meta {
    margin-top: 12px;
}

/* === RESPONSIVE: TABLET (1024px) === */
@media (max-width: 1024px) {
    .lk-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .lk-daily-feed {
        border-top: 1px solid var(--color-border);
        padding-top: 24px;
    }

    .lk-header-center {
        display: none;
    }

    .stb-menu-toggle {
        display: flex;
    }

    .stb-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--color-bg);
        padding: 24px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .stb-nav.is-open {
        transform: translateX(0);
    }

    .lk-menu {
        flex-direction: column;
        gap: 0;
    }

    .lk-menu .menu-item + .menu-item::before {
        display: none;
    }

    .lk-menu .menu-item > a {
        padding: 12px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .lk-menu .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }

    .lk-subscribe-btn {
        display: none;
    }
}

/* === RESPONSIVE: MOBILE (768px) === */
@media (max-width: 768px) {
    .lk-topbar {
        display: none;
    }

    .lk-header-inner {
        height: 60px;
    }

    /* Override tablet nav top offset for smaller header */
    .stb-nav {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .lk-daily-feed {
        padding-top: 24px;
    }

    .lk-hero-title {
        font-size: 1.5rem;
    }

    /* CTA responsive */
    .lk-cta-text h2 {
        font-size: 1.35rem;
    }

    /* Newsletter responsive */
    .lk-newsletter-inner {
        flex-direction: column;
        gap: 24px;
    }

    .lk-newsletter-row {
        flex-direction: column;
        gap: 8px;
    }

    .lk-newsletter-title {
        font-size: 1.25rem;
    }

    /* Footer wave */
    .lk-footer-wave svg {
        height: 40px;
    }

    /* Single header */
    .lk-single-header .stb-post-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .lk-daily-thumb {
        width: 80px;
    }

    .lk-daily-thumb img {
        width: 80px;
        height: 56px;
    }

    .lk-hero-title {
        font-size: 1.3rem;
    }
}
