/* style.css - Vollständige Version mit allen Optimierungen */

body, html {
    height: 100%;
    margin: 0;
    padding-top: 90px;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #f0f0f0;
}

.background-hands {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    z-index: 0;
    opacity: 0.5;
    flex-wrap: nowrap;
}

.hand-wrapper {
    position: relative;
    width: 15%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1;
    animation: pulse 2s infinite ease-in-out;
}

.hand-wrapper:nth-child(2) { animation-delay: 0.1s; }
.hand-wrapper:nth-child(3) { animation-delay: 0.2s; }
.hand-wrapper:nth-child(4) { animation-delay: 0.3s; }
.hand-wrapper:nth-child(5) { animation-delay: 0.4s; }
.hand-wrapper:nth-child(6) { animation-delay: 0.5s; }
.hand-wrapper:nth-child(7) { animation-delay: 0.6s; }

.hand-img {
    position: absolute;
    bottom: 0;
    width: auto;
    height: 100%;
    transform-origin: bottom center;
    object-fit: contain;
}

.hand-wrapper:nth-child(1) { height: 80%; }
.hand-wrapper:nth-child(2) { height: 65%; }
.hand-wrapper:nth-child(3) { height: 70%; }
.hand-wrapper:nth-child(4) { height: 90%; }
.hand-wrapper:nth-child(5) { height: 75%; }
.hand-wrapper:nth-child(6) { height: 60%; }
.hand-wrapper:nth-child(7) { height: 85%; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    position: fixed; 
    height: 90px;
    top: 0;
    left: 0;
    z-index: 10;
    background-color: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #ddd;
    transition: transform 0.3s ease-in-out; 
}

.header-hidden {
    transform: translateY(-100%); 
}

.logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.burger-menu {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.burger-menu:hover {
    transform: scale(1.1);
}

.burger-menu div {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu:hover div {
    background-color: #6a0dad;
}

.sidenav a:hover {
    color: #6a0dad !important; 
    font-weight: 600; 
    background-color: rgba(106, 13, 173, 0.1);
    transform: translateX(5px);
    transition: all 0.3s ease;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 5;
    padding: 20px;
}

.main-content-wrapper {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-content-wrapper h1,
.main-content-wrapper .title {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

.main-content-wrapper h2 {
    font-size: 1.5em;
    color: #555;
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 600;
}

.main-content-wrapper h3 {
    font-size: 1.2em;
    color: #444;
    margin-top: 25px;
    margin-bottom: 5px;
    font-weight: 600;
}

.main-content-wrapper p {
    font-size: 1.1em;
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.event-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(106, 13, 173, 0.1);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.15);
}

.event-card h3 {
    margin-top: 0;
    color: #6a0dad;
}

footer {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
    text-align: center;
    background-color: rgba(240, 240, 240, 0.9);
    border-top: 1px solid #ddd;
}

footer a {
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #6a0dad;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.show { display: flex; }

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    position: relative;
    margin: 0;
    overflow-y: auto;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.modal-close-button:hover {
    color: #6a0dad;
}

/* Sidenav */
.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 101;
    top: 0;
    right: 0;
    background-color: #f8f9fa;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    border-left: 1px solid #e9ecef;
}

.sidenav a {
    padding: 12px 8px 12px 32px;
    font-size: 18px;
    color: #495057;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
}

.sidenav a:last-child {
    border-bottom: none;
}

.sidenav .sidenav-close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    color: #333;
    transition: color 0.3s ease;
}

.sidenav .sidenav-close-button:hover {
    color: #6a0dad;
}

/* ================================
   BILDERGALERIE STYLES - MIT EINZELBILD-OPTION
   ================================ */
.image-gallery {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 75%;
    max-width: 600px;
    margin: 1rem auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

/* Verstecke Navigationspfeile und Zähler bei Einzelbildern */
.image-gallery.single-image .nav-arrow,
.image-gallery.single-image .image-counter {
    display: none !important;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    cursor: pointer;
}

.gallery-image.fade-out {
    opacity: 0;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    transition: all 0.3s ease;
    user-select: none;
    cursor: pointer;
    padding: 15px 10px;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.nav-arrow:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(0,0,0,0.5);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left {
    left: 10px;
}

.nav-arrow.right {
    right: 10px;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 20;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    touch-action: pan-y pinch-zoom;
}

.lightbox-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 95vw;
    height: auto;
    max-height: 95vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    background: rgba(0,0,0,0.7);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    padding: 20px 15px;
    user-select: none;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
}

.lightbox-nav:hover {
    color: #ffffff;
    background: rgba(0,0,0,0.7);
}

.lightbox-nav.prev {
    left: 25px;
}

.lightbox-nav.next {
    right: 25px;
}

body.no-scroll {
    overflow: hidden;
    padding-right: 15px;
}

/* ================================
   NEWSLETTER-ARCHIV STYLES
   ================================ */
.newsletter-list {
    display: grid;
    max-width: 960px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
    justify-content: center;
}

.newsletter-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-left: 5px solid #6a0dad;
    border-right: 5px solid #6a0dad;
    padding-left: calc(1.5rem - 5px);
    padding-right: calc(1.5rem - 5px);
}

.newsletter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.15);
}

.newsletter-card h3 {
    margin-top: 0;
    color: #6a0dad;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.newsletter-card p {
    color: #555;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 0;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 1.2rem;
}

.newsletter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 10px 5px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 40px;
    text-align: center;
    border: none;
    cursor: pointer;
}

.newsletter-card .pdf-link {
    background-color: #6a0dad;
}

.newsletter-card .pdf-link:hover {
    background-color: #550a8b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

.newsletter-card .web-link {
    background-color: #1a7e43;
}

.newsletter-card .web-link:hover {
    background-color: #145e32;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 126, 67, 0.3);
}

/* Newsletter Subscription Styles */
.newsletter-subscription {
    background: linear-gradient(135deg, #6a0dad 0%, #56298a 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(106, 13, 173, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-subscription h2 {
    color: white !important;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.newsletter-subscription p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(106, 13, 173, 0.3);
}

.newsletter-form button {
    background: #F47721;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 119, 33, 0.3);
}

.newsletter-form button:hover {
    background: #e06616;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 119, 33, 0.4);
}

/* Contact Form Styles */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #6a0dad;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

.contact-form button {
    background: #6a0dad;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: #550a8b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

/* Message Styles */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* -------------------
   RESPONSIVE LAYOUT
------------------- */
@media (max-width: 768px) {
    body, html {
        padding-top: 80px;
    }
    
    .main-content-wrapper {
        padding: 20px;
        margin: 10px;
        border-radius: 12px;
        max-width: none;
    }
    
    .main-content-wrapper h1,
    .main-content-wrapper .title {
        font-size: 1.8em;
    }
    
    .main-content-wrapper h2 {
        font-size: 1.4em;
    }
    
    .main-content-wrapper p {
        font-size: 1em;
        line-height: 1.7;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    header {
        padding: 15px;
        height: 80px;
    }
    
    .background-hands {
        justify-content: space-around;
    }
    
    .hand-wrapper:nth-child(n+4) { display: none; }
    .hand-wrapper { 
        width: 30%; 
        height: 70% !important;
    }
    
    /* MOBILE BILDOPTIMIERUNGEN */
    .image-gallery {
        padding-top: 70%;
        max-width: none;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .gallery-image {
        object-fit: cover;
    }
    
    .nav-arrow {
        font-size: 2rem;
        padding: 12px 8px;
        background: rgba(0,0,0,0.4);
    }
    
    .image-counter {
        bottom: 10px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Lightbox Mobile */
    .lightbox-image {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 35px;
        width: 50px;
        height: 50px;
    }
    
    .lightbox-nav {
        font-size: 35px;
        padding: 15px 10px;
    }
    
    .lightbox-nav.prev {
        left: 15px;
    }
    
    .lightbox-nav.next {
        right: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 5% auto;
        max-width: none;
    }
    
    /* Newsletter Mobile */
    .newsletter-list {
        max-width: 100%;
        margin: 0;
        padding: 1rem 0;
        grid-template-columns: 1fr;
    }
    
    .newsletter-card {
        max-width: none;
        margin: 0 auto;
        width: 100%;
        min-width: auto;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 0.8rem !important;
    }
    
    .newsletter-link {
        width: 100%;
        padding: 12px 5px;
        font-size: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .newsletter-subscription {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 12px;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    /* Event Cards auf Mobile */
    .event-list {
        gap: 20px;
    }
    
    .event-card {
        padding: 15px;
        margin: 0 -5px;
    }
    
    * { box-sizing: border-box; }
}

/* Extra kleine Geräte */
@media (max-width: 480px) {
    .image-gallery {
        padding-top: 80%;
    }
    
    .gallery-image {
        object-fit: cover;
    }
    
    .nav-arrow {
        font-size: 1.8rem;
        padding: 10px 6px;
    }
    
    .lightbox-image {
        max-width: 99vw;
        max-height: 99vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-nav {
        font-size: 30px;
        padding: 12px 8px;
    }
    
    .main-content-wrapper {
        padding: 15px;
        margin: 5px;
    }
    
    .newsletter-subscription {
        padding: 1rem;
    }
    
    .newsletter-subscription h2 {
        font-size: 1.5em;
    }
}

/* Touch-Optimierungen */
@media (hover: none) and (pointer: coarse) {
    .nav-arrow,
    .lightbox-nav,
    .lightbox-close {
        min-height: 44px;
        min-width: 44px;
    }
    
    .gallery-image {
        cursor: default;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #6a0dad;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Critical CSS Above the Fold */
.logo, .title, .main-content-wrapper {
    will-change: transform;
}

/* Lazy Loading für nicht-kritische Bilder */
.hand-img {
    loading: lazy;
}