/* --- CSS VARIABLEN & GRUNDLAGEN --- */
:root {
    --primary-color: #3b7e9b; 
    --secondary-color: #f4f4f4;
    --accent-color: #e67e22; 
    --text-color: #333;
    --white: #ffffff;
    --school-accent-color: #FF8C00; 
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; 
}

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

a:hover {
    text-decoration: underline;
}

/* --- NAVIGATION --- */
nav {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2%;
    height: 70px;
    /* overflow: visible ist wichtig für das mobile Menü */
    overflow: visible; 
}

.logo-area a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

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

.logo-text {
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

.nav-title {
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-left: 20px;
    flex-shrink: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../pic/banner.jpg') center/cover;
    min-height: 45vh; 
    height: auto; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 100px 20px 40px 20px;
    margin-top: 0;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-sub {
    background: var(--secondary-color);
    height: 20vh;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    text-align: center;
    padding: 0 20px;
    margin-top: 60px;
    border-bottom: 1px solid #ddd;
}

.hero-sub h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 800px;
}

section:first-of-type {
    margin-top: 10px; 
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

#aktuelles .content-container {
    max-width: 1200px;
}

/* --- ALLGEMEINE SECTIONS --- */
section {
    padding: 2.5rem 10%;
    flex: 1;
}

section[id] {
    scroll-margin-top: 60px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--school-accent-color);
    display: inline-block;
    padding-bottom: 5px;
}

/* --- NEWS SLIDER --- */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 2%; 
    padding: 1rem 5px;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.slider-container::-webkit-scrollbar {
    display: none; 
}

.slider-container .card {
    min-width: 31%; 
    max-width: 31%;
    flex: 0 0 auto; 
    margin-bottom: 0;
}

.slider-nav {
    position: absolute; 
    bottom: 20px; 
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s, transform 0.2s, opacity 0.3s;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0.2; 
}

.slider-nav.prev {
    left: 5px; 
}

.slider-nav.next {
    right: 5px; 
}

.slider-nav:hover {
    background: var(--accent-color);
    transform: scale(1.1); 
    opacity: 1; 
}

/* --- CARDS & GRID --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--primary-color);
}

.card h3 {
    margin-bottom: 1.5rem;
}

/* --- LISTEN-STYLING --- */
.card ul, .content-container ul {
    list-style-position: outside;
    padding-left: 1.2rem; 
    margin-bottom: 1.25rem;
    text-align: left;
}

.card ul li, .content-container ul li {
    margin-bottom: 0.3rem;
    padding-left: 0.3rem;
}

/* Spezifisches Styling für die Helfer-Karte in der Mensa */
.card-highlight-orange {
    border: 3px solid var(--school-accent-color) !important;
}

.news-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.mensa-image {
    width: 40%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* Animation für Zoom */
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; /* Wichtig für z-index */
    z-index: 1;
}

.mensa-image:active {
    transform: scale(1.8);
    z-index: 1000;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* --- IBAN & BUTTONS BEREICH --- */
.bank-details {
    background: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    width: fit-content; 
    max-width: 100%;
}

.iban-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin: 0;
    width: auto;
}

.button-spacer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-width: 320px;
}

.iban-container {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--secondary-color);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: fit-content;
}

#iban-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    flex: 0 0 auto;
}

.copy-button, 
.nav-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 165px; 
    white-space: nowrap;
    text-decoration: none; /* Wichtig für <a> Tags */
}

.copy-button:hover, 
.nav-button:hover {
    background: #2c5e75;
    text-decoration: none;
}

.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s;
    display: inline-flex;
    justify-content: center;
    width: auto;
    white-space: nowrap;
}

.cta-button:hover {
    background: #d35400;
}

.bic-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

#copy-success {
    display: none; 
    color: #27ae60;
    font-weight: bold;
    font-size: 0.85rem;
}

#copy-success.visible {
    display: inline-block;
}

.bic-text {
    font-size: 0.9rem;
    color: var(--text-color);
    text-align: left;
}

/* --- FOOTER --- */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: auto;
}

footer a {
    color: var(--white);
    margin: 0 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* DATENSCHUTZ Popup-Link */
/* Update für das Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(3px); /* Optional: macht den Hintergrund leicht unscharf */
}

/* Update für den Content mit Animation */
.popup-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    
    /* Animation-Trigger */
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- RESPONSIVE DESIGN (Bündelung & Mobil-Logik) --- */

@media (max-width: 1200px) {
    .iban-row { gap: 40px; }
}

@media (max-width: 1100px) {
    .nav-title { max-width: 250px; }
}

@media (max-width: 1024px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .slider-container .card { min-width: 48%; max-width: 48%; }
    .iban-container { min-width: auto; width: 100%; }
    .cta-button { min-width: auto; width: 100%; }
    .bank-details { width: 100%; }
}

@media (max-width: 900px) {
    .logo-text { font-size: 0.8rem; max-width: 200px; }
}

@media (max-width: 800px) {
    .nav-title { display: none; }
    nav { padding: 0 15px; }
    nav ul { gap: 12px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .grid-container { grid-template-columns: 1fr; }
    section { padding: 2rem 5%; }
    .slider-container .card { min-width: 85%; max-width: 85%; }
    .iban-row { flex-direction: column; align-items: flex-start; gap: 20px; }

    /* MOBILES MENÜ */
    .menu-toggle {
        display: block !important;
        font-size: 2rem;
        cursor: pointer;
        z-index: 1100;
        padding-right: 15px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px; 
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        margin: 0;
        z-index: 1050;
    }

    nav ul.active {
        display: flex !important;
    }

    nav ul li {
        margin: 10px 0 !important;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text { display: none; }
    .cta-button { width: 100%; padding: 12px 20px; }
}

/* Desktop-Sicherheit: Toggle verstecken */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}