/******************************************************************************
* Atherton Airport - Reusable Gallery Engine Styles                           *
* Location: /css/gallery.css                                                  *
******************************************************************************/

/* --- MODAL POPUP STYLES (Fixed for Maximum Size) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95); /* Darker for better focus */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

#modal-img {
    /* This allows the image to fill the screen while staying perfectly scaled */
    max-width: 98vw; 
    max-height: 92vh; 
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid white; /* Thinner border looks better at large scales */
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    background: black;
}

#modal-caption {
    color: white;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.5);
    padding: 5px 20px;
    border-radius: 20px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 60px;
    font-weight: 200; /* Thinner 'X' looks cleaner */
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}
.close-modal:hover { color: var(--accent); }

/* --- GALLERY MAIN DISPLAY --- */
.main-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.display-box { flex: 1; text-align: center; color: var(--primary); min-width: 0; }

.display-box img { 
    max-height: 550px; 
    width: auto; 
    max-width: 100%; 
    border-radius: 6px; 
    border: 3px solid white;
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

#image-caption { margin-top: 15px; font-weight: bold; font-size: 1.1rem; color: var(--primary); }

/* --- NAV, RIBBON, & FOLDERS --- */
.nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: 0.3s;
    flex-shrink: 0;
}
.nav-btn:hover { background: var(--accent); color: var(--primary); }

.ribbon-outer-container { width: 100%; max-width: 100%; overflow-x: auto; padding: 15px 0; }
.thumbnail-ribbon { display: flex; gap: 12px; width: max-content; padding: 5px; }
.thumb-wrapper { flex: 0 0 110px; height: 75px; cursor: pointer; border: 3px solid transparent; border-radius: 6px; overflow: hidden; transition: 0.2s; }
.thumb-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.active-thumb { border-color: var(--accent); transform: scale(1.05); }

.folder-grid { display: flex; flex-wrap: wrap; gap: 15px; margin: 20px 0 35px 0; }
.folder-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    min-width: 180px; 
}
.folder-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }