/* Collie Gallery Component - CSS */

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-container h1 {
    font-family: var(--font-heading, Georgia, serif);
    color: var(--primary, #8B2323);
    margin-bottom: 1.5rem;
}

.gallery-container h2 {
    font-family: var(--font-heading, Georgia, serif);
    color: var(--primary, #8B2323);
    margin-bottom: 1rem;
}

/* Breadcrumb */
.gallery-breadcrumb {
    margin-bottom: 1rem;
}

.gallery-breadcrumb a {
    color: var(--primary, #8B2323);
    text-decoration: none;
    font-size: 0.95rem;
}

.gallery-breadcrumb a:hover {
    text-decoration: underline;
}

/* Album Overview Grid */
.gallery-albums {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
    gap: 1.5rem;
}

.gallery-album-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(139, 35, 35, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gallery-album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(139, 35, 35, 0.12);
}

.album-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
}

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

.gallery-album-card:hover .album-thumb img {
    transform: scale(1.05);
}

.album-info {
    padding: 1rem;
}

.album-info h3 {
    font-family: var(--font-heading, Georgia, serif);
    color: var(--primary, #8B2323);
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.album-count {
    font-size: 0.85rem;
    color: #666;
}

/* Image Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
    gap: 1rem;
}

.gallery-item {
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(139, 35, 35, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   Lightbox
   ======================================== */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px 0;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: none;
    box-shadow: none;
    color: #fff;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 100000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%);
    box-shadow: none;
    color: #fff;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    z-index: 100000;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-albums {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .gallery-item {
        border-radius: 4px;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}
