/* FCO-Ticker */
.fco-ticker {
    width: var(--fco-width, 100%);
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    min-height: 40px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
    line-height: 21px;
    font-weight: 500;
}
.fco-ticker__title {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 9px 20px;
    border: 1px solid #000;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    background: var(--fco-title-bg, #f00);
    color: var(--fco-title-color, #fff);
    font-family: inherit;
    font-size: 16px;
    line-height: 26px;
    font-weight: 700;
    white-space: nowrap;
    box-sizing: border-box;
}
.fco-ticker__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px solid #000;
    border-radius: 0 5px 5px 0;
    background: var(--fco-bar-bg, #fff);
    color: var(--fco-text-color, #000);
}
.fco-ticker__track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: max-content;
    will-change: transform;
    animation: fco-ticker-scroll var(--fco-duration, 24s) linear infinite;
}
.fco-ticker--pause-hover:hover .fco-ticker__track { animation-play-state: paused; }
.fco-ticker__item {
    display: block;
    flex: 0 0 auto;
    padding: 0 48px 0 20px;
    white-space: nowrap;
    color: var(--fco-text-color, #000);
}
.fco-ticker__item p { display: inline; margin: 0; }
.fco-ticker__item a { color: var(--fco-text-color, #000); text-decoration: none; }
.fco-ticker__item a:hover,
.fco-ticker__item a:focus { color: var(--fco-link-color, #f00); }
@keyframes fco-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .fco-ticker__track { animation: none; }
    .fco-ticker__item[aria-hidden="true"] { display: none; }
}
@media (max-width: 800px) {
    .fco-ticker { width: 100%; min-height: 30px; }
    .fco-ticker__title { padding: 5px; }
    .fco-ticker__item { padding-left: 10px; padding-right: 30px; }
}

/* FCO – Letzte Beiträge: bewusst an RPWE-Ausgabe angelehnt */
.fco-recent__list {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.fco-recent__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid #eee;
    margin: 0 0 8px !important;
    padding: 5px 0 10px !important;
    list-style: none !important;
}
.fco-recent__thumb {
    flex: 0 0 auto;
    display: block;
    text-decoration: none;
}
.fco-recent__thumb img {
    display: block;
    box-sizing: content-box;
    object-fit: cover;
    border: 1px solid #eee !important;
    box-shadow: none !important;
    margin: 2px 0 !important;
    padding: 3px !important;
}
.fco-recent__content { min-width: 0; flex: 1 1 auto; }
.fco-recent__title {
    background: none !important;
    clear: none;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400;
    font-size: 12px !important;
    line-height: 1.5em;
}
.fco-recent__title a { display: inline !important; text-decoration: none; }
.fco-recent__date { display: block; color: #bbb; font-size: 11px; line-height: 1.5; }


/* Optionaler leichter Kopierschutz. Formulare und editierbare Bereiche bleiben bedienbar. */
.fco-copy-protect-selection :not(input):not(textarea):not(select):not(button):not([contenteditable="true"]) {
    -webkit-user-select: none;
    user-select: none;
}

/* FCO – Mitgliederkarten */
.fco-member-cards {
    display: grid;
    grid-template-columns: repeat(var(--fco-member-columns, 3), minmax(0, 1fr));
    gap: 14px 30px;
    width: 100%;
}
.fco-member-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
    min-width: 0;
    padding: 12px;
    background: #fff;
    box-sizing: border-box;
}
.fco-member-card__avatar {
    grid-column: 1;
    margin: 0 !important;
}
.fco-member-card__avatar img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    margin: 0;
}
.fco-member-card__body {
    grid-column: 2;
    display: grid;
    grid-template-rows: 24px 21px 21px minmax(24px, auto);
    row-gap: 4px;
    min-width: 0;
    min-height: 102px;
    align-content: start;
}
.fco-member-card__name,
.fco-member-card__awards,
.fco-member-card__function,
.fco-member-card__links {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 21px;
}
.fco-member-card__name {
    font: inherit;
    font-weight: 700;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fco-member-card__awards,
.fco-member-card__function {
    font-style: italic;
}
.fco-member-card__links {
    display: grid;
    grid-template-columns: max-content repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    align-items: start;
    line-height: 24px;
}
.fco-member-card__link {
    min-width: 0;
}
.fco-member-card__link--gallery {
    grid-column: 1;
    grid-row: 1;
    white-space: nowrap;
    text-align: left;
}
.fco-member-card__link--website {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    overflow-wrap: anywhere;
}
.fco-member-card__link--website-2 {
    grid-column: 3;
    grid-row: 1;
}
.fco-member-card__links a {
    margin: 0 !important;
}

/* FCO – interne Mitgliederliste */
.fco-member-list__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 24px;
}
.fco-member-list__alphabet button {
    min-width: 26px;
    border: 0;
    background: transparent;
    padding: 3px 5px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.fco-member-list__alphabet button.is-active { text-decoration: underline; }
.fco-member-list__alphabet button:disabled { opacity: .28; cursor: default; text-decoration: none; }
.fco-member-list__items { display: grid; gap: 18px; }
.fco-member-list__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.fco-member-list__avatar { flex: 0 0 64px; }
.fco-member-list__avatar img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: cover;
    margin: 0;
}
.fco-member-list__data { min-width: 0; }
.fco-member-list__data h3 { margin: 0 0 4px !important; padding: 0 !important; font: inherit; font-weight: 700; }

@media (max-width: 1000px) {
    .fco-member-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .fco-member-cards { grid-template-columns: 1fr; }
}

/* FCO – Galerieübersicht */
.fco-gallery-overview {
    display: grid;
    grid-template-columns: repeat(var(--fco-gallery-overview-columns, 3), minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}
.fco-gallery-overview__card,
.fco-gallery-overview__link,
.fco-gallery-overview__media {
    display: block;
    min-width: 0;
}
.fco-gallery-overview__link {
    text-decoration: none !important;
}
.fco-gallery-overview__media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f0f0f1;
}
.fco-gallery-overview__image,
.fco-gallery-overview__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}
.fco-gallery-overview__image {
    margin: 0;
    object-fit: cover;
    transition: transform .25s ease;
}
.fco-gallery-overview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .52);
    opacity: 0;
    transition: opacity .2s ease;
    box-sizing: border-box;
}
.fco-gallery-overview__title {
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
.fco-gallery-overview__link:hover .fco-gallery-overview__overlay,
.fco-gallery-overview__link:focus-visible .fco-gallery-overview__overlay {
    opacity: 1;
}
.fco-gallery-overview__link:hover .fco-gallery-overview__image,
.fco-gallery-overview__link:focus-visible .fco-gallery-overview__image {
    transform: scale(1.025);
}

/* FCO – eigenes Template für die Einzelgalerie */

.fco-gallery-single__header {
    margin: 0;
    padding: 88px 0 97px;
    text-align: center;
}
.fco-gallery-single__title {
    margin: 0;
    text-align: center;
}
.fco-gallery-single__section {
    margin: 0;
}
.fco-gallery-single__section:last-child {
    margin-bottom: 120px;
}
.fco-gallery-single__section-title {
    margin: 0 0 36px;
    text-align: center;
}
.fco-gallery-single__grid {
    column-count: 3;
    column-gap: 8px;
}
.fco-gallery-single__item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 8px;
    break-inside: avoid;
    overflow: hidden;
    vertical-align: top;
}
.fco-gallery-single__image-link,
.fco-gallery-single__image {
    display: block;
    width: 100%;
}
.fco-gallery-single__image {
    height: auto;
    margin: 0;
}
.fco-gallery-single__caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 7px 10px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font: inherit;
    font-size: .88em;
    line-height: 1.35;
}
@media (max-width: 1000px) {
    .fco-gallery-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fco-gallery-single__grid { column-count: 2; }
}
@media (max-width: 620px) {
    .fco-gallery-overview { grid-template-columns: 1fr; gap: 16px; }
    .fco-gallery-overview__overlay { opacity: 1; align-items: flex-end; justify-content: flex-start; }
    .fco-gallery-overview__title { text-align: left; }
    
    .fco-gallery-single__grid { column-count: 1; }
}

/* FCO – eigenständige Lightbox (theme-unabhängig) */
html.fco-lightbox-open,
html.fco-lightbox-open body { overflow: hidden; }

.fco-lightbox[hidden] { display: none !important; }

.fco-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(44px, 1fr);
    align-items: center;
    justify-items: center;
    background: rgba(0, 0, 0, .9);
    padding: 36px 20px;
    box-sizing: border-box;
}

.fco-lightbox__stage {
    grid-column: 2;
    width: min(88vw, 1600px);
    height: calc(100vh - 72px);
    min-width: 0;
}

.fco-lightbox__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fco-lightbox__track {
    display: flex;
    width: 300%;
    height: 100%;
    transform: translateX(-33.333333%);
    transition: transform 400ms ease-in-out;
    will-change: transform;
}

.fco-lightbox__track.is-resetting {
    transition: none !important;
}

.fco-lightbox__slide {
    flex: 0 0 33.333333%;
    width: 33.333333%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.fco-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 104px);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
}

.fco-lightbox__caption {
    max-width: 100%;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0);
    color: #fff;
    text-align: center;
    box-sizing: border-box;
}

.fco-lightbox__close,
.fco-lightbox__nav {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

.fco-lightbox__close {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 18px;
    padding: 4px 10px;
    font-size: 42px;
    line-height: 1;
}

.fco-lightbox__nav {
    position: relative;
    z-index: 4;
    padding: 18px;
    font-size: 42px;
    line-height: 1;
}

.fco-lightbox__nav--prev { grid-column: 1; justify-self: start; }
.fco-lightbox__nav--next { grid-column: 3; justify-self: end; }

.fco-lightbox__close:hover,
.fco-lightbox__close:focus-visible,
.fco-lightbox__nav:hover,
.fco-lightbox__nav:focus-visible {
    opacity: .72;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .fco-lightbox__track { transition: none; }
}

@media (max-width: 620px) {
    .fco-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        padding: 36px 4px;
    }

    .fco-lightbox__stage {
        width: calc(100vw - 96px);
    }

    .fco-lightbox__nav {
        padding: 8px;
        font-size: 34px;
    }

    .fco-lightbox__close {
        right: 8px;
    }
}

/* Zusätzliche Absicherung: nur die erste FCO-Lightbox darf sichtbar sein. */
.fco-lightbox ~ .fco-lightbox {
    display: none !important;
}

/* FCO Galerien – Theme-Contentbreite und horizontales Edge-Padding */
.fco-galerien,

/* FCO Galerie-Einzelseite – Contentbreite analog Seminare-Plugin */
.fco-gallery-single__inner {
    width: 100%;
    max-width: var(--global-content-width, 1560px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--global-content-edge-padding, 1.5rem);
    padding-right: var(--global-content-edge-padding, 1.5rem);
    box-sizing: border-box;
}

/* Einstellbare Darstellungsbreite ausschließlich Desktop ab 1025 px.
   Tablet/Mobil bleiben vollständig in der Theme-/Responsive-Logik. */
@media (min-width: 1025px) {
    .fco-gallery-single__inner {
        width: min(100%, var(--fco-gallery-single-content-width, var(--global-content-width, 1560px)));
        max-width: var(--fco-gallery-single-content-width, var(--global-content-width, 1560px));
    }
}

.fco-gallery-single__section + .fco-gallery-single__section {
    margin-top: 60px;
}

/* Gleich hohe Bilder je Zeile, proportional und ohne Beschnitt. */
.fco-gallery-single__grid--equal_height {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    column-count: auto;
    align-items: flex-start;
}
.fco-gallery-single__grid--equal_height .fco-gallery-single__item {
    display: block;
    flex-grow: var(--fco-image-ratio, 1);
    flex-basis: calc(240px * var(--fco-image-ratio, 1));
    min-width: 0;
    max-width: 100%;
    width: auto;
    margin: 0;
}
.fco-gallery-single__grid--equal_height .fco-gallery-single__image {
    width: 100%;
    height: auto;
}
@media (max-width: 1000px) {
    .fco-gallery-single__grid--equal_height .fco-gallery-single__item {
        flex-basis: calc(180px * var(--fco-image-ratio, 1));
    }
}
@media (max-width: 620px) {
    .fco-gallery-single__grid--equal_height .fco-gallery-single__item {
        flex-basis: calc(120px * var(--fco-image-ratio, 1));
    }
}

/* Quadratische Felder mit vollständig sichtbaren, zentrierten Bildern. */
.fco-gallery-single__grid--square {
    display: grid;
    grid-template-columns: repeat(var(--fco-square-columns, 3), minmax(0, 1fr));
    gap: 8px;
    column-count: auto;
}
.fco-gallery-single__grid--square .fco-gallery-single__item {
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    margin: 0;
    background: var(--fco-square-background, #404040);
}
.fco-gallery-single__grid--square .fco-gallery-single__image-link {
    position: absolute;
    inset: 8px;
    display: block;
    box-sizing: border-box;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
}
/* Optimierungsplugins können das Bild in ein picture-Element einbetten.
   Dieses darf keinen eigenen Positionierungs- oder Beschnittrahmen bilden. */
.fco-gallery-single__grid--square .fco-gallery-single__image-link picture {
    display: contents !important;
    position: static !important;
    overflow: visible !important;
}
.fco-gallery-single__grid--square .fco-gallery-single__image-link img {
    position: absolute !important;
    inset: auto !important;
    left: 50% !important;
    top: 50% !important;
    display: block !important;
    box-sizing: border-box !important;
    width: var(--fco-square-image-width, 100%) !important;
    height: var(--fco-square-image-height, 100%) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: translate(-50%, -50%) !important;
}
@media (max-width: 1000px) {
    .fco-gallery-single__grid--square {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    .fco-gallery-single__grid--square {
        grid-template-columns: minmax(0, 1fr);
    }
}
