/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #F5F4F0;
  --surface: #FFFFFF;
  --border:  #DDDBD4;
  --text:    #1C1B18;
  --muted:   #888580;
  --accent:  #2C5282;
  --accent-h:#3A6FAD;
  --shadow:  0 1px 3px rgba(0,0,0,.07), 0 1px 6px rgba(0,0,0,.04);
  --radius:  8px;
  --feed-w:  640px;
  --font:    system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:    'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* Visible focus ring for keyboard navigation (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Layout */
.site {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* Profile Header */
.site-header {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  position: relative;
}

.header-rss {
  position: absolute;
  top: 24px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.header-rss:hover { color: #e07b39; background: #fef3e8; }
.header-rss svg { width: 17px; height: 17px; }

.profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.profile-info { flex: 1; min-width: 0; }

.profile-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.15s;
}
.profile-name:hover { color: var(--accent); }
.profile-handle {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 2px;
  text-decoration: none;
  transition: color 0.15s;
}
.profile-handle:hover { color: var(--accent); }
.profile-desc {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Feed bar / page indicator */
.feed-bar {
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  min-height: 40px;
  align-items: center;
}
.feed-bar:empty { display: none; }
.feed-bar-page {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  padding: 10px 0;
}

/* Post Card */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.post:hover { border-color: #b8b5ad; }

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.post-time { font-size: 0.77rem; color: var(--muted); font-family: var(--mono); }
.post-time a { color: var(--muted); }
.post-time a:hover { color: var(--accent); }

.post-category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: #EBF0F8;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Update-Kennzeichnung: Tag "postupdate" zeigt nur ein Update-Icon */
.post-category--update {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  color: var(--bg);
  background: var(--accent-h);
}
.post-category--update svg { width: 14px; height: 14px; }

.post-meta-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Foto-Beitrag-Kennzeichnung: gleiche Optik wie Kategorie, eigene Akzentfarbe */
.post-category--img {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #B85C1E;
  background: #FBF0E6;
}
.post-category--img svg { width: 11px; height: 11px; }

.post-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); }
h1.post-title { font-size: 1.4rem; margin-bottom: 14px; }

/*     Post Content                                     */
.post-content { font-size: 0.95rem; line-height: 1.7; color: var(--text); word-break: break-word; }
.post-content p { margin-bottom: 12px; }
.post-content p:last-child { margin-bottom: 0; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--accent-h); }
.post-content h1, .post-content h2, .post-content h3 {
  font-weight: 700; margin: 22px 0 8px; line-height: 1.3; letter-spacing: -0.01em;
}
.post-content h1 { font-size: 1.4rem; }
.post-content h2 { font-size: 1.2rem; }
.post-content h3 { font-size: 1rem; }
.post-content ul, .post-content ol { margin: 10px 0 12px 22px; }
.post-content li { margin-bottom: 4px; }
.post-content blockquote {
  border-left: 3px solid var(--border);
  padding: 6px 0 6px 16px;
  margin: 14px 0;
  color: var(--muted);
  font-style: italic;
}
.post-content pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: 0.84rem; margin: 14px 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}
.post-content code {
  font-family: var(--mono); font-size: 0.875em;
  background: var(--bg); padding: 2px 5px; border-radius: 3px;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { margin: 14px 0; max-width: 100%; height: auto; }
.post-content figure { margin: 14px 0; }
.post-content figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 5px; text-align: center; }

/* WordPress-Standard-Ausrichtungsklassen */
.post-content img.aligncenter,
.post-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.post-content img.alignleft { float: left; margin-right: 14px; }
.post-content img.alignright { float: right; margin-left: 14px; }

/* Embeds (YouTube, Vimeo, Embed Privacy etc.) — immer volle Breite + zentriert */
.post-content iframe,
.post-content embed,
.post-content object,
.post-content video,
.post-content .wp-block-embed,
.post-content .embed-privacy-input,
.post-content .embed-privacy-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.post-content .embed-privacy-overlay {
border-radius: var(--radius);
}
.post-content .embed-privacy-container a {
color: #7EB3F5;
}
.post-content iframe { aspect-ratio: 16 / 9; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.post-content .wp-block-embed__wrapper { position: relative; }

/* Edit-Link */
.edit-link {
  margin-top: 14px;
  font-size: 0.8rem;
}
.edit-link a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.edit-link a:hover { color: var(--accent); }

/* Post Actions */
.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.post-action {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
}
.post-action:hover { color: var(--accent); }
.post-action svg { width: 15px; height: 15px; }

/* Single-Ansicht: IMG-Beiträge */
/* Nur .post bricht aus .site heraus, Kommentarbereich bleibt normal */
.main--img-single .post {
  background: #1C1B18;
  border-color: #1C1B18;
  padding: 16px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 92vw;
  max-width: 1040px;
  box-sizing: border-box;
}
.main--img-single .post:hover { border-color: #1C1B18; }
.main--img-single .post-time,
.main--img-single .post-category { color: #C9C6BE; }
.main--img-single .post-category--img { background: rgba(255,255,255,0.08); }
.main--img-single .post-title { color: #F5F4F0; }
.main--img-single .post-content { color: #E8E6E1; }
.main--img-single .post-content a { color: #7EB3F5; }
.main--img-single .post-content a:hover { color: #A8CCF8; }
.main--img-single .edit-link a { color: #C9C6BE; }

/* Erstes Bild im Content gross & randlos darstellen, Bild steht im Fokus */
.post-img-content {
  margin-top: 16px;
}
.post-img-content > p:first-child img:first-child,
.post-img-content > figure:first-child img,
.post-img-content > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  border-radius: var(--radius);
  border: none; /* kein Rahmen beim Hauptbild — soll im Fokus stehen */
}
.post-img-content > p:first-child:has(> img:only-child) {
  margin-bottom: 16px;
}
/* Bildunterschrift unter dem Hauptbild dezenter absetzen */
.post-img-content figcaption {
  margin-top: -10px;
  margin-bottom: 16px;
  color: #B5B2AB;
}

/* Pagination */
.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 24px 0 0;
  flex-wrap: wrap;
}
.page-numbers li a,
.page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.page-numbers li a:hover { color: var(--text); border-color: var(--accent); }
.page-numbers li span.current {
  color: var(--accent);
  border-color: var(--accent);
  background: #EBF0F8;
}
.page-numbers li .dots { background: none; border-color: transparent; box-shadow: none; }

/* Archive / Category Header */
.archive-header {
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.archive-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
  transition: color 0.15s;
}
.archive-back:hover { color: var(--text); }
.archive-back svg { width: 13px; height: 13px; }
.archive-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.archive-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.archive-desc { margin-top: 5px; font-size: 0.875rem; color: var(--muted); }

/* Page template */
.post--page { }
.post-title--page {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Comments Section */
.comments-section { margin-top: 10px; padding-top: 8px; }

.comments-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

ol.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-item { margin-bottom: 8px; }

/* Nested replies */
ol.comment-list--nested {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 16px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}
/* Flat stacking beyond 3rd level */
ol.comment-list--flat {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.comment-card {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow);
}
.comment-card--author {
  border-color: #b8c8df;
  background: #f5f8fc;
}
.comment-card--pending {
  border-style: dashed;
  opacity: 0.8;
}
.comment-awaiting-moderation {
  font-size: 0.78rem;
  font-style: italic;
  color: #FF0000;
  margin: 2px 0 8px;
}

.comment-avatar-wrap { flex-shrink: 0; }
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}
.comment-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: #EBF0F8;
  border-radius: 50%;
}

.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.comment-author-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}
.comment-author-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  background: #EBF0F8;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.comment-date {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
}
.comment-text { font-size: 0.9rem; line-height: 1.55; }
.comment-text p { margin-bottom: 6px; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-reply { margin-top: 7px; }
.comment-reply a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s;
  text-decoration: none;
}
.comment-reply a:hover { color: var(--accent); }

/* Comment Form */
.comment-form-wrap {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.comment-form-wrap #reply-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: block;
}
.comment-form-wrap #reply-title small { margin-left: 8px; }
.comment-form-wrap #reply-title small a { font-size: 0.75rem; font-weight: 500; color: var(--muted); }

.comment-form label {
  display: block;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comment-form-field { margin-bottom: 12px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 11px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { resize: vertical; min-height: 88px; }
.comment-form .form-submit { margin-bottom: 0; }
.comment-form input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}
.comment-form input[type="submit"]:hover { background: var(--accent-h); }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-nav {
  margin-bottom: 12px;
}
.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-list li a {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.footer-nav-list li a:hover { color: var(--text); background: var(--border); }
.footer-copy { font-size: 0.77rem; color: var(--muted); font-family: var(--mono);}
.footer-info {  font-size: 0.87rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 10px;}

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 480px) {
  .post { padding: 15px; }
  .main--img-single .post { padding: 16px; }
  .profile-avatar { width: 60px; height: 60px; }
  .header-rss { top: 24px; }
  .comment-form-wrap { padding: 15px; }
  .comment-list--nested { padding-left: 10px; margin-left: 10px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .post-content img.alignleft,
  .post-content img.alignright {
    float: none;
    display: block;
    margin-left: auto;
    margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.wp-caption {
    max-width: 100%;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  font-size: 16px;
}

.comment-form label { display: none; }

.comment-form-privacy {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.comment-form-cookies-consent input { width: auto; margin: 0; }
.comment-form-cookies-consent label { display: inline; text-transform: none; font-weight: 400; font-size: inherit; margin: 0; }

.comment-form-privacy {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 5px;
  margin-bottom: 10px;
}
.comment-form-privacy a {
  color: var(--muted);
  text-decoration: underline;
}
.comment-form-privacy a:hover {
  color: var(--accent);
}

.header-search {
  position: absolute;
  top: 24px;
  right: 40px;
  z-index: 5;
}

.header-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.header-search-icon:hover { color: var(--text); background: var(--border); }
.header-search-icon svg { width: 17px; height: 17px; }

.header-search-form {
  display: none;
}
.header-search-form input {
  width: 200px;
  padding: 7px 10px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.header-search-form input:focus { border-color: var(--accent); }

/* Geöffneter Zustand: Icon ausblenden, Suchfeld an Ort und Stelle einblenden */
.header-search.is-open .header-search-icon { display: none; }
.header-search.is-open .header-search-form { display: block; }
/*     Embed-Post-Card (Shortcode für eingebettete Beitragslinks)        
   Markup-Vorgabe (per Shortcode erzeugt):
   <a class="embedpostwrapperlink"><div class="embedpostwrapper">
     <div id="embedpostwrapper-one"><img></div>
     <div id="embedpostwrapper-two">Titel<span class="produktdatum">...</span></div>
   </div></a>
   Hinweis: id-Attribute können theoretisch nur einmal pro Seite vorkommen;
   funktionieren hier aber wie WordPress sie ausgibt. Styling über die IDs
   ist unkritisch, da es sich um reines Layout (kein JS-Hook) handelt. */

.embedpostwrapperlink {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 16px 0;
}
.post-content .embedpostwrapperlink,
.post-content .embedpostwrapperlink:hover,
.post-content .embedpostwrapperlink * {
  text-decoration: none !important;
}
.embedpostwrapper {
  display: flex;
  align-items: stretch;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.embedpostwrapperlink:hover .embedpostwrapper {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

#embedpostwrapper-one {
  flex: 0 0 120px;
  width: 120px;
  aspect-ratio: 350 / 200;
  overflow: hidden;
}
#embedpostwrapper-one img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  margin: 0;
  /* nur die innenliegenden Ecken abrunden (links in Desktop-Reihenanordnung) */
  border-radius: var(--radius) 0 0 var(--radius);
}

#embedpostwrapper-two {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px 10px 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.produktdatum {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: none;
}
.produktdatum span {
  color: var(--muted);
  font-weight: 400;
}

/* Schmale Container (z. B. Sidebar-Embeds): Bild oben, Text darunter */
@container (max-width: 360px) {
  .embedpostwrapper { flex-direction: column; }
  #embedpostwrapper-one { width: 100%; flex: none; aspect-ratio: 350 / 200; }
  #embedpostwrapper-one img { border-radius: var(--radius) var(--radius) 0 0; }
  #embedpostwrapper-two { padding: 12px 14px; }
  .embedpostwrapper {gap: 0;}
}

/* Fallback ohne Container-Query-Support: bei sehr schmalem Viewport stapeln */
@media (max-width: 420px) {
  .embedpostwrapper { flex-direction: column; }
  #embedpostwrapper-one { width: 100%; flex: none; aspect-ratio: 350 / 200; }
  #embedpostwrapper-one img { border-radius: var(--radius) var(--radius) 0 0; }
  #embedpostwrapper-two { padding: 12px 14px; }
  .embedpostwrapper {gap: 0;}
}

/* Versteckt Text visuell, bleibt aber für Screenreader zugänglich (WP-Standard) */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/*     Copyfield-Shortcode                              */
.copyfield {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  margin: 15px 0 20px;
}
.copyfield-input {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  height: 36px;
  min-width: 100px;
  outline: none;
}
.copyfield-input:focus { border-color: var(--accent); }
.copyfield-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.copyfield-btn:hover { opacity: 0.85; }

.archiv-hinweis {
  background: #FEF9E7;
  border-left: 3px solid #F0C040;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #5C4A00;
  border-radius: 0 4px 4px 0;
}
.aff-hinweis {
  background: #f8f8f8;
  padding: 10px;
  margin-top: 25px;
  font-size: 0.9rem;
  color: #5C4A00;
  line-height:1.1;
  border-radius: var(--radius);
}
.post-img-content .aff-hinweis {
  background: #333;
  color: #f8f8f8;
}
.aff-hinweis a{
  text-decoration: none;
  font-weight: 600;
}
.post-content .update {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent-h);
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: baseline;
    white-space: nowrap;
}
article a[rel*="nofollow"]:after, article a[rel*="sponsored"]:after {
    content: "*";
    font-weight: 300;
    text-decoration: none;
    display: inline-block;
  }
.wp-block-image a:hover img,
.post-content a:hover img {
  cursor: -webkit-zoom-in;
  cursor: zoom-in;
}
/* Bildunterschriften enger ans Bild rücken – ohne Hack */
.post-content .wp-block-image figure,
.post-content figure.wp-caption {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.post-content .wp-block-image figure img,
.post-content figure.wp-caption img {
	margin-bottom: 0;
}
.post-content .wp-block-image figcaption,
.post-content figure.wp-caption figcaption,
.post-content .wp-caption .wp-caption-text {
	margin: 0;
	padding: 0 10px;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--muted);
	text-align: center;
	max-width: 92%;
	margin-inline: auto;
}
.comment-text a {
    overflow-wrap: break-word;
    word-wrap: break-word; /* Fallback für ältere Browser */
    word-break: break-word;
    hyphens: auto;
}
/* Gallerie Style */
.post-content .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.post-content .gallery-item {
  margin: 0;
  padding: 0;
}
.post-content .gallery-columns-1 .gallery-item { flex: 0 0 100%; max-width: 100%; }
.post-content .gallery-columns-2 .gallery-item { flex: 0 0 calc(50% - 5px); max-width: calc(50% - 5px); }
.post-content .gallery-columns-3 .gallery-item { flex: 0 0 calc(33.333% - 7px); max-width: calc(33.333% - 7px); }
.post-content .gallery-columns-4 .gallery-item { flex: 0 0 calc(25% - 7.5px); max-width: calc(25% - 7.5px); }
.post-content .gallery-columns-5 .gallery-item { flex: 0 0 calc(20% - 8px); max-width: calc(20% - 8px); }
.post-content .gallery-columns-6 .gallery-item { flex: 0 0 calc(16.666% - 8.33px); max-width: calc(16.666% - 8.33px); }

.post-content .gallery-icon {
  margin: 0;
}
.post-content .gallery-icon a {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
}
.post-content .gallery-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: var(--radius);
}

.post-content .gallery-caption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

/* Mobil: immer eine Spalte, unabhängig von der im Shortcode angegebenen Zahl */
@media (max-width: 480px) {
  .post-content .gallery-columns-1 .gallery-item,
  .post-content .gallery-columns-2 .gallery-item,
  .post-content .gallery-columns-3 .gallery-item,
  .post-content .gallery-columns-4 .gallery-item,
  .post-content .gallery-columns-5 .gallery-item,
  .post-content .gallery-columns-6 .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
/* LIGHTBOX */

.js-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.js-lightbox.is-active { display: flex; }
.js-lightbox img {
  max-width: 92%;
  max-height: 92%;
  border-radius: var(--radius);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.js-lightbox .lb-prev,
.js-lightbox .lb-next,
.js-lightbox .lb-close {
  position: absolute;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  z-index: 10000;
}
.js-lightbox .lb-close { top: 10px; right: 20px; font-size: 2rem; }
.js-lightbox .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.js-lightbox .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ─── WordPress Audio-/Video-Player (MediaElement.js) ans Theme anpassen ─── */
.post-content .mejs-container {
  display: block;
  margin: 16px 0;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden; /* rundet die Ecken der Steuerleiste mit ab */
}

/* Steuerleiste bleibt dunkel (WordPress-Standard-Kontrast bleibt erhalten),
   nur leicht an die Theme-Farbe angeglichen statt reinem Schwarz */
.post-content .mejs-controls {
  background: #1C1B18 !important;
  padding: 0 10px !important;
}

/* Abgespielter Teil des Fortschrittsbalkens in Akzentfarbe statt Standard-Grau */
.post-content .mejs-controls .mejs-time-rail .mejs-time-current {
  background: var(--accent) !important;
}

/* Lautstärkeregler ebenfalls in Akzentfarbe */
.post-content .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
  background: var(--accent) !important;
}

/* Zeitanzeige-Schrift an Theme angleichen */
.post-content .mejs-time {
  font-family: var(--mono) !important;
}