:root {
    --primary-color: #2e8b57;
    --secondary-color: #ffffff;
    --background-color: #f4f4f4;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
	font-size: 1rem;
}

/* Topbar oben fixiert */
.topbar {
    width: 100%;
    background-color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.topbar-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.topbar-content img {
    height: 40px;
}

.topbar-content span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Hamburger-Menü */
.hamburger {
    display: none;
    font-size: 2rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
}

#menu-toggle {
    display: none;
}

/* Sidebar fixiert unter der Topbar */
.sidebar {
    width: 250px;
    background: linear-gradient(to bottom right, #3aa76b 0%, #2e8b57 35%, #134c31 100%);
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    top: 60px; /* Höhe der Topbar */
    left: 0;
    height: calc(100% - 60px);
    z-index: 999;
}

.sidebar nav a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 10px 0;
    display: block;
    padding: 10px;
    border-radius: 5px;
}

.sidebar nav a:hover {
    background-color: #256d48;
}

/* Hauptinhalt rechts neben Sidebar */
.main {
    margin-left: 250px;
    padding: 100px 30px 30px 30px; /* Abstand zur Topbar */
	padding-bottom: 80px;
}

/* Responsive Sidebar */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 997;
}

#menu-toggle:checked ~ .overlay {
    display: block;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
	.sidebar {
        top: 60px;
        left: -250px;
        height: calc(100% - 60px);
        transition: left 0.3s ease;
        width: 220px;
    }

    #menu-toggle:checked ~ .sidebar {
        left: 0;
    }

    .main {
        margin-left: 0;
        padding: 100px 20px 20px 20px;
    }

    .hamburger {
        display: block;
        margin-right: 15px;
    }
	
    .topbar {
        justify-content: flex-start;
    }

    .topbar-content {
        justify-content: flex-start;
    }
	
	    .zweispaltig {
        flex-direction: column;
    }

    .zweispaltig .bild-links,
    .zweispaltig .bild-rechts,
    .zweispaltig .inhalt-links,
    .zweispaltig .inhalt-rechts {
        flex: 1 1 100%;
    }

    .startseite-banner {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    margin-bottom: 20px;
}

    .startseite-einleitung {
        font-size: 1rem;
    }

    .spielvorschau li {
        font-size: 0.95rem;
        line-height: 1.4;
    }
}


/* Bilder und Kacheln */
.mannschaftsbilder {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.mannschaftsbilder img {
    max-width: 100%;
    width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.kachel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.kachel {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); */
	box-shadow: 0 0 15px rgba(0,0,0,0.7);
    text-align: center;
    border: 1px solid #e0e0e0;
	overflow-x: auto;
	
	/*max-width: 500px;  /* <<< HIER Begrenzung */
    width: 100%;
    margin: 0 auto;    /* zentriert innerhalb der Grid-Zelle */
}

.kachel h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.kachel h2 a {
    text-decoration: none;
    color: var(--primary-color);
}

.kachel h2 a:hover {
    text-decoration: underline;
}


.dropdown {
    position: relative;
}

.dropdown .submenu {
    display: none;
    flex-direction: column;
    margin-left: 10px;
}

.dropdown:hover .submenu {
    display: flex;
}

.submenu a {
    font-size: 0.95em;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 2px 0;
}

.submenu a:hover {
    background-color: #256d48;
}

.kachelbild {
    width: 100%;
    max-width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
}

.spielplan-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}

.spielplan-tabelle th {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: left;
}

.spielplan-tabelle td {
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.spielplan-tabelle tr:nth-child(even) {
    background-color: #f2f2f2;
}

.markiert {
    background-color: #d0f0d0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.markiert img {
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.markiertStart {
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.markiertStart img {
    height: 16px;
    display: block; /* Wichtig: Kein inline mehr, sauberer im Flex-Kontext */
    margin-right: 5px;
    transform: translateY(10px); /* Feinjustierung je nach Bedarf */
}

.tischtennis-suchfeld {
    width: 150px;        /* feste Breite */
    /* max-width: 100%;     /* bricht auf kleinen Screens sauber um */
}

ul.spielvorschau {
    margin-top: 10px;
    padding-left: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer-Stil */
footer {
    background-color: #f9f9f9;
    border-top: 1px solid #ccc;
    text-align: center;
    padding: 12px 10px;
    font-size: 0.9rem;
    color: #333;
}

/* Sticky Footer Erweiterung */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.main {
    flex: 1;
}

.cookie-hinweis {
    font-size: 0.8rem;
    color: #777;
    margin-top: 4px;
}

.startseite-banner {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    margin-bottom: 20px;
}

.startseite-einleitung {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.zweispaltig {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.zweispaltig .bild-links,
.zweispaltig .bild-rechts {
    flex: 1 1 45%;
}

.zweispaltig .inhalt-rechts,
.zweispaltig .inhalt-links {
    flex: 1 1 50%;
}

.zweispaltig img {
    width: 100%;
    height: auto;
    display: block;
}

.spiel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 0px;
    padding: 0;
}

.spiel-kachel {
    background-color: #f0f9f5;
	margin-bottom: 5px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0px 3px rgba(0,0,0,0.7);
    list-style: none;
	display: flex;
    flex-direction: column;
    justify-content: flex-start;
	font-size: 1rem;
    /*max-width: 400px; */
}

.spiel-kachel-jugend {
    background-color: #e6eefc;
	margin-bottom: 5px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0px 3px rgba(0,0,0,0.7);
    list-style: none;
	display: flex;
    flex-direction: column;
    justify-content: flex-start;
	font-size: 1rem;
    /*max-width: 400px; */
}

.spiel-kachel img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    margin: 0 auto 20px auto;
}

.spiel-datum {
    font-size: 1.1em;
    color: darkblue;
    font-weight: bold;
    margin-bottom: 6px;
}

.spiel-info {
    font-size: 1.0rem;
	display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-button-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.upload-button {
    display: inline-flex;               /* sorgt für saubere Ausrichtung */
    align-items: center;                /* Text & Icon vertikal mittig */
    justify-content: center;            /* zentriert den Inhalt horizontal */
    background-color: var(--primary-color, #2d8e5c);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    height: 38px;
    cursor: pointer;
    text-decoration: none;              /* entfernt Unterstreichung bei <a> */
    line-height: 1;                     /* verhindert unterschiedliche Höhen */
    box-sizing: border-box;             /* Padding & Border werden sauber berechnet */
}

.upload-button:hover {
    background-color: #256d48;
}

.upload-form-wrapper {
    display: none;
    margin-bottom: 30px;
}

.upload-form-wrapper.show {
    display: block;
}

.filter-upload-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-upload-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap; /* damit es auf kleinen Bildschirmen umbrechen kann */
    margin-bottom: 20px;
}

.lightbox {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.85);
    z-index: 2000;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    user-select: none;
    padding: 10px;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

.lightbox .caption {
    color: white;
    margin-top: 10px;
    font-size: 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: bold;
	text-align: center;
}

.upload-success {
    color: green;
    background-color: #e6f4e6;
    padding: 10px;
    border: 1px solid #b2d8b2;
    border-radius: 6px;
    margin-bottom: 15px;
}

.upload-error {
    color: darkred;
    background-color: #fce6e6;
    padding: 10px;
    border: 1px solid #e0a0a0;
    border-radius: 6px;
    margin-bottom: 15px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.topbar-login img.login-icon {
    height: 50px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.topbar-login img.login-icon:hover {
    opacity: 0.7;
}

@media (min-width: 769px) {
    .main {
        margin-left: 250px;
        padding-top: 70px;
        padding-bottom: 80px;
    }
}

.kachelbild {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 6px;
}

.spiel-kachel-reihe {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.spiel-kachel-reihe img {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.spiel-text {
    flex: 1 1 300px;
    text-align: justify;
}

.teamname-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Abstand zwischen Text und Logo */
}

.teamname-logo img {
    height: 16px;
    width: auto;
}

.teamname {
    font-family: inherit;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.4;
}

/* Überschriften mittig */
.spielplan-tabelle thead th {
  text-align: center;     /* sorgt fürs Zentrieren */
  vertical-align: middle; /* optional, für bessere Optik */
}

/* Falls irgendwo global th linksbündig gesetzt ist, nimm (bei Bedarf) mehr Wumms: */
.spielplan-tabelle thead th { text-align: center !important; }

.results-nav{
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.nav-btn{
    display: inline-block;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    background: #e6eefc;   /* kannst du anpassen */
    color: #0b2a6f;
    font-weight: 600;
}

.nav-btn:hover{
    filter: brightness(0.95);
}

.nav-btn.disabled{
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.aktuelles-mehr-wrapper {
  margin-top: 12px;
  text-align: center;
}

/* Bericht-Seite: Bilder im Text sauber begrenzen */
.spiel-text img {
    display: block;
	width: auto;
    max-width: 100%;
    height: 260px;
    object-fit: contain;    /* nichts abschneiden */
    margin: 14px auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

/* Bericht: saubere Absatzabstände */
.spiel-text p {
    margin: 0 0 2.0em 0;   /* Abstand NACH jedem Absatz */
    line-height: 1.6;
}

.bericht-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.bericht-link:hover {
    text-decoration: underline;
}

.kachel h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.kachel .bericht-datum {
    font-size: 0.9rem;
    color: #555;
    margin: 4px 0 8px 0;
}

.kachel h3 a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
	text-align: center;
}

.kachel h3 a:hover {
    text-decoration: underline;
}

/* Bericht-Titel (h3-Link) wie "bericht-link" – auch für :visited */
.kachel h3 a:link,
.kachel h3 a:visited {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.kachel h3 a:hover,
.kachel h3 a:active {
    text-decoration: underline;
}

/* Bericht: kein Blocksatz, weil mobil unschön */
.spiel-text {
    text-align: left;
}

/* Optional: auf sehr kleinen Screens noch besser lesbar */
@media (max-width: 768px) {
    .spiel-text {
        text-align: left;
        hyphens: auto;
    }
}

/* Berichte auf Startseite: einheitliche Karten */
.kachel.bericht-card {
    display: flex;
    flex-direction: column;
    text-align: left;           /* liest sich besser in Cards */
    height: 100%;               /* wichtig im Grid */
}

/* Cover immer gleich hoch */
.kachel.bericht-card .bericht-cover {
    width: 100%;
    height: 180px;              /* <- DAS ist deine einheitliche Höhe */
    object-fit: cover;          /* schneidet sauber zu */
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
}

/* Content-Bereich nimmt den Platz */
.kachel.bericht-card .bericht-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;             /* <- wächst, drückt Footer nach unten */
}

/* Titel-Link wie gewünscht (auch visited) */
.kachel.bericht-card .bericht-title a:link,
.kachel.bericht-card .bericht-title a:visited {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.kachel.bericht-card .bericht-title a:hover {
    text-decoration: underline;
}

/* Teaser: gleiche Höhe über Clamp */
.kachel.bericht-card .bericht-teaser {
    margin-top: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;      /* <- gleiche Textfläche (4 Zeilen) */
}

/* Footer immer unten */
.kachel.bericht-card .bericht-footer {
    margin-top: 12px;
}

/* Weiterlesen-Link optisch wie Button/CTA (dezent) */
.kachel.bericht-card .bericht-link {
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.kachel.bericht-card .bericht-link:hover {
    text-decoration: underline;
}

/* Bericht-Titel auf der Startseite zentrieren */
.kachel.bericht-card .bericht-title {
    text-align: center;
}

.kachel.bericht-card .bericht-title a {
    display: inline-block;
}

/* Ganze Bericht-Kachel klickbar */
.bericht-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Dezent: beim Hover leicht "anheben" */
.bericht-card-link .kachel.bericht-card {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.bericht-card-link:hover .kachel.bericht-card {
    transform: translateY(-2px);
}

/* Titel bleibt grün, auch wenn alles ein Link ist */
.bericht-card-link .bericht-title {
    color: var(--primary-color);
    text-align: center; /* falls du das willst */
}

/* "Weiterlesen" wie Link aussehen lassen */
.bericht-card-link .bericht-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.bericht-card-link:hover .bericht-link {
    text-decoration: underline;
}


/* Filter oben */
.berichte-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0 20px 0;
}

.berichte-filter select {
    height: 38px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Jahres-Headline */
.berichte-jahr {
    text-align: center;
    margin: 26px 0 14px 0;
    color: var(--primary-color);
}

/* PDF-Links im Bericht: kein Blau, kein Underline */
.spiel-text a[href$=".pdf"]:link,
.spiel-text a[href$=".pdf"]:visited {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

.spiel-text a[href$=".pdf"]:hover,
.spiel-text a[href$=".pdf"]:active {
    text-decoration: underline;
}

.bericht-cover-detail {
    width: auto;
    max-width: 100%;
	height: 260px;     /* anpassen */
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 12px auto 18px auto;
}

.spiel-link-icon {
    display: inline-flex;
    align-items: center;
    margin: 0 6px;
    color: #1e3a8a; /* dunkles Blau */
    text-decoration: none;
}

.spiel-link-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.spiel-link-icon:hover {
    color: #2563eb;
}

.bericht-cover-wrap {
  display: flex;
  justify-content: center;  /* horizontale Zentrierung */
}

.bericht-cover-detail {
  height: 260px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 12px 0 18px 0;   /* auto nicht mehr nötig */
}

.aktuelles-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.aktuelles-header h2{
  margin:0;
}

.aktuelles-header .nav-btn{
  align-self:center;
}

.aktuelles-admin-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}

.markiertStart.no-bold,
.markiertStart.no-bold * {
  font-weight: normal !important;
}


/* Edles PDF-Icon für PDF-Links */
.spiel-text a[href$=".pdf"]::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.35em;
    vertical-align: -0.15em;

    background-repeat: no-repeat;
    background-size: contain;

    /* Inline-SVG (PDF-Icon) */
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ED2224'>\
<path d='M6 2h7l5 5v15a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm7 1.5V8h4.5L13 3.5z'/>\
<path d='M7 13h2.5a1.5 1.5 0 0 1 0 3H8v3H7v-6zm1 1v1.5h1.5a.75.75 0 0 0 0-1.5H8zm5-1h2a2 2 0 0 1 0 4h-1v2h-1v-6zm1 1v3h1a1.5 1.5 0 0 0 0-3h-1zm5-1h3v1h-2v1.5h2v1h-2V19h-1v-6z'/>\
</svg>");
}



