/* allerhand! Struktur: Ausgaben, Gemeinden. Farben und Schriften kommen von Newspaper. */

.ah-ausgabe-kopf { display: flex; gap: 24px; align-items: flex-start; margin: 10px 0 20px; }
.ah-ausgabe-kopf .ah-ausgabe-cover { flex: 0 0 200px; }
.ah-ausgabe-kopf .ah-cover,
.ah-ausgabe-aktuell .ah-cover { width: 100%; height: auto; display: block; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.ah-vorwort { flex: 1; min-width: 0; }
.ah-emag { margin: 12px 0 0; }
/* Akzentfarbe aus dem Theme-Panel (Newspaper setzt --td_theme_color). */
.ah-emag-link { display: inline-block; padding: 8px 16px; background: var(--td_theme_color, #222); color: #fff !important; font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 500; }
.ah-emag-link:hover { background: #222; }
.ah-vorwort-titel { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }

.ah-ausgabe-aktuell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.ah-ausgabe-aktuell .entry-title { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }

.ah-ausgaben { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 24px 20px; }
.ah-ausgaben li { margin: 0; min-width: 0; }
.ah-ausgaben a { display: block; color: inherit; }
.ah-ausgaben .ah-cover { width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; display: block; box-shadow: 0 1px 6px rgba(0, 0, 0, .15); transition: transform .15s; }
.ah-ausgaben a:hover .ah-cover { transform: translateY(-3px); }
.ah-cover-leer { background: #eee; }
.ah-ausgabe-name { display: block; margin-top: 8px; font-weight: 600; font-size: 14px; line-height: 1.3; }

.ah-gemeinden { list-style: none; margin: 24px 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.ah-gemeinden li { margin: 0; }
.ah-gemeinden a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border: 1px solid #eaeaea; color: #111; font-family: 'Roboto', sans-serif; }
.ah-gemeinden a:hover { border-color: currentColor; }
.ah-gemeinde-name { font-size: 15px; font-weight: 500; }
/* Wappen (inc/wappen.php): in der Kachel vor dem Namen, auf der Gemeinde-Seite vor dem Titel. */
/* Newspaper gibt Bildern im Inhalt auf dem Handy 21 px Abstand nach unten. */
.ah-wappen { margin: 0 !important; }
/* Feste Spalte, damit die Namen trotz verschieden breiter Wappen bündig stehen. */
.ah-gemeinden a:has(.ah-wappen) { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; }
.ah-gemeinden .ah-wappen { grid-row: span 2; justify-self: center; }
.ah-gemeinden a:has(.ah-wappen) .ah-gemeinde-name { align-self: end; }
.ah-gemeinden a:has(.ah-wappen) .ah-gemeinde-anzahl { align-self: start; }
.ah-titel-wappen { display: flex; align-items: center; gap: 12px; }
.ah-titel-wappen .ah-wappen { flex: 0 0 auto; }
.ah-titel-wappen .td-page-title { margin-bottom: 0; }
.ah-gemeinde-anzahl { font-size: 12px; color: #767676; }

@media (max-width: 767px) {
	.ah-ausgabe-kopf { flex-direction: column; }
	.ah-ausgabe-kopf .ah-ausgabe-cover { flex-basis: auto; width: 160px; }
	.ah-ausgabe-aktuell { grid-template-columns: minmax(0, 1fr); }
	.ah-ausgabe-aktuell .ah-ausgabe-cover { width: 180px; }
	.ah-ausgaben { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
}

/* Gemeinde-Seiten */
.ah-block-title { margin-top: 10px; }
.ah-erwaehnt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.ah-erwaehnt .td-related-span4 { width: auto; float: none; margin: 0; padding: 0; }
.ah-erwaehnt .entry-thumb { width: 100%; height: auto; display: block; }
@media (max-width: 767px) {
	.ah-erwaehnt { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* Hauptmenü: Newspaper hat 14 px Abstand je Seite (mit Untermenü rechts 31 px, Pfeil bei 15 px), damit bleiben
   bei 980 px Breite nur 36 px bis zur Suche und eine etwas breitere Ersatzschrift (Open Sans wird nicht
   geladen) bricht „Werben“ in eine zweite Zeile. Jeder Abstand wird um 4 px kleiner. */
@media (min-width: 1019px) {
	#td-header-menu .sf-menu > li > a { padding-left: 10px; padding-right: 10px; }
	#td-header-menu .sf-menu > li > a.sf-with-ul { padding-right: 27px; }
	#td-header-menu .sf-menu > li > a.sf-with-ul .td-icon-menu-down { right: 11px; }
}

/* Unter jedem Beitrag: „Im E-Mag lesen“ mit Ausgabe und Seite (inc/emag-seiten.php). */
.ah-emag-beitrag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 26px 0; }
.ah-emag-seite { font-family: 'Roboto', sans-serif; font-size: 13px; color: #767676; }
