/* Gallery Grid Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Album Card Styles — matches article-card layout */
.btc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
}

.btc-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f1f5f9;
}

.btc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.btc-card:hover .btc-card-image img {
    transform: scale(1.05);
}

/* Remove old overlay styles — no longer used */
.btc-card-overlay {
    display: none;
}

.btc-card-content {
    padding: 25px;
}

/* Meta row with icons */
.btc-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.btc-card-date,
.btc-card-photo-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    line-height: 1.43;
    color: #6b7280;
}

.btc-card-date svg,
.btc-card-photo-count svg {
    width: 16px;
    height: 16px;
}

.btc-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem 0;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    max-width: 100%;
}

.btc-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btc-card-title a:hover {
    color: #2563eb;
}

.btc-card-excerpt {
    font-size: 0.875rem;
    line-height: 1.625;
    color: #6b7280;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    max-width: 100%;
}

/* Footer with CTA */
.btc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.btc-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.43;
    color: #2563eb;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.btc-card-cta:hover {
    gap: 12px;
}

.btc-card-cta svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    font-size: 1.125rem;
}

/* Single Gallery Styles */
.single-gallery-images {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .single-gallery-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .single-gallery-images {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-image-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #f5f5f5;
}

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

.gallery-image-item:hover img {
    transform: scale(1.05);
}

.gallery-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-overlay svg {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-image-item:hover .gallery-image-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-image-item:hover .gallery-image-overlay svg {
    transform: scale(1);
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.lightbox-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav-prev {
    left: 1rem;
}

.lightbox-nav-next {
    right: 1rem;
}

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

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    text-align: center;
    font-size: 1rem;
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.lightbox-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    padding: 2rem;
}

.lightbox-error:before {
    content: "⚠️";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lightbox-container {
        padding: 1rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-nav-prev {
        left: 0.5rem;
    }

    .lightbox-nav-next {
        right: 0.5rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-caption {
        font-size: 0.875rem;
        padding: 1rem;
    }

    .lightbox-counter {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Related Galleries */
.related-galleries {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.related-galleries h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Pagination */
.gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.gallery-pagination a,
.gallery-pagination span {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.gallery-pagination a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.gallery-pagination .current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}


.single-gallery-subtitle {
    color: #555;
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 65ch;
    margin-top: 0.75rem;
}

.single-gallery-date {
    color: #666;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
}