/* --- Gallery Landing Page --- */
.category-links {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 2rem 0 6rem;
    max-width: var(--divider-width, 600px);
    margin: 0 auto;
}

@media (max-width: 768px) {
    .category-links {
        gap: 2rem;
    }
}

.category-link-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    text-decoration: none;
    display: block;
}

.category-link-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-link-item:hover img {
    transform: scale(1.05);
}

.category-link-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Default tint */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
    z-index: 10;
}

.category-link-item:hover .category-link-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

.category-link-title {
    color: white; /* Default high contrast color */
    font-family: var(--font-willow);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    pointer-events: none;
}

/* --- Gallery Layout --- */
.gallery-section {
    max-width: 1400px; /* Overrides .page-container default */
}

/* --- Gallery Grid --- */
.gallery-category {
    padding-bottom: 6rem;
}

.category-title {
    /* Styles moved to .accent-title in theme.css */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 4rem;
    padding-bottom: 4rem;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 1.2s ease, filter 1.2s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transform: translateZ(0);
}

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

/* Atmospheric Vignette and Color Wash */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle, 
        transparent 50%, 
        rgba(226, 220, 211, 0.2) 100%
    );
    background-color: rgba(226, 220, 211, 0.12);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 5;
    transition: background-color 0.4s ease, opacity 0.4s ease;
}

.gallery-item:hover::after {
    background-color: rgba(226, 220, 211, 0.05);
}

/* --- Image Loading Effects --- */
.fade-blur-image {
    opacity: 0;
    transform: scale(0.98);
}

.fade-blur-image.is-loaded {
    opacity: 1;
    transform: scale(1);
}

/* --- Item Details --- */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    pointer-events: none;
    z-index: 10;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.item-title {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.item-meta {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
