/* =============================================================
   TANMAYA - Detail článku
   Layout dle Figmy (hero fotka + bílá textová karta)

   Aplikuje se na: body.type-post (všechny detaily článků)
   Pokud chceš omezit jen na sekci "Pomáháme s výběrem",
   nahraď body.type-post za body.in-pomahame-s-vyberem
   ============================================================= */

/* === Prevence horizontálního scrollu při full-bleed hero === */
body.type-post {
    overflow-x: clip;
}

/* === Layout článku === */
body.type-post .news-item-detail article {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 16px;
}

/* === Hero (náhledová fotka) - FULL BLEED přes celou šířku okna === */
body.type-post .news-item-detail article > img {
    order: 1;
    width: 100vw;
    max-width: 100vw;
    height: 450px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    object-fit: cover;
    border-radius: 0;
    display: block;
}

/* === Hlavička s nadpisem H1 === */
body.type-post .news-item-detail article > header {
    order: 2;
    text-align: center;
    margin: 0;
}

body.type-post .news-item-detail article > header h1 {
    margin: 0;
    padding: 0;
}

/* === Bílá karta s textem === */
body.type-post .news-item-detail article > .text {
    order: 3;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 48px 56px;
    box-shadow: 0 4px 24px rgba(122, 92, 80, 0.06);
    margin: 0;
}

/* === Footer (Předchozí / Další článek) === */
body.type-post .news-item-detail article > footer {
    order: 4;
    margin-top: 0;
}

/* === Obrázky uvnitř textu článku === */
body.type-post .news-item-detail article > .text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 24px auto;
}

/* === Tabulky v textu === */
body.type-post .news-item-detail article > .text table {
    margin: 24px 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

body.type-post .news-item-detail article > .text table th {
    background-color: var(--color-primary, #F7EEDA);
    color: var(--color-secondary, #7A5C50);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
}

body.type-post .news-item-detail article > .text table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f0e8d6;
    vertical-align: top;
}

body.type-post .news-item-detail article > .text table tr:last-child td {
    border-bottom: none;
}

/* === Typografie - menší vylepšení === */
body.type-post .news-item-detail article > .text > p:first-child {
    margin-top: 0;
}

body.type-post .news-item-detail article > .text > h2,
body.type-post .news-item-detail article > .text > h3,
body.type-post .news-item-detail article > .text > h4 {
    margin-top: 32px;
}

body.type-post .news-item-detail article > .text > h2:first-child,
body.type-post .news-item-detail article > .text > h3:first-child,
body.type-post .news-item-detail article > .text > h4:first-child {
    margin-top: 0;
}

/* === Mobilní úpravy === */
@media (max-width: 768px) {
    body.type-post .news-item-detail article {
        gap: 20px;
        margin-top: 8px;
    }

    body.type-post .news-item-detail article > img {
        height: 280px;
        border-radius: 0;
    }

    body.type-post .news-item-detail article > .text {
        padding: 28px 20px;
        border-radius: 12px;
    }

    body.type-post .news-item-detail article > .text img {
        border-radius: 8px;
        margin: 16px auto;
    }

    body.type-post .news-item-detail article > .text table {
        font-size: 14px;
    }

    body.type-post .news-item-detail article > .text table th,
    body.type-post .news-item-detail article > .text table td {
        padding: 10px 12px;
    }
}
