/* blog.css - additive: /blog/ (templates/home.html), posts (single.html), archives (archive.html) and room
   for the 10th header item "Blog". Loads after assets/theme.css (handle edw-theme); theme tokens only. */

/* Header: room for "Blog". Measured in headless Chrome (Segoe UI): without this the phone block wraps at
   1366-1920px and the pre-existing nav overflow below 1280px grows; with it the header equals today's
   at 1280-1920px and overflows less than today between 961 and 1200px. */
.menu{gap:2px}
.menu>li>a{padding-left:8px;padding-right:8px}
.menu>li>a::after{left:8px;right:8px}
.menu>li>a:hover::after,.menu a[aria-current]::after{width:calc(100% - 16px)}

/* Hero (post + archive hero built from core blocks; same classes as page-ratgeber.html) */
body .edw-blog-hero .display{margin:6px 0 0}
.edw-blog-hero--post .display,.edw-blog-hero--archive .display{font-size:clamp(28px,4.6vw,56px);line-height:1.02;overflow-wrap:break-word;hyphens:auto}
body .edw-blog-hero .lead{margin-top:14px;color:#bed3e9;font-size:17px;max-width:52ch}
.edw-blog-hero .lead p{margin:0}
body .edw-blog-hero .edw-blog-date{margin:22px 0 0}
.edw-blog-date{display:flex;align-items:center;gap:9px;font-size:13.5px;color:#a9c3dd}
.edw-blog-date::before{content:"";width:16px;height:16px;flex:none;background:var(--accent);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat}

/* Post list (Query Loop on the theme's .g3 grid + .scard cards) */
body .edw-blog-query>*{margin-block:0}
body .edw-blog-query .wp-block-post-template{list-style:none;margin:0;padding:0;max-width:none}
body .edw-blog-query .wp-block-post-template>li{margin:0;display:flex;min-width:0}
.edw-blog-card{width:100%;display:flex;flex-direction:column}
body .edw-blog-card>*{margin:0}
.edw-blog-card .ph a{display:block}
.edw-blog-card .ph img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.edw-blog-card .bd{flex:1;display:flex;flex-direction:column}
body .edw-blog-card .bd>*{margin:0}
body .edw-blog-card .edw-blog-meta{margin-bottom:8px}
.edw-blog-meta{font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
body .edw-blog-card .wp-block-post-title{margin-bottom:9px}
.edw-blog-card .wp-block-post-title{font-size:20px;line-height:1.3}
.edw-blog-card .wp-block-post-title a{color:var(--head);text-decoration:none}
.edw-blog-card .wp-block-post-title a::after{content:"";position:absolute;inset:0;z-index:1}
.edw-blog-card:hover .wp-block-post-title a{color:var(--brand)}
.edw-blog-card .wp-block-post-excerpt{flex:1;display:flex;flex-direction:column}
.edw-blog-card .wp-block-post-excerpt__excerpt{margin:0;font-size:16px;line-height:1.75;color:var(--text)}
.edw-blog-card .wp-block-post-excerpt__more-text{margin:auto 0 0;padding-top:16px}
.edw-blog-card .wp-block-post-excerpt__more-link{position:relative;z-index:2;display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--brand);text-decoration:none}
.edw-blog-card .wp-block-post-excerpt__more-link::after{content:"";width:15px;height:15px;flex:none;background:currentColor;transition:transform .3s var(--ease);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat}
.edw-blog-card:hover .wp-block-post-excerpt__more-link::after{transform:translateX(5px)}

/* Empty state */
.edw-blog-empty{display:flex;gap:22px;align-items:flex-start;max-width:780px;background:#fff;border:1px solid var(--line);box-shadow:var(--sh-card);padding:clamp(26px,3.5vw,40px)}
.edw-blog-empty h2{font-size:clamp(20px,2.4vw,26px);line-height:1.3;margin-bottom:8px}
.edw-blog-empty p{font-size:16px;line-height:1.75;color:var(--text)}

/* Pagination */
body .edw-blog-query .edw-blog-pagination{margin-top:44px}
.edw-blog-pagination{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center}
.edw-blog-pagination .wp-block-query-pagination-numbers{display:flex;flex-wrap:wrap;gap:10px}
.edw-blog-pagination a,.edw-blog-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 16px;background:#fff;border:1px solid var(--line);font-size:14px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--head);text-decoration:none}
.edw-blog-pagination a:hover{border-color:var(--brand);color:var(--brand)}
.edw-blog-pagination .page-numbers.current{background:var(--brand);border-color:var(--brand);color:#fff}
.edw-blog-pagination .page-numbers.dots{background:transparent;border-color:transparent}

/* Single post */
.edw-blog-narrow{width:min(100% - 36px,800px)}
body .edw-blog-narrow>*{margin-block:0}
body .edw-blog-narrow>.edw-blog-figure{margin:0 0 clamp(30px,4vw,44px)}
.edw-blog-figure img{width:100%;height:auto;object-fit:cover}

/* Prose (Gutenberg post content). body-prefixed spacing outranks the core flow-layout margins. */
.edw-blog-prose{font-size:18px;line-height:1.8;color:var(--text)}
body .edw-blog-prose>*{margin-top:0;margin-bottom:0}
body .edw-blog-prose>*+*{margin-top:1.25em}
body .edw-blog-prose>h2{margin-top:1.9em}
body .edw-blog-prose>h3{margin-top:1.6em}
body .edw-blog-prose>h4{margin-top:1.4em}
body .edw-blog-prose>:is(h2,h3,h4)+*{margin-top:.6em}
.edw-blog-prose h2{font-size:clamp(24px,2.8vw,32px);line-height:1.2;letter-spacing:-.01em}
.edw-blog-prose h3{font-size:clamp(20px,2.1vw,24px);line-height:1.3}
.edw-blog-prose h4{font-size:18px;line-height:1.4}
.edw-blog-prose a{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.edw-blog-prose a:hover{color:var(--brand-600)}
.edw-blog-prose strong,.edw-blog-prose b{color:var(--head)}
.edw-blog-prose ul,.edw-blog-prose ol{padding-left:1.4em}
.edw-blog-prose li+li{margin-top:.45em}
.edw-blog-prose li>ul,.edw-blog-prose li>ol{margin-top:.45em}
.edw-blog-prose ul li::marker{color:var(--brand)}
.edw-blog-prose blockquote{margin-left:0;margin-right:0;padding:20px 24px;border-left:5px solid var(--brand);background:var(--tint);color:var(--head)}
.edw-blog-prose blockquote p+p{margin-top:.8em}
.edw-blog-prose blockquote cite{display:block;margin-top:8px;font-size:15px;font-style:normal;color:var(--muted)}
.edw-blog-prose figure{margin-left:0;margin-right:0}
.edw-blog-prose img{height:auto}
.edw-blog-prose figcaption,.edw-blog-prose .wp-element-caption{margin-top:8px;font-size:14px;line-height:1.6;color:var(--muted)}
.edw-blog-prose hr,.edw-blog-prose .wp-block-separator{border:0;border-top:1px solid var(--line);height:0;opacity:1}
body .edw-blog-prose>hr{margin-top:2em;margin-bottom:2em}
.edw-blog-prose .wp-block-table{overflow-x:auto}
.edw-blog-prose table{width:100%;border-collapse:collapse;font-size:16px;line-height:1.6}
.edw-blog-prose table th,.edw-blog-prose table td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
.edw-blog-prose table th,.edw-blog-prose table thead td{background:var(--tint);color:var(--head);font-weight:700}
.edw-blog-prose pre{background:var(--tint);padding:16px 18px;overflow-x:auto;font-size:15px;line-height:1.6}
.edw-blog-prose .wp-block-details{border:1px solid var(--line);background:#fff;padding:16px 20px}
.edw-blog-prose .wp-block-details summary{cursor:pointer;font-weight:700;color:var(--head)}
body .edw-blog-prose .wp-block-details>summary+*{margin-top:.6em}
.edw-blog-prose .wp-block-buttons{display:flex;flex-wrap:wrap;gap:12px}
.edw-blog-prose .wp-block-button__link{display:inline-flex;align-items:center;min-height:44px;padding:15px 30px;font-size:14px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;text-decoration:none;border-radius:0}
.edw-blog-prose .wp-block-button__link:hover{background:var(--brand);color:#fff}
.edw-blog-prose iframe,.edw-blog-prose video{max-width:100%}
.edw-blog-prose .has-text-align-center{text-align:center}
.edw-blog-prose .has-text-align-right{text-align:right}
body .edw-blog-prose>.aligncenter{margin-left:auto;margin-right:auto}
.edw-blog-prose .aligncenter{text-align:center}
.edw-blog-prose .aligncenter img{margin-inline:auto}
body .edw-blog-prose>.alignleft{float:left;max-width:50%;margin:.3em 1.5em 1em 0}
body .edw-blog-prose>.alignright{float:right;max-width:50%;margin:.3em 0 1em 1.5em}
body .edw-blog-prose>.alignwide,body .edw-blog-prose>.alignfull{max-width:100%;margin-left:0;margin-right:0}
.edw-blog-prose::after{content:"";display:table;clear:both}

@media (max-width:760px){
  .edw-blog-empty{flex-direction:column;gap:16px}
  body .edw-blog-prose>.alignleft,body .edw-blog-prose>.alignright{float:none;max-width:100%;margin:1.25em 0 0}
}
