﻿/* Gemeinsame Layout- und Inhaltsstile */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -100%;
    z-index: 2000;
    background: #ffffff;
    color: #275C0A;
    padding: 0.5rem 1rem;
    font-weight: bold;
    text-decoration: underline;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0.75rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header-link {
    display: block;
}

.site-main:focus,
.admin-content:focus,
.site-main:focus-visible,
.admin-content:focus-visible {
    outline: none;
}

.menu-toggle,
.mobile-nav,
.nav-backdrop,
.mobile-bar {
    display: none;
}

.page {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
}

.site-header img,
.site-header-print img,
.banner-img {
    display: block;
    width: 100%;
    height: auto;
}

.site-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #275C0A;
    color: #ffffff;
}

.site-nav {
    flex: 1;
    min-width: 0;
}

.site-login {
    flex: 0 0 auto;
    padding: 0 12px;
    text-align: center;
    white-space: nowrap;
}

.asp-menu-wrap,
.desktop-nav {
    display: none;
}

@media (min-width: 769px) {
    .site-topbar {
        padding: 0 18px 0 16px;
        gap: 12px;
        align-items: stretch;
    }

    .site-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 8px 0 6px;
        min-width: 0;
    }

    .site-login {
        display: flex;
        align-items: center;
        padding: 4px 10px 4px 16px;
    }

    .desktop-nav {
        display: flex;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        align-items: stretch;
    }

    .desktop-nav > li {
        flex: 1 1 0;
        position: relative;
        text-align: center;
        min-width: 0;
    }

    .desktop-nav > li > a,
    .site-login a {
        display: block;
        padding: 10px 8px;
        border-radius: 4px;
        font-weight: bold;
        font-size: large;
        color: #ffffff;
        text-decoration: none;
        transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    }

    .site-login a {
        display: inline-block;
        padding: 8px 14px;
        font-size: 12pt;
    }

    .desktop-nav-admin > li > a {
        font-size: medium;
        padding: 8px 6px;
    }

    .desktop-nav > li > a:hover,
    .desktop-nav > li:hover > a,
    .desktop-nav > li:focus-within > a,
    .desktop-nav a:focus-visible,
    .site-login a:hover,
    .site-login a:focus-visible {
        background-color: rgba(255, 255, 255, 0.16);
        color: #ffffff;
        text-decoration: none;
        box-shadow: inset 0 -3px 0 #c8e6a0;
    }

    .desktop-nav .has-sub > ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1200;
        min-width: 100%;
        margin: 0;
        padding: 6px 0;
        list-style: none;
        text-align: left;
        background: #006600;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    }

    .desktop-nav .has-sub:hover > ul,
    .desktop-nav .has-sub:focus-within > ul {
        display: block;
    }

    .desktop-nav .has-sub > ul a {
        display: block;
        padding: 8px 16px;
        white-space: nowrap;
        color: #ffffff;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.15s ease;
    }

    .desktop-nav .has-sub > ul a:hover,
    .desktop-nav .has-sub > ul a:focus-visible {
        background-color: #003300;
        text-decoration: none;
    }
}

.site-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    align-items: stretch;
}

.site-main {
    padding: 10px;
    min-width: 0;
}

.site-aside {
    background: #1c4608;
    color: #ffffff;
    padding: 8px 0;
    align-self: stretch;
}

.site-aside table,
.site-aside th,
.site-aside td {
    background: transparent !important;
    border: none;
    width: 100%;
}

.admin-layout {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    min-height: 800px;
}

.admin-nav {
    padding: 0 0 0 15px;
}

.admin-content {
    padding: 0 10px;
    background-image: url('../transpixel.png');
}

.text-center {
    text-align: center;
}

.text-start {
    text-align: left;
}

.align-top {
    vertical-align: top;
}

.full-width {
    width: 100%;
}

.team-photo {
    display: block;
    width: 80%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.team-photo-narrow {
    width: 70%;
}

.team-logo {
    display: block;
    height: 120px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

.player-photo {
    width: 90%;
    max-width: 100%;
    height: auto;
}

.sponsor-heading {
    color: #ffffff;
    text-align: center;
    display: block;
    margin-bottom: 1em;
}

.sponsor-link {
    display: block;
    text-align: center;
    margin: 0 0 1em;
}

.site-aside .sponsor-link img {
    display: block;
    width: 90%;
    max-width: 90%;
    height: auto;
    margin: 0 auto;
}

.sponsor-grid img {
    width: 85%;
    max-width: 100%;
    height: auto;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.sponsor-grid a {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

.sponsor-grid img {
    width: 85%;
}

.message-error {
    color: #c00;
    font-size: 1.2em;
    text-align: center;
}

.message-success {
    font-weight: bold;
    text-align: center;
}

.goals-layout {
    width: 100%;
    border-collapse: collapse;
}

.goals-layout > tbody > tr > td,
.goals-layout > tr > td {
    width: 50%;
    vertical-align: top;
}

.goals-heading {
    text-align: center;
    font-weight: bold;
}

.score-cell {
    text-align: center;
}

.match-formview,
.match-formview table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.match-scoreboard {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.match-scoreboard td {
    border: none;
    vertical-align: top;
    padding: 4px 8px;
}

.match-home {
    width: 38%;
    text-align: right;
}

.match-center {
    width: 24%;
    text-align: center;
}

.match-away {
    width: 38%;
    text-align: left;
}

.match-team {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 0.35em;
}

.match-datetime {
    font-size: small;
}

.match-result {
    font-size: 3em;
    font-weight: bold;
    line-height: 1.1;
    margin-top: 0.15em;
}

.match-home table,
.match-home td {
    text-align: right;
}

.match-away table,
.match-away td {
    text-align: left;
}

.small-text {
    font-size: small;
}

.info-table {
    width: 100%;
    font-size: small;
}

.info-table th,
.info-label {
    width: 40%;
    font-weight: bold;
    text-align: left;
}

.layout-split {
    width: 100%;
}

.layout-split td {
    vertical-align: top;
}

.kader-layout {
    width: 100%;
    font-size: small;
}

.kader-layout td {
    vertical-align: top;
}

.login-form {
    color: #000000;
}

.login-form table {
    margin: 0 auto;
}

.kader-list {
    width: 35%;
}

.kader-photo {
    width: 30%;
    text-align: center;
}

table {
    border-color: transparent;
}

.site-main th,
.admin-content th {
    text-shadow: 0 1px 2px #000000;
    padding-top: 5px;
    padding-bottom: 5px;
}

.desktop-nav a,
.site-login,
.site-login a,
.mobile-nav a,
.mobile-nav summary {
    text-shadow: 0 1px 2px #000000;
}

:focus-visible {
    outline: 3px solid #275C0A;
    outline-offset: 2px;
}

.site-nav :focus-visible,
.site-login :focus-visible,
.site-aside :focus-visible,
.admin-nav :focus-visible,
.menu-toggle:focus-visible,
.mobile-nav :focus-visible {
    outline-color: #ffe566;
}

@media (max-width: 768px) {
    .mobile-bar,
    .site-topbar .menu-toggle {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1100;
        margin-left: auto;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 2px solid #ffffff;
        border-radius: 4px;
        background: #1d4308;
        color: #ffffff;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle-box {
        display: block;
        width: 22px;
        height: 16px;
        position: relative;
    }

    .menu-toggle-bar {
        position: absolute;
        left: 0;
        display: block;
        width: 22px;
        height: 2px;
        background: #ffffff;
        transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
    }

    .menu-toggle-bar:nth-child(1) { top: 0; }
    .menu-toggle-bar:nth-child(2) { top: 7px; }
    .menu-toggle-bar:nth-child(3) { top: 14px; }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
        top: 7px;
        transform: rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
        top: 7px;
        transform: rotate(-45deg);
    }

    .site-topbar {
        position: relative;
        z-index: 1100;
        justify-content: flex-end;
        min-height: 56px;
        padding: 4px 8px;
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .site-nav,
    .site-login,
    .site-aside,
    .admin-nav {
        display: none !important;
    }

    .site-body,
    .admin-layout,
    .sponsor-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        min-height: 0;
    }

    .mobile-bar {
        position: relative;
        z-index: 1100;
        justify-content: flex-end;
        align-items: center;
        background: #275C0A;
        min-height: 56px;
        padding: 4px 8px;
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .mobile-nav:not([hidden]) {
        display: block;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1050;
        background: #1d4308;
        color: #ffffff;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    }

    .nav-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.45);
    }

    .mobile-nav-heading {
        margin: 0;
        padding: 12px 16px 4px;
        font-size: 0.85rem;
        font-weight: bold;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #cde8c4;
    }

    .mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0 0 8px;
    }

    .mobile-nav-list ul {
        list-style: none;
        margin: 0;
        padding: 0;
        background: #163406;
    }

    .mobile-nav a,
    .mobile-nav summary,
    .mobile-nav-login a,
    .mobile-nav-login input,
    .mobile-nav-login .login-status {
        display: block;
        width: 100%;
        padding: 12px 16px;
        min-height: 44px;
        color: #ffffff;
        text-align: left;
        font-size: 1rem;
        font-weight: bold;
        text-decoration: none;
        border: 0;
        background: transparent;
        box-sizing: border-box;
    }

    .mobile-nav summary {
        cursor: pointer;
        list-style: none;
    }

    .mobile-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-nav summary::after {
        content: "▾";
        float: right;
    }

    .mobile-nav details[open] summary::after {
        content: "▴";
    }

    .mobile-nav-list ul a {
        padding-left: 28px;
        font-weight: normal;
    }

    .mobile-nav a[aria-current="page"] {
        background: #003300;
        box-shadow: inset 4px 0 0 #ffe566;
    }

    .mobile-nav-login {
        border-top: 1px solid #3d7a20;
        padding: 4px 0 12px;
    }

    .mobile-nav-login p {
        margin: 0;
        padding: 8px 16px 0;
        color: #cde8c4;
    }

    .site-main,
    .admin-content {
        padding: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .goals-layout > tbody > tr > td,
    .goals-layout > tr > td {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .team-photo,
    .team-photo-narrow {
        width: 100%;
    }

    .team-logo {
        height: auto;
        max-height: 120px;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    .login-form table {
        width: 100%;
    }

    body.nav-open {
        overflow: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-toggle-bar {
        transition: none;
    }
}
