/* --- Global Styles & Variables --- */
:root {
    --primary-color: #F15A24;
    --secondary-color: #8CB2D1;
    --highlight-bg: #FCEE21;
    --dark-bg: #3C3D42;
    --darker-bg: #343438;
    --light-gray-bg: #E6E7ED;
    --text-dark: #464646;
    --text-light: #FFFFFF;
    --text-gray: #CCCCCC;
    --font-primary: 'Noto Sans KR', sans-serif;
    --font-secondary: Arial, Helvetica, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--text-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 40px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 5px;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--text-dark);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    padding: 20px 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo img {
    height: 44px;
    transition: height 0.3s ease;
}

.navbar.scrolled .navbar-logo img {
    height: 35px;
}

.navbar-menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: var(--secondary-color);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}


.hero-section {
    position: relative;
    width: 100%;
    /* 
      1. 높이를 0으로 설정합니다. 
      2. padding-bottom으로 16:9 비율의 높이를 만듭니다. (9 / 16 = 0.5625)
    */
    height: 0;
    padding-bottom: 56.25%;
    background-color: #000;
}

.video-container {
    /* 
      3. hero-section이 만든 비율 있는 공간 전체를 차지하도록 absolute 설정합니다.
    */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container iframe {
    /* 
      4. video-container 안을 완벽하게 채웁니다.
    */
    width: 100%;
    height: 100%;
    border: 0; /* 혹시 모를 테두리 제거 */
}

/* --- About Section --- */
.about-section {
    padding: 100px 0;
    background-color: var(--highlight-bg);
}

.about-content {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    background-color: var(--text-light);
    padding: 40px;
}

.about-text, .about-award {
    flex: 1;
}

.about-text h3 {
    font-family: var(--font-secondary);
    font-size: 38px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 20px;
}

.about-text .highlight {
    color: var(--primary-color);
}

.about-text p {
    font-size: 15px;
    line-height: 2;
}

.about-award {
    text-align: right;
}

.about-award img {
    width: 82px;
    margin-bottom: 20px;
}

.about-award h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}
.about-award p {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.about-image img {
    width: 100%;
    display: block;
}

/* --- System & Works Section --- */
.system-section, .works-section {
    padding: 100px 0;
    background-color: var(--light-gray-bg);
}

.system-image {
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.works-lists {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
    font-size: 15px;
}
.works-lists ul {
    list-style: none;
    flex: 1;
    padding: 0 10px;
}
.works-lists li {
    line-height: 2;
}

/* Works Grid 캡션 정렬 문제 해결 */
.works-grid-container {
    position: relative;
    max-width: 1048px;
    margin: 0 auto;
}
.works-grid-image {
    width: 100%;
    display: block;
    /* 캡션이 이미지 위에 올라가야 하므로 z-index 설정 */
    position: relative;
    z-index: 1;
}
.works-caption-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 원본 이미지 비율에 맞게 행 높이 설정 */
    grid-template-rows: 19% 19% 19% 19% 19%;
    gap: 1.5%; /* 행 사이 간격 */
}
.caption {
    display: flex;
    align-items: flex-end; /* 텍스트를 셀 바닥에 정렬 */
    justify-content: center; /* 텍스트를 수평 중앙 정렬 */
    padding-bottom: 2%; /* 바닥에서 약간 띄움 */
    text-align: center;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 0;
}

.contact-wrapper {
    display: flex;
    gap: 30px;
}

.contact-info {
    flex-basis: 45%;
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}
.info-item img {
    width: 40px;
    height: 40px;
}
.info-item p {
    font-size: 15px;
}

.contact-form {
    flex-basis: 55%;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 400;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--text-dark);
    font-size: 14px;
    font-family: var(--font-primary);
    background-color: transparent;
}
.form-group input:focus, .form-group textarea:focus {
    outline: 1px solid var(--secondary-color);
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--dark-bg);
    background-color: transparent;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    float: right;
}
.btn:hover, .btn:disabled {
    background-color: var(--dark-bg);
    color: var(--text-light);
}
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Footer --- */
.footer {
    color: var(--text-gray);
    text-align: center;
    font-size: 12px;
}
.footer-top {
    background-color: var(--dark-bg);
    padding: 20px 0;
    position: relative;
    height: 113px;
}
.scroll-to-top {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: inline-block;
    width: 45px;
    height: 45px;
    background-color: var(--darker-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}
.scroll-to-top svg {
    fill: var(--text-gray);
    width: 25px;
    height: 25px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.scroll-to-top:hover svg {
    opacity: 0.85;
}
.footer-main {
    background-color: var(--darker-bg);
    padding: 20px 0;
}
.footer-bottom {
    background-color: var(--darker-bg);
    padding: 0 10px 20px 10px;
    font-size: 10px;
    line-height: 1.5;
    opacity: 0.7;
    word-break: keep-all; 
}
.footer-divider {
    display: inline-block;
    width: 2em;
}

/* --- Responsive Styles --- */
@media (max-width: 1050px) {
    .section-title { font-size: 30px; }
    .about-text h3 { font-size: 30px; }
    .contact-wrapper { flex-direction: column; }
    .works-caption-grid { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }

    .navbar-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        background-color: var(--dark-bg);
        flex-direction: column;
        padding-top: 80px;
        transition: right 0.4s ease-in-out;
    }
    .navbar-menu.active {
        display: flex;
        right: 0;
    }
    .navbar-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    .navbar-menu li a {
        display: block;
        padding: 15px 20px;
        color: var(--text-light);
        text-align: right;
    }
    .navbar-menu li a:hover {
        background-color: var(--darker-bg);
    }

    .hamburger-menu {
        display: block;
        z-index: 1001;
    }
    .hamburger-menu.active span {
        background-color: var(--text-light);
    }
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-content {
        flex-direction: column;
        padding: 20px;
    }
    .about-award {
        text-align: left;
    }
    .works-lists {
        flex-direction: column;
    }
    
    .contact-info {
        padding: 30px 20px;
    }
    
    .footer-divider {
        display: block;
        height: 0.5em;
    }
}