/* Gallery Page Specific Styles */

/* Gallery Header Adjustments */
#gallery-header {
    height: 40vh; /* Reduced height */
    min-height: 300px; /* Minimum height */
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    position: relative; /* Needed for absolute positioning of home button */
    padding-top: 0; /* Remove inherited padding if not needed */
}

#gallery-header .header-content {
    position: relative; /* Ensure it respects padding/margins */
    z-index: 1;
    padding: 20px; /* Add some padding */
    border-radius: 8px;
    text-align: center;
}

#gallery-header .header-content h1 {
    font-size: 2.8rem; /* Adjust size as needed */
    margin-bottom: 0.5rem;
    color: #fff;
}

#gallery-header .header-content p {
    font-size: 1.3rem; /* Adjust size as needed */
    margin: 0;
    color: #eee;
}

/* Home Button Style */
.home-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10; /* Ensure it's above header content */
}

.home-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.home-button:hover {
    background-color: #fff; /* Solid white on hover */
    color: #ff6b6b; /* Theme color */
    transform: scale(1.05);
}

/* Album Section */
.album-section {
    padding: 60px 20px;
    background-color: #f9f9f9; /* Light background for contrast */
    text-align: center;
}

.album-title {
    font-size: 2.5em;
    color: #5a8b85; /* Match theme color */
    margin-bottom: 40px;
    font-weight: 600;
}

.error-message,
.no-albums-message {
    color: #cc0000;
    font-size: 1.1em;
    background-color: #ffe0e0;
    padding: 15px;
    border: 1px solid #cc0000;
    border-radius: 5px;
    margin: 20px auto;
    max-width: 600px;
}

.no-albums-message {
    color: #555;
    background-color: #eee;
    border: 1px solid #ccc;
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.album-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* For potential absolute positioning inside */
}

.album-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.album-thumbnail {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop images nicely */
    display: block;
}

.album-name {
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker overlay */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

#overlay-image {
    max-width: 85%;
    max-height: 80%;
    display: block;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

/* Overlay Controls */
.close-button,
.prev-button,
.next-button {
    position: absolute;
    color: #fff;
    font-size: 3em; /* Larger buttons */
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.close-button:hover,
.prev-button:hover,
.next-button:hover {
    color: #bbb;
}

.close-button {
    top: 20px;
    right: 30px;
    font-size: 3.5em;
}

.prev-button {
    left: 30px;
}

.next-button {
    right: 30px;
}

#image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* Responsive Adjustments for Overlay */
@media (max-width: 768px) {
    .prev-button {
        left: 15px;
    }
    .next-button {
        right: 15px;
    }
    #overlay-image {
        max-width: 90%;
        max-height: 75%;
    }
    .close-button {
        top: 15px;
        right: 20px;
        font-size: 3em;
    }
}
