/* ============================================================
   Mannschafts-Template Styles
   ============================================================ */

/* ---- 1. HERO: Kaderbild ---- */
.team-hero {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 420px;
    max-height: 700px;
    overflow: hidden;
}

.team-hero--no-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 3.5rem 0 2rem;
}
.team-hero--no-image .team-hero__overlay {
    position: relative;
    background: none;
    padding-bottom: 0;
}

.team-hero__image {
    position: absolute;
    inset: 0;
}

.team-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.team-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 2.5rem;
}

.team-hero__title {
    color: #fff;
    font-weight: 800;
    font-size: 2.8rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.team-hero__league {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.team-hero__info {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ---- 1b. KATEGORIE-NAVIGATION (Ebene 1) ---- */
.cat-nav {
    background: var(--primary-color);
    position: relative;
    z-index: 100;
}
.cat-nav:last-of-type:not(:has(+ .team-nav))::after,
.cat-nav.cat-nav--solo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--highlight-color);
}
.cat-nav__scroll {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
}
.cat-nav__scroll::-webkit-scrollbar { display: none; }
.cat-nav__label {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    white-space: nowrap;
    padding: 0.75rem 0.75rem 0.75rem 0;
    border-right: 1px solid rgba(255,255,255,0.12);
    margin-right: 0.25rem;
    flex-shrink: 0;
}
.cat-nav__item {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.cat-nav__item:hover {
    color: rgba(255,255,255,0.85);
}
.cat-nav__item--active {
    color: #fff;
    font-weight: 700;
    border-bottom-color: var(--highlight-color);
}

/* ---- 1b. TEAM-NAVIGATION (Ebene 2) ---- */
.team-nav {
    background: var(--secondary-color);
    position: relative;
    z-index: 99;
    transition: box-shadow 0.2s ease;
}
.team-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--highlight-color);
}

.team-nav--sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.team-nav .container {
    position: relative;
}

.team-nav__scroll {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
}

.team-nav__scroll::-webkit-scrollbar {
    display: none;
}

.team-nav__scroll .team-nav__item:first-child {
    padding-left: 0;
}

.team-nav__item {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.65rem 1rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.team-nav__item i {
    color: var(--highlight-color);
    margin-right: 0.35rem;
    font-size: 0.75rem;
}

.team-nav__item:hover {
    color: rgba(255,255,255,0.85);
}

.team-nav__item--active {
    color: #fff;
    font-weight: 700;
    border-bottom-color: #fff;
}

/* ---- 1c. PAGE CONTENT (optional, from Gutenberg editor) ---- */
.team-page-content__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--secondary-color);
}

.team-page-content__body p {
    margin-bottom: 1.25rem;
}

.team-page-content__body h2,
.team-page-content__body h3,
.team-page-content__body h4 {
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.team-page-content__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.team-page-content__body a {
    color: var(--highlight-color);
    text-decoration: underline;
}

.team-page-content__body a:hover {
    color: var(--highlight-dark);
}

/* ---- 2. INFO CARDS (Training & Ansprechpartner) ---- */
.team-info-section {
    background: #fff;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.info-card__header {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 1rem 1.5rem;
}

.info-card__body {
    padding: 1.5rem;
}

/* Contact persons */
.contact-person {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-person:first-child {
    padding-top: 0;
}

.contact-person:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-person__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--highlight-color);
    font-size: 1.2rem;
    border: 2px solid #e9ecef;
}

.contact-person__info {
    flex: 1;
    min-width: 0;
}

.contact-person__info strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
}

.contact-person__role {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.contact-person__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-person__details a {
    font-size: 0.85rem;
    color: var(--highlight-color);
    text-decoration: none;
}

.contact-person__details a:hover {
    color: var(--highlight-dark);
    text-decoration: underline;
}

/* Training items */
.training-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.training-item:first-child {
    padding-top: 0;
}

.training-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.training-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--highlight-color);
    font-size: 1.1rem;
}

.training-item--location .training-item__icon {
    color: #e74c3c;
}

.training-item__content {
    flex: 1;
}

.training-item__content strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
}

.training-item__content span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ---- 3. MATCH LIST (Spielplan) ---- */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.match-list__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 0.75rem;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.match-list__item:hover {
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.match-list__item--win {
    border-left-color: #28a745;
}

.match-list__item--loss {
    border-left-color: #dc3545;
}

.match-list__item--draw {
    border-left-color: #6c757d;
}

.match-list__item--upcoming {
    border-left-color: var(--highlight-color);
}

.match-list__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 42px;
    flex-shrink: 0;
}

.match-list__day {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.match-list__month {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.match-list__teams {
    flex: 1;
    min-width: 0;
}

.match-list__home,
.match-list__away {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-list__away {
    font-weight: 400;
    color: var(--text-light);
}

.match-list__league {
    color: var(--text-light);
    font-size: 0.75rem;
}

.match-list__score {
    flex-shrink: 0;
}

.match-list__score .badge {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    min-width: 56px;
    text-align: center;
}

/* ---- 4. LEAGUE TABLE ---- */
.league-table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.league-table thead {
    background: var(--primary-color);
    color: #fff;
}

.league-table thead th {
    font-weight: 600;
    padding: 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
    white-space: nowrap;
    text-align: center;
}

.league-table thead th.league-table__team {
    text-align: left;
}

.league-table tbody td {
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.league-table tbody td:nth-child(2) {
    text-align: left;
}

.league-table__highlight {
    background: rgba(107, 159, 212, 0.1) !important;
}

.league-table__highlight td {
    border-top: 2px solid var(--highlight-color);
    border-bottom: 2px solid var(--highlight-color) !important;
}

.table-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    background: #f0f0f0;
    color: var(--text-dark);
}

.table-pos--1 {
    background: #ffd700;
    color: #333;
}

.table-pos--2 {
    background: #c0c0c0;
    color: #333;
}

.table-pos--3 {
    background: #cd7f32;
    color: #fff;
}

.league-table__logo {
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 2px;
}

/* Aufstieg / Abstieg Zonen */
.league-table__zone--promotion td:first-child {
    border-left: 3px solid #198754;
}
.league-table__zone--promotion-playoff td:first-child {
    border-left: 3px solid #8bc34a;
}
.league-table__zone--relegation td:first-child {
    border-left: 3px solid #dc3545;
}
.league-table__zone--relegation-playoff td:first-child {
    border-left: 3px solid #fd7e14;
}

/* ---- 5. TEAM NEWS ---- */
.team-news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.team-news-card:hover {
    color: inherit;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.team-news-card__image {
    height: 100%;
    min-height: 100px;
    overflow: hidden;
}

.team-news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100px;
}

.team-news-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 100px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--highlight-color);
}

.team-news-card__body {
    padding: 1rem 1.25rem;
}

.team-news-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.team-news-card__excerpt {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ---- 6. DOWNLOADS ---- */
.download-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.download-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--highlight-color);
}

.download-card__icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
}

.download-card__body {
    flex: 1;
    min-width: 0;
}

.download-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.download-card__desc {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.download-card__meta {
    font-size: 0.78rem;
    color: #adb5bd;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.download-card__action {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--highlight-color);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.download-card:hover .download-card__action {
    background: var(--highlight-color);
    color: #fff;
}

@media (max-width: 767px) {
    .download-card {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .download-card__icon {
        font-size: 1.8rem;
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .download-card__title {
        font-size: 0.92rem;
    }

    .download-card__desc {
        display: none;
    }
}

/* ---- 7. HINWEISE & AUSSCHREIBUNGEN ---- */
.team-notices {
    padding: 1.5rem 0 0;
}

.team-notice {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: 5px solid;
    margin-bottom: 1rem;
}

.team-notice--ausschreibung {
    background: #fffbeb;
    border-color: #f59e0b;
}
.team-notice--info {
    background: #eff6ff;
    border-color: #3b82f6;
}
.team-notice--warnung {
    background: #fff7ed;
    border-color: #f97316;
}

.team-notice__icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 3px;
}
.team-notice--ausschreibung .team-notice__icon { color: #f59e0b; }
.team-notice--info .team-notice__icon { color: #3b82f6; }
.team-notice--warnung .team-notice__icon { color: #f97316; }

.team-notice__body {
    flex: 1;
    min-width: 0;
}

.team-notice__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--text-dark);
}

.team-notice__text {
    color: var(--secondary-color);
    margin: 0 0 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.team-notice__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    align-items: center;
}

.team-notice__contact-name {
    font-weight: 600;
    color: var(--text-dark);
}

.team-notice__contact-link {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 500;
}
.team-notice__contact-link:hover {
    text-decoration: underline;
}

/* ---- 8. GALERIE GRID ---- */
.galerie-section {
    padding: 2rem 0 3rem;
}

.galerie-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.galerie-section-title i {
    color: var(--highlight-color);
    margin-right: 0.5rem;
}

.galerie-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.galerie-item[data-lightbox] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.galerie-item[data-lightbox]:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.galerie-item__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.galerie-item__title {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
    .team-hero {
        height: 50vh;
        min-height: 350px;
    }

    .team-hero__title {
        font-size: 2.2rem;
    }

    .cat-nav__label {
        display: none;
    }
}

@media (max-width: 767px) {
    .team-hero {
        height: 45vh;
        min-height: 300px;
    }

    .team-hero__title {
        font-size: 1.8rem;
    }

    .team-hero__league {
        font-size: 0.95rem;
    }

    .team-hero__info {
        font-size: 0.85rem;
    }

    .team-hero__overlay {
        padding-bottom: 1.5rem;
    }

    .cat-nav__item {
        font-size: 0.8rem;
        padding: 0.65rem 0.75rem;
    }

    .team-nav__item {
        font-size: 0.78rem;
        padding: 0.55rem 0.7rem;
    }

    .match-list__item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .match-list__home,
    .match-list__away {
        font-size: 0.82rem;
    }

    .match-list__score .badge {
        font-size: 0.8rem;
        min-width: 48px;
    }

    .league-table {
        font-size: 0.8rem;
    }

    .league-table thead th,
    .league-table tbody td {
        padding: 0.5rem 0.4rem;
    }

}
