/* ==========================================================================
   BAZARTIP.CZ – HLAVNÍ STYLOVÝ SOUBOR
   ========================================================================== */

/* 1. ZÁKLADNÍ NASTAVENÍ A RESET */
* {
    box-sizing: border-box;
}

html {
    font-family: Arial, Helvetica, sans-serif;
    background: #eeeeee;
    color: #171717;
}

body {
    margin: 0;
    min-width: 320px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 2. HLAVNÍ ROZVRŽENÍ STRÁNKY (PC) */
.page {
    max-width: 1050px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.topbar {
    height: 86px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.top-date {
    font-size: 13px;
    color: #666666;
    flex: 1;
    text-align: left;
}

.logo {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.5px;
    flex: 1;
    text-align: center;
}

.logo span {
    font-weight: 400;
}

.categories {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid #cccccc;
    scrollbar-width: thin;
}

.categories a {
    padding: 15px 15px;
    font-size: 16px;
    font-weight: 700;
}

.categories a:hover,
.categories a.active {
    background: #222222;
    color: #ffffff;
}

main {
    padding: 0 30px 40px;
}

.content-layout {
    display: flex;
    gap: 30px;
    padding: 20px;
}

.main-column {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 3. KARTY INZERÁTŮ (PC) */
.news-card {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #888;
}

.news-media {
    order: 1;
    flex-shrink: 0;
    width: 250px;
}
.news-header { order: 2; flex: 1; min-width: 0; }
.news-body { order: 3; width: 100%; }

.news-content h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

.news-content p {
    margin: 0 0 10px;
    color: #555555;
    font-size: 14px;
    line-height: 1.35;
}

/* 4. POSTRANNÍ REKLAMY (PC) */
.side-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 150px;
}
.side-ad-left  { right: calc(50% + 525px + 10px); }
.side-ad-right { left:  calc(50% + 525px + 10px); }

/* 5. TABLETY A MALÉ NOTEBOOKY (do 1024px) */
@media (max-width: 1024px) {
    .news-media {
        width: 100%;
        max-width: 100%;
        flex-shrink: 1;
        margin-bottom: 10px;
    }

    .news-card {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .news-header, .news-body {
        width: 100%;
        flex: none;
    }

    .news-card .news-header h2 span {
        font-size: 18px;
    }
}

/* 6. MOBILNÍ VERZE (do 768px) */
@media (max-width: 768px) {
    main { padding: 10px 8px 40px 8px; }
    .content-layout { display: block; width: 100%; padding: 0; }
    .main-column { display: block; width: 100%; margin: 0 0 20px 0; }
    .sidebar { display: block; width: 100%; margin: 0; padding: 0; }
    .side-ad { display: none; }

    .news-card {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 10px 0;
    }

    .news-header { display: contents; }

    .news-card .article-category { order: 1; width: 100%; }
    .news-card h2 { order: 2; width: 100%; }
    .news-media { order: 3; width: 100%; height: auto; margin-bottom: 5px; }
    .news-header .news-perex { order: 4; width: 100%; margin: 0 0 4px 0; display: block; }
    .news-body { order: 5; width: 100%; margin-top: 0; padding-top: 0; }

    .news-media img, .news-media div {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    .news-card .news-header h2,
    .news-card .news-header h2 span {
        font-size: 22px;
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .news-perex { font-size: 18px; }
    .news-perex span { display: none; }
}