:root {
    --colors-white: #FFFFFF;
    --colors-offwhite: #f5f5f5;
    --colors-black: #000000;
    --colors-red: #f61718;
    --colors-dark-grey: #4d4d4d;
    --colors-grey: #b9b8b6;
    --colors-light-grey: #E8E8E8;
    --colors-green: #3EA83B;
    --colors-teal: #0891b2;
    --colors-test: #6b8cae;

    --bg-primary: var(--colors-white);
    --bg-secondary: var(--colors-light-grey);
    --bg-body: var(--colors-dark-grey);
    --bg-main: var(--colors-offwhite);
    --bg-article: var(--colors-white);
    --nav-link: var(--colors-red);
    --text-article: #292929;
    --text-dark: var(--colors-black);
    --text-accent: var(--colors-red);
    --text-light: var(--colors-white);
    --text-muted: var(--colors-dark-grey);
    --text-link: var(--colors-test);
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 0;
    font-family: sans-serif;
    color: var(--text-dark);
    background: var(--bg-body);
    font-size: 1rem;
}

h1 {
    margin: 0;
    color: var(--text-accent);
    font-size: 1.5rem;
    font-weight: bold;
}

h2 {
    margin: 0;
    color: var(--text-accent);
    font-size: 1.2rem;
    font-weight: bold;
}

h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: bold;
}

h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 0.9rem;
}

main {
    width: 100%;
    background: var(--bg-main);
    max-width: 990px;
    border: 1px solid black;
}

header {
    background: var(--bg-main);
}

header img {
    max-width: 100%;
}

img.article {
    float: left;
    margin-top: 0.5rem;
    margin-right: 1rem;
    max-width: 60%;
    margin-bottom: 0.5rem;
}

.fullScreenImageWrapper img{
    width: 100%;
    max-height: 95vh;
    height: auto;
}

.overlay figcaption {
    color: var(--text-light); 
}

article {
    overflow: auto;
    background: var(--bg-article);
    color: var(--text-article);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

address {
    font-style: normal;
    padding-left: 1rem;
    margin-top: 1rem;
}

p.padded {
    padding-left: 1rem;
}

address a {
    color: var(--text-link);
    font-weight: bold;
    text-decoration: none;
}

address a:hover{
    text-decoration: underline
}

article:nth-child(even) img.article{
    float: right; 
}

article footer {
    clear: both;
    background: var(--bg-primary);
    display: block;
    text-align: left;
    border: none;
}

article footer a {
    display: block;
    cursor: pointer;
    color: var(--text-article);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

article footer a:hover {
    color: var(--text-accent);
    text-decoration: underline;
}

article.event-news-article{
    border-radius: 8px;
    padding: 1rem;
    background: #ffffff;
}

.attachments a {
    display: block;
    cursor: pointer;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

.attachments a:hover {
    color: var(--text-accent);
    text-decoration: underline;
}

ul {
    list-style: none;
}

nav ul ul {
    padding: 0 0 0 1rem;
}

ul.datenschutz-card {
    padding-left: 1rem;
}

li header {
    background: var(--bg-secondary);
    font-weight: bold;
}

li a {
    text-decoration: none;
    color: var(--text-dark);
}

li a:visited {
    text-decoration: none;
    color: var(--text-dark);
}

li a:hover {
    text-decoration: underline;
    color: var(--text-accent);
}

nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 0;
    column-gap: 1rem;
    width: 100%;
    padding: 0;
    overflow: visible;
    align-items:center;
    background: var(--bg-secondary);
}

nav.symbols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 1rem;
    width: 100%;
    text-align: right;
}

nav.symbols a {
    font-size: 1.5rem;
    text-decoration: none;
}

nav.contact-message-nav {
    background: var(--colors-white);
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.hamburger-nav-container {
    position: relative;
    display: flex;
    background: var(--bg-secondary);
    margin: 0;
    white-space: nowrap;
    width: auto;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    margin: 1rem;
    gap: 7px
}

.hamburger-btn span {
    width: 35px;
    height: 5px;
    background: var(--colors-dark-grey);
}

/* Wenn das Menü aktiv ist */
.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;  /* Mittlerer Balken verschwindet */
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.hamburger-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    list-style: none;
    background: var(--bg-secondary);
    padding: 0.5rem;
    margin: 0rem;
    max-height: 400px;
    border: none;
    overflow: scroll;
    z-index: 500;
}

.nav-list-header {
    background: var(--color-red);
    color: var(--color-white);

    font-weight: bold;
}

.nav-card {
    cursor: pointer;
    border-radius: 8px;
    margin: 0.5rem;
    text-align: center;
}

footer {
    display: flex;
    background: var(--bg-main);
    flex-direction: row;
    justify-content: center;
    gap: 2em;
    font-size: 1.5rem;
    border-top: 1px solid black;
}

footer.main-footer{
    display: flex;
    background: var(--bg-main);
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1.5rem;
    border-top: 1px solid black;
}

a.nav-link {
    padding-left: 1rem;
    color: var(--nav-link);
    text-decoration: none;
}

a.nav-link:hover {
    text-decoration: underline;
}

a.event-registration-link {
    font-size: 1.1rem;
    padding-top: 1.5rem;
    font-weight: bold;
    color: var(--colors-green);
    text-decoration: none;
}

a.event-registration-link:hover {
    font-size: 1.2rem;
    text-decoration: underline;
}

fieldset {
    margin: 1rem;
}

legend {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-accent);
}

label {
    display: block;
    width: 100%;
    margin-top: 0.7rem;
}

label.fileInput {
    cursor: pointer;
}

label.fileInput:hover {
    color: var(--text-accent);
}

input {
    width: 100%;
    padding: 0.5rem;
}

input[type="checkbox"]{
    width: 20px;
    cursor: pointer;
}

input[type="radio"]{
    width: 20px;
    cursor: pointer;
}

textarea {
    width: 100%;
    rows: 15;
}

button {
    width: 100%;
    background: var(--bg-secondary);
    color: var(--text-accent);
    margin-top: 0.7rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    padding: 0.2rem;
    cursor: pointer;
}

.board-card {
    margin-top: 1.5rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-left: 0.8rem solid var(--colors-dark-grey);
    border-top: 0.4rem solid var(--colors-dark-grey);
    border-radius: 8px;
}

.board-card h1 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: bold;
}

.board-card ul {
    padding: 0;
}

.team-card {
    margin-top: 1.5rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-left: 0.8rem solid var(--colors-dark-grey);
    border-top: 0.4rem solid var(--colors-dark-grey);
    border-radius: 8px;
}

.team-card h1 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: bold;
}

.team-card ul {
    padding: 0;
}

.team-card a {
    font-weight: bold;
}

.contact-card {
    padding: 1rem;
}

.contact-card ul {
    padding: 0;
}

.content-btn-row {
    display: flex;
    gap: 5px;
}

.content-btn-row buttone {
    width: auto;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    row-gap: 0.5rem;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: var(--bg-body);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: var(--bg-body);
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    background: var(--bg-body);
}

.overlay section {
    width: 100%;
    max-width: 990px;
    max-height: 90%;
    overflow: auto;
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-primary);
}

.loader-overlay section {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    width: 100%;
    max-width: 400px;
    max-height: 90%;
    overflow: auto;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-primary);
}

.news-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
    margin-right: 2rem;
    border: 2px solid black;
    border-radius: 8px;
    padding: 0.5rem;
}

.news-card h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-news-container {
    background: #F5F5F5;
    padding: 0.5rem;
    border-bottom: 2px solid black;
}

section.main-content {
    background: var(--bg-main);
    padding: 1rem;
}

section.attachmentPreview {
    display: grid;
    grid-template-columns: 10fr 1fr;
    gap: 10px;
    margin-top: 0.5rem;
}

section.attachmentPreview button, input {
    padding: 0;
    font-size: 1rem;
    margin-top: 0.5rem;
}

section.attachmentPreview button {
    border: 1px solid black;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table caption {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-accent);
}

tr, td {
    border: 1px solid black;
    padding: 0.2rem;
}

tr:nth-child(even){
    background: var(--bg-secondary);
}

th {
    border: 1px solid black;
    padding: 0.2rem;
}

.text-button {
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

text-button: hover{
    color: var(--text-accent);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse
}

.schedule-table tr, td {
    border: 1px solid black;
    padding: 0.2rem;
}

.schedule-table tr {
    page-break-inside: avoid;
}

select {
    width: 100%;
    padding: 0.5rem;
}

.generic-content-container {
    padding: 0.5rem;
}

.contact-message-container {
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.contact-message-container:hover {
    background: var(--bg-secondary);
}

.gallery {
    margin: 1.5rem 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.gallery-item {
    flex: 1 1 calc(33% - 1.5rem);
    aspect-ratio: 1/1;
    max-width: 33%;
    min-width: 150px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

.gallery-edit {
    margin: 1.5rem 0 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1.5rem;
}

.gallery-edit h1{
    grid-column: span 3;
}

.gallery-edittt {
    margin: 1.5rem 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.gallery-edit-itemm {
    flex: 1 1 calc(33% - 1.5rem);
    max-width: 33%;
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

.gallery-edit-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: scale-down;
}

.gallery-edit-itemm input,
.gallery-edit-itemm button {
    flex: 0, 0, auto;
}

.year-card-wrapper {
    padding: 0.5rem;
    margin-bottom: 40px;
    border-top: 0.4rem solid var(--colors-dark-grey);
    border-left: 0.8rem solid var(--colors-dark-grey);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.year-card-wrapper h1{
    margin-bottom: 1rem;
}

.champion-year-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .champion-year-card {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .champion-year-card {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
}

.champion-year-card h1 {
    display: block;
    width: 100%;
}

.champion-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.champion-card-header {
    padding: 1rem;
    background: #f5f5f5;
    border-top: 4px solid #f61718;
    text-align: center;
}

.champion-tournament-name {
    color: #4d4d4d;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.champion-card ul {
    padding: 0;
}

 .champion-placements {
    display: flex;
    flex-direction: column;
}

.champion-placement {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.champion-placement:last-child {
    border-bottom: none;
}

.champion-placement-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.champion-placement-info {
    flex: 1;
}

.champion-placement-rank {
    color: #f61718;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.champion-placement-name {
    color: #4d4d4d;
    font-weight: 500;
    font-size: 1rem;
}

.champion-placement:first-child .champion-placement-name {
    font-weight: 700;
}

.champion-gold {
    font-size: 1.1rem;
    font-weight: bold;
}

img.autofit {
    max-width: 100%;
    height: auto;
}

.event-series-card {
    margin: 0.5rem;
    padding: 0.5rem;
    border: 2px solid black;
    border-radius: 8px;
}

.event-series-card img {
    max-width: 100%;
    height: auto;
}

.interactive-text {
    cursor: pointer;
}

.interactive-text:hover {
    color: var(--text-accent);
}

a.content-link {
    color: var(--text-link);
    font-weight: bold;
    text-decoration: none;
}

a.content-link:visited {
    color: var(--text-link);
    text-decoration: underline;
}

a.content-link:hover {
    text-decoration: underline;
}

.bold-text{
    font-weight: bold;
}

.registration-card{
    background: var(--colors-light-grey);
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

section.sponsor-section {
    display: flex;
    background: var(--bg-main);
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid black;
}

.alert-text{
    color: red;
}

.success-text{
    color: green;
}

.muted {
    color: var(--text-muted);
}

.hidden {
    display: none;
}
