* {
    box-sizing: border-box;
}

:root {
    --bg-color: #000;
    --text-color: #fff;
    --accent-color: #ffd700; /* Gold/Onyx accent */
    --font-family: 'Pretendard', sans-serif;
    --navbar-height: 110px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    background: transparent;
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
    align-items: center;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Toggle Animation */
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
    .navbar {
        height: 80px;
        padding: 0;
    }
    .navbar .container {
        flex-direction: row; /* Horizontal layout for logo and toggle */
        gap: 0;
        width: 90%;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px;
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        gap: 30px;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        font-size: 1.4rem;
        display: block;
        width: 100%;
    }
    .dropdown {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none; /* Toggle with JS */
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 5px 0 5px 20px !important;
        margin-top: 10px;
        min-width: unset !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        border-radius: 4px;
    }
    .has-dropdown.active .dropdown {
        display: block !important;
    }
    .dropdown li a {
        font-size: 1.1rem !important;
        padding: 12px 0 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        text-align: left !important;
    }
    .logo-img {
        height: 45px;
    }
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000); /* 이미지 로고에 테두리 효과 */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #fff; /* 글씨 색상을 흰색으로 통일 */
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000; /* 검은색 테두리 효과 */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Dropdown Menu Styles */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    list-style: none;
    padding: 15px 0;
    margin: 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    border-radius: 4px;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

@media (min-width: 769px) {
    .has-dropdown:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown li {
    width: 100%;
}

.dropdown li a {
    display: block;
    padding: 12px 25px;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7) !important;
    text-shadow: none;
    transition: 0.3s;
    text-align: center;
}

.dropdown li a:hover {
    color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 30px;
}

/* Dropdown arrow indicator */
.has-dropdown > a::after {
    content: '▾';
    font-size: 0.7rem;
    margin-left: 5px;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s;
}

.has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* Sections */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 0; /* 헤더와 이미지 영역 통합 */
    background: url('../images/main_banner_m.png') no-repeat center center/cover;
}

@media (min-width: 769px) {
    .hero-section {
        background-image: url('../images/home_main_pc_20260522.jpg');
    }
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #999;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* Expanding Image Effect */
.expansion-container {
    height: 180vh; /* Reduced from 300vh for a tighter experience */
    position: relative;
    background-color: #080808;
}

.expand-sticky {
    position: sticky;
    top: 10%; /* Center relative vertically on screen */
    height: 80vh; 
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.expand-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Initial small centered rectangle */
    clip-path: inset(20% 30% 20% 30%); /* Will be animated via JS scroll */
    transition: clip-path 0.1s ease-out; /* Smooth snapping if any */
}

.expand-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* Slight drift for look */
}

.expand-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%); /* Initial slide-up position */
    width: 85%;
    max-width: 1100px;
    text-align: center;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 5;
    /* Glassmorphism Frame for Readability */
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 40px;
    border-radius: 4px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.expand-h3 {
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin: 0; /* Reset all margins */
    margin-bottom: 0px; 
    letter-spacing: 3px;
}

.expand-h2 {
    font-size: 4.2rem;
    font-weight: 900;
    margin: 0; /* Reset browser default margin-top */
    margin-bottom: 40px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.expand-h2 .accent {
    color: var(--accent-color);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.expand-body {
    font-size: 1.35rem; /* Increased readability size */
    line-height: 1.65; /* Reduced from 2.0 to be tighter */
    color: rgba(255, 255, 255, 0.9);
    max-width: 900px;
    margin: 0 auto;
    word-break: keep-all;
    font-weight: 400;
}

.expand-body p {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .expand-overlay-text { padding: 40px 20px; width: 92%; }
    .expand-h3 { font-size: 1.1rem; }
    .expand-h2 { font-size: 2.2rem; margin-bottom: 25px; }
    .expand-body { font-size: 1rem; line-height: 1.6; }
}

/* Tech Section (Updated Info Section) */
.tech-section {
    padding: 150px 0;
    background-color: #000;
}

.tech-header {
    text-align: center;
    margin-bottom: 100px;
}

.tech-header h2 {
    font-size: 1.7rem; /* Increased from 1.2rem */
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 3px;
    margin: 0;
    margin-bottom: 2px; /* Reduced from 15px for tight grouping */
}

.tech-header h3 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.2;
    word-break: keep-all;
    white-space: nowrap; /* Force one line */
    margin: 0; /* Reset all browser margins */
}

.tech-header p {
    font-size: 1.15rem; /* Slightly larger */
    color: #999; /* Brighter than #666 */
    max-width: 900px;
    margin: 5px auto 0; /* Minimized from 10px */
    line-height: 1.8;
}

.tech-category-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 80px 0 40px;
    padding-left: 20px;
    border-left: 6px solid var(--accent-color);
    text-transform: uppercase;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.tech-card {
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.tech-card-bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    opacity: 0.05;
    transition: all 0.6s ease;
    z-index: -1;
    pointer-events: none;
}

.tech-card:hover {
    border-color: #333;
    background: #141414;
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.tech-card:hover .tech-card-bg-icon {
    opacity: 0.15;
    transform: translate(-50%, -65%); /* Lift effect */
}

.tech-card .top-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 30px;
    transition: 0.5s ease;
}

.tech-card:hover .top-icon {
    transform: translateY(-5px);
}

.tech-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.tech-card h5 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.tech-card p {
    font-size: 1.05rem; /* Increased from 0.95rem */
    color: #ccc; /* Brighter than #888 for better readability */
    line-height: 1.7;
    word-break: keep-all;
}

@media (max-width: 1024px) {
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-header h3 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .tech-grid { grid-template-columns: 1fr; }
    .tech-header h3 { font-size: 2rem; }
}

.text-center { text-align: center; }

/* Product Section */
.product-section {
    background: #000;
    padding: 120px 0 0 0;
}

.main-product-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 80px;
    letter-spacing: -1px;
    text-transform: uppercase;
    /* Reveal state */
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease;
}

.main-product-title.reveal {
    opacity: 1;
    transform: translateY(0);
}

.product-subsection {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin-bottom: 150px;
}

.sub-product-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 5px solid #fff;
    letter-spacing: 2px;
    /* Initial state for animation */
    opacity: 0;
    transform: translateX(-40px);
    transition: 0.7s ease;
}

.sub-product-title.reveal {
    opacity: 1;
    transform: translateX(0);
}

.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0; /* 모든 여백 제거 요청 반영 */
    overflow: hidden;
}

.product-item {
    position: relative;
    overflow: hidden;
    background: #000;
    /* Initial state for image animation */
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.7s ease, opacity 0.7s ease;
}

.product-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay for grid items */
/* Local staggering if items hit threshold together */
.product-item.reveal:nth-child(2) { transition-delay: 0.15s; }
.product-item.reveal:nth-child(4) { transition-delay: 0.15s; }

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.85);
}

.product-name {
    position: absolute;
    bottom: 40px;
    left: 40px;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    z-index: 10;
    margin: 0;
    pointer-events: none;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-item:hover .product-name {
    transform: translateY(-10px);
    color: var(--accent-color);
}

/* Window Film Grid Specific (3 items layout) */
.wf-full-width {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .wf-full-width {
        grid-column: auto;
    }
}

.product-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s ease;
    z-index: 2;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-item:hover .product-img {
    transform: scale(1.05); /* Hover 확대 유지 */
}

.grid-btn {
    padding: 15px 35px;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    transition: 0.3s;
}

.grid-btn:hover {
    background: #fff;
    color: #000;
}

/* 공통 푸터 (심사용 사업자 표기 포함 — 제거 시 footer.php 편집) */
.site-footer {
    padding: 28px 16px 32px;
    background: #000;
    border-top: 1px solid #1a1a1a;
}

.footer-business {
    font-size: 11px;
    line-height: 1.6;
    color: #777;
    margin: 0 0 10px;
    word-break: keep-all;
}

.footer-copy {
    font-size: 12px;
    color: #666;
    margin: 0;
}
