/* Author: https://www.instagram.com/captomomentum/ */


/* google fonts */
@font-face {
    font-family: 'Playfair Display';
    src: url('fonts/PlayfairDisplay-Regular.woff2') format('woff2'),
         url('fonts/PlayfairDisplay-Regular.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Playfair Display';
    src: url('fonts/PlayfairDisplay-Bold.woff2') format('woff2'),
         url('fonts/PlayfairDisplay-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('fonts/Lato-Regular.woff2') format('woff2'),
         url('fonts/Lato-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('fonts/Lato-Bold.woff2') format('woff2'),
         url('fonts/Lato-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}


/* Main style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(to bottom right, #fdf6f0, #fff);
    color: #5a4e4e;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
	margin-top: 10px;
    margin-bottom: 40px;
    color: #b08d57;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3em;
    font-weight: 700;
    color: #a87e4d;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.gallery-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    aspect-ratio: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(168, 126, 77, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    font-weight: 500;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination button {
    background: linear-gradient(145deg, #d4af37, #e7c065);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.pagination button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.pagination button:disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}

.pagination button.active {
    background: #b08d57;
    color: white;
    transform: scale(1.05);
}

/* Modal Styling */

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,1);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 0px;
    right: -10px;
    font-size: 30px;
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.8);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.modal-nav:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.85);
    color: #5a4e4e;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}





/* Logout-Button Styles - Ergänzung zur style.css */

.logout-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.logout-btn {
    background: linear-gradient(145deg, #d4af37, #e7c065);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    background: linear-gradient(145deg, #b08d57, #d4af37);
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .logout-container {
        top: 10px;
        right: 10px;
    }
    
    .logout-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Mobile Modal Close Button Fix - Samsung Browser */
@media (max-width: 768px) {
    .modal-close {
        top: 10px !important;
        right: 10px !important;
        position: fixed !important;
        z-index: 1002 !important;
        font-size: 24px !important;
        padding: 8px !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0,0,0,0.7) !important;
        border-radius: 50% !important;
        color: white !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .modal-close:hover {
        background: rgba(0,0,0,0.9) !important;
        transform: scale(1.1) !important;
    }
}

/* Spezifische Anpassungen für Samsung Internet Browser */
@media (max-width: 768px) {
    .modal-content {
        position: relative !important;
        width: 100vw !important;
        height: 100vh !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .modal-content img {
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 80px) !important;
        object-fit: contain !important;
    }
    
    /* Verhindert, dass der Close Button zu hoch angezeigt wird */
    .modal-close {
        transform: none !important;
        margin-top: env(safe-area-inset-top, 0) !important;
    }
}

/* Sicherstellen, dass der Button über allem anderen liegt, aber nicht im Modal */
.logout-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999; /* Unter Modal (1000) */
}

/* Button im Modal verstecken */
.modal:not([style*="display: none"]) ~ .logout-container,
.modal[style*="display: flex"] ~ .logout-container {
    display: none;
}

/* Alternative: Button verstecken wenn Modal aktiv ist */
body.modal-open .logout-container {
    display: none;
}