/* ========================================
   Bakey Daoom - Gallery Page (Museum Style)
   ======================================== */

/* --- Gallery Page Body --- */
.gallery-page {
    background-color: #0a0a0a;
    color: var(--color-text-light);
}

/* --- Gallery Header (always solid dark) --- */
.site-header--gallery {
    background-color: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header--gallery .logo__en {
    color: var(--color-text-light);
}

.site-header--gallery .logo__kr {
    color: rgba(255, 255, 255, 0.4);
}

.site-header--gallery .nav__link {
    color: rgba(255, 255, 255, 0.6);
}

.site-header--gallery .nav__link:hover,
.site-header--gallery .nav__link.active {
    color: var(--color-text-light);
}

.site-header--gallery .nav__link::after {
    background-color: var(--color-accent-warm);
}

.site-header--gallery .nav__toggle span {
    background-color: var(--color-text-light);
}

/* --- Gallery Hero --- */
.gallery-hero {
    height: 45vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #0a0a0a;
    padding-top: var(--header-height);
    position: relative;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.gallery-hero__content {
    animation: heroFadeIn 1s ease-out;
}

.gallery-hero__label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--font-size-label);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent-warm);
    margin-bottom: var(--space-lg);
}

.gallery-hero__title {
    font-family: var(--font-display);
    font-size: var(--font-size-h1);
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.gallery-hero__desc {
    font-size: var(--font-size-body);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    line-height: var(--line-height-loose);
    max-width: 500px;
    margin: 0 auto;
}

/* --- Filter Section --- */
.filter-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--space-md) 0;
}

.gallery-page .filter-bar {
    gap: var(--space-md);
}

.gallery-page .filter-btn {
    color: rgba(255, 255, 255, 0.35);
    border-color: transparent;
    font-size: var(--font-size-small);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border-radius: 0;
    transition: all var(--transition-base);
}

.gallery-page .filter-btn:hover {
    color: var(--color-text-light);
    border-color: transparent;
}

.gallery-page .filter-btn.active {
    color: var(--color-text-light);
    background-color: transparent;
    border-color: transparent;
    position: relative;
}

.gallery-page .filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-accent-warm);
    border-radius: 50%;
}

/* --- Gallery Body --- */
.gallery-body {
    padding: var(--space-2xl) 0;
    background-color: #0a0a0a;
}

/* --- Gallery Grid (Museum Style) --- */
.gallery-page .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.gallery-page .gallery-grid .gallery-item:nth-child(1),
.gallery-page .gallery-grid .gallery-item:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
}

/* --- Gallery Item (Museum Card) --- */
.gallery-page .gallery-item {
    background-color: transparent;
    border-radius: 0;
    transition: transform var(--transition-base);
}

.gallery-page .gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.gallery-page .gallery-item__image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.gallery-page .gallery-item:nth-child(1) .gallery-item__image-wrapper,
.gallery-page .gallery-item:nth-child(5) .gallery-item__image-wrapper {
    aspect-ratio: 3 / 4;
    height: auto;
    min-height: auto;
}

.gallery-page .gallery-item__image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.gallery-page .gallery-item:hover .gallery-item__image-wrapper img {
    transform: scale(1.03);
}

/* Overlay */
.gallery-page .gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-page .gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-page .gallery-item__view {
    font-size: var(--font-size-caption);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
}

/* Info */
.gallery-page .gallery-item__info {
    padding: var(--space-md) 0;
    background-color: transparent;
    text-align: center;
}

.gallery-page .gallery-item__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.gallery-page .gallery-item__artist {
    font-size: var(--font-size-caption);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}

.gallery-page .gallery-item__category {
    display: none;
}

/* --- Gallery Item Transitions for Filtering --- */
.gallery-item {
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.gallery-item.hiding {
    opacity: 0;
    transform: scale(0.95);
}

.gallery-item.hidden {
    display: none;
}

/* --- Lightbox Dark Theme --- */
.gallery-page .lightbox {
    background-color: rgba(0, 0, 0, 0.95);
}

.gallery-page .lightbox__image-frame {
    background-color: #111;
    padding: var(--space-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* --- Footer Dark Override --- */
.gallery-page .site-footer {
    background-color: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-page .footer__logo .logo__en {
    color: var(--color-text-light);
}

.gallery-page .footer__logo .logo__kr {
    color: rgba(255, 255, 255, 0.4);
}

.gallery-page .footer__quote {
    color: rgba(255, 255, 255, 0.3);
}

.gallery-page .footer__nav-link {
    color: rgba(255, 255, 255, 0.4);
}

.gallery-page .footer__nav-link:hover {
    color: var(--color-text-light);
}

.gallery-page .footer__copyright {
    color: rgba(255, 255, 255, 0.2);
}

/* --- Animation --- */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .gallery-page .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        height: auto;
        min-height: 300px;
        padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-lg);
    }

    .gallery-hero__desc br {
        display: none;
    }

    .gallery-page .gallery-item__image-wrapper {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .gallery-page .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}