/* Layout */

/* Header */
.site-header {
    height: var(--header-height);
    background-color: rgba(11, 12, 16, 0.95);
    /* semi-transparent bg */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand {
    font-family: var(--font-family-display);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.brand span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: var(--font-size-sm);
    letter-spacing: 1px;
    color: var(--color-text);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Page Layout */
.main-content {
    padding: var(--spacing-lg) 0;
    min-height: calc(100vh - var(--header-height) - 100px);
    /* rough footer height */
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

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

/* Footer */
.site-footer {
    background-color: var(--color-bg-light);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: var(--font-size-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer p {
    color: var(--color-text);
    opacity: 0.7;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* JS will toggle this */
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-bg-light);
        flex-direction: column;
        padding: var(--spacing-md);
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* Modal / Gallery Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-visual {
    position: relative;
    max-height: 500px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #000;
}

.content-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(11, 12, 16, 0.3) 100%);
    pointer-events: none;
}

.content-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Filter to hide low quality and blend with theme */
    filter: sepia(30%) contrast(110%) saturate(80%);
    transition: filter 0.5s ease, transform 5s ease;
}

.content-visual:hover img {
    filter: sepia(0%) contrast(100%) saturate(100%);
    transform: scale(1.05);
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--color-bg-light);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: var(--spacing-md);
    position: relative;
    box-shadow: var(--shadow-md);
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.credit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.credit-card {
    background: var(--color-bg-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.credit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-primary);
}

.credit-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #000;
}

.credit-info {
    padding: var(--spacing-sm);
}

.credit-year {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: bold;
}

.credit-title {
    font-family: var(--font-family-display);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Gallery inside Modal */
.gallery-grid {
    display: grid;
    /* Larger images: Auto-fill with min 300px width */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    /* Increased from 100px */
    object-fit: cover;
    border-radius: 2px;
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.gallery-item img:hover {
    opacity: 0.8;
}


/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    z-index: 3001;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 3002;
}

.lightbox-nav:hover {
    background: rgba(69, 162, 158, 0.8);
    /* Primary color accent */
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.film-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
    color: var(--color-text-muted);
}