﻿/* ============================================================
   FootballTeam - Public team page
   ============================================================ */

#footballTeam {
    width: 100%;
    min-width: 0;
    color: var(--CSSColor, #333);
}

    #footballTeam *,
    #footballTeam *::before,
    #footballTeam *::after {
        box-sizing: border-box;
    }

    /* ============================================================
   Team overview: image and optional short information
   ============================================================ */

    #footballTeam #teamOverviewContainer {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 24px;
        align-items: stretch;
        margin-bottom: 32px;
        background: transparent;
        border: 0;
        padding: 0;
        overflow: visible;
    }

        #footballTeam #teamOverviewContainer > .teamBox {
            position: relative;
            display: block;
            width: 100%;
            min-width: 0;
            margin: 0;
            padding: 12px;
            background: #fff;
            border: 1px solid #e5ebe7;
            border-radius: 10px;
            box-shadow: 0 4px 16px rgba(23, 45, 63, .065);
        }

    #footballTeam #teamImageContainer {
        min-width: 0;
        padding-bottom: 12px;
    }

    #footballTeam #teamImage,
    #footballTeam #teamImage a {
        display: block;
        width: 100%;
    }

        #footballTeam #teamImage img {
            display: block;
            width: 100%;
            height: auto !important;
            object-fit: contain;
        }

    /* Only the information card shows the club logo and team title. */
    #footballTeam #teamShortInfoContainer > .teamName {
        display: block;
        min-height: 78px;
        padding: 14px 0 8px 82px;
        background: url(../../layout/images/logo.svg) 14px 11px / 54px 54px no-repeat;
        color: #0a8137;
        font-size: clamp(26px, 2.6vw, 36px);
        font-weight: 300;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    #footballTeam #teamShortInfo {
        padding: 10px 16px 20px;
        font-size: 15px;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

        #footballTeam #teamShortInfo > :first-child {
            margin-top: 0;
        }

        #footballTeam #teamShortInfo > :last-child {
            margin-bottom: 0;
        }

    /* No short information: use the entire width for the photograph. */
    #footballTeam #teamOverviewContainer.team-overview-image-only {
        grid-template-columns: minmax(0, 1fr);
    }

    #footballTeam .team-overview-image-only #teamImageContainer {
        grid-column: 1 / -1;
    }

    #footballTeam .teamPhotoCaption {
        padding: 14px 6px 4px;
        color: #0a8137;
        font-size: clamp(23px, 2.5vw, 34px);
        font-weight: 300;
        line-height: 1.3;
    }

    /* Additional editable team content */
    #footballTeam #teamContent {
        clear: both;
        margin-bottom: 30px;
        overflow-wrap: anywhere;
    }

        #footballTeam #teamContent h1 {
            font-size: 30px;
        }

        #footballTeam #teamContent h2 {
            font-size: 28px;
        }

    /* ============================================================
   Coaches and contacts from FootballConnectorV2
   ============================================================ */

    #footballTeam #footballTeamTrainers {
        clear: both;
        margin-bottom: 30px;
    }

        #footballTeam #footballTeamTrainers > h2 {
            margin: 0 0 18px;
            color: var(--HeadingColor, #0a8137);
            font-size: 23px;
            font-weight: 500;
            line-height: 1.35;
        }

    /* ============================================================
   External Matchcenter links
   ============================================================ */

    #footballTeam #teamLinkContainer {
        clear: both;
        margin: 0 0 30px;
        padding: 18px 22px 12px;
        border: 1px solid #e5ebe7;
        border-radius: 10px;
        background: #f7faf8;
    }

        #footballTeam #teamLinkContainer h3 {
            margin: 0 0 12px;
            color: #555;
            font-size: 16px;
            font-weight: 600;
            line-height: 1.4;
        }

        #footballTeam #teamLinkContainer a,
        #footballTeam #teamLinkContainer a:visited {
            display: inline-block;
            margin: 0 22px 8px 0;
            color: var(--LinkColor, #0a8137);
            font-size: 14px;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

            #footballTeam #teamLinkContainer a:hover,
            #footballTeam #teamLinkContainer a:focus-visible {
                color: var(--LinkHoverColor, #4fbe37);
            }

    /* ============================================================
   Match fixtures, results, standings - full width
   ============================================================ */

    #footballTeam #teamGamesAndResultsWrapper {
        float: none;
        clear: both;
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 0 40px;
    }

    #footballTeam .Spielbetrieb {
        font-size: 17px;
    }

    /* Keep the standings card narrower without narrowing the match cards. */
    #footballTeam .football-v2-team-standing.football-v2-team-card {
        width: 100%;
        max-width: 800px;
        margin-left: 0;
        margin-right: 0;
    }

    /* ============================================================
   Image gallery - full width, consistently sized thumbnails
   ============================================================ */

    #footballTeam #footballTeamGalleryImagesWrapper {
        float: none;
        clear: both;
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 0 38px;
    }

        #footballTeam #footballTeamGalleryImagesWrapper > h3 {
            margin: 0 0 18px;
            color: var(--HeadingColor, #0a8137);
            font-size: 23px;
            font-weight: 500;
            line-height: 1.35;
        }

    #footballTeam #footballTeamGalleryImagesContainer {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        align-items: start;
    }

    #footballTeam .footballTeamGalleryImageContainer {
        position: relative;
        width: auto;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        background: #f3f6f4;
        border: 1px solid #e5ebe7;
        border-radius: 8px;
        box-shadow: 0 3px 12px rgba(23, 45, 63, .09);
    }

        #footballTeam .footballTeamGalleryImageContainer > a {
            position: relative;
            display: block;
            width: 100%;
            aspect-ratio: 4 / 3;
            overflow: hidden;
            color: inherit;
            text-decoration: none;
        }

            /* Override the global img { height: auto !important; } rule for thumbnails only. */
            #footballTeam .footballTeamGalleryImageContainer > a > img {
                display: block;
                width: 100%;
                height: 100% !important;
                max-width: 100%;
                object-fit: cover;
                object-position: center;
                transition: transform .2s ease;
            }

        #footballTeam .footballTeamGalleryImageContainer:hover > a > img {
            transform: scale(1.025);
        }

        #footballTeam .footballTeamGalleryImageContainer > a:focus-visible {
            outline: 3px solid var(--LinkColor, #0a8137);
            outline-offset: -3px;
        }

    #footballTeam .footballTeamGalleryImageDescription,
    #footballTeam .gallerySingleImageDescription {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        padding: 8px 12px;
        background: rgba(255, 255, 255, .93);
        color: #333;
        font-size: 13px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transform: translateY(100%);
        transition: transform .2s ease;
    }

    #footballTeam .footballTeamGalleryImageContainer:hover .footballTeamGalleryImageDescription,
    #footballTeam .footballTeamGalleryImageContainer:focus-within .footballTeamGalleryImageDescription,
    #footballTeam .footballTeamGalleryImageContainer:hover .gallerySingleImageDescription,
    #footballTeam .footballTeamGalleryImageContainer:focus-within .gallerySingleImageDescription {
        transform: translateY(0);
    }

/* ============================================================
   Responsive
   ============================================================ */

@media screen and (max-width: 1023.9px) {
    #footballTeam #teamOverviewContainer {
        gap: 18px;
    }

    #footballTeam #teamShortInfoContainer > .teamName {
        min-height: 68px;
        padding-left: 74px;
        background-position: 10px 8px;
        background-size: 48px 48px;
        font-size: 27px;
    }

    #footballTeam #footballTeamGalleryImagesContainer {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

@media screen and (max-width: 767.9px) {
    #footballTeam #teamOverviewContainer {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-bottom: 26px;
    }

    #footballTeam #teamShortInfo {
        padding: 8px 12px 16px;
    }

    #footballTeam #footballTeamTrainers > h2,
    #footballTeam #footballTeamGalleryImagesWrapper > h3 {
        font-size: 21px;
    }
}

@media screen and (max-width: 600px) {
    #footballTeam #footballTeamGalleryImagesContainer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #footballTeam #teamLinkContainer {
        padding: 16px 16px 10px;
    }

        #footballTeam #teamLinkContainer a {
            margin-right: 16px;
        }
}

@media screen and (max-width: 380px) {
    #footballTeam #footballTeamGalleryImagesContainer {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #footballTeam .footballTeamGalleryImageContainer > a > img,
    #footballTeam .footballTeamGalleryImageDescription,
    #footballTeam .gallerySingleImageDescription {
        transition: none;
    }
}
