/* ============================================
 * Shared Component: Gallery (_gallery partial)
 * Used by: blog/show, portfolio/show
 * ============================================ */

/* --- Gallery header --- */
.post-gallery h5 {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* --- Grid style --- */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gallery-thumb-wrapper {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}
.gallery-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.gallery-thumb-wrapper:hover .gallery-thumb {
    transform: scale(1.08);
}
.gallery-thumb-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Carousel style --- */
.gallery-carousel {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
}
.gallery-carousel .carousel-control-prev,
.gallery-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-80%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    opacity: 0.8;
}
.gallery-carousel .carousel-control-prev {
    left: 10px;
}
.gallery-carousel .carousel-control-next {
    right: 10px;
}
.gallery-carousel .carousel-control-prev:hover,
.gallery-carousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0,0,0,0.8);
}
.gallery-carousel .carousel-control-prev-icon,
.gallery-carousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}
.gallery-carousel .carousel-indicators {
    position: relative;
    margin: 0;
    padding-top: 1rem;
    justify-content: center;
    gap: 8px;
}
.gallery-carousel .carousel-indicators button {
    opacity: 0.7;
    border: 2px solid transparent;
    margin: 0;
}
.gallery-carousel .carousel-indicators button.active {
    opacity: 1;
    border: 2px solid #0d6efd;
}

/* --- Small carousel (sidebar) --- */
.gallery-carousel-sm {
    padding: 0.5rem;
}
.gallery-carousel-sm .carousel-control-prev,
.gallery-carousel-sm .carousel-control-next {
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
}
.gallery-carousel-sm .carousel-control-prev {
    left: 5px;
}
.gallery-carousel-sm .carousel-control-next {
    right: 5px;
}
.gallery-carousel-sm .carousel-control-prev-icon,
.gallery-carousel-sm .carousel-control-next-icon {
    width: 14px;
    height: 14px;
}
