/* Baustein News ([rftoa_news], modules/news.php): Liste im Stil der bisherigen News auf rock-for-tolerance.de
   (Schrift und Grundfarben vom Theme, Titel gelb, Bild links, Text rechts, „Weiter lesen“), dazu Quelle, Filter,
   „Mehr laden“ und ein Fenster für Instagram-Beiträge. Doppelt verschachtelt (.rfn .rfn-…) gegen Theme-Regeln. */

.rfn { --rfn-accent: #fcb900; --rfn-line: #333; --rfn-muted: #a8a8a8; max-width: 760px; margin: 24px auto; padding: 0; border: 0; background: none; }   /* schmal genug zum Lesen */
/* kein Rahmen beim Antippen oder Klicken, nur bei Bedienung per Tastatur */
.rfn a:focus, .rfn button:focus, .rfn-modal a:focus, .rfn-modal button:focus { outline: none; box-shadow: none; }
.rfn a:focus-visible, .rfn button:focus-visible, .rfn-modal a:focus-visible, .rfn-modal button:focus-visible { outline: 2px solid var(--rfn-accent, #fcb900); outline-offset: 3px; }
.rfn *, .rfn-modal * { box-sizing: border-box; }

/* Filter */
.rfn .rfn-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.rfn .rfn-filter button {
    display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 14px;
    border: 1px solid #444; border-radius: 999px; background: transparent; color: #ddd; box-shadow: none;
    font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: normal; cursor: pointer;
}
.rfn .rfn-filter button svg { width: 16px; height: 16px; }
.rfn .rfn-filter button:hover { border-color: var(--rfn-accent); color: #fff; background: transparent; }
.rfn .rfn-filter button[aria-pressed="true"] { background: var(--rfn-accent); border-color: var(--rfn-accent); color: #151515; }

/* Liste */
.rfn .rfn-list { list-style: none; margin: 0; padding: 0; }
.rfn .rfn-item { margin: 0; padding: 26px 0; border-bottom: 1px solid var(--rfn-line); list-style: none; }
.rfn .rfn-item::before, .rfn .rfn-item::marker { content: none; }
.rfn .rfn-item[hidden] { display: none; }
.rfn .rfn-title { margin: 0 0 4px; padding: 0; font-size: 24px; font-weight: 400; line-height: 1.3; text-transform: none; letter-spacing: normal; }
.rfn .rfn-title::before, .rfn .rfn-title::after { content: none; }
.rfn .rfn-title a { color: var(--rfn-accent); text-decoration: none; }
.rfn .rfn-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rfn .rfn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0; font-size: 13px; line-height: 1.4; color: var(--rfn-muted); }
.rfn .rfn-src, .rfn-modal .rfn-src { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 6px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.rfn .rfn-src svg, .rfn-modal .rfn-src svg { width: 15px; height: 15px; }
.rfn .rfn-src--web { background: rgba(252, 185, 0, .14); color: var(--rfn-accent); }
.rfn .rfn-src--ig, .rfn-modal .rfn-src--ig { background: linear-gradient(90deg, rgba(254, 218, 117, .18), rgba(214, 41, 118, .22), rgba(150, 47, 191, .22)); color: #ff8ac2; }

.rfn .rfn-body { display: flex; gap: 20px; align-items: flex-start; }
.rfn .rfn-thumb { position: relative; flex: 0 0 200px; width: 200px; height: 200px; display: block; margin: 0; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #222; }
.rfn .rfn-thumb img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; transition: transform .4s; }
.rfn .rfn-thumb:hover img { transform: scale(1.05); }
.rfn .rfn-badge { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.rfn .rfn-badge svg { width: 17px; height: 17px; }
.rfn .rfn-badge--web { background: var(--rfn-accent); color: #151515; }
.rfn .rfn-badge--ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.rfn .rfn-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.rfn .rfn-play svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.rfn .rfn-multi { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.rfn .rfn-multi svg { width: 16px; height: 16px; }
.rfn .rfn-text { flex: 1; min-width: 0; }
.rfn .rfn-excerpt { margin: 0; padding: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rfn .rfn-more { display: table; margin: 6px 0 0 auto; color: var(--rfn-accent); text-decoration: none; }   /* rechts, nur so breit wie der Text */
.rfn .rfn-more:hover { text-decoration: underline; }

.rfn .rfn-loadmore { display: flex; justify-content: center; margin-top: 26px; }
.rfn .rfn-loadmore[hidden] { display: none; }
.rfn .rfn-loadmore button {
    margin: 0; padding: 11px 26px; border: 2px solid var(--rfn-accent); border-radius: 999px; background: transparent; color: var(--rfn-accent);
    box-shadow: none; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-transform: none; cursor: pointer;
}
.rfn .rfn-loadmore button:hover { background: var(--rfn-accent); color: #151515; }

@media (max-width: 560px) {
    .rfn .rfn-title { font-size: 20px; }
    .rfn .rfn-body { gap: 14px; }
    .rfn .rfn-thumb { flex-basis: 112px; width: 112px; height: 112px; }
    .rfn .rfn-badge { width: 24px; height: 24px; right: 4px; bottom: 4px; }
    .rfn .rfn-badge svg { width: 14px; height: 14px; }
    .rfn .rfn-excerpt { -webkit-line-clamp: 4; font-size: 15px; line-height: 1.55; }
}

/* Fenster für Instagram-Beiträge (vom Skript an <body> gehängt) */
.rfn-modal { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .82); font-family: inherit; }
.rfn-modal.is-open { display: flex; animation: rfn-fade .2s ease-out; }
@keyframes rfn-fade { from { opacity: 0; } }
.rfn-modal .rfn-dialog { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); width: min(980px, 100%); max-height: calc(100vh - 32px); border-radius: 12px; overflow: hidden; background: #1d1d1d; color: #eee; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); text-align: left; }
/* Bilder als Karussell: Wischen (scroll-snap), Pfeile, Punkte */
.rfn-modal .rfn-dialog-img { position: relative; min-width: 0; min-height: 0; background: #000; }
.rfn-modal .rfn-slides { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.rfn-modal .rfn-slides::-webkit-scrollbar { display: none; }
.rfn-modal .rfn-slide { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: center; }
.rfn-modal .rfn-slide img { display: block; width: 100%; height: 100%; max-width: none; max-height: calc(100vh - 32px); margin: 0; border: 0; object-fit: contain; }
.rfn-modal .rfn-nav { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.rfn-modal .rfn-nav--prev { left: 10px; }
.rfn-modal .rfn-nav--next { right: 10px; }
.rfn-modal .rfn-nav[hidden], .rfn-modal .rfn-dots[hidden], .rfn-modal .rfn-video[hidden] { display: none; }
.rfn-modal .rfn-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.rfn-modal .rfn-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); box-shadow: 0 0 3px rgba(0, 0, 0, .6); }
.rfn-modal .rfn-dots span.is-on { background: #fff; }
.rfn-modal .rfn-video { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #fff; text-decoration: none; }
.rfn-modal .rfn-video svg { width: 72px; height: 72px; padding: 18px; border-radius: 50%; background: rgba(0, 0, 0, .6); }
.rfn-modal .rfn-dialog-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 32px); overflow: hidden; padding: 22px 22px 18px; }
.rfn-modal .rfn-meta { display: flex; align-items: center; gap: 8px; margin: 0 50px 14px 0; font-size: 13px; color: #a8a8a8; }
.rfn-modal .rfn-dialog-cap { flex: 1; min-height: 0; overflow-y: auto; white-space: pre-line; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.rfn-modal .rfn-dialog-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 12px 18px; border-radius: 999px; background: linear-gradient(90deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; font-weight: 700; text-decoration: none; }
.rfn-modal .rfn-dialog-cta:hover { color: #fff; filter: brightness(1.08); }
.rfn-modal .rfn-dialog-cta svg { width: 18px; height: 18px; }
.rfn-modal .rfn-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
@media (max-width: 760px) {
    .rfn-modal .rfn-dialog { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
    .rfn-modal .rfn-slide img { max-height: 52vh; }
    .rfn-modal .rfn-dialog-side { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
    .rfn .rfn-thumb img { transition: none; }
    .rfn-modal.is-open { animation: none; }
}
