/* === Globale Stile & Resets === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;600&display=swap');

:root {
    --color-bg: #FFFFFF;
    --color-bg-soft: #F8F6F3;
    /* Ein warmer, sanfter Hintergrund */
    --color-text: #3D3D3D;
    --color-primary: #C9A97E;
    /* Ein edles, gedämpftes Gold */
    --color-primary-dark: #B89A6E;
    --color-light-gray: #f0f0f0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --container-width: 1100px;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

section {
    padding: 6rem 0;
}

/* === Button Stile === */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-hero {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.1rem;
    line-height: 1.2;
    border-radius: 12px;
}

.btn .btn-main-text {
    display: block;
    font-size: 1.1rem;
}

.btn .btn-sub-text {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 4px;
}


/* === Landing Page: Hero Section (funktional) === */
.hero-section-functional {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.pexels.com/photos/4340918/pexels-photo-4340918.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center;
    background-size: cover;
    filter: blur(8px) brightness(0.8);
    transform: scale(1.05);
}

.hero-card-container {
    position: relative;
    z-index: 2;
}

.hero-card {
    width: 450px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-card-headline {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.hero-card-subheadline {
    font-size: 1.1rem;
    margin: 0 auto 2rem auto;
    color: #555;
}

.hero-card-features {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #666;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 10px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
}

.scroll-indicator a:hover {
    opacity: 0.8;
}

/* === Landing Page: Restliche Sektionen === */
.how-it-works-section {
    background-color: var(--color-bg-soft);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin: 0 auto 1.5rem auto;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.feature-item.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.feature-image img {
    width: 100%;
    display: block;
}

.feature-item h2 {
    font-size: 2.8rem;
}

.testimonial-section {
    background-color: var(--color-bg-soft);
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.testimonial blockquote {
    margin: 0;
    font-size: 1.1rem;
    font-style: italic;
    border-left: 3px solid var(--color-primary);
    padding-left: 1.5rem;
}

.testimonial cite {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    font-style: normal;
}

.pricing-section {
    position: relative;
}

.pricing-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.pexels.com/photos/2395249/pexels-photo-2395249.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center;
    background-size: cover;
    filter: blur(8px) brightness(0.8);
    transform: scale(1.05);
}

.pricing-card {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.price {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 0;
}

.price-term {
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    color: #777;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    text-align: left;
}

.pricing-features li {
    margin-bottom: 1rem;
}

.btn-pricing {
    width: 100%;
}

.faq-section {
    background-color: var(--color-bg-soft);
}

.faq-accordion {
    max-width: 750px;
    margin: 3rem auto 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-question {
    font-size: 1.2rem;
    cursor: pointer;
    padding: 1.5rem 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.8rem;
    font-family: var(--font-body);
    transition: transform 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    margin: 0;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.final-cta-section .container {
    max-width: 800px;
}

.final-cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* === Galerie Seite === */
.gallery-header {
    text-align: center;
    padding: 2rem 1rem;
}

.gallery-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin: 0;
    color: var(--color-text);
}

.gallery-header .date {
    font-style: italic;
    color: #777;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-container select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.gallery-grid {
    column-count: 4;
    column-gap: 1rem;
}

.gallery-item {
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 2rem 1rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item:hover .photo-overlay {
    opacity: 1;
}

.download-link-overlay {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.download-link-overlay:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === Modals (Upload & Lightbox) === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.is-visible {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

#drop-zone {
    border: 2px dashed var(--color-primary);
    border-radius: 5px;
    padding: 40px;
    margin: 1rem 0;
    cursor: pointer;
}

#drop-zone.dragover {
    background-color: var(--color-light-gray);
}

#upload-feedback {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 1rem;
    margin-top: 1rem;
    background-color: #f9f9f9;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-item .filename {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    height: 10px;
    margin: 5px 0;
}

.progress-bar {
    background-color: var(--color-primary);
    width: 0%;
    height: 100%;
    border-radius: 0.25rem;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.progress-item .status {
    width: 80px;
    text-align: right;
    font-size: 0.8rem;
    color: #6c757d;
}

.retry-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--color-primary);
    font-size: 1.5rem;
    line-height: 1;
    display: none;
}

.progress-item.failed .retry-btn {
    display: inline-block;
}

/* === Lightbox Styling (CORRECTED) === */
#lightbox {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 2rem;
    /* Abstand zum Rand des Viewports */
    box-sizing: border-box;
}

#lightbox.lightbox-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Neuer Wrapper, der Bild und Caption als Spalte anordnet */
.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 1.5rem;
    /* Abstand zwischen Bild und Caption */
}

/* Container nur für das Bild */
.lightbox-content {
    flex-grow: 1;
    /* Nimmt den meisten verfügbaren Platz ein */
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 100%;
    max-width: 100%;
    min-height: 0;
    /* WICHTIGER FIX für Flexbox-Verhalten */
}

/* Das Bild selbst */
#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    /* Passt sich jetzt perfekt an den .lightbox-content Container an */
    object-fit: contain;
    display: block;
}

/* Die Steuerungselemente */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 2.5rem;
    font-weight: bold;
    transition: color 0.2s;
    z-index: 2001;
    /* Stellt sicher, dass sie über dem Bild liegen */
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ccc;
}

.lightbox-close {
    top: 15px;
    right: 35px;
}

.lightbox-prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Die Bildunterschrift */
.lightbox-caption {
    flex-shrink: 0;
    /* Verhindert, dass die Caption schrumpft */
    width: 100%;
    max-width: 80vw;
    /* Passt die Breite an die Bildbreite an */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === Admin Seite === */
.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.admin-card h2 {
    font-family: var(--font-heading);
    margin-top: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.admin-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.admin-photo-item {
    position: relative;
}

.admin-photo-item img {
    width: 100%;
    border-radius: 4px;
}

.admin-photo-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
}

/* === Responsive Design Anpassungen === */
@media (max-width: 992px) {
    h2 {
        font-size: 2.2rem;
    }

    .feature-item,
    .feature-item.reverse {
        flex-direction: column;
        gap: 2rem;
    }

    .testimonials-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .hero-card-headline {
        font-size: 2.2rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        column-count: 2;
    }

    .gallery-header h1 {
        font-size: 2.5rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }
}

/* === NEW Admin Dashboard Styles === */
.admin-body {
    background-color: var(--color-bg-soft);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.admin-header h1 {
    font-size: 2rem;
    margin: 0;
}

.btn-secondary {
    background-color: #fff;
    color: var(--color-text);
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #bbb;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.dashboard-sidebar .admin-card {
    /* position: sticky;
    top: 2rem; */
}

.dashboard-sidebar p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

#qrcode {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#qrcode img {
    max-width: 100%;
}

.dashboard-sidebar .btn {
    /* width: 100%;  */
    display: block;
    width: auto;
    text-align: center;
    margin-top: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* === NEW Print Page Styles === */
.print-body {
    background-color: #e0e0e0;
}

.print-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    align-content: start;
    justify-items: center;
}

.print-card {
    width: 210mm;
    /* A4-Breite für die Vorschau */
    height: 99mm;
    /* Höhe für 1/3 A4 */
    padding: 20px;
    box-sizing: border-box;
    background: white;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    /* Nur eine leichte Kante für die Vorschau */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.print-header {
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
}

.print-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.print-header p {
    margin: 5px 0 0 0;
    font-size: 1rem;
}

.print-main {
    display: flex;
    flex-grow: 1;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
}

.print-qr-code {
    flex-shrink: 0;
}

.print-qr-code img {
    width: 150px;
    height: 150px;
    display: block;
}

.print-instructions h3 {
    font-size: 1.2rem;
    margin-top: 0;
}

.print-instructions ol {
    padding-left: 20px;
    margin: 0;
}

.print-instructions li {
    margin-bottom: 10px;
}

.print-footer {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-top: 1px solid #eee;
    padding-top: 10px;
}


/* WICHTIG: Die Magie für den eigentlichen Druck passiert hier! */
@media print {

    body,
    .print-body {
        margin: 0;
        padding: 0;
        background-color: white;
        /* Hintergrund für den Druck erzwingen */
    }

    .print-container {
        display: flex;
        /* Wechsle zu Flexbox für den Druck */
        flex-direction: column;
        /* Staple die Karten vertikal */
        justify-content: space-around;
        /* Verteile sie gleichmäßig auf der Seite */
        width: 100%;
        height: 100vh;
        /* Nutze die volle Seitenhöhe */
        padding: 0;
        margin: 0;
    }

    .print-card {
        width: 100%;
        height: auto;
        /* Höhe automatisch anpassen lassen */
        flex-grow: 1;
        /* Jede Karte soll wachsen, um den Platz zu füllen */
        border: 1px dashed #aaa;
        /* Schneidelinie */
        box-shadow: none;
        /* Kein Schatten auf Papier */
        margin: 0;
        padding: 1cm;
        /* Etwas Innenabstand */
        page-break-inside: avoid;
        /* Verhindert, dass eine Karte auf zwei Seiten geteilt wird */
    }
}

/* Responsive adjustments for admin dashboard */
@media (max-width: 1200px) {
    .admin-dashboard {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 992px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar .admin-card {
        position: static;
    }
}

/* === Success Page Styles === */
.success-page-body {
    background-color: var(--color-bg-soft);
}

.success-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.success-card {
    max-width: 650px;
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.success-icon {
    color: #28a745;
    /* A nice green for success */
    margin-bottom: 1.5rem;
}

.success-card h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.success-message {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2.5rem;
}

.admin-link-box {
    background-color: var(--color-bg-soft);
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.admin-link-box label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.admin-link-box .warning {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.link-input-wrapper {
    display: flex;
    gap: 10px;
}

.link-input-wrapper input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-family: monospace;
    color: #333;
    font-size: 0.9rem;
}

#copy-link-btn {
    padding: 0 20px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

#copy-link-btn:hover {
    background-color: #e0e0e0;
}

#copy-link-btn.copied {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.success-card>.btn {
    font-size: 1.1rem;
    padding: 15px 35px;
}

.lightbox-download-link {
    color: white !important;
    font-weight: 400;
    border: 1px solid white;
    border-radius: revert-layer;
}