/*
 * MeinErfolgsShop 2026 — Magazin (blog archive + single post).
 * Ported from shop-design/{blog,beitrag}.html. Scoped under .mes- prefixed
 * classes used only by archive.php/single.php. Content (titles, excerpts,
 * categories, author, date, featured images) is real post data; the three
 * CSS-drawn "editorial-art" motifs are a decorative fallback for the small
 * number of posts without a featured image, not a claim about content.
 * Enqueued conditionally — see inc/mes-blog.php.
 */

/* Magazin-Übersicht (Blog-Home + Kategorie-Archive): Astras Standard-
   Container (1200px inkl. Innenabstand) war schmaler als der 1240er-
   Design-Wrap — auf exakt dasselbe Maß wie .mes-wrap bringen. Der
   Einzelbeitrag behält bewusst seine schmalere Lesespalte. */
body.blog .site-content .ast-container,
body.archive.category .site-content .ast-container{
	max-width:none;
	width:min(var(--mes-max),calc(100% - 80px));
	padding-left:0;
	padding-right:0;
}
@media(max-width:1100px){
	body.blog .site-content .ast-container,
	body.archive.category .site-content .ast-container{width:calc(100% - 48px)}
}
@media(max-width:560px){
	body.blog .site-content .ast-container,
	body.archive.category .site-content .ast-container{width:calc(100% - 36px)}
}

.mes-magazine-head,.mes-featured-post,.mes-post-grid,.mes-article-head,.mes-article-visual,.mes-reading-layout,.mes-crumb{font-family:"MES Roboto",Arial,sans-serif;color:var(--mes-ink)}
.mes-magazine-head *,.mes-article-body *{box-sizing:border-box}
.mes-crumb{display:block;padding:25px 0;font-size:12px;color:var(--mes-muted)}
.mes-crumb a{color:var(--mes-muted)}
.mes-crumb a:hover{color:var(--mes-blue)}

.mes-magazine-head{padding:25px 0 40px}
.mes-magazine-head h1{font-size:54px;font-weight:700;letter-spacing:-1.3px;margin:0 0 14px}
.mes-magazine-head .mes-lead{font-size:17px;color:var(--mes-muted);max-width:620px;margin:0}

.mes-editorial-art{position:relative;min-height:260px;overflow:hidden;background:#c9dfef;border-radius:6px;isolation:isolate}
.mes-editorial-photo{width:100%;height:100%;object-fit:cover;border-radius:6px;display:block}
.mes-art-steps{background:linear-gradient(140deg,#daeaf5,#afcfe6)}
.mes-art-steps:before{content:'JEDER SCHRITT ZÄHLT.';position:absolute;top:26px;left:26px;font-size:10px;font-weight:700;letter-spacing:2px;color:#2d648c}
.mes-art-pause{background:#e5e9df}
.mes-art-pause:before{content:'RAUM FÜR DICH.';position:absolute;top:26px;left:26px;font-size:10px;font-weight:700;letter-spacing:2px;color:#466b63}
.mes-art-pause:after{content:'';position:absolute;border-radius:50%;background:#c5d0bd;width:200px;height:200px;right:12%;top:14%}
.mes-art-book{background:#ede8e1}
.mes-art-book:before{content:'NEUE PERSPEKTIVEN.';position:absolute;top:26px;left:26px;font-size:10px;font-weight:700;letter-spacing:2px;color:#74716a;z-index:1}
.mes-art-book:after{content:'';position:absolute;width:130px;height:170px;left:38%;top:22%;background:#bacfdf;box-shadow:16px 20px 0 #83aac5,32px 40px 0 #fff;border-radius:2px;transform:rotate(-8deg)}

.mes-featured-post{display:grid;grid-template-columns:1.15fr 1fr;align-items:center;gap:50px;background:#f0f6fa;border-radius:7px;overflow:hidden;padding-right:46px;margin-bottom:60px}
.mes-featured-post .mes-editorial-art,.mes-featured-post .mes-editorial-photo{min-height:400px;border-radius:0}
.mes-featured-post>div{padding:34px 0}
.mes-featured-post h2{font-size:38px;font-weight:700;letter-spacing:-1px;margin:0 0 14px;line-height:1.15}
.mes-featured-post p{color:var(--mes-muted);font-size:16px;line-height:1.8;margin:0}
.mes-featured-post .mes-post-meta{font-size:11px;margin:18px 0 22px}

.mes-topic-tabs{display:flex;gap:8px;flex-wrap:wrap}
.mes-topic-tabs a{border:1px solid var(--mes-line);background:#fff;padding:8px 14px;border-radius:25px;font-size:12px;color:var(--mes-ink)}
.mes-topic-tabs a:hover{border-color:var(--mes-blue);color:var(--mes-blue)}
.mes-topic-tabs a.mes-active{background:var(--mes-ink);color:#fff;border-color:var(--mes-ink)}

/* align-items:start (not grid's default stretch) so each card sizes to its
   own content instead of being stretched to match the tallest card in its
   row. Grid stretch is what broke this layout before: .mes-editorial-photo
   has height:100% (shared with .mes-featured-post/.mes-article-visual,
   which do set an explicit pixel height on their own wrapper and rely on
   that), so inside a stretched card it filled the whole row height,
   pushing the title/excerpt out of the card's own box and down over the
   row below instead of just stacking under a normal-height image. */
.mes-post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;align-items:start}
.mes-post-grid-two{grid-template-columns:repeat(2,1fr);max-width:900px}
.mes-post-card .mes-editorial-art,.mes-post-card .mes-editorial-photo{height:280px;min-height:280px}
.mes-post-card .mes-post-meta{font-size:11px;color:var(--mes-blue);margin:18px 0 10px}
.mes-post-card .mes-post-meta span{color:var(--mes-muted)}
.mes-post-card h2{font-size:23px;line-height:1.25;letter-spacing:-.4px;margin:0 0 10px}
.mes-post-card h2 a{color:inherit}
.mes-post-card p{font-size:14px;line-height:1.8;color:var(--mes-muted);margin:0 0 16px}

/* Paginierung als zentrierte Button-Reihe (‹ 1 2 3 … 11 ›) mit Trennlinie */
.mes-pagination{margin-top:46px;border-top:1px solid var(--mes-line);padding-top:28px}
.mes-pagination .nav-links{display:flex;justify-content:center;align-items:center;gap:8px;font-size:14px;flex-wrap:wrap}
.mes-pagination .page-numbers{display:grid;place-items:center;min-width:40px;height:40px;padding:0 6px;border:1px solid var(--mes-line);border-radius:7px;background:#fff;color:var(--mes-ink);font-weight:700;text-decoration:none;transition:background .15s,border-color .15s}
.mes-pagination a.page-numbers:hover{background:var(--mes-pale);border-color:#bfd3e5;color:var(--mes-blue)}
.mes-pagination .page-numbers.current{background:var(--mes-blue);border-color:var(--mes-blue);color:#fff}
.mes-pagination .page-numbers.dots{border:0;background:none;color:var(--mes-muted);min-width:24px;font-weight:400}
.mes-pagination .page-numbers.prev,.mes-pagination .page-numbers.next{color:var(--mes-blue)}
.mes-pagination .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

.mes-article-head{max-width:850px;text-align:center;padding:25px auto 35px;margin-left:auto;margin-right:auto}
.mes-article-head h1{font-size:62px;font-weight:700;line-height:1.1;letter-spacing:-1.8px;color:var(--mes-ink);margin:0 0 23px}
.mes-article-head .mes-lead{font-size:18px;color:var(--mes-muted);margin:0 auto 24px;max-width:650px}
.mes-article-byline{display:flex;justify-content:center;align-items:center;gap:12px;font-size:12px;text-align:left}
.mes-article-byline small{display:block;font-size:10px;color:var(--mes-muted);margin-top:4px}
.mes-article-date{font-size:12px;color:var(--mes-muted);margin:0}
.mes-article-author-end{font-size:12px;color:var(--mes-muted);margin:40px 0 0;padding-top:18px;border-top:1px solid var(--mes-line)}
.mes-author-mark{background:#edf4f9;color:var(--mes-blue);border-radius:50%;width:38px;height:38px;display:grid;place-items:center;font-weight:900;flex-shrink:0}

.mes-article-visual{max-width:1060px;margin:30px auto}
.mes-article-visual .mes-editorial-art,.mes-article-visual .mes-editorial-photo{height:380px;min-height:380px;border-radius:6px}

.mes-reading-layout{display:grid;grid-template-columns:230px minmax(0,710px);justify-content:center;gap:60px;padding-top:40px;padding-bottom:60px}
/* Posts without any <h2> headings render no .mes-article-toc aside (see
   mes_get_toc_headings() in inc/mes-blog.php) — without this, grid
   auto-placement drops .mes-article-body into the empty 230px TOC column
   instead of the 710px content column, squeezing the whole article. */
.mes-reading-layout .mes-article-body{grid-column:2}
/* No TOC at all (single.php adds this class): drop the 710px reading-width
   cap and the now-unused 230px column entirely, so the body uses the full
   .mes-wrap width instead of just sitting correctly in the narrower
   content column. */
.mes-reading-layout-no-toc{grid-template-columns:1fr;justify-content:stretch}
.mes-reading-layout-no-toc .mes-article-body{grid-column:1}
.mes-article-toc{align-self:start;position:sticky;top:30px;border-top:1px solid var(--mes-line);padding-top:22px}
.mes-article-toc a{display:block;font-size:12px;color:var(--mes-muted);padding:9px 0;line-height:1.6}
.mes-article-toc a:hover{color:var(--mes-blue)}
.mes-article-toc a.mes-text-link{color:var(--mes-blue);margin-top:18px}

.mes-article-body{font-size:17px;line-height:1.9;color:#425669}
.mes-article-body p{margin:18px 0}
.mes-article-body h2{font-size:28px;color:var(--mes-ink);font-weight:700;line-height:1.25;margin:40px 0 16px;scroll-margin-top:30px}
.mes-article-body h3{font-size:20px;color:var(--mes-ink);font-weight:700;margin:28px 0 12px}
.mes-article-body ul,.mes-article-body ol{padding-left:22px}
.mes-article-body hr{border:0;border-top:1px solid var(--mes-line);margin:32px 0}
.mes-article-body blockquote{border-left:3px solid var(--mes-blue);background:var(--mes-pale);padding:20px 26px;margin:28px 0;font-size:18px;font-weight:700;color:var(--mes-ink)}
.mes-article-body img{border-radius:6px;max-width:100%;height:auto}

/* [mes_produkt]-Shortcode (inc/mes-blog.php) — Produkt-Widget im Beitrag,
   beitrag.html .article-product: Cover links auf grauer Karte, rechts
   Eyebrow/Titel/Autor·Format/Textlink. mix-blend-mode löst weiße
   Cover-Hintergründe optisch in der grauen Karte auf (wie .mes-cover-stage). */
.mes-article-product{display:grid;grid-template-columns:125px 1fr;align-items:center;gap:25px;padding:30px;background:#f3f6f8;border-radius:6px;margin:32px 0}
.mes-article-product img{width:125px;height:155px;object-fit:contain;mix-blend-mode:multiply;border-radius:0}
.mes-article-product .mes-eyebrow{font-size:9px;margin:0 0 8px}
.mes-article-product h3{margin:0;font-size:25px}
.mes-article-product h3 a{color:var(--mes-ink);text-decoration:none}
.mes-article-product h3 a:hover{color:var(--mes-blue)}
.mes-article-product p:not(.mes-eyebrow){font-size:12px;margin:8px 0;color:var(--mes-muted)}

@media(max-width:1100px){
	.mes-featured-post{gap:30px;padding-right:30px}
	.mes-featured-post h2{font-size:32px}
	.mes-reading-layout{gap:35px;grid-template-columns:200px minmax(0,1fr)}
}
@media(max-width:800px){
	.mes-magazine-head h1{font-size:40px}
	.mes-featured-post{grid-template-columns:1fr;gap:0;padding:0}
	.mes-featured-post .mes-editorial-art,.mes-featured-post .mes-editorial-photo{min-height:260px}
	.mes-featured-post>div{padding:28px 20px}
	.mes-post-grid{grid-template-columns:1fr 1fr}
	.mes-article-head h1{font-size:36px}
	.mes-article-visual .mes-editorial-art,.mes-article-visual .mes-editorial-photo{height:260px;min-height:260px}
	.mes-reading-layout{grid-template-columns:1fr;gap:26px}
	.mes-reading-layout .mes-article-body{grid-column:1}
	.mes-article-toc{position:static;display:flex;flex-wrap:wrap;gap:4px 22px;border-bottom:1px solid var(--mes-line);padding-bottom:14px}
	.mes-article-toc a.mes-text-link{margin:0}
}
@media(max-width:560px){
	.mes-magazine-head h1{font-size:32px}
	.mes-post-grid,.mes-post-grid-two{grid-template-columns:1fr;gap:30px}
	.mes-article-head h1{font-size:28px}
	.mes-article-body{font-size:16px}
	.mes-article-product{grid-template-columns:90px 1fr;padding:20px;gap:16px}
	.mes-article-product img{width:90px;height:120px}
	.mes-article-product h3{font-size:23px}
	.mes-article-product .mes-eyebrow{font-size:8px}
	.mes-article-product .mes-text-link{font-size:12px}
}
