/* ================================================
   GALLERY LISTING PAGE
   ================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

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

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Gallery Card */
.gallery-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.gallery-card__image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    display: block;
}

.gallery-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.gallery-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.gallery-card__count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.gallery-card__content {
    padding: 1.25rem;
}

@media (max-width: 576px) {
    .gallery-card__content {
        padding: 1rem;
    }
}

.gallery-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .gallery-card__title {
        font-size: 1rem;
    }
}

.gallery-card__title a {
    color: inherit;
    text-decoration: none;
}

.gallery-card__title a:hover {
    color: var(--color-primary, #C0392B);
}

.gallery-card__description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 576px) {
    .gallery-card__description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

.gallery-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .gallery-card__meta {
        font-size: 0.8rem;
    }
}

.gallery-card__category {
    background: rgba(192, 57, 43, 0.1);
    color: var(--color-primary, #C0392B);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.gallery-empty i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .gallery-empty {
        padding: 3rem 1rem;
    }

    .gallery-empty i {
        font-size: 3rem;
    }
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

@media (max-width: 576px) {
    .pagination-wrapper {
        margin-top: 2rem;
    }
}

/* ================================================
   GALLERY SHOW - ALBUM DETAIL PAGE
   ================================================ */
.album-header {
    margin-bottom: 3rem;
}

.album-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.album-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.album-description {
    margin-top: 1.5rem;
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Media Grid - Responsive */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

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

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

@media (max-width: 576px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .album-title {
        font-size: 1.75rem;
    }

    .album-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
}

/* Media Item Card */
.media-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: block;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-item img,
.media-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.media-item:hover img,
.media-item:hover video {
    transform: scale(1.05);
}

.media-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-item:hover .media-item__overlay {
    opacity: 1;
}

.media-item__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary, #C0392B);
}

.media-item__video-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.media-item__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.media-item:hover .media-item__title {
    transform: translateY(0);
}

/* ================================================
   GALLERY LIGHTBOX MODAL
   ================================================ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-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: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox__nav--prev {
    left: 20px;
}

.gallery-lightbox__nav--next {
    right: 20px;
}

.gallery-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.gallery-lightbox__title {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .gallery-lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-lightbox__nav--prev {
        left: 10px;
    }

    .gallery-lightbox__nav--next {
        right: 10px;
    }

    .gallery-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .gallery-lightbox__counter {
        bottom: 10px;
        font-size: 0.85rem;
    }

    .gallery-lightbox__title {
        bottom: 50px;
        font-size: 0.9rem;
        max-width: 90%;
    }
}

/* Related Albums */
.related-albums {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.related-albums__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 576px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

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

.related-card__image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card__content {
    flex: 1;
    min-width: 0;
}

.related-card__title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-card__meta {
    font-size: 0.85rem;
    color: #888;
}