/* =============== 기본 설정 =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    overflow-x: hidden;
}

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

/* =============== 부드러운 스크롤 효과 =============== */
html {
    scroll-behavior: smooth;
}

/* =============== 고정 네비게이션 =============== */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1976d2;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-logo a:hover {
    color: #1565c0;
    transform: translateY(-1px);
}

.nav-logo i {
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #1976d2;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #1976d2;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
    font-weight: 600;
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #1976d2;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* =============== 프로젝트 상세 페이지 =============== */
.project-detail {
    padding: 140px 0 80px; /* 네비게이션 높이만큼 상단 여백 추가 */
    min-height: 100vh;
}

.back-button {
    margin-bottom: 2rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

/* =============== 새로운 프로젝트 헤더 =============== */
.project-header-new {
    text-align: center;
    margin-bottom: 60px;
    padding: 50px 40px;
    border-radius: 16px;
}

.project-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3498db 0%, #3498db 100%);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.project-title-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.2;
}

.project-subtitle-main {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 500;
    font-style: italic;
}

/* =============== 섹션 카드 =============== */
.section-card {
    margin-bottom: 40px;
    padding: 40px;
    border-radius: 16px;
    scroll-margin-top: 90px; /* 스크롤 오프셋 조정 */
}

.section-header-new {
    margin-bottom: 30px;
}

.section-title-new {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.section-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* =============== 프로젝트 소개 전용 레이아웃 =============== */
.intro-showcase-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* =============== 기능 소개 레이아웃 (모든 섹션 동일하게: 이미지 왼쪽, 내용 오른쪽) =============== */
.features-showcase {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.feature-showcase-item {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 이미지 2, 내용 1 비율 (시연 영상과 동일) */
    gap: 30px;
    align-items: start;
}

/* 지그재그 배치 제거 - 모든 섹션이 동일한 배치 */
/* .feature-showcase-item:nth-child(even) 관련 스타일 모두 제거 */

.feature-description {
    padding: 20px 0;
}

.feature-description h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.feature-details {
    margin-bottom: 20px;
}

.feature-details:last-child {
    margin-bottom: 0;
}

.feature-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.feature-description p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.feature-description p:last-child {
    margin-bottom: 0;
}

/* =============== 통합된 이미지 스타일 =============== */
.feature-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    padding: 0;
    overflow: hidden;
}

.feature-screenshot {
    width: 100%;
    height: auto;
    max-height: 450px;
    min-height: 300px;
    object-fit: contain;
    display: block;
}

/* =============== 메인 이미지 + 썸네일 갤러리 스타일 =============== */
.feature-image-with-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    background: white;
    padding: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.1);
}

.main-image-container {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    min-height: 250px;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
    border-color: #42a5f5;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #1976d2;
    opacity: 1;
    box-shadow: 0 2px 10px rgba(25, 118, 210, 0.3);
}

/* =============== 프로젝트 개요 테이블 개선 (하늘색 통일) =============== */
.project-overview-table {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e3f2fd;
}

.overview-row {
    display: flex;
    border-bottom: 1px solid #e3f2fd;
    transition: background-color 0.2s ease;
}

.overview-row:last-child {
    border-bottom: none;
}

.overview-row:hover {
    background-color: #f8fbff;
}

.overview-label {
    min-width: 100px;
    color: #1976d2;
    padding: 18px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    border-right: 2px solid #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.overview-content {
    padding: 18px 20px;
    background: white;
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 70px;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.role-tag {
    color: rgba(30, 136, 229);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 0 3px rgba(30, 136, 229);
    transition: all 0.3s ease;
    border: none;
}

.role-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.35);
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
}

/* =============== 단일 이미지 컨테이너 (아키텍처, 워크플로우용) =============== */
.single-image-container {
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    padding: 0;
    overflow: hidden;
}

.single-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    min-height: 400px;
    object-fit: contain;
    display: block;
}

/* =============== 시연 영상 전용 스타일 (동영상 왼쪽) =============== */
.demo-showcase-item {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2:1 비율, 동영상이 왼쪽 */
    gap: 30px;
    align-items: start;
}

.demo-video-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.demo-iframe-large {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 12px;
    display: block;
}

.demo-description-compact {
    padding: 20px 0;
}

.demo-description-compact .feature-details {
    margin-bottom: 20px;
}

.demo-description-compact .feature-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 10px;
    display: block;
}

.demo-description-compact p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* =============== 푸터 =============== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

/* =============== 반응형 네비게이션 =============== */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(52, 152, 219, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 30px;
        justify-content: flex-start;
        border-radius: 0;
        border-bottom: 1px solid rgba(52, 152, 219, 0.05);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        background: rgba(52, 152, 219, 0.05);
        transform: none;
    }
    
    .nav-toggle {
        display: flex;
    }
}

/* =============== 반응형 디자인 =============== */
@media (max-width: 768px) {
    .project-title-main {
        font-size: 2rem;
    }
    
    .section-card {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .intro-showcase-item {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .feature-showcase-item {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .demo-showcase-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-description h3 {
        font-size: 1.2rem;
    }
    
    .feature-description p {
        font-size: 0.9rem;
    }
    
    .feature-screenshot {
        max-height: 300px;
    }
    
    .demo-iframe-large {
        height: 350px;
    }
    
    .single-image {
        min-height: 250px;
        max-height: 400px;
    }
    
    .overview-row {
        flex-direction: column;
    }
    
    .overview-label {
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #90caf9;
        padding: 15px;
        text-align: center;
    }
    
    .overview-content {
        padding: 15px;
    }
    
    .role-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .feature-image-with-gallery {
        padding: 10px;
    }
    
    .main-image {
        max-height: 300px;
        min-height: 200px;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .thumbnail-gallery {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-logo a {
        font-size: 1rem;
    }
    
    .nav-link {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .project-detail {
        padding: 120px 0 80px;
    }
    
    .project-header-new {
        padding: 30px 20px;
    }
    
    .project-title-main {
        font-size: 1.8rem;
    }
    
    .project-subtitle-main {
        font-size: 1.1rem;
    }
    
    .demo-iframe-large {
        height: 250px;
    }
    
    .feature-screenshot {
        min-height: 200px;
        max-height: 250px;
    }
    
    .single-image {
        min-height: 200px;
        max-height: 300px;
    }
    
    .overview-label {
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .overview-content {
        padding: 12px;
    }
    
    .role-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .role-tags {
        gap: 6px;
    }
    
    .main-image {
        max-height: 250px;
        min-height: 150px;
    }
    
    .thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .thumbnail-gallery {
        gap: 6px;
    }
}
