/* Globale Reset-Regeln */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body-Grundlagen */
body {
    font-family: -apple-system, BlinkMacMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background-image: url('https://pixaroa.de/images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
	background-attachment: fixed; 
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
}

/* Verhindert Scrollen des Body, wenn Sidebar offen ist */
body.sidebar-open {
    overflow: hidden;
}

/* Main-Inhaltsbereich */
main {
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Allgemeine Container-Stile für Inhaltsbereiche (Login, Dashboard, Galerien, etc.) */
.login-container,
.dashboard-content,
.my-galleries-container,
.create-gallery-container,
.edit-gallery-container,
.content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto;
}

/* Logo-Stile */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon::before {
    content: '';
    width: 30px;
    height: 24px;
    border: 3px solid #333;
    border-radius: 4px;
    position: relative;
}

.logo-icon::after {
    content: '';
    width: 24px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 3px;
    position: absolute;
    margin-left: 8px;
    margin-top: 4px;
    background: transparent;
}

.logo-text {
    font-size: 36px;
    font-weight: 400;
    color: #333;
    letter-spacing: -1px;
}

/* Formular-Stile */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    padding: 12px 15px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #a8c8a8;
    background: white;
    box-shadow: 0 0 0 3px rgba(168, 200, 168, 0.1);
}

/* Button-Stile */
.login-btn,
.save-gallery-btn,
.cta-button {
    width: 100%;
    padding: 16px;
    background: #a8c8a8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-btn:hover,
.save-gallery-btn:hover,
.cta-button:hover {
    background: #96b896;
    transform: translateY(-1px);
}

.cta-button {
    padding: 18px 35px;
    font-size: 20px;
    box-shadow: 0 8px 15px rgba(168, 200, 168, 0.3);
    margin-bottom: 0;
    width: auto;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(168, 200, 168, 0.4);
}

/* Spezifische Links */
.facebook-login {
    color: #4267B2;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.facebook-login:hover {
    background: #f8f9fa;
}

.link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.link:hover {
    color: #a8c8a8;
}

.links-container {
    margin: 20px 0;
}

/* Header-Stile (Standard für nicht eingeloggte Benutzer) */
.main-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 15px 40px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.main-nav .logo {
    margin-bottom: 0;
}

.main-nav .logo-text {
    font-size: 28px;
}

.nav-links {
    list-style: none;
    display: flex; /* Desktop-Navigation ist flex */
    gap: 25px;
    padding: 5;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
}

.nav-link:hover {
    color: #a8c8a8;
}

.primary-nav-link {
    background: #a8c8a8;
    color: white;
    padding: 10px 10px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-align: center; 
}

.primary-nav-link:hover {
    background: #96b896;
    transform: translateY(-1px);
    color: white;
}

/* Spezifische Stile für den User-Header (eingeloggte Benutzer) */
.main-header.user-header {
    background: rgba(240, 240, 240, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.main-header.user-header .nav-link {
    color: #444;
}

.main-header.user-header .nav-link:hover {
    color: #a8c8a8;
}

.main-header.user-header .primary-nav-link {
    background: #a8c8a8;
}

.main-header.user-header .primary-nav-link:hover {
    background: #96b896;
}




/* Login-Seite */
.login-container {
    max-width: 600px;
    padding: 40px;
    text-align: center;
}

/* Dashboard-Seite */
.dashboard-content {
    max-width: 800px;
    padding: 50px;
    text-align: center;
}

.dashboard-content h1 {
    font-size: 42px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.dashboard-content p {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Meine Galerien-Seite */
.my-galleries-container {
    max-width: 1200px;
    padding: 50px;
    text-align: center;
}

.my-galleries-container h1 {
    font-size: 38px;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.gallery-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.gallery-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background-color: #f0f0f0;
}

.gallery-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-card-content h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.gallery-card-content p {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
    flex-grow: 1;
}

.gallery-card-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.gallery-card-actions .btn {
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-grow: 1;
    text-align: center;
}

.gallery-card-actions .btn-edit {
    background: #a8c8a8;
    color: white;
}

.gallery-card-actions .btn-edit:hover {
    background: #96b896;
    transform: translateY(-1px);
}

.gallery-card-actions .btn-delete {
    background: #e74c3c;
    color: white;
}

.gallery-card-actions .btn-delete:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.no-galleries-message {
    font-size: 18px;
    color: #666;
    margin-top: 50px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #e0e0e0;
}

.no-galleries-message a {
    color: #a8c8a8;
    text-decoration: none;
    font-weight: 600;
}

.no-galleries-message a:hover {
    text-decoration: underline;
}

/* Erstellen/Bearbeiten Galerie-Seiten */
.create-gallery-container,
.edit-gallery-container {
    max-width: 900px;
    padding: 50px;
    text-align: left;
}

.create-gallery-container h1,
.edit-gallery-container h1 {
    text-align: center;
    font-size: 38px;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.form-group label {
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
}

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    margin-bottom: 30px;
}

.file-upload-area:hover {
    border-color: #a8c8a8;
    background-color: #f9fdf9;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area p {
    color: #666;
    font-size: 18px;
    margin-top: 10px;
}

.file-upload-area .upload-icon {
    font-size: 48px;
    color: #a8c8a8;
}

/* Masonry Grid für Bildvorschauen */
.image-preview-grid {
    column-count: 3;
    column-gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.image-preview-item {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
    break-inside: avoid-column;
    display: inline-block;
    width: 100%;
}

.image-preview-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 200px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.image-preview-item .remove-btn:hover {
    background: rgba(255, 0, 0, 0.9);
}

.image-preview-item .main-image-radio {
    margin-top: 5px;
    accent-color: #a8c8a8;
}

.image-preview-item label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
    display: block;
    margin-top: 5px;
}

/* Kundenlink-Gruppe für edit-gallery.php */
.customer-link-group {
    margin-bottom: 30px;
    text-align: left;
}

.customer-link-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.link-display {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    word-break: break-all;
}

.link-display a {
    flex-grow: 1;
    color: #a8c8a8;
    text-decoration: none;
    margin-right: 10px;
}

.link-display a:hover {
    text-decoration: underline;
}

.copy-btn {
    background: #a8c8a8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #96b896;
    transform: translateY(-1px);
}


/* Nachrichten-Stile (Fehler/Erfolg) */
.message.error {
    color: red;
    background-color: #ffe0e0;
    border: 1px solid red;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.message.success {
    color: green;
    background-color: #e0ffe0;
    border: 1px solid green;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Index-Seite (Landing Page) */
.content-section {
    max-width: 1000px;
    padding: 60px;
    text-align: center;
    margin-bottom: 40px;
}

.hero-section {
    text-align: center;
    padding: 80px 20px;
    color: #333;
}

.hero-section h1 {
    font-size: 52px;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.hero-section p {
    font-size: 20px;
    line-height: 1.7;
    max-width: 850px;
    margin: 0 auto 50px auto;
    color: #555;
}

.section-title {
    font-size: 38px;
    font-weight: 500;
    color: #333;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #a8c8a8;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid #a8c8a8;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    font-size: 26px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    font-size: 17px;
    color: #666;
    line-height: 1.6;
}

.feature-icon-professional {
    font-size: 60px;
    color: #a8c8a8;
    margin-bottom: 25px;
    display: block;
}

.testimonials-section {
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    padding: 80px 20px;
    margin-top: 60px;
    border-radius: 12px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.testimonial-card p {
    font-size: 20px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    font-size: 18px;
    font-weight: 600;
    color: #a8c8a8;
}

.testimonial-author span {
    display: block;
    font-size: 15px;
    font-weight: 400;
    color: #777;
    margin-top: 5px;
}

.final-cta-section {
    padding: 80px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    margin-top: 60px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.final-cta-section h2 {
    font-size: 42px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.final-cta-section p {
    font-size: 20px;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

/* Globaler Footer-Stil */
.site-footer {
    width: 100%;
    margin-top: 0 !important;      /* überschreibt alles */
    padding: 30px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    color: #999;
    background: white;
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.site-footer p {
    margin-bottom: 10px;
}

.site-footer a {
    color: #999;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #a8c8a8;
}

/* Media Queries für den Header */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 20px;
        /* Auf Mobile soll der Header selbst die Elemente verteilen */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .main-nav .nav-links {
        display: none; /* Desktop-Nav-Links auf Mobile ausblenden */
    }

    .hamburger-menu {
        display: block; /* Hamburger-Button auf Mobile anzeigen */
    }

    /* Sicherstellen, dass die Sidebar auf Mobile sichtbar werden kann */
    .mobile-sidebar {
        visibility: hidden; /* Startet unsichtbar */
        opacity: 0;
        right: -300px;
        transition: right 0.3s ease-in-out, visibility 0s linear 0.3s, opacity 0.3s ease;
    }

    .mobile-sidebar.active {
        visibility: visible; /* Wird sichtbar, wenn aktiv */
        opacity: 1;
        right: 0;
        transition: right 0.3s ease-in-out, visibility 0s linear 0s, opacity 0.3s ease;
    }

    body {
        padding-top: 70px; /* Header-Höhe anpassen */
    }
}

/* Media Queries für allgemeine Container und Inhalte */
@media (max-width: 992px) {
    .image-preview-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    /* Login-Seite */
    .login-container {
        margin: 20px;
        padding: 30px 24px;
        max-width: 90%;
    }
    .logo-text {
        font-size: 28px;
    }

    /* Dashboard-Seite */
    .dashboard-content {
        padding: 30px;
        margin: 20px;
        max-width: 90%;
    }
    .dashboard-content h1 {
        font-size: 34px;
    }
    .dashboard-content p {
        font-size: 16px;
    }

    /* Meine Galerien-Seite */
    .my-galleries-container {
        padding: 30px 20px;
        margin: 20px;
    }
    .my-galleries-container h1 {
        font-size: 32px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-card-image {
        height: 180px;
    }
    .gallery-card-content h2 {
        font-size: 20px;
    }
    .gallery-card-actions .btn {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Erstellen/Bearbeiten Galerie-Seiten */
    .create-gallery-container,
    .edit-gallery-container {
        padding: 30px;
        margin: 20px;
    }
    .create-gallery-container h1,
    .edit-gallery-container h1 {
        font-size: 32px;
    }
    .file-upload-area {
        padding: 20px;
    }
    .file-upload-area p {
        font-size: 16px;
    }
    .image-preview-grid {
        column-count: 1;
        column-gap: 0;
    }
    .image-preview-item {
        margin-bottom: 15px;
    }
    .image-preview-item img {
        max-height: 150px;
    }

    /* Index-Seite (Landing Page) */
    .content-section {
        padding: 40px 20px;
        margin: 20px;
    }
    .hero-section {
        padding: 60px 15px;
    }
    .hero-section h1 {
        font-size: 40px;
    }
    .hero-section p {
        font-size: 18px;
    }
    .cta-button {
        padding: 15px 25px;
        font-size: 18px;
    }
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 15px;
    }
    .feature-card {
        padding: 30px;
    }
    .feature-card h3 {
        font-size: 22px;
    }
    .feature-card p {
        font-size: 16px;
    }
    .feature-icon-professional {
        font-size: 50px;
    }
    .testimonials-section {
        padding: 60px 15px;
    }
    .testimonial-card {
        padding: 30px;
    }
    .testimonial-card p {
        font-size: 18px;
    }
    .final-cta-section {
        padding: 60px 15px;
    }
    .final-cta-section h2 {
        font-size: 34px;
    }
    .final-cta-section p {
        font-size: 18px;
    }
    .site-footer {
        margin-top: 40px;
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    /* Login-Seite */
    .login-container {
        padding: 30px 20px;
    }
    .logo-text {
        font-size: 24px;
    }

    /* Dashboard-Seite */
    .dashboard-content h1 {
        font-size: 28px;
    }

    /* Meine Galerien-Seite */
    .my-galleries-container h1 {
        font-size: 28px;
    }
    .gallery-card-image {
        height: 150px;
    }

    /* Erstellen/Bearbeiten Galerie-Seiten */
    .create-gallery-container h1,
    .edit-gallery-container h1 {
        font-size: 28px;
    }
    .image-preview-item img {
        max-height: 120px;
    }

    /* Index-Seite (Landing Page) */
    .hero-section h1 {
        font-size: 32px;
    }
    .hero-section p {
        font-size: 16px;
    }
    .section-title {
        font-size: 28px;
    }
    .final-cta-section h2 {
        font-size: 28px;
    }
    .final-cta-section p {
        font-size: 16px;
    }
}

/* --- Spezifische Stile für die öffentliche Galerie-Ansicht (gallery.php) --- */
body.public-gallery-page {
    background-image: none;
    background-color: #f8f8f8;
    display: block;
    padding-top: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
}
main.public-gallery-main {
    width: 100%;
    padding: 0;
    display: block;
    flex-grow: 1;
    margin: 0;
}

/* Container für den Hauptinhalt (Beschreibung, Masonry Grid, Download-Button) */
.public-gallery-container {
    width: 100%;
    max-width: 1200px; /* Eine maximale Breite für den Inhalt, um Lesbarkeit zu gewährleisten */
    margin: 0 auto; /* Zentriert den Container */
    padding: 40px 20px; /* Etwas horizontaler und vertikaler Padding für den Inhalt */
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05); /* Leichter Schatten für den Container */
    border-radius: 8px; /* Leichte Abrundung */
    overflow: hidden; /* Wichtig, um den Schatten und Radius korrekt anzuzeigen */
    margin-top: -80px; /* Überlappt das Hauptbild für einen sauberen Übergang */
    position: relative; /* Für z-index */
    z-index: 2; /* Stellt sicher, dass der Container über dem Hauptbild liegt */
}

@media (min-width: 1201px) {
    .public-gallery-container {
        max-width: 1400px; /* Noch breiter für sehr große Bildschirme */
        padding: 40px 30px;
    }
}

/* Hauptbild-Wrapper für volle Breite */
.main-gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 60vh; /* Beispielhöhe, kann angepasst werden */
    overflow: hidden;
    margin-bottom: 0; /* Keine Lücke zum Container */
    border-radius: 0; /* Keine Abrundung für volle Breite */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1; /* Liegt unter dem public-gallery-container */
}

.main-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Stellt sicher, dass das Bild den Bereich füllt */
    display: block;
}

.gallery-title-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
    z-index: 10;
}

.gallery-description-below-image {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
    padding: 0 20px;
}

.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px; /* Abstand zur Beschreibung/Header */
}

.masonry-column {
    display: flex;
    flex-direction: column;
    width: calc(25% - 10px);
    margin: 0 5px;
}

.masonry-item {
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    position: relative;
    /* Entferne feste Höhe, damit Bilder ihre natürliche Höhe bestimmen */
    /* height: auto; */ /* Dies ist der Standard, aber explizit zur Klarstellung */
}

.masonry-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.masonry-item img {
    width: 100%;
    height: auto; /* Wichtig: Bilder behalten ihre Proportionen */
    object-fit: cover; /* Füllt den verfügbaren Platz aus, kann aber beschneiden */
    display: block;
}

/* Download-Button für die gesamte Galerie am Ende */
.gallery-actions-bar-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gallery-actions-bar-bottom .download-all-btn {
    width: auto;
    max-width: 300px;
    margin: 0 auto;
    padding: 15px 30px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* --- Lightbox Stile (Erneut überarbeitet für korrekte Proportionen) --- */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Kein Padding hier, der Content soll sich selbst um seine Größe kümmern */
}

#lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

#lightbox-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    padding: 15px; /* Innenabstand um das Bild */
    /* Wichtig: max-width/max-height hier auf den verfügbaren Viewport-Platz beschränken,
       abzüglich eines Sicherheitsabstands für die Buttons und Ränder. */
    max-width: calc(100vw - 5px); /* 40px links + 40px rechts Puffer */
    max-height: calc(100vh - 5px); /* 40px oben + 40px unten Puffer */
    box-sizing: border-box; /* Padding wird in max-width/height einbezogen */
    overflow: hidden; /* Verhindert Scrollbalken im Content-Bereich */
}

#lightbox-image {
    max-width: 100%; /* Bild darf nicht breiter sein als sein Elternelement (#lightbox-content) */
    max-height: 100%; /* Bild darf nicht höher sein als sein Elternelement (#lightbox-content) */
    width: 50%; /* Wichtig: Bild soll seine natürliche Breite behalten */
    height: 50%; /* Wichtig: Bild soll seine natürliche Höhe behalten */
    display: block;
    object-fit: contain; /* Das gesamte Bild wird angezeigt, mit Rändern falls nötig */
    border-radius: 4px;
    /* Hintergrundfarbe für den Bereich, den das Bild nicht füllt (innerhalb von #lightbox-content) */
    background-color: #f0f0f0;
}

/* Buttons direkt im Overlay positionieren, um unabhängig vom Bild zu sein */
.lightbox-btn {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10000;
}

.lightbox-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

#lightbox-close {
    top: 20px;
    right: 20px;
}

#lightbox-download {
    bottom: 20px;
    right: 20px;
    text-decoration: none;
}

/* Media Queries für die Lightbox */
@media (max-width: 768px) {
    #lightbox-content {
        max-width: calc(100vw - 40px); /* Weniger Puffer auf kleineren Bildschirmen */
        max-height: calc(100vh - 40px);
        padding: 10px;
    }
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    #lightbox-close {
        top: 10px;
        right: 10px;
    }
    #lightbox-download {
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    #lightbox-content {
        max-width: calc(100vw - 20px); /* Minimaler Puffer auf sehr kleinen Bildschirmen */
        max-height: calc(100vh - 20px);
        padding: 5px;
    }
    .lightbox-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    #lightbox-close {
        top: 5px;
        right: 5px;
    }
    #lightbox-download {
        bottom: 5px;
        right: 5px;
    }
}

/* --- Spezifische Stile für die Ambassadors-Seite --- */
.ambassadors-hero-section {
    width: 100%;
    padding: 120px 20px 80px;
    background: linear-gradient(
        135deg,
        rgba(168, 200, 168, 0.95) 0%,   /* #a8c8a8 mit 0.95 Transparenz */
        rgba(139, 184, 139, 0.95) 100%  /* #8bb88b mit 0.95 Transparenz */
    );
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.ambassadors-hero-section h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    line-height: 1.2;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.ambassadors-hero-section p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.3em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Vorteile Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 45px;
    justify-content: center;
}

.benefit-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    border-bottom: 5px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-bottom-color: #a8c8a8;
}

.benefit-card .icon-wrapper {
    background: linear-gradient(45deg, #a8c8a8, #a8c8a8);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.8em;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(100, 180, 100, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}

.benefit-card:hover .icon-wrapper {
    background: linear-gradient(45deg, #a8c8a8, #a8c8a8);
    transform: scale(1.08);
}

.benefit-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 700;
}

.benefit-card p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95em;
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
}

/* Bewerbungsformular */
.application-form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.application-form-section .form-group {
    margin-bottom: 25px;
}

.application-form-section .form-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.application-form-section .form-input,
.application-form-section .form-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.application-form-section .form-input:focus,
.application-form-section .form-textarea:focus {
    outline: none;
    border-color: #a8c8a8;
    background: white;
    box-shadow: 0 0 0 3px rgba(168, 200, 168, 0.1);
}

.application-form-section .form-textarea {
    min-height: 150px;
    resize: vertical;
}

.application-form-section .submit-btn {
    width: auto;
    padding: 16px 40px;
    background: #a8c8a8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0 auto;
}

.application-form-section .submit-btn:hover {
    background: #96b896;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(168, 200, 168, 0.3);
}

/* Media Queries für die Ambassadors-Seite */
@media (max-width: 992px) {
    .ambassadors-hero-section h1 {
        font-size: 2.8em;
    }
    .ambassadors-hero-section p {
        font-size: 1.1em;
    }
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 30px;
    }
    .benefit-card {
        padding: 25px 20px;
    }
    .benefit-card .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 2.5em;
        margin-bottom: 18px;
    }
    .benefit-card h3 {
        font-size: 1.4em;
    }
    .benefit-card p {
        font-size: 0.9em;
    }
    .application-form-section {
        padding: 30px;
    }
    .application-form-section .form-label {
        font-size: 1em;
    }
    .application-form-section .form-input,
    .application-form-section .form-textarea {
        padding: 12px;
        font-size: 0.95em;
    }
    .application-form-section .submit-btn {
        padding: 14px 30px;
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .ambassadors-hero-section {
        padding: 100px 15px 60px;
    }
    .ambassadors-hero-section h1 {
        font-size: 2.4em;
        letter-spacing: -1px;
    }
    .ambassadors-hero-section p {
        font-size: 1em;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .benefit-card .icon-wrapper {
        width: 55px;
        height: 55px;
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .benefit-card h3 {
        font-size: 1.3em;
    }
    .benefit-card p {
        font-size: 0.85em;
    }
    .application-form-section {
        padding: 25px;
    }
    .application-form-section .form-label {
        font-size: 0.95em;
    }
    .application-form-section .form-input,
    .application-form-section .form-textarea {
        padding: 10px;
        font-size: 0.9em;
    }
    .application-form-section .submit-btn {
        padding: 12px 25px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .ambassadors-hero-section {
        padding: 80px 10px 40px;
    }
    .ambassadors-hero-section h1 {
        font-size: 2em;
        letter-spacing: -0.8px;
    }
    .ambassadors-hero-section p {
        font-size: 0.9em;
    }
    .benefit-card .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 2em;
        margin-bottom: 10px;
    }
    .benefit-card h3 {
        font-size: 1.2em;
    }
    .benefit-card p {
        font-size: 0.8em;
    }
    .application-form-section {
        padding: 20px;
    }
    .application-form-section .form-label {
        font-size: 0.9em;
    }
    .application-form-section .form-input,
    .application-form-section .form-textarea {
        padding: 8px;
        font-size: 0.85em;
    }
    .application-form-section .submit-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}
/* ... (bestehende Stile) ... */

/* --- NEUE STILE FÜR ÖFFENTLICHES PROFIL MIT TABS --- */

/* Tab-Navigation für öffentliches Profil */
.profile-tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    gap: 10px; /* Abstand zwischen den Tabs */
    flex-wrap: wrap; /* Tabs können umbrechen auf kleinen Bildschirmen */
}

.profile-tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    text-decoration: none; /* Für a-Tags */
    display: inline-flex; /* Für Icons und Text */
    align-items: center;
    gap: 8px;
}

.profile-tab-button:hover {
    color: #a8c8a8;
}

.profile-tab-button.active {
    color: #a8c8a8;
    border-bottom: 2px solid #a8c8a8;
    font-weight: 600;
}

/* Tab-Inhalt */
.profile-tab-content {
    display: none; /* Standardmäßig ausgeblendet */
    padding-top: 20px;
}

.profile-tab-content.active {
    display: block; /* Aktiver Tab wird angezeigt */
}

/* Allgemeine Container-Stile für Inhaltsbereiche (Login, Dashboard, Galerien, etc.) */
/* Sicherstellen, dass die Container-Stile auch für die neuen Tabs gelten */
.public-profile-settings-container,
.public-profile-galleries-container, /* Angepasster Name */
.create-public-profile-gallery-container { /* Angepasster Name */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto;
    text-align: left; /* Standardmäßig linksbündig */
    max-width: 1200px; /* Max-Breite für den Hauptcontainer */
    padding: 50px;
}

/* Überschriften in den Tabs */
.public-profile-settings-container h1,
.public-profile-galleries-container h1, /* Angepasster Name */
.create-public-profile-gallery-container h1 { /* Angepasster Name */
    text-align: center;
    font-size: 38px;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.public-profile-settings-container h2,
.public-profile-galleries-container h2, /* Angepasster Name */
.create-public-profile-gallery-container h2 { /* Angepasster Name */
    font-size: 28px;
    color: #333;
    margin-top: 40px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Galerien-Ansicht im öffentlichen Profil */
.public-profile-gallery-grid { /* Angepasster Name */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.public-profile-gallery-card { /* Angepasster Name */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.public-profile-gallery-card:hover { /* Angepasster Name */
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.public-profile-gallery-card-image { /* Angepasster Name */
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background-color: #f0f0f0;
}

.public-profile-gallery-card-content { /* Angepasster Name */
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.public-profile-gallery-card-content h3 { /* Angepasster Name */
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.public-profile-gallery-card-content p { /* Angepasster Name */
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
    flex-grow: 1;
}

.public-profile-gallery-card-actions { /* Angepasster Name */
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.public-profile-gallery-card-actions .btn { /* Angepasster Name */
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-grow: 1;
    text-align: center;
}

.public-profile-gallery-card-actions .btn-edit { /* Angepasster Name */
    background: #a8c8a8;
    color: white;
}

.public-profile-gallery-card-actions .btn-edit:hover { /* Angepasster Name */
    background: #96b896;
    transform: translateY(-1px);
}

.public-profile-gallery-card-actions .btn-delete { /* Angepasster Name */
    background: #e74c3c;
    color: white;
}

.public-profile-gallery-card-actions .btn-delete:hover { /* Angepasster Name */
    background: #c0392b;
    transform: translateY(-1px);
}

.no-public-profile-galleries-message { /* Angepasster Name */
    font-size: 18px;
    color: #666;
    margin-top: 50px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #e0e0e0;
    text-align: center;
}

.no-public-profile-galleries-message a { /* Angepasster Name */
    color: #a8c8a8;
    text-decoration: none;
    font-weight: 600;
}

.no-public-profile-galleries-message a:hover { /* Angepasster Name */
    text-decoration: underline;
}

/* Create Gallery Form im öffentlichen Profil */
.create-public-profile-gallery-container { /* Angepasster Name */
    max-width: 900px;
    padding: 50px;
    text-align: left;
    margin: 0 auto; /* Zentriert das Formular */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.create-public-profile-gallery-container h2 { /* Angepasster Name */
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: -1px;
    border-bottom: none; /* Überschreibt den Standard-Border-Bottom */
    padding-bottom: 0;
}

/* Image Upload Area für Profil-Galerien */
.public-profile-file-upload-area { /* Angepasster Name */
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    margin-bottom: 30px;
}

.public-profile-file-upload-area:hover { /* Angepasster Name */
    border-color: #a8c8a8;
    background-color: #f9fdf9;
}

.public-profile-file-upload-area input[type="file"] { /* Angepasster Name */
    display: none;
}

.public-profile-file-upload-area p { /* Angepasster Name */
    color: #666;
    font-size: 18px;
    margin-top: 10px;
}

.public-profile-file-upload-area .upload-icon { /* Angepasster Name */
    font-size: 48px;
    color: #a8c8a8;
}

/* Image Preview Grid für Profil-Galerie-Erstellung/Bearbeitung */
.public-profile-image-preview-grid { /* Angepasster Name */
    column-count: 3;
    column-gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.public-profile-image-preview-item { /* Angepasster Name */
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
    break-inside: avoid-column;
    display: inline-block;
    width: 100%;
}

.public-profile-image-preview-item img { /* Angepasster Name */
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 200px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.public-profile-image-preview-item .remove-btn { /* Angepasster Name */
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.public-profile-image-preview-item .remove-btn:hover { /* Angepasster Name */
    background: rgba(255, 0, 0, 0.9);
}

.public-profile-image-preview-item .main-image-radio { /* Angepasster Name */
    margin-top: 5px;
    accent-color: #a8c8a8;
}

.public-profile-image-preview-item label { /* Angepasster Name */
    font-size: 14px;
    color: #555;
    cursor: pointer;
    display: block;
    margin-top: 5px;
}

/* Media Queries für Tabs */
@media (max-width: 768px) {
    .profile-tabs-nav {
        flex-direction: column;
        align-items: center;
    }
    .profile-tab-button {
        width: 100%;
        max-width: 300px; /* Begrenzt die Breite der Buttons */
        margin-bottom: 10px;
        justify-content: center;
    }
    .public-profile-settings-container,
    .public-profile-galleries-container, /* Angepasster Name */
    .create-public-profile-gallery-container { /* Angepasster Name */
        padding: 30px;
        margin: 20px;
    }
    .public-profile-settings-container h1,
    .public-profile-galleries-container h1, /* Angepasster Name */
    .create-public-profile-gallery-container h1 { /* Angepasster Name */
        font-size: 32px;
    }
    .public-profile-gallery-grid { /* Angepasster Name */
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .public-profile-gallery-card-image { /* Angepasster Name */
        height: 180px;
    }
    .create-public-profile-gallery-container { /* Angepasster Name */
        padding: 30px;
        margin: 20px;
    }
}