/* Peter Toohil Horizontal Film Strip Gallery - Complete Rebuild */

:root {
    --accent-color: #d4af37; /* Golden accent */
    --primary-dark: #1a1a1a;
    --text-light: #f8f9fa;
    --film-border: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Main Container */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    margin-top: 80px; /* Account for fixed header */
    overflow: hidden;
}

/* Page Header */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 3rem;
    font-weight: 300;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    text-align: center;
    flex: 1;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-2px);
}

.header-spacer {
    width: 140px; /* Same width as back button to balance layout */
}

/* Sketch Background */
.sketch-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.8;
}

.background-sketch-image {
    max-width: 102vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: scale(1.2);
}

/* Remove old title overlay styles - now using header */

/* Film Strip Fade-in Animation - Original Style */
.film-strip-gallery.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 3.2s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Horizontal Film Strip Gallery */
.film-strip-gallery {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
}

.scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.film-strip-track {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    min-width: max-content;
    align-items: center;
}

/* Individual Film Frames */
.film-frame {
    position: relative;
    border: 3px solid #2A2A2A;
    border-radius: 4px;
    overflow: hidden;
    min-width: 160px;
    height: 120px;
    flex-shrink: 0;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.6),
        0 6px 12px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.film-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, hsl(43 74% 66%), hsl(43 74% 85%), hsl(43 74% 66%));
    z-index: -1;
    border-radius: 6px;
    opacity: 0.3;
}

/* Film Holes */
.film-holes {
    position: absolute;
    left: 0;
    width: 100%;
    height: 16px;
    background: repeating-linear-gradient(
        to right,
        transparent 0px,
        transparent 8px,
        hsl(43 74% 66%) 8px,
        hsl(43 74% 66%) 16px,
        transparent 16px,
        transparent 24px
    );
    border-radius: 2px;
    z-index: 2;
}

.film-holes.top {
    top: -8px;
}

.film-holes.bottom {
    bottom: -8px;
}

/* Film Frame Images */
.image-card {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.film-frame:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.8),
        0 15px 30px rgba(212,175,55,0.2);
}

.film-frame:hover .image-card {
    transform: scale(1.05);
}

/* Frame Titles */
.frame-title {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.film-frame:hover .frame-title {
    opacity: 1;
}



/* Current Image Info */
.image-info-overlay {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    opacity: 0;
    transition: all 0.5s ease;
}

.current-title {
    color: var(--accent-color);
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0 8px 0;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.8);
}

.current-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 300;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* Show info on hover */
.film-frame:hover ~ .image-info-overlay,
.image-info-overlay:hover {
    opacity: 1;
}

/* Modal Styling */
.modal-backdrop {
    backdrop-filter: blur(20px);
    background: rgba(0,0,0,0.9);
}

.modal-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 3.2s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .film-frame {
        width: 150px;
        min-width: 0;
        max-width: 150px;
        height: 120px;
        flex: 0 0 150px;
    }

    .image-card {
        display: block;
        object-fit: contain;
    }
    
    .film-strip-track {
        padding: 0 20px;
        gap: 10px;
    }
    
    .current-title {
        font-size: 1.4rem;
    }
    
    .current-subtitle {
        font-size: 0.9rem;
    }
}