/* gallery-details.css - For Specific Gallery Album Images Page */
@import url("shared.css");

/* Page Spacing for Sticky Header */
.page-top-padding {
    height: 80px; /* Match header height */
    width: 100%;
}
@media (max-width: 768px) {
    .page-top-padding {
        height: 60px;
    }
}

/* Album Details Hero Section */
.album-details-hero-section {
    background-image: linear-gradient(rgba(43, 29, 20, 0.7), rgba(43, 29, 20, 0.7)); /* Background image for this specific album hero */
    background-size: cover;
    background-position: center;
    color: var(--color-text-light);
    text-align: center;
    padding: var(--spacing-xl) 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    margin-bottom: var(--spacing-xl);
}

.album-details-hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.album-details-hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    color: var(--color-accent-gold);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.album-details-hero-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Album Content Grid */
.gallery-album-content {
    padding-top: var(--spacing-lg); /* Adjust spacing from hero */
    padding-bottom: var(--spacing-xl);
}
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid for images */
    gap: var(--spacing-lg); /* Space between items */
    justify-content: center;
    padding: var(--spacing-sm);
}

/* Individual Album Item */
.album-item {
    position: relative;
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    height: 350px; /* Fixed height for consistent image cards */
    display: flex; /* For centering content (if needed) */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer; /* Indicates clickable */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fit, maintain aspect ratio */
    display: block;
    transition: transform 0.4s ease;
}

.album-item:hover img {
    transform: scale(1.1);
}

/* Album Item Overlay */
.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(43, 29, 20, 0.8) 0%, rgba(43, 29, 20, 0) 60%); /* Dark gradient from bottom */
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    align-items: center;
    padding: var(--spacing-md) var(--spacing-sm);
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease;
}

.album-item:hover .album-overlay {
    opacity: 1; /* Show on hover */
}

.album-item-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-accent-gold); /* Accent color for title */
    margin-bottom: var(--spacing-xs);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.view-icon {
    font-size: 2rem;
    color: var(--color-text-light);
    margin-top: var(--spacing-sm);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* No Gallery Items Message */
.no-gallery-items {
    grid-column: 1 / -1; /* Span across all columns */
    text-align: center;
    padding: var(--spacing-xl);
    font-size: 1.2rem;
    color: var(--color-text-dark);
    background-color: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    margin-top: var(--spacing-lg);
}


/* Lightbox Modal Styles */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; /* Prevent scroll inside modal */
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
    justify-content: center; /* Center content */
    align-items: center; /* Center content */
    flex-direction: column;
    padding: var(--spacing-md);
    animation: fadeIn 0.3s;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh; /* Image takes up to 80% of viewport height */
    display: block;
    object-fit: contain; /* Ensure image fits without cropping */
    animation: zoomIn 0.3s;
}

.lightbox-caption {
    color: white;
    font-size: 1.2rem;
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius-sm);
    margin-top: var(--spacing-sm);
    max-width: 80%;
}

/* Close Button */
.lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close-btn:hover,
.lightbox-close-btn:focus {
    color: var(--color-accent-gold);
    text-decoration: none;
    cursor: pointer;
}

/* Navigation Arrows */
.lightbox-prev-btn, .lightbox-next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    z-index: 2001;
}

.lightbox-next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev-btn:hover,
.lightbox-next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .album-details-hero-title { font-size: 3rem; }
    .album-details-hero-text { font-size: 1.15rem; }
    .album-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .album-item { height: 320px; }
    .album-item-title { font-size: 1.6rem; }
    .lightbox-image { max-height: 70vh; }
}

@media (max-width: 768px) {
    .album-details-hero-section { padding: var(--spacing-lg) 0; }
    .album-details-hero-title { font-size: 2.5rem; }
    .album-details-hero-text { font-size: 1rem; }
    .album-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: var(--spacing-md);
        padding: var(--spacing-xs);
    }
    .album-item { height: 280px; }
    .album-item-title { font-size: 1.4rem; }
    .view-icon { font-size: 1.8rem; }
    .lightbox-prev-btn, .lightbox-next-btn { font-size: 18px; padding: 12px; }
    .lightbox-close-btn { font-size: 30px; right: 20px; top: 10px;}
    .lightbox-image { max-height: 60vh; }
    .lightbox-caption { font-size: 1rem; }
}

@media (max-width: 480px) {
    .album-details-hero-section { padding: var(--spacing-md) 0; }
    .album-details-hero-title { font-size: 2rem; }
    .album-details-hero-text { font-size: 0.9rem; }
    .album-grid {
        grid-template-columns: 1fr; /* Single column on smallest screens */
        padding: 0;
    }
    .album-item {
        height: 250px;
        border-radius: var(--border-radius-md);
        margin: 0 var(--spacing-sm) var(--spacing-lg); /* Add horizontal margin */
    }
    .album-item-title { font-size: 1.2rem; }
    .view-icon { font-size: 1.5rem; }
    .lightbox-prev-btn, .lightbox-next-btn { font-size: 16px; padding: 8px; top: unset; bottom: 10px; transform: none; }
    .lightbox-prev-btn { left: 10px; }
    .lightbox-next-btn { right: 10px; }
    .lightbox-close-btn { font-size: 24px; right: 10px; top: 5px; }
    .lightbox-image { max-height: 50vh; }
    .lightbox-caption { font-size: 0.9rem; }
}
