/* ==========================================================================
   Gallery Module Stylesheet
   ========================================================================== */

/* Grid Layout for Gallery List */
.grid_gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 991px) {
    .grid_gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .grid_gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Album Card Style */
.gallery-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gallery-card .g-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 390/230;
}

.gallery-card .g-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .g-image-wrapper img {
    transform: scale(1.05);
}

.gallery-card .g-desc {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.gallery-card .g-title {
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-card .g-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gallery-card .g-title a:hover {
    color: #c11c1c;
}

/* Pagination */
.gallery-pagination {
    text-align: center;
    margin-top: 40px;
}

/* ==========================================================================
   Gallery Single Page (Slideshow)
   ========================================================================== */
.gallery-single-page .gallery-detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-single-page .entry-title {
    font-family: 'Outfit', 'Georgia', serif;
    font-size: 36px;
    color: #222;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-single-page .entry-description {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.gallery-slideshow {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
}

/* Large Image Container */
.slideshow-preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

.slideshow-large-trigger {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.slideshow-large-trigger img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f7f7f7;
    transition: opacity 0.3s ease;
}

.image-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    backdrop-filter: blur(5px);
}

/* Slideshow Navigation Buttons */
.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #c11c1c;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-nav-btn:hover {
    opacity: 1;
    background: #a01414;
    transform: translateY(-50%) scale(1.08);
}

.slide-nav-btn.prev {
    left: 20px;
}

.slide-nav-btn.next {
    right: 20px;
}

/* Thumbnails list */
.slideshow-thumbnails-container {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
}

.thumbnails-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.thumb-item {
    width: 100px;
    height: 67px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.thumb-item:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.thumb-item.active {
    border-color: #c11c1c;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(193, 28, 28, 0.2);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related Albums */
.gallery-related-section {
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
    margin-top: 50px;
}

.gallery-related-section .related-badge-container {
    margin-bottom: 15px;
}

.gallery-related-section .related-badge {
    background: #c11c1c;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
}

.gallery-related-section .related-title {
    font-family: 'Outfit', 'Georgia', serif;
    font-size: 28px;
    color: #222222;
    margin-top: 0;
    margin-bottom: 30px;
    text-transform: uppercase;
}
