/* 1. Bílé pozadí pro breadcrumbs (drobečkovou navigaci) na blogu */
body.type-post .breadcrumbs {
    background-color: #ffffff ;
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* 2. Zúžení celého článku a hlavní typografie */
body.type-post .news-item-detail {
    max-width: 850px;
    margin: 0 auto;
    font-family: 'Setup Grotesk', sans-serif !important;
    color: #333;
    font-size: 16px;
    padding: 0 15px; /* Ochrana okrajů pro mobily */
}

/* Vynucení brand fontu pro Pobo Builder */
body.type-post #pobo-all-content,
body.type-post #pobo-all-content p,
body.type-post #pobo-all-content span,
body.type-post #pobo-all-content h2,
body.type-post #pobo-all-content h3,
body.type-post #pobo-all-content h4,
body.type-post #pobo-all-content li,
body.type-post #pobo-all-content a,
body.type-post #pobo-all-content table {
    font-family: 'Setup Grotesk', sans-serif !important;
}

/* ==========================================================================
   AGRESIVNÍ RESET POBO MEZER (Odstranění 40px "děr")
   ========================================================================== */
body.type-post #pobo-all-content .widget-container,
body.type-post #pobo-all-content .widget-projector,
body.type-post #pobo-all-content .widget-typography,
body.type-post #pobo-all-content .empty {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Plošné skrytí prázdných odstavců vygenerovaných editorem (v celém článku) */
body.type-post .news-item-detail p:empty,
body.type-post .news-item-detail p:has(> br:only-child) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Textové odkazy */
body.type-post #pobo-all-content p a,
body.type-post #pobo-all-content li a,
body.type-post .news-item-detail > .text > p a {
    color: #1E22AA;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

body.type-post #pobo-all-content p a:hover,
body.type-post #pobo-all-content li a:hover {
    color: #412C0B;
}

/* 4. Oprava mezer v hlavičce článku (Nadpis a datum) */
body.type-post .news-item-detail h1 {
    color: #000000;
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 15px 0 !important; /* Zvětšena mezera pod nadpisem */
    text-align: left;
    line-height: 1.3;
}

body.type-post .news-item-detail time {
    display: block;
    text-align: left;
    margin-bottom: 25px !important; /* Zvětšena mezera pod datumem pro lepší oddělení od obsahu */
    color: #777;
    font-size: 14px;
    font-weight: 600;
}

/* Očištění automatických mezer a paddingů od Shoptetu nad obsahem */
body.type-post .news-item-detail > .text,
body.type-post #pobo-all-content,
body.type-post #pobo-inner-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 5. Odstavce, specifické Pobo Bullet Listy a Tabulky */
body.type-post #pobo-all-content p,
body.type-post .news-item-detail > .text > p {
    margin-top: 0 !important;
    margin-bottom: 16px !important; 
    color: #333;
    line-height: 1.5 !important;
}

/* Vynucení odsazení pro seznamy v Pobu i v čistém Shoptet článku */
body.type-post #pobo-all-content .widget-typography ul,
body.type-post #pobo-all-content .widget-typography ol,
body.type-post .news-item-detail > .text > ul,
body.type-post .news-item-detail > .text > ol {
    margin-top: 5px !important;
    margin-bottom: 25px !important; 
    padding-left: 20px !important;
}

/* Specifický reset pro odrážky uvnitř Pobo i klasických článků */
body.type-post #pobo-all-content .widget-typography ul li,
body.type-post #pobo-all-content .widget-typography ol li,
body.type-post .news-item-detail > .text > ul li,
body.type-post .news-item-detail > .text > ol li {
    margin-top: 0 !important;
    margin-bottom: 8px !important; 
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.5 !important;
}

body.type-post #pobo-all-content li p,
body.type-post .news-item-detail > .text > li p {
    margin-bottom: 0 !important;
}

body.type-post #pobo-all-content .widget-typography table {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    width: 100%;
}

/* 6. Mezery u podnadpisů uvnitř textu */
body.type-post #pobo-all-content h2,
body.type-post .news-item-detail h2 {
    color: #1E22AA !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 40px 0 15px 0 !important;
    line-height: 1.3;
}

body.type-post #pobo-all-content h3,
body.type-post .news-item-detail h3 {
    color: #1E22AA !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 35px 0 12px 0 !important;
    line-height: 1.3;
}

/* Nově přidáno: Mezery pro menší nadpisy (H4), používané v ne-Pobo článcích */
body.type-post #pobo-all-content h4,
body.type-post .news-item-detail h4,
body.type-post .news-item-detail h5,
body.type-post .news-item-detail h6 {
    color: #000000 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 35px 0 15px 0 !important; 
    line-height: 1.3;
}

/* Zrušení horní mezery, pokud prvek začíná hned na vrchu Pobo bloku */
body.type-post #pobo-all-content .empty > *:first-child,
body.type-post #pobo-all-content .widget-typography > *:first-child {
    margin-top: 0 !important;
}

/* Odstranění spodní mezery u posledního odstavce v bloku (zabraňuje sčítání mezer) */
body.type-post #pobo-all-content .empty > *:last-child,
body.type-post #pobo-all-content .widget-typography > *:last-child {
    margin-bottom: 0 !important;
}

/* 7. Zaoblení všech obrázků */
body.type-post #pobo-all-content img {
    border-radius: 5px;
    max-width: 100%;
    height: auto;
}

body.type-post #pobo-all-content .rc-author-left__photo-img {
    border-radius: 5px !important; 
    border: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Rozložení Pobo Widgetů a boxů
   ========================================================================== */

/* Každý Pobo widget má od dalšího pevný a sjednocený odstup */
body.type-post #pobo-all-content .widget-container {
    margin-bottom: 25px !important; 
}
body.type-post #pobo-all-content .widget-container:last-child {
    margin-bottom: 0 !important;
}

/* 8. Pobo blok (Obrázek + Text) */
body.type-post #pobo-all-content .rc-image-right,
body.type-post #pobo-all-content .rc-image-left {
    display: flex !important;
    align-items: center;
    gap: 35px;
    margin: 0 !important; 
}

body.type-post #pobo-all-content .rc-image-right__image,
body.type-post #pobo-all-content .rc-image-left__image {
    flex: 1;
}

body.type-post #pobo-all-content .rc-image-right__text,
body.type-post #pobo-all-content .rc-image-left__text {
    flex: 1.3;
}

/* 9. Pobo "Author" blok jako designový Highlight box (Perex) */
body.type-post #pobo-all-content .rc-author-left__wrap {
    background-color: #f3f4ff !important;
    border-radius: 5px !important;
    padding: 25px !important; 
    margin: 0 !important; 
    display: flex;
    align-items: center;
    gap: 25px;
}

body.type-post #pobo-all-content .rc-author-left__content-title {
    font-size: 20px !important;
    margin-top: 0 !important;
    margin-bottom: 5px !important;
    color: #1E22AA !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

body.type-post #pobo-all-content .rc-author-left__content-text {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #444 !important;
    line-height: 1.5 !important;
}

/* 10. Mřížka s čísly a obrázky (widget z článku Typologie) */
body.type-post #pobo-all-content .arsov-numbers__wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin: 0 !important; 
}

body.type-post #pobo-all-content .arsov-numbers__item {
    background: #f9f9f9;
    padding: 25px 20px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

body.type-post #pobo-all-content .arsov-numbers__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

body.type-post #pobo-all-content .arsov-numbers__item-img {
    margin-bottom: 15px;
}

body.type-post #pobo-all-content .arsov-numbers__text {
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

/* 11. Responzivita pro mobily a tablety */
@media (max-width: 768px) {
    body.type-post .news-item-detail h1 {
        font-size: 26px;
        text-align: left;
    }
    
    body.type-post #pobo-all-content h2,
    body.type-post .news-item-detail h2 {
        font-size: 24px !important;
        margin: 25px 0 10px 0 !important;
    }

    body.type-post #pobo-all-content .widget-container {
        margin-bottom: 20px !important; 
    }

    body.type-post #pobo-all-content .rc-image-right,
    body.type-post #pobo-all-content .rc-image-left {
        flex-direction: column !important;
        gap: 20px;
    }

    body.type-post #pobo-all-content .rc-author-left__wrap {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 20px !important;
    }
    
    body.type-post #pobo-all-content .widget-typography ul,
    body.type-post #pobo-all-content .widget-typography ol,
    body.type-post .news-item-detail > .text > ul,
    body.type-post .news-item-detail > .text > ol {
        padding-left: 15px !important;
    }
}