/**
 * Fanhilfen – Ergänzungen zu ff-kampagnen.css (Übersicht wie Kampagnen).
 */

/* Fallback: GP-Standard #main.site-main (wenn page-fanhilfen.php auf dem Server noch alt ist) */
body.ff-page-fanhilfen #main.site-main {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 0 0 !important;
    box-sizing: border-box;
    background: #fff;
    overflow-x: hidden;
    min-height: calc(100dvh + 150px);
}

body.ff-page-fanhilfen #main.site-main:has(.ff-fanhilfen-wrap) > article {
    display: none !important;
}

body.ff-page-fanhilfen .ff-kampagnen-wrap,
body.ff-page-fanhilfen .ff-fanhilfen-wrap {
    margin-left: auto;
    margin-right: auto;
}

/* Grid horizontal mittig (wie Kampagnen ≤720px, hier auch Desktop) */
body.ff-page-fanhilfen .ff-kampagnen-grid,
body.ff-page-fanhilfen .ff-fanhilfen-grid,
.ff-fanhilfen-page .ff-kampagnen-grid,
.ff-fanhilfen-page .ff-fanhilfen-grid {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* Abstand Suchleiste → Grid wie Kampagnen (kein zusätzlicher Top-Abstand am Grid) */
body.ff-page-fanhilfen .ff-fanhilfen-search,
.ff-fanhilfen-page .ff-fanhilfen-search {
    margin-top: 0;
    margin-bottom: 34px;
}

.ff-fanhilfen-page .ff-fanhilfen-card-logo-placeholder {
    display: none;
}

.ff-fanhilfen-page .ff-kampagnen-card-logo {
    object-fit: contain;
    object-position: center center;
}

.ff-fanhilfen-page .ff-kampagnen-card-visual {
    align-items: center;
    justify-content: center;
    background: transparent;
}

body.ff-page-fanhilfen .ff-fanhilfen-page .ff-kampagnen-card-visual,
body.ff-page-fanhilfen .ff-fanhilfen-wrap .ff-kampagnen-card-visual {
    background: transparent !important;
}

body.ff-page-fanhilfen .ff-fanhilfen-card-logo-placeholder {
    display: none !important;
}

main.ff-main.ff-fanhilfen-detail {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 0 200px !important;
    box-sizing: border-box;
    background: #fff;
    overflow-x: hidden;
}

.ff-fanhilfen-detail-wrap {
    width: 100%;
    max-width: 1000px;
    min-width: 0;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* Stern + Uhr oben rechts, Oberkante am Titel */
.ff-fanhilfen-detail-head .ff-kampagnen-detail-title-row {
    align-items: flex-start;
}

.ff-fanhilfen-detail-head .ff-kampagnen-detail-head-actions {
    align-self: flex-start;
    align-items: flex-start;
    padding-top: 0;
    margin-top: 0;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-head .ff-kampagnen-detail-title-row,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-head .ff-kampagnen-detail-title-row {
    align-items: flex-start !important;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-head .ff-kampagnen-detail-head-actions,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-head .ff-kampagnen-detail-head-actions {
    align-self: flex-start !important;
    align-items: flex-start !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.ff-fanhilfen-detail-content {
    width: 1000px;
    max-width: 100%;
    min-height: 304px;
    height: auto;
    align-items: start;
    grid-template-columns: 384px minmax(0, 570px);
}

/* Logo links: kein grauer Kasten, Logo zentriert wenn kleiner */
.ff-fanhilfen-detail-content .ff-kampagnen-detail-media.ff-fanhilfen-detail-media,
.ff-fanhilfen-detail-media {
    width: 384px;
    max-width: 100%;
    min-height: 304px;
    height: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: visible;
    line-height: 0;
}

.ff-fanhilfen-detail-image,
.ff-fanhilfen-detail-content .ff-kampagnen-detail-image.ff-fanhilfen-detail-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 304px;
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
    object-fit: contain;
    object-position: center center;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-content .ff-kampagnen-detail-media.ff-fanhilfen-detail-media,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-content .ff-kampagnen-detail-media.ff-fanhilfen-detail-media {
    width: 384px !important;
    max-width: 100% !important;
    min-height: 304px !important;
    height: auto !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-image,
html body.ff-page-fanhilfen #main .ff-kampagnen-detail-image.ff-fanhilfen-detail-image,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-image,
html body.ff-page-fanhilfen-detail #main .ff-kampagnen-detail-image.ff-fanhilfen-detail-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 304px !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.ff-fanhilfen-detail-image-placeholder {
    display: none;
}

.ff-fanhilfen-detail-text {
    width: 570px;
    max-width: 570px;
    min-width: 0;
    min-height: 304px;
    height: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0;
    color: #000;
    text-align: left;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text.ff-kampagnen-detail-text,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text.ff-kampagnen-detail-text {
    width: 570px !important;
    max-width: 570px !important;
    min-width: 0 !important;
    min-height: 304px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text p,
html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text p:first-child,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text p,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text p:first-child {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.ff-fanhilfen-detail-text p {
    margin: 0;
    padding: 0;
    font: inherit;
    line-height: 1;
    overflow: visible;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Dynamischer Abstand: kurzer Text → Absätze oben/unten; langer Text → normal untereinander */
.ff-fanhilfen-detail-text p:first-child {
    margin-bottom: auto;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text p,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text p {
    margin: 0 !important;
    margin-block: 0 !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1 !important;
    font-size: 16px !important;
}

html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text p:first-child,
html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text p:first-child {
    margin-bottom: auto !important;
    margin-block-end: auto !important;
}

.ff-fanhilfen-detail-text p:last-child {
    margin-bottom: 0;
}

.ff-fanhilfen-detail-contact {
    margin: 40px 0;
    width: 100%;
}

.ff-fanhilfen-detail-rule {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid #000;
}

.ff-fanhilfen-detail-contact-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    min-height: 52px;
    padding: 16px 0;
    box-sizing: border-box;
}

.ff-fanhilfen-detail-contact-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 48px;
    max-width: 100%;
}

.ff-fanhilfen-detail-contact-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex: none;
    text-decoration: none !important;
    color: #000 !important;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
}

.ff-fanhilfen-detail-contact-item:hover {
    color: #b43526 !important;
}

.ff-fanhilfen-detail-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 22px;
    height: 17px;
    line-height: 0;
}

.ff-fanhilfen-detail-contact-icon svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.ff-fanhilfen-detail-socials {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: none;
}

.ff-fanhilfen-detail-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 0;
    text-decoration: none;
    flex: none;
}

.ff-fanhilfen-detail-social-link img {
    display: block;
    width: 20px;
    height: 20px;
}

.ff-fanhilfen-detail-placeholders {
    margin-top: 40px;
    width: 100%;
}

.ff-fanhilfen-detail-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 312px);
    gap: 20px 32px;
    width: 1000px;
    max-width: 100%;
    box-sizing: border-box;
}

.ff-fanhilfen-detail-placeholder-card {
    display: block;
    width: 312px;
    max-width: 100%;
    height: 400px;
    background: #c4c4c4;
}

.ff-fanhilfen-detail-feed.ff-home-feed {
    margin-top: 40px;
}

html body.ff-page-fanhilfen #main button.ff-fanhilfen-detail-mitteilungen,
html body.ff-page-fanhilfen #main button.ff-fanhilfen-detail-mitteilungen:hover,
html body.ff-page-fanhilfen #main button.ff-fanhilfen-detail-mitteilungen:focus:not(:focus-visible),
html body.ff-page-fanhilfen #main button.ff-fanhilfen-detail-mitteilungen:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    color: #000 !important;
}

@media (max-width: 1024px) {
    .ff-fanhilfen-detail-placeholder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .ff-fanhilfen-detail-placeholder-card {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .ff-fanhilfen-detail-content {
        width: 100%;
        grid-template-columns: 1fr;
    }

    html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-text.ff-kampagnen-detail-text,
    html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-text.ff-kampagnen-detail-text {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    html body.ff-page-fanhilfen #main .ff-fanhilfen-detail-content .ff-kampagnen-detail-media.ff-fanhilfen-detail-media,
    html body.ff-page-fanhilfen-detail #main .ff-fanhilfen-detail-content .ff-kampagnen-detail-media.ff-fanhilfen-detail-media {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        background: transparent !important;
    }

    html body.ff-page-fanhilfen #main .ff-kampagnen-detail-image.ff-fanhilfen-detail-image,
    html body.ff-page-fanhilfen-detail #main .ff-kampagnen-detail-image.ff-fanhilfen-detail-image {
        width: 100% !important;
        height: auto !important;
        max-height: 304px !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        object-position: center center !important;
    }
}
