/*
* Truleum Gallery - NEW DESIGN
* A modern, minimalist, and professional gallery style.
*/

/* Base Section Styling */
.gallery-album-section {
    padding: 80px 0;
    background-color: #f8f9fa; /* Light gray background */
    margin-bottom: -140px;
}

.gallery-album-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Album Card - The main component for each category */
.album-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.album-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.album-image {
    width: 100%;
    height: 100%;
}

.album-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.album-card:hover .album-image img {
    transform: scale(1.08);
}

/* Dark overlay for text readability */
.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    opacity: 1; /* Always visible */
}

/* Content inside the overlay */
.album-info {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: #fff;
    opacity: 1; /* Always visible */
    transition: all 0.4s ease; /* For smooth hover on child elements */
}

.album-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.album-count {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 20px;
}

.view-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--truleum-gold, #cda45e);
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

.album-card:hover .view-gallery-btn {
    color: var(--truleum-gold, #cda45e);
    padding-bottom: 6px;
}

/* --- MODAL STYLES (NEW) --- */

/* Gallery Modal (for image grid) */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Use auto for scrollbar only when needed */
    background-color: #fff; /* Solid white background */
    opacity: 0;
    transform: translateY(100%); /* Start from bottom */
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.6s ease;
}

.gallery-modal.is-open {
    opacity: 1;
    transform: translateY(0);
}

.modal-content {
    padding: 100px 50px 50px; /* More top padding for header */
    max-width: 1600px;
    margin: 0 auto;
    margin-bottom: 150px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 30px;
}

.modal-title {
    font-size: 42px;
    font-weight: 800;
    color: #0A1A4A;
    margin: 0;
}

.close-modal {
    font-size: 24px;
    font-weight: 600;
    color: #0A1A4A;
    text-decoration: none;
    border: 2px solid #0A1A4A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: #0A1A4A;
    color: white;
    transform: rotate(90deg);
}

/* Grid inside the modal */
.gallery-modal .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-modal .gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4 / 3; /* Maintain aspect ratio */
}

.gallery-modal .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-modal .gallery-item:hover img {
    transform: scale(1.1);
}

/* Overlay and icon on hover */
.gallery-modal .gallery-item .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-modal .gallery-item:hover .image-overlay {
    opacity: 1;
}

.gallery-modal .gallery-item .zoom-icon {
    font-size: 24px;
    color: #fff;
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.gallery-modal .gallery-item:hover .zoom-icon {
    opacity: 1;
    transform: scale(1);
}

/* --- LIGHTBOX STYLES --- */

/* Lightbox Modal (for single full-screen image) */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.95);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    position: relative;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover, .lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 992px) {
    .album-grid {
        grid-template-columns: 1fr; /* Stack on smaller screens */
        gap: 40px;
    }

    .album-card {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        margin: 5% 20px;
        padding: 30px;
        width: auto;
    }

    .gallery-modal .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .album-info h3 {
        font-size: 22px;
    }

    .album-count {
        font-size: 14px;
    }

    .modal-title {
        font-size: 28px;
    }
}
