/* Redesign — Magazin (blog list + article).
   Loaded via __css('pages/redesign-magazin') from Layouts/kutego/Blogs/*.tpl.php.
   Card look mirrors the voice/benefit cards from webroot/redesign/final.html. */

/* Neutralise the legacy page/module containers so .sec > .wrap controls the width. */
.controller-magazin .legacy-content > .container {
    max-width: none;
    padding: 0;
    margin-top: 0 !important;
}
.controller-magazin [data-module="blogs"] > .container {
    max-width: none;
    padding: 0;
}

/* ---------- Section rhythm ---------- */
.blog-sec { padding: 56px 0 92px; }
.article-sec { padding: 56px 0 92px; }

/* ---------- Blog list: horizontal cards, one per row ---------- */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.blog-card {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

.blog-card .banner {
    position: relative;
    display: block;
    flex: 0 0 380px;
    min-height: 214px; /* keeps ~16:9 even for short teasers */
    background: linear-gradient(145deg, #E9F0FB, #CFDFF5);
}
.blog-card .banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.blog-card .banner img.placeholder { object-fit: contain; padding: 24px; }

.flag-unpublished {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: #fff;
    font-family: var(--f-body-bold);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 999px;
    padding: 4px 12px;
}
.article-meta .flag-unpublished { position: static; }

.blog-card .body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    padding: 26px 30px 24px;
}
.blog-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: var(--muted);
    font-size: .88rem;
    margin-bottom: 10px;
}
.blog-card .meta i { color: var(--yellow); margin-right: 4px; }
.blog-card h2 {
    font-size: 1.4rem;
    line-height: 1.2;
    letter-spacing: 0;
    margin-bottom: 10px;
}
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--blue-dark); }
.blog-card .excerpt {
    color: var(--text-mid);
    font-size: .98rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* "Weiterlesen" CTA — same grammar as pages/redesign-kontakt.css .btn-yellow,
   slightly smaller and pinned to the bottom-right of the card body */
.blog-card .btn-yellow {
    display: inline-block;
    margin-top: auto;
    align-self: flex-end;
    font-family: var(--f-body-bold);
    font-size: .95rem;
    background: var(--yellow);
    color: var(--ink);
    text-decoration: none;
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    box-shadow: var(--sh-yellow);
    transition: transform .18s var(--ease);
}
.blog-card .btn-yellow:hover { transform: translateY(-2px); }
.blog-card .btn-yellow i { font-size: .8rem; margin-left: 4px; }

/* Mobile: image on top, content below, CTA left-aligned */
@media (max-width: 860px) {
    .blog-card { flex-direction: column; }
    .blog-card .banner {
        flex: 0 0 auto;
        aspect-ratio: 16 / 9;
        width: 100%;
    }
    .blog-card .body { padding: 20px 22px 22px; }
    .blog-card h2 { font-size: 1.2rem; }
    .blog-card .btn-yellow { align-self: flex-start; }
}

/* Empty state */
.blog-empty {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--sh-sm);
    padding: 44px 34px;
    text-align: center;
}

/* ---------- Pagination (PageNavigation markup) ---------- */
.blog-sec .pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 44px 0 0;
    padding: 0;
}
.blog-sec .pagination li a {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--f-body-bold);
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.blog-sec .pagination li a:hover { background: var(--yellow-soft); color: var(--blue-dark); }
.blog-sec .pagination li.active a {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    pointer-events: none;
}

/* ---------- Article ---------- */
.article-wrap { max-width: 860px; }
.blog-article {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: var(--sh-sm);
    padding: 52px 56px 60px;
}
@media (max-width: 760px) { .blog-article { padding: 30px 22px 36px; border-radius: 24px; } }

.article-head { margin-bottom: 26px; }
.article-head h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    line-height: 1.08;
    margin-bottom: 14px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    margin: 0;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: .9rem;
}
.article-meta i { color: var(--yellow); margin-right: 4px; }

/* Leading media + content images — also neutralises inline width attributes
   and legacy .img-responsive markup coming from the DB content. */
.blog-article img {
    max-width: 100%;
    border-radius: 18px;
    height: auto;
}

/* Legacy alert boxes inside the article (summary box etc. from DB content):
   restyle to the redesign card look without rewriting the content. */
.blog-article .alert {
    background: var(--cream-band);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 22px;
    margin: 26px 0;
    color: var(--ink);
}
.blog-article .alert a { color: var(--blue-dark); }

/* Softer <mark> highlights in the article body */
.blog-article mark {
    background: var(--yellow-soft);
    color: inherit;
    padding: 1px 5px;
    border-radius: 6px;
}

/* Table of contents (PageHelper::buildTableOfContents markup) */
.blog-article .article-toc {
    background: var(--cream-band);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 22px;
    margin: 26px 0;
    color: var(--ink);
}
.blog-article .article-toc summary {
    cursor: pointer;
    font-family: var(--f-body-bold);
    list-style: none;
}
.blog-article .article-toc summary i { color: var(--yellow-dark); }
.blog-article .article-toc ol {
    margin: 10px 0 0;
    padding-left: 22px;
}
.blog-article .article-toc li { padding: 2px 0; }
.blog-article .article-toc a { color: var(--blue-dark); text-decoration: none; }
.blog-article .article-toc a:hover { text-decoration: underline; }

/* Readable body */
.article-body { max-width: 72ch; }
.article-body p,
.article-body li {
    color: var(--text-mid);
    font-size: 1.05rem;
    line-height: 1.7;
}
.article-body p { margin: 0 0 18px; }
.article-body ul,
.article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body h2 {
    font-size: 1.5rem;
    line-height: 1.15;
    margin: 40px 0 14px;
    scroll-margin-top: 110px;
}
.article-body h3 {
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 30px 0 10px;
    scroll-margin-top: 110px;
}
.article-body h4, .article-body h5 {
    font-family: var(--f-body-bold);
    margin: 24px 0 8px;
}
.article-body a { color: var(--blue-dark); }
.article-body blockquote {
    border-left: 4px solid var(--yellow);
    background: var(--cream-band);
    border-radius: 0 18px 18px 0;
    padding: 16px 22px;
    margin: 0 0 18px;
    color: var(--ink);
}
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.article-body table td,
.article-body table th {
    border: 1px solid var(--border);
    padding: 8px 12px;
    color: var(--text-mid);
}
