/* --- GRUNDLEGENDE EINSTELLUNGEN --- */
:root {
    /* Farben basierend auf dem Luisen-Gymnasium Logo */
    --luisen-red: #9e1b34;
    --luisen-yellow: #dcb326;
    --luisen-blue: #2a84ba;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
    --white: #ffffff;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
}

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

/* --- ÜBERSCHRIFTEN DESIGN --- */
h1 {
    text-align: center;
    color: var(--luisen-red);
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 50px;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
        margin-top: 20px;
    }
}

h2 {
    color: var(--luisen-red);
    margin-top: 60px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    position: relative;
    scroll-margin-top: 140px;
    /* Adjusted for double nav */
}

/* Die drei bunten Balken über den Sektions-Überschriften */
h2::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--luisen-yellow);
    box-shadow: 12px 0 0 var(--luisen-red), 24px 0 0 var(--luisen-blue);
}

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

a:hover {
    text-decoration: underline;
}

/* --- LOGO --- */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 150px;
    height: auto;
}

/* --- GLOBAL NAVIGATION --- */
/* --- GLOBAL NAVIGATION --- */
/* --- GLOBAL NAVIGATION --- */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    /* padding handles vertical spacing */
    padding: 12px 0;
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    /* Context for absolute logo */
}

.nav-logo {
    position: absolute;
    left: 20px;
    /* Aligns with padding-left of nav-inner, effectively matching content start */
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo img {
    height: 32px;
    width: auto;
}

@media (max-width: 600px) {
    .nav-inner {
        justify-content: space-between;
        padding: 0 15px;
    }

    .nav-logo {
        position: static;
        display: flex;
    }
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    /* Modern Pill Shape */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Gentle background tint */
.nav-link:hover {
    background-color: rgba(158, 27, 52, 0.08);
    color: var(--luisen-red);
    text-decoration: none;
}

/* Active State: Solid Brand Color */
.nav-link.active {
    background-color: var(--luisen-red);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(158, 27, 52, 0.3);
    transform: translateY(-1px);
}

/* --- SUB NAVIGATION (Jump Markers) --- */
.sub-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    /* Static, no background */
}

.sub-nav a {
    text-decoration: none;
    color: var(--luisen-red);
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    background-color: rgba(158, 27, 52, 0.08);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.sub-nav a:hover {
    background-color: var(--luisen-red);
    color: var(--white);
    transform: translateY(-1px);
}


/* --- AKKORDEON STYLE (FAQ) --- */
.accordion-item {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
}

.accordion-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--luisen-yellow);
}

button.accordion-header {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    text-align: left;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--luisen-red);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

button.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--luisen-blue);
    transition: transform 0.3s ease;
    margin-left: 10px;
}

button.accordion-header.active::after {
    content: '−';
    transform: rotate(180deg);
}

button.accordion-header.active {
    background-color: #fffaf0;
}

@media (max-width: 600px) {
    button.accordion-header {
        font-size: 1rem;
    }
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--white);
}

.accordion-content p {
    padding: 0 20px 20px 20px;
    margin-top: 0;
    color: #555;
}


/* --- STUNDENTAFEL STYLES --- */
.download-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-block;
    background-color: var(--luisen-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.3s;
    font-weight: 600;
}

.btn-download:hover {
    background-color: #1f6b9a;
}

.timetable-wrapper {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

.time-column {
    flex: 0 0 100px;
    background-color: #f0f4f8;
    border-right: 1px solid #ddd;
    z-index: 2;
}

.days-carousel {
    flex: 1;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.days-carousel::-webkit-scrollbar {
    display: none;
}

.day-column {
    min-width: 100%;
    scroll-snap-align: start;
    border-right: 1px solid #eee;
}

.cell {
    padding: 12px;
    border-bottom: 1px solid #eee;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #555;
    box-sizing: border-box;
}

.header-cell {
    background-color: var(--luisen-red);
    color: white;
    font-weight: bold;
    height: 50px;
    font-size: 1rem;
}

.time-column .header-cell {
    background-color: #7d1529;
    justify-content: center;
}

.time-cell {
    background-color: #eef2f6;
    font-weight: 600;
    color: var(--luisen-blue);
    font-size: 0.85rem;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    text-align: center;
}

.subject-cell {
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

.subject-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.room-name {
    font-size: 0.75rem;
    color: #888;
}

.break-cell {
    background-color: #fffaf0;
    color: #888;
    font-style: italic;
    font-size: 0.85rem;
}

.lunch-cell {
    background-color: #e8f4fd;
    color: var(--luisen-blue);
    font-weight: bold;
}

.ag-cell {
    background-color: #fffde7;
    color: #8a6d0b;
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
}

.carousel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #888;
    font-size: 0.9rem;
}

.swipe-hint {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (min-width: 768px) {
    .day-column {
        min-width: 20%;
        border-right: 1px solid #ddd;
    }

    .days-carousel {
        scroll-snap-type: none;
    }

    .swipe-hint {
        display: none;
    }
}

/* --- HERO SECTION --- */
.hero-image-wrapper {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 8px;
    /* Optional: rounds corners if inside container */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Context for copyright overlay */
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    /* Removes bottom space */
    object-fit: cover;
}

.hero-copyright {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    color: #555;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-top-left-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* --- NAVIGATION RESPONSIVENESS --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle img {
    height: 24px;
    /* Adjust size */
    width: auto;
}

/* Container for the links to hide/show them */
.nav-links-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links-container {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
    }

    .nav-links-container.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        border-radius: 8px;
        /* Softer rects for stacking */
    }
}


/* --- PRESENTATION PAGE STYLES --- */
.presentation-actions {
    text-align: center;
    margin-bottom: 40px;
}

.slide-carousel-wrapper {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 20px;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

.slide-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 10px;
    /* Space for scrollbar if visible */
    scrollbar-width: thin;
    scrollbar-color: var(--luisen-blue) #f0f0f0;
}

.slide-item {
    flex: 0 0 80%;
    /* Show most of one slide, peek at next */
    scroll-snap-align: center;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
    background-color: #f9f9f9;
    aspect-ratio: 4/3;
    /* Matches PDF slide format */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full slide is visible */
    display: block;
}

.slide-placeholder-text {
    color: #888;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Desktop: Show multiple slides? */
@media (min-width: 900px) {
    .slide-item {
        flex: 0 0 45%;
    }
}

/* --- FULLSCREEN CAROUSEL --- */
.slide-carousel-wrapper {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-carousel-wrapper:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Native Fullscreen & iOS Fallback */
.slide-carousel-wrapper:fullscreen,
.slide-carousel-wrapper.pseudo-fullscreen {
    background-color: #000;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: none;
    overflow: hidden;
}

/* Additional styles specifically for the fallback to make it cover viewport */
.slide-carousel-wrapper.pseudo-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.slide-carousel-wrapper:fullscreen .slide-carousel,
.slide-carousel-wrapper.pseudo-fullscreen .slide-carousel {
    height: 100%;
    width: 100%;
    padding: 0 20px;
    gap: 20px;
    scrollbar-color: #555 #222;
}

.slide-carousel-wrapper:fullscreen .slide-item,
.slide-carousel-wrapper.pseudo-fullscreen .slide-item {
    flex: 0 0 85%;
    /* Much larger in fullscreen */
    height: 90%;
    align-self: center;
    background-color: #333;
    border-color: #444;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.slide-carousel-wrapper:fullscreen .slide-placeholder-text,
.slide-carousel-wrapper.pseudo-fullscreen .slide-placeholder-text {
    color: #fff;
    font-size: 2rem;
}

.slide-carousel-wrapper:fullscreen p,
.slide-carousel-wrapper.pseudo-fullscreen p {
    display: none;
    /* Hide the helper text */
}