/**
 * Gallery Styles for Establishment Detail Pages
 * Liège en Duo - Image Gallery Feature
 */

/* ==========================================================================
   Gallery Hero Container
   ========================================================================== */

.gallery-hero {
    display: flex;
    height: 18rem; /* h-72 */
}

@media (min-width: 768px) {
    .gallery-hero {
        height: 20rem; /* md:h-80 */
    }
}

/* ==========================================================================
   Main Image
   ========================================================================== */

.gallery-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.gallery-main:hover img {
    transform: scale(1.02);
}

/* Gradient overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

/* Photo count badge (appears on hover) */
.gallery-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-main:hover .gallery-badge {
    opacity: 1;
}

/* ==========================================================================
   Desktop Thumbnails (Right side strip)
   ========================================================================== */

.gallery-thumbs {
    display: none;
    flex-direction: column;
    width: 5rem;
    gap: 2px;
    margin-left: 2px;
}

@media (min-width: 1024px) {
    .gallery-thumbs {
        display: flex;
    }
}

@media (min-width: 1280px) {
    .gallery-thumbs {
        width: 6rem;
    }
}

.gallery-thumb {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.1);
}

.gallery-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

.gallery-thumb:hover .gallery-thumb-overlay {
    background: transparent;
}

/* ==========================================================================
   Mobile Button (Single thumbnail with +X overlay)
   ========================================================================== */

.gallery-mobile-btn {
    position: absolute;
    bottom: 4.5rem;
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-mobile-btn:hover,
.gallery-mobile-btn:active {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.gallery-mobile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-mobile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Hide on desktop */
@media (min-width: 1024px) {
    .gallery-mobile-btn {
        display: none;
    }
}

/* ==========================================================================
   No Gallery Fallback (Single image only)
   ========================================================================== */

.gallery-hero.no-gallery {
    display: block;
}

.gallery-hero.no-gallery .gallery-main {
    height: 18rem;
}

@media (min-width: 768px) {
    .gallery-hero.no-gallery .gallery-main {
        height: 20rem;
    }
}

/* ==========================================================================
   PhotoSwipe Customizations
   ========================================================================== */

/* Custom caption styling */
.pswp__caption__center {
    text-align: center;
    font-family: 'Raleway', sans-serif;
}

/* Custom button colors to match site theme */
.pswp__button {
    opacity: 0.8;
}

.pswp__button:hover {
    opacity: 1;
}

/* Counter styling */
.pswp__counter {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}
