/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    bottom: 0;
    background-color: var(--bg-white, #FFFFFF);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding-top: env(safe-area-inset-top);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-initials {
    font-family: 'Lora', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--accent, #1a3a52);
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Warme moderne Palette */
    --accent: #1a3a52;       /* Tiefes Navy-Blau */
    --text-dark: #000000;    /* Schwarz */
    --text-light: #666666;   /* Mittelgrau */
    --bg-white: #FFFFFF;     /* Weiß */
    --bg-warm: #F5F5F5;      /* Sehr helles Grau */
    --smoke: #E0E0E0;        /* Helles Grau für Borders */

    /* Semantic Colors */
    --primary-color: var(--accent);
    --bg-light: var(--bg-warm);

    /* Modern Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --space-2xl: 8rem;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.01em;
    position: relative;
}

/* Subtile Analog-Textur für digitalen Glanz-Bruch */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.035;
    pointer-events: none;
    z-index: 9999;
}

h1, h2, h3 {
    font-family: 'Lora', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

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

/* ============================================
   UNIFIED GLASS BUTTON STANDARD
   ============================================ */

/* Base Glass Button - Reusable Standard */
.btn-glass-standard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-glass-standard:hover {
    background: rgba(0, 0, 0, 0.45);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Language Switcher Container */
.language-switcher {
    position: fixed;
    top: calc(30px + env(safe-area-inset-top));
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 6px;
}

/* Language Buttons - Using Glass Standard */
.lang-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-btn.active {
    background: #FFFFFF;
    color: #000000;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Hero Section - Fullscreen with Tint */
.hero {
    position: relative;
    height: 100svh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.hero-content {
    position: relative;
    text-align: left;
    z-index: 2;
    padding: 0 0 10vh 5vw;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Verwende nur high-quality hero-large für alle Geräte */
    background-image: url('hero-main.webp');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    z-index: 0;
    /* Optimierte Bildqualität für Fotos */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    -webkit-font-smoothing: antialiased;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-title {
    position: relative;
    font-size: clamp(4rem, 12vw, 8rem);
    line-height: 0.9;
    margin-bottom: 30px;
    color: var(--bg-white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-date {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    font-family: 'Lora', serif;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.08em;
    font-family: 'Lato', sans-serif;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hero-location .location-icon {
    flex-shrink: 0;
    width: clamp(16px, 2.5vw, 20px);
    height: clamp(16px, 2.5vw, 20px);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* Calendar Button - Using Glass Standard */
.calendar-button-wrapper {
    text-align: center;
    margin-top: 3rem;
}

.calendar-button {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
}

.calendar-button:hover {
    background: rgba(26, 58, 82, 0.9);
    border-color: rgba(26, 58, 82, 0.9);
}

.calendar-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-button:hover svg {
    transform: scale(1.05);
}

/* Section Styles */
section {
    padding: clamp(4rem, 12vw, 8rem) 20px;
}

.section-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: clamp(3rem, 8vw, 5rem);
    color: var(--text-dark);
    letter-spacing: 0.03em;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Personal Message Section */
.personal-message {
    background: var(--bg-white);
    position: relative;
}

.personal-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
}

.message-content {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    line-height: 2;
    color: var(--text-light);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.message-content p {
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.message-content p:nth-child(1) { animation-delay: 0.1s; }
.message-content p:nth-child(2) { animation-delay: 0.2s; }
.message-content p:nth-child(3) { animation-delay: 0.3s; }
.message-content p:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RSVP Section */
.rsvp {
    background: var(--bg-light);
    position: relative;
}

.rsvp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.rsvp-content {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.rsvp-text {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.rsvp-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rsvp-button {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    font-size: clamp(1rem, 2vw, 1.1rem);
    padding: 12px 24px;
}

.rsvp-button:hover {
    background: rgba(26, 58, 82, 0.9);
    border-color: rgba(26, 58, 82, 0.9);
}

.rsvp-button svg {
    width: 18px;
    height: 18px;
}

/* Timeline Section */
.timeline {
    background: var(--bg-white);
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* Timeline List Container */
.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-left: 60px; /* Platz für Linie und Marker */
}


/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 12px 0;
    display: grid;
    grid-template-columns: 80px 1fr; /* Feste Spalte für Zeit, flexible für Event */
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 8px;
    padding-left: 15px;
    margin-left: -15px;
    padding-right: 15px;
}

.timeline-item:hover {
    transform: translateY(-3px);
    background: rgba(26, 58, 82, 0.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Kreisförmiger Marker - perfekt zentriert auf der Linie */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -51px; /* Position relativ zum Item */
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-white);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 4px var(--bg-white);
    z-index: 1;
}

/* Zeitangabe */
.timeline-time {
    font-size: 1.25rem;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Event-Beschreibung */
.timeline-event {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-dark);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Placeholder-Styling für "Informationen folgen" */
.timeline-item.placeholder .timeline-event {
    color: #888888;
    font-style: italic;
}

.timeline-item.placeholder .timeline-time {
    color: #888888;
}

/* FAQ Section */
.faq {
    background: var(--bg-white);
    position: relative;
}

.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.faq-item {
    border-bottom: 1px solid var(--smoke);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 0 15px;
    margin: 0 -15px;
}

.faq-item:hover {
    background: rgba(26, 58, 82, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 25px 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Lato', sans-serif;
    font-size: 1.15rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question:focus {
    outline: none;
}

.faq-icon {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
    margin-left: 20px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 25px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 20px;
}

footer p {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-light);
}

/* NEUE BILDERGALERIE */
.gallery {
    background: var(--bg-dark); /* Dunkler Hintergrund nach der hellen FAQ-Sektion */
    padding-top: 0; /* Weniger Abstand, da es nach der Nachricht kommt */
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px; /* Etwas breiter als der Text */
    margin: 0 auto;
}
.gallery-item {
    position: relative;
    z-index: 1;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .language-switcher {
        top: 15px;
        right: 15px;
    }

    .faq-question {
        font-size: 1.1rem;
        padding: 20px 0;
    }

    .faq-icon {
        font-size: 1.5rem;
        margin-left: 15px;
    }

    .faq-answer p {
        font-size: 1rem;
    }

    section {
        padding: 60px 20px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Modern Elegant Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.hero-title {
    animation-delay: 0.3s;
}

.hero-date {
    animation-delay: 0.5s;
}

.hero-location {
    animation-delay: 0.7s;
}

/* Scroll Reveal Animation */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item,
.faq-item {
    animation: scrollReveal 0.8s ease-out backwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.15s; }
.faq-item:nth-child(3) { animation-delay: 0.2s; }
.faq-item:nth-child(4) { animation-delay: 0.25s; }

/* Anfahrt Section */
.anfahrt {
    background: var(--bg-light);
    position: relative;
}

.anfahrt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.anfahrt-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.anfahrt-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 500;
}

.anfahrt-content iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 16px;
    margin-top: 1.5rem;
}

/* Navigation Button - Using Glass Standard */
.navigation-button-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.navigation-button {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    font-size: clamp(1rem, 2vw, 1.1rem);
    padding: 12px 24px;
}

.navigation-button:hover {
    background: rgba(26, 58, 82, 0.9);
    border-color: rgba(26, 58, 82, 0.9);
}

.navigation-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation-button:hover svg {
    transform: rotate(15deg) scale(1.1);
}

/* Handwritten Signature */
.signature {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--primary-color);
    font-weight: 400;
    display: inline-block;
    margin-top: 0.5rem;
    line-height: 1.2;
}

/* Countdown Section */
.countdown {
    background: var(--bg-light);
    position: relative;
    padding: clamp(4rem, 12vw, 6rem) 20px;
}

.countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain-texture.svg');
    background-repeat: repeat;
    background-size: 180px 180px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap; /* Besser für mobile Ansicht */
    gap: clamp(1.5rem, 4vw, 3rem); /* Dynamischer Abstand */
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.countdown-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-item:hover {
    transform: scale(1.05);
}

/* HIER IST DIE ÄNDERUNG:
   Die Sektion .countdown-item:not(:last-child)::after wurde entfernt,
   um die Punkte zu beseitigen.
*/

.countdown-number {
    font-family: 'Lato', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -0.02em;
}

.countdown-label {
    font-family: 'Lora', serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-light);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    font-weight: 400;
}

.countdown-finished {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-color);
    text-align: center;
    padding: 3rem 2rem;
    font-weight: 500;
}

/* Countdown animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.countdown-number {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive for countdown */
@media (max-width: 768px) {
    .countdown-timer {
        gap: 1.5rem; /* Etwas mehr Abstand auf Mobilgeräten */
        justify-content: space-around;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }
}

/* NEUES GRUPPENFOTO */
.group-photo-section {
    padding-top: 0;
    padding-bottom: 0;
    background: var(--bg-white); /* Passt zur FAQ Sektion */
}
.group-photo-wrapper {
    max-width: 800px; /* Passt zur FAQ Breite */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.group-photo-wrapper img {
    width: 100%;
    border-radius: 16px; /* Weichere Kanten */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */

/* Initial state - hidden */
.fade-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Visible state - revealed */
.fade-element.visible {
    opacity: 1;
    transform: translateY(0);
}
