/* ==========================================================================
   1. CONTAINER & BASIC LAYOUT
   ========================================================================== */
/* Erweitert die Inhaltsbox, damit das Foto-Grid maximalen Platz hat */
.unique-galerie-container {
    max-width: 1200px !important;
}

.subtitle {
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    font-size: 0.9rem;
}

/* ==========================================================================
   2. EVENT SECTIONS & HEADERS
   ========================================================================== */
.event-section {
    margin-bottom: 80px;
}

.event-header {
    border-left: 4px solid var(--yellow);
    padding-left: 20px;
    margin-bottom: 25px;
}

.event-header h2 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 900;
    font-size: 1.8rem;
}

.event-date {
    color: var(--yellow);
    font-weight: 700;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
}

/* ==========================================================================
   3. PASSWORD UNLOCK BOX (MIT ABSTAND)
   ========================================================================== */
.password-box {
    background: var(--dark-grey);
    padding: 40px;
    border: 1px solid #1f1f1f;
    margin: 40px 0 60px 0;
    width: 100%;
    box-sizing: border-box;
}

.pw-headline {
    margin: 0 0 25px 0;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: #fff;
    text-align: left;
}

.password-form {
    display: grid !important;
    grid-template-columns: 1fr 140px !important; /* 1fr flexibel links, 140px starr rechts */
    width: 100% !important;
    height: 54px !important;
    gap: 15px !important; /* Der Abstand zwischen Textbox und Button */
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.password-form input {
    background: #000 !important;
    border: 1px solid #333 !important; /* Allseitiger Rahmen */
    color: #fff !important;
    padding: 0 20px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    
    width: 100% !important; 
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

.password-form input:focus {
    border-color: var(--yellow) !important;
    outline: none !important;
}

.password-form button {
    background: var(--yellow) !important;
    color: #000 !important;
    border: 1px solid var(--yellow) !important;
    padding: 0 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
    
    width: 100% !important; 
    max-width: 140px !important;
    min-width: 140px !important;
    height: 100% !important;
    
    box-sizing: border-box !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    transition: background 0.2s ease;
}

.password-form button:hover {
    background: #fff !important;
    border-color: #fff !important;
}

/* ==========================================================================
   4. PHOTO RASTER GRID & ITEMS
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #222;
    background: #111;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* ==========================================================================
   5. ADMIN OVERLAYS & CONTROLS
   ========================================================================== */
.admin-controls {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.gallery-item:hover .admin-controls {
    opacity: 1;
}

.admin-btn {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    font-family: sans-serif;
    letter-spacing: 0.5px;
}

.btn-toggle {
    background: var(--yellow);
}

.btn-del {
    background: #ff4444;
    color: #fff;
}

.status-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 9px;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.85);
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.pw-display {
    color: var(--yellow);
    font-size: 0.85rem;
    margin-left: 15px;
    border: 1px dashed var(--yellow);
    padding: 2px 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* ==========================================================================
   6. UTILITIES & NAV-LINKS
   ========================================================================== */
.btn-back-nav {
    display: inline-block;
    margin-bottom: 45px;
    color: var(--yellow);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.btn-back-nav:hover {
    color: #fff;
}

.no-photos {
    color: #444;
    text-transform: uppercase;
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.logout-link {
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.logout-link:hover {
    color: #ff4444;
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }
    
    .event-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .password-form {
        grid-template-columns: 1fr !important; /* Stacked-Layout für mobile Displays */
        height: auto !important;
        gap: 10px !important;
    }
    
    .password-form input {
        height: 50px !important;
    }
    
    .password-form button {
        height: 50px !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}