/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --text-muted: #888888;
    --accent-color: #D22027;
    /* Updated to Logo Red */
    --overlay-color: rgba(0, 0, 0, 0.7);
    --header-height: 80px;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Updates for Style */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    /* Increased padding */
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(5, 5, 5, 0.8);
    /* More transparency */
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    /* Subtle border */
}

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

.logo {
    font-family: 'Noto Sans KR', sans-serif;
    /* Changed to Sans-serif for bold look */
    font-size: 1.5rem;
    font-weight: 800;
    /* Extra bold */
    letter-spacing: -0.5px;
    /* Tighter spacing for impact */
    color: var(--text-color);
    text-transform: uppercase;
}

.logo-highlight {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 50px;
    /* More space */
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    color: var(--text-muted);
    position: relative;
    padding: 10px 0;
    /* Increase hit area */
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    /* Adjusted for padding */
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

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

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

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    /* Center relative to parent */
    transform: translateX(-50%);
    background-color: rgba(5, 5, 5, 0.95);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInUp 0.3s ease forwards;
}

.dropdown-content li {
    display: block;
    text-align: center;
}

.dropdown-content li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.dropdown-content li a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-content li a::after {
    display: none;
    /* No underline for dropdown items */
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section Refined */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 70%);
    /* Subtle radial gradient */
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-img {
    width: 250px;
    /* Adjust size as needed */
    margin-bottom: 40px;
    animation: fadeInUp 1.2s ease forwards;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 5px;
    margin-bottom: 3rem;
    text-transform: uppercase;
    animation: fadeInUp 1.2s ease 0.3s forwards;
    opacity: 0;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: fadeInUp 1.2s ease 0.6s forwards;
    opacity: 0;
}

.btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 10px 30px rgba(210, 32, 39, 0.3);
    /* Red glow */
}

/* Section Common */
section {
    padding: 100px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-color);
}

.view-all {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all:hover {
    color: var(--accent-color);
}

/* Grid Layout */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Work Card */
.work-card {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    background-color: #1a1a1a;
}

.work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.work-card:hover .work-thumb {
    transform: scale(1.05);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 500;
}

.work-title {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
}

/* Detail Page Styles */
.detail-hero {
    margin-top: var(--header-height);
    padding: 40px 0;
    min-height: 60vh;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 0 auto;
    background: #000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.detail-info {
    padding: 80px 40px;
    /* Restore container padding */
}

.detail-header {
    margin-bottom: 50px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.detail-desc {
    font-size: 1.1rem;
    max-width: 800px;
    margin-bottom: 50px;
    color: #ccc;
}

.detail-credits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.credit-item h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-family: 'Noto Sans KR', sans-serif;
}

.credit-item p {
    font-size: 1rem;
}

.stills-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 80px;
}

.stills-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

/* Filters */
.filters {
    margin-bottom: 50px;
}

.filter-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--text-color);
}

.sub-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.sub-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-filter-btn.active,
.sub-filter-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* 스틸 갤러리 - 클릭 가능한 이미지 스타일 */
.stills-gallery img {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.stills-gallery img:hover {
    transform: scale(1.02);
    filter: brightness(1.15);
}

/* 라이트박스 갤러리 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.lightbox.hidden {
    display: none;
    opacity: 0;
}

/* 라이트박스 이미지 컨테이너 */
.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    animation: lightboxFadeIn 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 닫기 버튼 */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 25px;
    font-size: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* 이전/다음 버튼 */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 카운터 표시 */
.lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10001;
}

/* 모바일 라이트박스 */
@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 60px;
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 20px;
    display: inline-block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        /* Below toggle button */
        gap: 30px;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block;
        z-index: 2001;
        /* Ultra high z-index */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 모바일 작은 화면용 스타일 */
@media (max-width: 480px) {

    /* Filters Fix */
    .sub-filters {
        flex-wrap: wrap;
        /* Allow wrapping */
        gap: 10px;
    }

    .sub-filter-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Contact Page Styles (Enhanced) */
.contact-hero {
    margin-top: var(--header-height);
    padding: 100px 0 60px;
    text-align: center;
}

.contact-title {
    font-size: 3.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease forwards;
    letter-spacing: -1px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.contact-info-wrapper {
    padding-top: 20px;
}

.info-group {
    margin-bottom: 40px;
}

.info-label {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
    font-weight: 700;
}

.info-content {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 300;
}

.social-link-item {
    display: inline-block;
    font-size: 1.1rem;
    color: #fff;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.social-link-item:hover {
    color: var(--accent-color);
}

/* Contact Form */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.03);
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-input,
.form-textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    color: #fff;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
}

.form-textarea {
    min-height: 50px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.form-label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label,
.form-textarea:focus~.form-label,
.form-textarea:not(:placeholder-shown)~.form-label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.send-btn {
    width: 100%;
    padding: 20px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.send-btn:hover {
    background: #a0151a;
    /* Darker red */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(210, 32, 39, 0.2);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-title {
        font-size: 2.5rem;
    }

    .contact-form-wrapper {
        padding: 30px;
    }
}

/* Detail Page Mobile */
@media (max-width: 768px) {
    .detail-hero {
        min-height: 40vh;
        /* Reduce height on mobile */
        padding: 20px 0;
    }

    .detail-meta {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
    }

    .section-title {
        font-size: 2rem;
        /* Smaller title */
    }

    .detail-desc {
        font-size: 1rem;
    }

    .detail-credits {
        grid-template-columns: 1fr 1fr;
        /* 2 cols on mobile instead of 1 if possible, or 1 */
        gap: 20px;
    }
}