.banner-content p {
    font-size: 2vmin;
    align-self: flex-start; /* Changed from 'left' */
}

.content-container {
    background-image: url('/static/img/backgrounds/Background4.webp');
    background-size: cover;
    background-position: center bottom; /* Added center for horizontal balance */
    background-repeat: no-repeat;
    position: relative;
}

.content-mid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    box-sizing: border-box;
}

.banner-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 90%; /* etwas Luft links & rechts */
    height: 100%;
    gap: 2vw; /* Abstand zwischen Bannern */
    position: relative;
}

/* Banner im Grundzustand */
.banner {
    background: rgba(11,12,14,0.85);
    color: #D9D9D9;
    flex: 1;
    min-width: 5vw;
    height: calc(100% - 20px); /* gleicht das Padding oben/unten aus */
    display: flex;
    align-items: flex-start;
    justify-content: left;
    position: relative;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.5s ease;
    border-radius: 15px;
}

/* Senkrechter Titel */
.banner::before {
    content: attr(data-title);
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-weight: bold;
    font-size: 2.5vmin;
    letter-spacing: 3px;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
}

.banner-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    text-align: left;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Changed from 'left' */
    justify-content: flex-start;
}

/* Hover: Banner klappt auf */
.banner:hover {
    flex: 2.5;
    background: #1E2126;
    box-shadow: 0 0 15px rgba(138,166,255,0.2);
    z-index: 10;
}

/* Hover: Senkrechter Titel verschwindet */
.banner:hover::before {
    opacity: 0;
}

/* Hover: Inhalt erscheint */
.banner:hover .banner-content {
    opacity: 1;
    transform: translateY(0);
}


.banner-content-logo {
    margin-top: 40px;
    align-self: center;
    width: 50%;
}

.banner-content-image {
    margin-top: 40px;
    align-self: center;
    width: 100%;
}

.banner-content h2 {
    margin-top: 40px; /* Abstand vom oberen Rand des Banners */
    margin-bottom: 40px; /* Abstand zwischen Titel und Text */
    font-size: 4vmin;
    align-self: center; /* horizontal zentriert */
}

.banner-content p {
    font-size: 2vmin;
    align-self: flex-start; /* horizontal zentriert */
}


body.light-mode .content-container{
    background-image: url('/static/img/backgrounds/Background5.webp');
}

body.light-mode .banner{
    background-color: rgba(6, 11, 24, 0.85);
}


body.light-mode .banner:hover{
    background-color: #152A46;
    box-shadow: 0 0 18px rgba(63,131,248,0.25);
}



/* Footer Sachen machen */

.footer-link-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1vh;
    width: auto;
    padding: 20px;
    border: 0.2rem solid;
    border-radius: 15px;
    background-color: rgba(11,12,14,0.85);
    border-color: rgba(11,12,14,0.85);
    max-width: 100%;
    box-sizing: border-box;
}

.footer-link-line {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    gap: 0.5vw;
}

.footer-link-logo {
    height: 7.5vh;
    object-fit: contain;
}

.footer-link-line a {
    color: #D9D9D9;
    text-decoration: none;
    font-size: 2vmin;
}

.footer-link-line a:hover {
    color: #8AA6FF;
}


body.light-mode .footer-link-container{
    background-color: rgba(6, 11, 24, 0.85);
    border-color: rgba(6, 11, 24, 0.85);
}


/* Responsive Design Fixes for screens up to 1200px */
@media (max-width: 1200px) {
    .content-mid {
        align-items: flex-start;
        overflow-y: auto;
    }

    .banner-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        width: 90%;
        height: auto;
        gap: 2vh;
        position: relative;
        overflow-y: visible;
    }

    .banner {
        background: rgba(11,12,14,0.85);
        color: #D9D9D9;
        flex: 0 0 auto;
        min-width: 5vw;
        min-height: auto;
        display: flex;
        align-items: flex-start;
        justify-content: left;
        position: relative;
        overflow-y: visible;
        scrollbar-width: auto;
        -ms-overflow-style: auto;
        transition: background 0.5s ease;
        border-radius: 15px;
    }

    /* Remove vertical title on mobile */
    .banner::before {
        display: none;
    }

    .banner:hover {
        background: rgba(11,12,14,0.85); /* Reset hover changes */
        box-shadow: none;
    }

    .banner-content {
        opacity: 1;
        transform: translateY(0);
        transition: none;
        text-align: left;
        padding: 20px;
        box-sizing: border-box;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

/* Mobile-specific optimizations for screens smaller than 768px */
@media (max-width: 768px) {
    .content-mid {
        align-items: flex-start;
        overflow-y: auto;
    }

    .banner-container {
        width: 95%; /* Maximize space on smaller screens */
        gap: 1.5vh;
        padding-bottom: 2vh;
        padding-top: 2vh;
    }

    .banner {
        min-height: auto;
        height: auto;
        border-radius: 10px;
        overflow-y: visible;
        flex-shrink: 0;
    }

    .banner-content h2 {
        font-size: 5vmin; /* Larger heading for mobile readability */
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .banner-content p {
        font-size: 3.5vmin; /* Larger text for mobile readability */
        line-height: 1.6;
    }

    .banner-content-logo,
    .banner-content-image {
        width: 80%; /* Better size for mobile viewing */
        margin-top: 20px;
    }

    .footer-link-container {
        padding: 15px;
    }

    .footer-link-logo {
        height: 5vh; /* Smaller icons on mobile */
    }
}

/* Very small devices (max-width: 368px) */
@media (max-width: 368px) {
    .banner-container {
        width: 98%;
        gap: 1vh;
        padding-bottom: 1.5vh;
    }

    .banner {
        border-radius: 8px;
        padding: 10px;
    }

    .banner-content {
        padding: 15px;
    }

    .banner-content h2 {
        font-size: 6vmin;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .banner-content p {
        font-size: 4vmin;
        line-height: 1.5;
    }

    .banner-content-logo,
    .banner-content-image {
        width: 90%;
        margin-top: 15px;
    }

    .footer-link-container {
        padding: 10px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .footer-link-logo {
        height: 4vh;
    }

    .footer-link-line a {
        font-size: 3vmin;
    }
}

/* Additional Global Hover Disable for Touch */
@media (hover: none) and (pointer: coarse) {
    /* On touch devices, disable hover effects but keep content visible */
    .banner:hover {
        flex: 1;
        background: rgba(11,12,14,0.85);
        box-shadow: none;
    }
    .banner:hover::before {
        opacity: 0;
    }
    .banner:hover .banner-content {
        opacity: 1;
        transform: translateY(0);
    }
}