/* SINEOS 2026-12: ph-bw.de – Roboto (lokal), News-Karten, News-Detailseite. Eckig, ohne Rundungen. Nur für ph-bw.de geladen. */

/*-- Roboto, lokal eingebunden (Apache License 2.0, siehe Fonts/LICENSE.txt) --*/
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 300; font-display: swap; src: url('Fonts/roboto-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url('Fonts/roboto-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: italic; font-weight: 400; font-display: swap; src: url('Fonts/roboto-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap; src: url('Fonts/roboto-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url('Fonts/roboto-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: italic; font-weight: 700; font-display: swap; src: url('Fonts/roboto-latin-700-italic.woff2') format('woff2'); }

:root {
    --bs-body-font-family: 'Roboto', Arial, Helvetica, sans-serif;
    --bw-blue: #086FB8;
    --bw-blue-dark: #065A96;
    --bw-blue-tint: #EAF3FA;
    --bw-text: #212121;
    --bw-muted: #5C5C5C;
    --bw-line: #D8E0E7;
    --bw-red: #BE0027;
    --bw-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9 3l5 5-5 5'/%3E%3C/svg%3E");
    --bw-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8M4 6.5 8 10.5l4-4M2.5 14h11'/%3E%3C/svg%3E");
}
body, button, input, select, textarea { font-family: var(--bs-body-font-family); }

/*-- Button (eckig) --*/
.bw-btn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--bw-blue); background-color: #fff; color: var(--bw-blue); padding: 9px 22px; font-size: 1rem; line-height: 1.5; text-decoration: none !important; white-space: nowrap; border-radius: 0; transition: background-color 0.25s, color 0.25s; }
.bw-btn:after { content: ''; flex: none; width: 14px; height: 14px; background-color: currentColor; -webkit-mask: var(--bw-arrow) center / contain no-repeat; mask: var(--bw-arrow) center / contain no-repeat; }
.bw-btn:hover, .bw-btn:focus-visible { background-color: var(--bw-blue); color: #fff !important; }
.bw-btn--back:after { order: -1; transform: scaleX(-1); }

/*-- News-Karten --*/
.frame:has(.bw-news__head) .frame-header { display: none; }
.bw-news__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.bw-news__head .bw-news__title { margin: 0; }
.bw-news { container-type: inline-size; }
.bw-news__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
/* Spaltenzahl nach verfügbarer Breite (volle Breite oder 2/3-Spalte), nicht nach Bildschirm */
@container (max-width: 980px) { .bw-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@container (max-width: 560px) { .bw-news__grid { grid-template-columns: minmax(0, 1fr); } }
.bw-news__empty { color: var(--bw-muted); }

.bw-card { position: relative; display: flex; flex-direction: column; background-color: var(--bw-blue-tint); transition: box-shadow 0.3s; }
.bw-card:hover, .bw-card:focus-within { box-shadow: 0px 10px 24px rgba(8, 111, 184, 0.16); }
.bw-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 412 / 268; object-fit: cover; }
.bw-card__placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 412 / 268; background-color: #DCEAF5; }
.bw-card__placeholder span { width: 14px; height: 14px; background-color: #3A82C6; box-shadow: 20px 0 #54AB42, 40px 0 #D99623, 60px 0 #BE0027, 80px 0 #3A4D98, 100px 0 #E9C91E; margin-right: 100px; }
.bw-card__body { flex: 1; border-top: 3px solid var(--bw-blue); padding: 24px 26px 28px 26px; }
.bw-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.875rem; line-height: 20px; color: var(--bw-blue); margin-bottom: 10px; }
.bw-card__title { font-size: 1.1875rem; line-height: 1.4; font-weight: 700; margin: 0 0 12px 0; color: var(--bw-text); }
.bw-card__link { display: flex; justify-content: space-between; gap: 16px; color: var(--bw-text) !important; text-decoration: none !important; }
.bw-card__link:before { content: ''; position: absolute; inset: 0; z-index: 1; }
.bw-card__link:after { content: ''; flex: none; width: 20px; height: 20px; margin-top: 3px; background-color: var(--bw-blue); -webkit-mask: var(--bw-arrow) center / contain no-repeat; mask: var(--bw-arrow) center / contain no-repeat; transition: translate 0.3s; }
.bw-card--pdf .bw-card__link:after { -webkit-mask-image: var(--bw-download); mask-image: var(--bw-download); }
.bw-card:hover .bw-card__link { color: var(--bw-blue) !important; }
.bw-card:hover .bw-card__link:after { translate: 4px 0; }
.bw-card--pdf:hover .bw-card__link:after { translate: 0 3px; }
.bw-card__link:focus-visible { outline: none; }
.bw-card:has(.bw-card__link:focus-visible) { outline: 2px solid var(--bw-blue); outline-offset: 3px; }
.bw-card__teaser { font-size: 0.9375rem; line-height: 1.6; margin: 0; color: var(--bw-text); }

.bw-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; line-height: 1; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 8px; }
.bw-badge--pdf { background-color: var(--bw-red); color: #fff; }
.bw-badge--pdf:before, .bw-badge--file:before { content: ''; width: 11px; height: 11px; background-color: currentColor; -webkit-mask: var(--bw-download) center / contain no-repeat; mask: var(--bw-download) center / contain no-repeat; }
.bw-badge--file { border: 1px solid var(--bw-red); color: var(--bw-red); padding: 4px 7px; }

/*-- Seitenblättern --*/
.bw-pager { margin-top: 44px; }
.bw-pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.bw-pager a, .bw-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--bw-line); color: var(--bw-blue); text-decoration: none; font-size: 1rem; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.bw-pager a:hover, .bw-pager a:focus-visible { border-color: var(--bw-blue); background-color: var(--bw-blue); color: #fff; }
.bw-pager .bw-pager__current { background-color: var(--bw-blue); border-color: var(--bw-blue); color: #fff; }
.bw-pager .bw-pager__gap { border-color: transparent; }

/*-- Detailseite --*/
.news-single .bw-detail { max-width: 860px; }
.bw-detail__head { margin-bottom: 28px; }
.bw-detail__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9375rem; color: var(--bw-blue); margin: 0 0 10px 0; }
.bw-detail__author { color: var(--bw-muted); }
.bw-detail__title { font-size: 2.25rem; line-height: 1.25; font-weight: 300; color: var(--bw-blue); margin: 0 0 18px 0; hyphens: auto; }
.bw-detail__lead { font-size: 1.1875rem; line-height: 1.6; font-weight: 500; color: var(--bw-text); }
.bw-detail__lead p:last-child { margin-bottom: 0; }
.bw-detail__figure { margin: 0 0 32px 0; }
.bw-detail__figure img { display: block; width: 100%; height: auto; }
.bw-detail__figure figcaption, .bw-detail__gallery figcaption { font-size: 0.875rem; line-height: 1.5; color: var(--bw-muted); padding: 10px 0 0 0; border-bottom: 1px solid var(--bw-line); padding-bottom: 10px; }
.bw-detail__text { font-size: 1.0625rem; line-height: 1.7; }
.bw-detail__text a { color: var(--bw-blue); }
.bw-detail__text h2, .bw-detail__text h3 { margin-top: 1.6em; }
.bw-detail__content { margin-top: 24px; }
.bw-detail__gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.bw-detail__gallery figure { margin: 0; }
.bw-detail__gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity 0.25s; }
.bw-detail__gallery a:hover img { opacity: 0.85; }
.bw-detail__subhead { font-size: 1.375rem; line-height: 1.3; font-weight: 300; color: var(--bw-blue); margin: 0 0 14px 0; }
.bw-detail__files, .bw-detail__links, .bw-detail__related { margin-top: 44px; }

.bw-files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bw-line); }
.bw-file a { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 16px; padding: 14px 6px 14px 0; border-bottom: 1px solid var(--bw-line); color: var(--bw-text) !important; text-decoration: none !important; transition: background-color 0.25s; }
.bw-file a:hover, .bw-file a:focus-visible { background-color: var(--bw-blue-tint); }
.bw-file__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background-color: var(--bw-blue); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.bw-file--pdf .bw-file__icon { background-color: var(--bw-red); }
.bw-file__name { font-weight: 500; line-height: 1.4; }
.bw-file a:hover .bw-file__name { color: var(--bw-blue); }
.bw-file__info { font-size: 0.875rem; color: var(--bw-muted); white-space: nowrap; }

.bw-detail__links ul, .bw-detail__related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bw-line); }
.bw-detail__links li, .bw-detail__related li { padding: 12px 0; border-bottom: 1px solid var(--bw-line); }
.bw-detail__links li span { display: block; font-size: 0.875rem; color: var(--bw-muted); }
.bw-detail__related time { color: var(--bw-blue); font-size: 0.875rem; margin-right: 10px; }
.bw-detail__back { margin-top: 48px; }

/*-- Tablet und Mobil --*/
@media (max-width: 767.98px) {
    .bw-news__head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
    .bw-card__body { padding: 20px 20px 24px 20px; }
    .bw-card__title { font-size: 1.125rem; }
    .bw-detail__title { font-size: 1.75rem; }
    .bw-detail__lead { font-size: 1.0625rem; }
    .bw-detail__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bw-file a { grid-template-columns: 40px 1fr; }
    .bw-file__icon { width: 40px; height: 40px; }
    .bw-file__info { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
    .bw-card, .bw-card__link:after, .bw-btn, .bw-pager a, .bw-file a { transition: none; }
    .bw-card:hover .bw-card__link:after { translate: none; }
}
