/* ========================================= */
/* --- 1. 기본 설정 (Reset & Defaults) --- */
/* ========================================= */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================= */
/* --- 2. 공통 레이아웃 (Wrappers) --- */
/* ========================================= */

/* 헤더 & 푸터 공통 래퍼 */
.header-container,
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-container {
    margin: 0 auto;
    padding: 40px 0;
}

/* ========================================= */
/* --- 3. 헤더 (.site-header) --- */
/* ========================================= */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    width: 100%; 
    box-sizing: border-box;
}

.site-header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ========================================= */
/* --- 4. 메인 내비게이션 (.main-navigation) --- */
/* ========================================= */
.main-navigation {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.main-navigation li {
    margin-left: 25px;
}

.main-navigation a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    padding: 10px 0;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

/* ========================================= */
/* --- 5. 언어 스위처 (.lang-switcher) --- */
/* ========================================= */
.lang-switcher {
    white-space: nowrap;
}

.lang-switcher a {
    text-decoration: none;
    color: #000;
    font-weight: 400;
    padding: 2px;
}

.lang-switcher a.active {
    color: #007bff;
    text-decoration: none;
}

/* ========================================= */
/* --- 6. 메인 콘텐츠 (.main-content) --- */
/* ========================================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

/* 서브페이지 제목 스타일 */
.page-container h1 { font-size: 2.5rem; color: #000; }
.page-container h2 { font-size: 2.0rem; color: #333; }
.page-container h3 { font-size: 1.5rem; color: #555; }

/* ========================================= */
/* --- 7. 푸터 (.site-footer) --- */
/* ========================================= */
.site-footer {
    background-color: #151515;
    color: #aaa;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

/* ========================================= */
/* --- 8. 메인 페이지 히어로 (.page-main-hero) --- */
/* ========================================= */
.page-main-hero {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(21, 21, 21, 0.7);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    font-weight: 400;
}

.hero-content h1 {
    font-size: 50px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 0;
}

.hero-content .subtitle {
    font-style: italic;
    font-weight: 300;
    font-size: 1.5rem;
    color: #f0f0f0;
    margin: 0 auto;
    margin-top: 30px;
}

.page-main-hero h1 { /* 메인 페이지 H1만 다르게 */
    font-size: 67px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-main-hero .main-subtitle { /* 메인 페이지 부제목 */
    font-size: 26px;
    font-weight: 300;
    color: #f0f0f0;
    margin-bottom: 40px;
}

.hero-content .contact-prompt {
    font-size: 16px;
    line-height: 1.5;
    color: #c0c0c0;
}

.hero-content .contact-prompt p { margin: 5px 0; }

.hero-content .contact-prompt a {
    color: #ddd;
    text-decoration: underline;
}

.hero-content .contact-prompt a:hover { color: #007bff; }

/* ========================================= */
/* --- 9. 햄버거 메뉴 --- */
/* ========================================= */
.menu-toggle {
    display: none;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    flex-direction: column;
    justify-content: space-between;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 열린 햄버거 메뉴 스타일 */
.main-navigation.is-active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    z-index: 1001;
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
    flex-direction: column;
}

.main-navigation.is-active ul {
    flex-direction: column;
    width: 100%;
}

.main-navigation.is-active li {
    margin-left: 0;
    width: 100%;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.main-navigation.is-active a {
    display: block;
    padding: 15px;
    border-bottom: none;
}

.main-navigation.is-active a:hover,
.main-navigation.is-active a.active {
    border-bottom: none;
}

/* ========================================= */
/* --- 10. 서브 페이지 히어로 공통 스타일 --- */
/* ========================================= */
.subpage-hero {
    height: 40vh;
    min-height: 250px;
    position: relative; /* 자식 요소의 absolute 위치를 위한 기준 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    /* 패럴랙스 효과를 위한 배경 이미지 속성 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ========================================= */
/* --- 11. 미션 페이지 --- */
/* ========================================= */

/* 히어로 섹션 (배경 이미지) */
.mission-hero {
    background-image: url('../images/mission/bg.jpg');
}

/* ========================================= */
/* --- 12. 팀 페이지 --- */
/* ========================================= */

.team-hero {
    background-image: url('../images/team/bg.jpg');
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.team-member {
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    text-align: left;
    background-color: #fff;
}

.team-member img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #f0f0f0;
}

.team-member h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 15px 20px 5px 20px;
    color: #000;
    line-height: 1.4;
}

.team-role {
    display: block;
    font-size: 0.9rem;
    color: #007bff;
    font-weight: 500;
    margin: 0 20px 15px 20px;
    line-height: 1.4;
}

.team-member p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 20px 20px 20px;
    padding-left: 0;
}

/* ========================================= */
/* --- 13. 기술 페이지 --- */
/* ========================================= */

.tech-hero {
    background-image: url('../images/tech/bg.jpg');
}

.product-list {
    max-width: 1100px;
    margin: 0 auto;
}

.product-item {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
}

.product-item.image-left { /* 기본 */ }
.product-item.image-right { flex-direction: row-reverse; }

.product-visual {
    flex: 1 1 45%;
    min-width: 300px;
}

.product-visual video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-text {
    flex: 1 1 55%;
    text-align: left;
}

.product-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #000;
    margin-top: 0;
    margin-bottom: 5px;
}

.product-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0070C0;
    margin-top: 0;
    margin-bottom: 2px;
}

.product-text p {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    color: #555;
}

.product-text p strong {
    font-weight: 600;
}

/* 유튜브 링크 블록 */
.product-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 0 0; 
}
.product-link-icon {
    width: 20px; 
    height: 20px;
    stroke: #007bff; /* 아이콘 색상 (파란색) */
    flex-shrink: 0;
}
.product-link {
    font-size: 0.95rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.product-link:hover {
    text-decoration: underline;
}

/* ========================================= */
/* --- 14. 채용 페이지 --- */
/* ========================================= */

.recruit-hero {
    background-image: url('../images/recruiting/bg.jpg');
}

.hiring-shoutout {
    font-size: 2.5rem;
    font-weight: 600;
    color: #007bff;
    text-align: center;
    margin-bottom: 30px;
}

.divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px auto;
    width: 80%;
    max-width: 800px;
}

.page-recruit-content h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
    margin-top: 0;
}

.job-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto;
}

.job-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.job-item:last-child { border-bottom: none; }

.job-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 모바일에서 줄바꿈을 위해 유지 */
    width: 100%;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    max-width: calc(100% - 130px);
    margin-right: 20px;
}

.job-link {
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #007bff;
    border-radius: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex; /* 텍스트와 SVG 아이콘을 한 줄에 나열 */
    align-items: center; /* 세로 중앙 정렬 */
    gap: 5px; /* 텍스트와 아이콘 사이 간격 */
}
/* 마우스(호버) 사용이 가능한 기기에서만 hover 스타일 적용 */
@media (hover: hover) {
    .job-link:hover {
        background-color: #007bff;
        color: #ffffff;
    }
}
.job-link-icon {
    width: 15px; /* 아이콘 크기 조정 */
    height: 15px;
    transition: transform 0.3s ease; /* 회전 애니메이션 */
    fill: none;
    stroke: currentColor; /* 부모의 color 속성을 따라감 */
    transform: rotate(0deg); /* 기본은 아래쪽 */
    display: block; /* SVG 기본 정렬 문제 해결 */
}
.job-link.is-open {
    background-color: #007bff;
    color: #ffffff;
}
.job-link.is-open .job-link-icon {
    transform: rotate(180deg); /* 위쪽으로 180도 회전 */
}
.job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out, margin 0.5s ease-out;
    padding: 0 20px;
    margin-top: 0;
    box-sizing: border-box;
    background-color: #fafafa;
    border-radius: 4px;
}

.job-details.is-open {
    max-height: 1500px; /* (충분히 큰 값) */
    padding: 20px 20px 20px 20px;
    margin-top: 20px;
}

.job-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-top: 0;
    margin-bottom: 10px;
}
.job-details ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0 0 20px 0;
}
.job-details li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 8px;
}
.job-details p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

.job-inquiry-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px; /* 위쪽 리스트와의 간격 */
    padding-top: 20px; /* 박스 내부 상단 패딩 */
    border-top: 1px solid #e0e0e0; /* 구분선 */
}

.job-inquiry-icon {
    width: 24px; 
    height: 24px;
    stroke: #007bff; /* 아이콘 색상 (파란색) */
    flex-shrink: 0; /* 아이콘이 찌그러지지 않도록 */
}

.job-inquiry-text {
    display: flex;
    flex-direction: column;
}

.inquiry-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.inquiry-email {
    font-size: 0.95rem;
    color: #007bff;
    text-decoration: none;
}
.inquiry-email:hover {
    text-decoration: underline;
}

/* ========================================= */
/* --- 15. 연락처 페이지 --- */
/* ========================================= */

.contact-hero {
    background-image: url('../images/contact/bg.jpg');
}

.contact-details {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-item {
    margin-bottom: 40px;
}

.contact-item h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

.contact-item a {
    color: #007bff;
    text-decoration: none;
}
.contact-item a:hover { text-decoration: underline; }

/* ========================================= */
/* --- 16. 404 페이지 스타일 --- */
/* ========================================= */
.page-404 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

.page-404 h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.page-404 p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.page-404 a {
    display: inline-block;
    padding: 12px 25px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.page-404 a:hover {
    background-color: #0056b3;
}

/* ========================================= */
/* --- 17. 반응형 (Media Queries) --- */
/* ========================================= */

/* 넓은 데스크탑 (1150px 이상) */
@media (min-width: 1150px) {
    .team-member {
        min-width: 350px;
    }
}

/* PC 메뉴 (1024px 이상) */
@media (min-width: 1024px) {
    .main-navigation {
        max-height: none;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        position: static;
        background-color: transparent;
        border-bottom: none;
        box-shadow: none;
        width: auto;
    }
    .main-navigation ul {
        display: flex;
        flex-direction: row;
        width: auto;
    }
}

/* 태블릿 & 모바일 (1023px 이하) - 메뉴 숨김 / 햄버거 보임 */
@media (max-width: 1023px) {
    .main-navigation {
        max-height: 0;
        position: absolute;
        background-color: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        width: 100%;
        left: 0;
        top: 100%;
        opacity: 0;
        pointer-events: none;
    }
    .main-navigation.is-active {
        display: flex;
        flex-direction: column;
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
    }
    .menu-toggle {
        display: flex;
    }
    .main-navigation ul {
        display: none;
    }
    .main-navigation.is-active ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
}

/* 태블릿 (768px ~ 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* 공통 */
    .page-container { padding-left: 20px; padding-right: 20px; }
    .page-container h1 { font-size: 2.2rem; }
    /* 메인 */
    .page-main-hero h1 { font-size: 45px; }
    .page-main-hero .main-subtitle { font-size: 18px; }
    /* 서브페이지 히어로 공통 */
    .hero-content h1 { font-size: 42px; }
    .hero-content .subtitle { font-size: 1.25rem; }
    /* 팀 */
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    /* 기술 */
    .product-item { gap: 30px; }
    .product-text h2 { font-size: 1.6rem; }
    /* 채용 */
    .hiring-shoutout { font-size: 2.2rem; }
    .page-recruit-content h3 { font-size: 1.6rem; }
    .job-title { max-width: calc(100% - 130px); }
    /* 연락처 */
    /* (태블릿 연락처 스타일은 기본 스타일과 동일) */
}

/* 모바일 전체 (767px 이하) - 기술 페이지 레이아웃 변경 */
@media (max-width: 767px) {
.product-item,
    .product-item.image-right {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
    }
    .product-visual {
        min-width: unset;
        width: 100%;
        flex-basis: auto;
    }
    .product-text {
        flex-basis: auto;
        text-align: center;
    }
    .product-text h2 {
        font-size: 1.4rem;
    }
    .product-text p {
        font-size: 0.95rem;
    }
}

/* 작은 태블릿 & 큰 모바일 (600px ~ 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    /* 공통 */
    .page-container { padding-left: 20px; padding-right: 20px; }
    .page-container h1 { font-size: 2rem; }
    /* 메인 */
    .page-main-hero h1 { font-size: 38px; }
    .page-main-hero .main-subtitle { font-size: 19px; }
    /* 서브페이지 히어로 공통 */
    .hero-content h1 { font-size: 36px; }
    .hero-content .subtitle { font-size: 1.1rem; }
    /* 팀 */
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    /* 기술 (폰트 크기 조정) */
    /* (레이아웃은 max-width: 767px 에서 이미 처리됨) */
    /* 채용 */
    .hiring-shoutout { font-size: 2rem; }
    .page-recruit-content h3 { font-size: 1.5rem; }
    .job-title { max-width: calc(100% - 130px); }
    /* 연락처 */
    .contact-item h2 { font-size: 1.2rem; }
    .contact-item p { font-size: 1rem; }
}

/* 작은 모바일 (599px 이하) */
@media (max-width: 599px) {
    /* 공통 */
    .page-container { padding-left: 20px; padding-right: 20px; }
    .page-container h1 { font-size: 1.8rem; }
    /* 헤더 */
    .site-header { padding: 10px 0; }
    .logo img { height: 30px; }
    .controls-wrapper { justify-content: flex-end; width: auto; margin-top: 0; }
    .lang-switcher { margin-right: 15px; }
    .lang-switcher a { font-size: 0.9rem; padding: 1px; }
    .menu-toggle { width: 24px; height: 18px; margin-left: 10px; }
    .menu-toggle span { height: 2px; }
    /* 메인 */
    .page-main-hero h1 { font-size: 28px; }
    .hero-content .contact-prompt { font-size: 14px; }
    .page-main-hero .main-subtitle { font-size: 16px; }
    /* 서브페이지 히어로 공통 */
    .hero-content h1 { font-size: 32px; }
    .hero-content .subtitle { font-size: 1rem; }
    .subpage-hero { height: 30vh; min-height: 250px; }
    /* 팀 */
    .team-grid { grid-template-columns: 1fr; gap: 30px; padding: 0 15px; }
    /* 기술 (폰트 크기 조정) */
    .product-text h2 { font-size: 1.3rem; }
    /* 채용 */
    .hiring-shoutout { font-size: 1.8rem; }
    .page-recruit-content h3 { font-size: 1.4rem; }
    .job-item-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px; 
    }
    .job-item {
        padding: 20px 0; /* .job-item 자체의 패딩은 유지 */
    }
    .job-title { 
        max-width: 100%; 
        margin-right: 0; 
        margin-bottom: 5px; 
    }
    .job-link { 
        width: 100%; 
        /* [수정] 텍스트와 아이콘 중앙 정렬 */
        justify-content: center; 
        padding: 10px 15px; 
        box-sizing: border-box;
    }
    .job-link::after {
        right: 15px; /* 모바일에서도 동일하게 오른쪽에서 띄움 */
    }
    .job-details {
        padding: 0 10px;
    }
    .job-details.is-open {
        padding: 20px 10px 20px 10px;
    }
    /* 연락처 */
    .contact-item h2 { font-size: 1.1rem; }
    .contact-item p { font-size: 0.95rem; }
}