/* allerhand! Struktur: issues, municipalities. Colours and fonts come from 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; }
/* Accent colour from the theme panel (Newspaper sets --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; }
/* Coats of arms (inc/coats-of-arms.php): in the tile before the name, on the municipality page before the title. */
/* Newspaper gives images in the content a 21 px bottom margin on phones. */
.ah-wappen { margin: 0 !important; }
/* Fixed column, so the names line up even though the coats of arms differ in width. */
.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; }
}

/* Municipality pages */
.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; }
}

/* Main menu: Newspaper has 14 px padding per side (31 px on the right with a submenu, arrow at 15 px), which leaves
   only 36 px to the search at 980 px width, and a slightly wider fallback font (Open Sans isn't loaded) wraps
   "Werben" onto a second line. Each padding gets 4 px smaller. */
@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; }
}

/* Below every post: "Im E-Mag lesen" with issue and page (inc/emag-pages.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; }
