/* ==========================================
   GALLERY SECTION STYLING
=========================================== */
#gallery {
    padding: 90px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

#gallery .section-title {
    text-align: center;
    margin-bottom: 50px;
}

/* GALLERY GRID CONTAINER */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ALBUM CARD */
.gallery-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
}

/* CAROUSEL IMAGE CONTAINER */
.gallery-images {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0f172a;
    overflow: hidden;
    display: flex;
}

.gallery-images .album-photo {
    width: 50%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border-right: 2px solid #ffffff;
}

.gallery-images .album-photo:last-child {
    border-right: none;
}

.gallery-images .album-photo:hover {
    opacity: 1;
    transform: scale(1.03);
}

/* CARD CONTENT */
.gallery-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-content h2 {
    font-size: 1.35rem;
    color: var(--heading-color, #0f172a);
    margin-bottom: 12px;
}

.gallery-content p {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 6px;
}

.gallery-content p b {
    color: var(--primary-color, #0284c7);
}

/* ACTION BUTTONS */
.gallery-buttons {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.gallery-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gallery-buttons button:first-child {
    background: #f1f5f9;
    color: #334155;
}

.gallery-buttons button:first-child:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gallery-buttons button:last-child {
    background: var(--primary-color, #0284c7);
    color: #ffffff;
}

.gallery-buttons button:last-child:hover {
    background: var(--primary-dark, #0369a1);
}

/* EMPTY GALLERY STATE */
.no-gallery {
    text-align: center;
    grid-column: 1 / -1;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.no-gallery h2 {
    color: #0f172a;
    margin-bottom: 8px;
}

.no-gallery p {
    color: #64748b;
}

/* ==========================================
   IMAGE MODAL & SLIDESHOW OVERLAY
=========================================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.image-modal .modal-content-box {
    position: relative;
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.image-modal .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.2s ease;
}

.image-modal .modal-close:hover {
    color: #ef4444;
}

/* RESPONSIVE DESIGN */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-images {
        height: 200px;
    }
}