/* CSS Variables - SFB 06 Farben */
:root {
    --SFBBlau: #0091d4;
    --SFBGelb: #FDDB00;
}

/* Accessibility: Focus styles */
a:focus,
button:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* Skip to main content link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000000;
    color: #ffffff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}

/* Header Styles */
header {
    background-color: var(--SFBGelb);
    padding: 2px 0;
    width: 100%;
}

.header-container {
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.spacer {
    flex-grow: 1;
}

.menu {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
}

.menu-item {
    padding: 6px 20px;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    background-color: var(--SFBGelb);
    transition: background-color 0.5s ease;
    display: inline-block;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #000000;
}

a.menu-item:hover {
    background-color: var(--SFBBlau);
}

a.menu-item:focus {
    background-color: var(--SFBBlau);
}

span.menu-item.active {
    background-color: var(--SFBBlau);
    color: #ffffff;
    cursor: default;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 0;
    margin: 0;
}

.content {
    padding: 0;
}

.content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

.content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Team sections */
.team-section {
    margin-bottom: 30px;
}

.team-section h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Grid System für dynamische Elemente */
.elements-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.element {
    box-sizing: border-box;
    display: flex;
}

.element-inner {
    width: 100%;
}

/* Kinder-Container (für verschachtelte Elemente) */
.element-children {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

/* Element-spezifische Styles */
.element p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.element h1,
.element h2,
.element h3,
.element h4,
.element h5,
.element h6 {
    margin-bottom: 15px;
    font-weight: 500;
}

.element h1 {
    font-size: 2.5em;
    font-weight: 700;
}

.element h2 {
    font-size: 2em;
}

.element h3 {
    font-size: 1.75em;
}

.element h4 {
    font-size: 1.5em;
}

.element h5 {
    font-size: 1.25em;
}

.element h6 {
    font-size: 1.1em;
}

.element-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image Container und Caption */
.image-container {
    position: relative;
    display: inline-block;
}

.image-caption {
    position: absolute;
    left: 10px;
    right: 10px;
    border-radius: 5px;
}

.image-caption.caption-bottom {
    bottom: 10px;
}

.image-caption.caption-top {
    top: 10px;
}

.image-caption.caption-center {
    top: 50%;
    transform: translateY(-50%);
}

/* Karussell Styles */
.carousel {
    position: relative;
    width: 100%;
    /* Festes Landscape-Seitenverhältnis 20:9 - modernes Ultra-Wide Format */
    aspect-ratio: 20 / 9;
    overflow: hidden;
    background-color: #000000;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    /* WICHTIG: Verhindert dass Items ihre eigene Höhe bestimmen */
    align-items: stretch;
}

.carousel-item {
    min-width: 100%;
    /* WICHTIG: Item nimmt die volle Höhe des Containers */
    height: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Verhindert Layout-Shift */
    position: relative;
}

.carousel-item .image-container {
    width: 100%;
    height: 100%;
    /* WICHTIG: Absolute Positionierung verhindert Layout-Probleme */
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    display: block;
    /* Cover: Bild füllt Container, wird bei Bedarf beschnitten */
    object-fit: cover;
    /* Position: Mitte des Bildes wird angezeigt */
    object-position: center;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    font-size: 2em;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    text-align: center;
    padding: 10px 0;
}

.carousel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cccccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
    background-color: var(--SFBBlau);
}

.spacer {
    width: 100%;
}

/* Mobile Grid (Default) */
.grid-mobile-1 { width: 8.333%; }
.grid-mobile-2 { width: 16.666%; }
.grid-mobile-3 { width: 25%; }
.grid-mobile-4 { width: 33.333%; }
.grid-mobile-5 { width: 41.666%; }
.grid-mobile-6 { width: 50%; }
.grid-mobile-7 { width: 58.333%; }
.grid-mobile-8 { width: 66.666%; }
.grid-mobile-9 { width: 75%; }
.grid-mobile-10 { width: 83.333%; }
.grid-mobile-11 { width: 91.666%; }
.grid-mobile-12 { width: 100%; }

/* Tablet Grid */
@media (min-width: 768px) {
    .grid-tablet-1 { width: 8.333%; }
    .grid-tablet-2 { width: 16.666%; }
    .grid-tablet-3 { width: 25%; }
    .grid-tablet-4 { width: 33.333%; }
    .grid-tablet-5 { width: 41.666%; }
    .grid-tablet-6 { width: 50%; }
    .grid-tablet-7 { width: 58.333%; }
    .grid-tablet-8 { width: 66.666%; }
    .grid-tablet-9 { width: 75%; }
    .grid-tablet-10 { width: 83.333%; }
    .grid-tablet-11 { width: 91.666%; }
    .grid-tablet-12 { width: 100%; }
}

/* Desktop Grid */
@media (min-width: 1024px) {
    .grid-desktop-1 { width: 8.333%; }
    .grid-desktop-2 { width: 16.666%; }
    .grid-desktop-3 { width: 25%; }
    .grid-desktop-4 { width: 33.333%; }
    .grid-desktop-5 { width: 41.666%; }
    .grid-desktop-6 { width: 50%; }
    .grid-desktop-7 { width: 58.333%; }
    .grid-desktop-8 { width: 66.666%; }
    .grid-desktop-9 { width: 75%; }
    .grid-desktop-10 { width: 83.333%; }
    .grid-desktop-11 { width: 91.666%; }
    .grid-desktop-12 { width: 100%; }
}

/* Footer Styles */
footer {
    background-color: #f5f5f5;
    border-top: 2px solid #e0e0e0;
    padding: 30px 0;
    margin-top: auto;
}

.footer-container {
    padding: 0 20px;
    text-align: center;
}

.footer-container p {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.footer-container a {
    color: #000000;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.footer-container a:hover {
    text-decoration: underline;
}

/* News sections */
.news-article {
    margin-bottom: 30px;
}

.news-article h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
    font-weight: 500;
}

.news-date {
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 10px;
}

/* Contact sections */
.contact-section {
    margin-bottom: 30px;
}

.contact-section h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .spacer {
        display: none;
    }

    .menu {
        flex-direction: column;
        width: 100%;
    }

    .menu-item {
        text-align: center;
        width: 100%;
    }
}