/* Photography Pages Styles - Logan Detty Photo */

/* Category Navigation */
.category-nav-section {
    padding: 80px 40px;
    background-color: var(--bg-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    text-decoration: none;
    display: block;
}

.category-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card-bg {
    transform: scale(1.05);
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    z-index: 1;
}

.category-content h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Sub-page Hero & Grid */
.hero-grid {
    height: 60vh;
    height: 60dvh;
    min-height: 400px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    background-color: var(--bg-dark);
}

.hero-grid-item {
    width: 100%;
    height: 100%;
}

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

/* Dark overlay for readability over the whole grid */
.hero-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

.sub-page-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    padding: 40px;
    width: 100%;
}

.sub-page-hero-content h1 {
    color: var(--text-primary);
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Responsive Grid */
@media screen and (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .hero-grid {
        height: 50vh;
        height: 50dvh;
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid-item {
        aspect-ratio: 4/5;
        height: auto;
    }

    .sub-page-hero-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 40px 24px;
        width: 100%;
        box-sizing: border-box;
        background: transparent;
    }
}

/* Intro Section */
.sub-page-intro {
    padding: 80px 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.sub-page-intro h2 {
    margin-top: 0;
}

.sub-page-intro p {
    text-align: center;
    color: var(--text-secondary);
}

/* Gallery Grid */
.premium-gallery-grid {
    columns: 4;
    column-gap: 16px;
    padding: 0 40px 80px;
    max-width: 1400px;
    margin: 0 auto;
    line-height: 0;
    /* Eliminate whitespace gaps */
    column-fill: balance;
}

.premium-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 16px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    line-height: initial;
    /* Reset line-height */
}

.premium-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.6s ease-in-out;
    display: block;
    opacity: 0;
}

.premium-gallery-item img.fade-in-visible {
    opacity: 1;
}

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

.premium-gallery-item a {
    display: block;
}

/* Masonry Grid */
.masonry-grid {
    columns: 4;
    column-gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    line-height: 0;
}

.masonry-item {
    margin-bottom: 16px;
    break-inside: avoid;
}

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Hero Fullscreen */
.hero-fullscreen {
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-fullscreen video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(40%);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.hero-overlay h1 {
    color: var(--text-primary);
    font-size: 4rem;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-overlay p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .premium-gallery-grid {
        columns: 3;
    }

    .masonry-grid {
        columns: 3;
    }
}

@media screen and (max-width: 768px) {
    .category-nav-section {
        padding: 60px 24px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-card {
        aspect-ratio: 16/9;
    }

    .sub-page-hero {
        height: 50vh;
        min-height: 300px;
    }

    .sub-page-intro {
        padding: 60px 24px;
    }

    .premium-gallery-grid {
        columns: 2;
        column-gap: 12px;
        padding: 0 24px 60px;
    }

    .masonry-grid {
        columns: 2;
        column-gap: 12px;
    }

    .hero-overlay h1 {
        font-size: 2.5rem;
    }
}