/* Film Grain Overlay */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Studio Lighting */
.studio-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}
.light-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138,43,226,0.5) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    left: -200px;
}
.light-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0,210,255,0.3) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px;
    right: -250px;
}

/* Projects Page Header */
.projects-hero {
    padding-top: 150px;
    padding-bottom: 60px;
    text-align: center;
    position: relative;
}

.projects-hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.projects-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* Category Navigation (Optional smooth scroll) */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    padding: 0 20px;
}

.cat-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--font-primary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

/* Project Categories */
.project-category {
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
    position: relative;
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.category-title h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-right: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Waveform Animation */
.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}
.waveform .bar {
    width: 3px;
    background: var(--accent-2);
    border-radius: 3px;
    animation: wave 1.2s ease-in-out infinite;
}
.waveform .bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.waveform .bar:nth-child(2) { height: 18px; animation-delay: 0.2s; }
.waveform .bar:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.waveform .bar:nth-child(4) { height: 20px; animation-delay: 0.4s; }
.waveform .bar:nth-child(5) { height: 14px; animation-delay: 0.5s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Movie Title Cards Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Movie Card Styles */
.movie-card {
    background: #0a0a0a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    z-index: 1;
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.movie-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(138,43,226,0.1), rgba(0,210,255,0.05));
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.15);
    background: #111;
}

.movie-card:hover::before, .movie-card:hover::after {
    opacity: 1;
}

.movie-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.movie-director {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
    display: flex;
    align-items: center;
}

.movie-director.has-dir::before {
    content: 'DIR.';
    font-size: 0.75rem;
    color: var(--accent-2);
    margin-right: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    background: rgba(0, 210, 255, 0.1);
    border-radius: 4px;
}

/* Filter Gallery Styles */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.filter-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.filter-btn.active {
    background: var(--gradient-accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 20px rgba(138,43,226,0.4);
}

/* Search Bar Styles */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 45px;
    padding: 0 20px;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 6px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.search-wrapper:hover {
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 12px 35px rgba(138, 43, 226, 0.15), 0 0 20px rgba(0, 210, 255, 0.05);
}

.search-wrapper:focus-within {
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.2), inset 0 0 8px rgba(0, 210, 255, 0.05);
}

.search-icon-svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.search-wrapper:focus-within .search-icon-svg {
    color: var(--accent-2);
}

#movie-search {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
}

#movie-search::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.clear-icon-svg {
    width: 16px;
    height: 16px;
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* No Results Card styling */
.no-results-card {
    grid-column: 1 / -1;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(10px);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.no-results-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: grayscale(0.5);
    opacity: 0.7;
}

.no-results-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.no-results-card p {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 400px;
}

.filter-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.filter-item.hide {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute; /* Take out of flow so grid collapses nicely */
}

/* Add custom animations for gallery grid to keep layout smooth */
.gallery-grid {
    position: relative;
    /* Grid gap will be maintained by active elements */
}

/* Service Headings inside the grid */
.service-heading {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 40px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
}

/* Watch Button */
.watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
    color: #fff;
}

.watch-btn::before {
    content: '▶';
    font-size: 0.7rem;
}

/* Creative & Modern Stats Pill */
.gallery-stats-bar {
    margin-bottom: 35px;
    display: flex;
    justify-content: flex-start;
    padding: 0 5px;
}

.stat-pill {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 10px 24px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
}

.stat-pill:hover::before {
    left: 150%;
    transition: left 1.5s ease-in-out;
}

.stat-pill:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(138, 43, 226, 0.25);
    box-shadow: 0 15px 35px rgba(138, 43, 226, 0.15), 0 0 20px rgba(0, 210, 255, 0.05);
}

.stat-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 6px rgba(138, 43, 226, 0.4));
    animation: pulseIcon 3s infinite ease-in-out;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 6px rgba(138, 43, 226, 0.4)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 2px 10px rgba(0, 210, 255, 0.6)); }
}

.stat-count {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.stat-title {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.stat-glow {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--gradient-accent);
    filter: blur(20px);
    opacity: 0.15;
    pointer-events: none;
    border-radius: 50%;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
}

/* Commercial Client Card Aspect Ratio */
.movie-card.commercial {
    aspect-ratio: 1 / 1;
}

