/*
 * SKYLIGHT — článkové rubriky
 * Vložte na konec vlastního CSS, bez tagů <style>.
 * type-posts-listing = výpis rubriky, nikoli detail článku či produktu.
 */

body.type-posts-listing #content {
    --blog-blue: #245ba5;
    --blog-ink: #24242e;
    --blog-muted: #626b76;
    --blog-line: #dfe5eb;
    --blog-soft: #f3f6fa;
}

/* Hero: nadpis vlevo, čitelně široký úvod vpravo */
body.type-posts-listing #content .sectionDescription {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.6fr);
    gap: 16px 48px;
    align-items: start;
    margin: 0 0 32px;
    padding: clamp(24px, 3.5vw, 48px);
    border: 0;
    border-left: 4px solid var(--blog-blue);
    border-radius: 0;
    background: var(--blog-soft);
}
body.type-posts-listing #content .sectionDescription h1 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    color: var(--blog-ink);
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}
body.type-posts-listing #content .sectionDescription > :not(h1) {
    grid-column: 2;
    min-width: 0;
    margin: 0;
    color: var(--blog-muted);
    font-size: 16px;
    line-height: 1.8;
}
body.type-posts-listing #content .sectionDescription > :not(h1) > :last-child {
    margin-bottom: 0;
}

/* Rubriky: kompaktní obrazové dlaždice */
body.type-posts-listing #content .subcategories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: auto;
    margin: 0 0 40px;
    padding: 0;
    border: 0;
    list-style: none;
}
body.type-posts-listing #content .subcategories::before,
body.type-posts-listing #content .subcategories::after {
    display: none;
}
body.type-posts-listing #content .subcategories > li {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
body.type-posts-listing #content .subcategories > li > a {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
    min-height: 104px;
    padding: 12px 18px 12px 12px;
    border: 1px solid var(--blog-line);
    border-radius: 0;
    background: #fff;
    color: var(--blog-ink);
    text-decoration: none;
    box-shadow: none;
    transition: border-color .2s, background-color .2s;
}
body.type-posts-listing #content .subcategories .image {
    display: block;
    flex: 0 0 96px;
    width: 96px;
    height: 76px;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
body.type-posts-listing #content .subcategories .image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
}
body.type-posts-listing #content .subcategories .text {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}
body.type-posts-listing #content .subcategories > li > a::after {
    content: "→";
    flex: 0 0 auto;
    color: var(--blog-blue);
    font-size: 22px;
}
body.type-posts-listing #content .subcategories a:hover {
    border-color: var(--blog-blue);
    background: var(--blog-soft);
}

/* Články: stejné obrázky, výrazné nadpisy, odkaz vždy dole */
body.type-posts-listing #content #newsWrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
}
body.type-posts-listing #content #newsWrapper::before,
body.type-posts-listing #content #newsWrapper::after {
    display: none;
}
body.type-posts-listing #content #newsWrapper .news-item {
    display: flex;
    flex-direction: column;
    float: none;
    position: relative;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--blog-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    transition: border-color .2s;
}
body.type-posts-listing #content #newsWrapper .news-item:hover {
    border-color: var(--blog-blue);
}
body.type-posts-listing #content #newsWrapper .news-item > .image {
    float: none;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--blog-soft);
}
body.type-posts-listing #content #newsWrapper .image > a {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
body.type-posts-listing #content #newsWrapper .image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    transition: transform .3s;
}
body.type-posts-listing #content #newsWrapper .news-item:hover .image img {
    transform: scale(1.025);
}
body.type-posts-listing #content #newsWrapper .news-item > .text {
    flex: 1;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 24px 24px 20px;
}
body.type-posts-listing #content #newsWrapper time {
    display: block;
    margin: 0 0 12px;
    color: var(--blog-muted);
    font-size: 13px;
    line-height: 1.5;
}
body.type-posts-listing #content #newsWrapper .title {
    display: block;
    margin: 0 0 14px;
    color: var(--blog-ink);
    font-size: clamp(19px, 1.5vw, 23px);
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}
body.type-posts-listing #content #newsWrapper .title:hover {
    color: var(--blog-blue);
    text-decoration: underline;
    text-underline-offset: 4px;
}
body.type-posts-listing #content #newsWrapper .description,
body.type-posts-listing #content #newsWrapper .description p {
    margin: 0;
    color: var(--blog-muted);
    font-size: 15px;
    line-height: 1.75;
}
body.type-posts-listing #content #newsWrapper .cely-clanek {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: static;
    width: auto;
    margin: 0 24px;
    padding: 16px 0 18px;
    border: 0;
    border-top: 1px solid var(--blog-line);
    border-radius: 0;
    background: transparent;
    color: var(--blog-blue);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
}
body.type-posts-listing #content #newsWrapper .cely-clanek::after {
    content: "→";
    position: static;
    margin: 0;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
}

/* Stránkování — zachovává původní odkazy i jejich přístupné názvy */
body.type-posts-listing #content .listingControls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0 56px;
    padding: 24px 0 0;
    border-top: 1px solid var(--blog-line);
}
body.type-posts-listing #content .pagination {
    width: auto;
    margin: 0;
    padding: 0;
}
body.type-posts-listing #content .pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.type-posts-listing #content .pagination__list > li {
    margin: 0;
    padding: 0;
}
body.type-posts-listing #content .pagination__link,
body.type-posts-listing #content .pagination__currentPage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    width: auto;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--blog-line);
    border-radius: 0;
    background: #fff;
    color: var(--blog-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}
body.type-posts-listing #content .pagination__currentPage,
body.type-posts-listing #content .pagination__link:hover {
    border-color: var(--blog-blue);
    background: var(--blog-blue);
    color: #fff;
}
body.type-posts-listing #content .itemsTotal {
    position: static;
    width: auto;
    margin: 0;
    color: var(--blog-muted);
    font-size: 14px;
}
body.type-posts-listing #content .goToTop {
    position: static;
    width: auto;
    margin: 0;
}
body.type-posts-listing #content .goToTop__button {
    border: 1px solid var(--blog-line);
    border-radius: 0;
    background: #fff;
    color: var(--blog-blue);
}
body.type-posts-listing #content .goToTop__button:hover {
    border-color: var(--blog-blue);
    background: var(--blog-soft);
}
body.type-posts-listing #content :is(.subcategories a, .news-item a, .pagination__link, .goToTop__button):focus-visible {
    outline: 3px solid var(--blog-blue);
    outline-offset: 4px;
}

@media (max-width: 1199px) {
    body.type-posts-listing #content #newsWrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    body.type-posts-listing #content .subcategories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    body.type-posts-listing #content .sectionDescription {
        display: block;
        margin-bottom: 24px;
        padding: 24px 20px;
    }
    body.type-posts-listing #content .sectionDescription h1 {
        margin-bottom: 16px;
    }
    body.type-posts-listing #content .sectionDescription > :not(h1) {
        margin-top: 12px;
        font-size: 15px;
    }
    body.type-posts-listing #content .subcategories,
    body.type-posts-listing #content #newsWrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    body.type-posts-listing #content .subcategories {
        margin-bottom: 28px;
    }
    body.type-posts-listing #content #newsWrapper .news-item > .text {
        padding: 20px;
    }
    body.type-posts-listing #content #newsWrapper .cely-clanek {
        margin: 0 20px;
    }
    body.type-posts-listing #content .listingControls {
        justify-content: center;
        gap: 16px;
        margin-top: 28px;
    }
    body.type-posts-listing #content .itemsTotal {
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.type-posts-listing #content .subcategories a,
    body.type-posts-listing #content #newsWrapper .news-item,
    body.type-posts-listing #content #newsWrapper .image img {
        transition: none;
        transform: none;
    }
}
body.type-posts-listing #content #newsWrapper .cely-clanek::after {
    transform: none;
    rotate: none;
}
/* Rubriky – bez podtržení při najetí */
body.type-posts-listing #content .subcategories > li > a,
body.type-posts-listing #content .subcategories > li > a:hover,
body.type-posts-listing #content .subcategories > li > a .text {
    text-decoration: none !important;
}

/* Čistá šipka bez pozadí a podtržení */
body.type-posts-listing #content .subcategories > li > a::after,
body.type-posts-listing #content .subcategories > li > a:hover::after {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
    padding: 0 !important;
}