/* ================================================================
   [Works Detail 통합 스타일 - works_detail.css]
   ================================================================ */

/* 1. 전체 구조 및 시작점 통일 (works04.php 기준) */
.works-detail-snap {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    scroll-snap-align: none !important;
    justify-content: flex-start !important;
    padding-top: 140px !important; /* PC 시작점 */
    padding-bottom: 80px !important;
}

[id^="page-works0"] .sub-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
    text-align: center;
}

/* 2. 브레드크럼 및 텍스트 스타일 */
.works-breadcrumb { font-size: 1rem; margin-top: 0; margin-bottom: 18px; color: #aaa; text-align: center; }
.works-breadcrumb a { color: #aaa; text-decoration: none; transition: color 0.2s; }
.works-breadcrumb a:hover { color: #ff2c2c; }
.works-breadcrumb .current-noola { color: #ff2c2c; font-weight: 600; letter-spacing: 0.01em; }

.brand-desc, .brand-info-text, .brand-intro-text { 
    text-align: center; margin: 18px 0 24px 0; color: #a0a0a0; font-size: 1.13em; font-weight: 300; 
}
.vertical-divider { width: 2px; height: 32px; background: #fff; margin: 0 auto 18px auto; border-radius: 2px; }

/* 3. 상세 정보 그리드 */
.project-detail-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); row-gap: 24px; column-gap: 40px;
    max-width: 1200px; margin: 32px auto 50px auto; text-align: left;
}
.project-detail-item { display: flex; flex-direction: column; }
.project-detail-title { display: block; font-weight: 600; color: #fff; margin-bottom: 8px; font-size: 1.18em; text-align: left; }
.project-detail-body { color: #a0a0a0; font-weight: 300; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word; font-size: 1.04em; text-align: left; }

/* 4. 이미지 및 비디오 레이아웃 */
.works-image-wrapper { margin-top: 48px; text-align: left; }
.works-detail-img { width: 100%; max-width: 1200px; border-radius: 24px; display: block; margin: 0 auto; }

.video-container {
    position: relative; width: 100% !important; max-width: 1200px !important; height: auto;
    margin: 32px auto 0 auto !important; background: transparent !important;
    border-radius: 24px; overflow: hidden; padding: 0 !important;
    border: none !important; outline: none !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.custom-video, .video-container video {
    width: 100% !important; min-width: 100% !important; max-width: 1200px; height: auto !important;
    display: block !important; object-fit: contain !important;
    background: transparent !important; border: none !important; border-radius: 24px;
}

/* 5. 핵심 기능 구분선 */
.feature-divider-wrapper { display: flex; align-items: center; justify-content: center; margin: 48px 0; }
.horizontal-divider { flex: 1; height: 2px; background: #fff; opacity: 0.3; }
.core-feature-title { font-size: 2em; font-weight: 700; color: #fff; padding: 0 12px; margin: 0; }

/* 6. [추가] 목록으로 돌아가기 버튼 스타일 */
.back-btn-wrapper { margin-top: 80px; display: flex; justify-content: center; padding-bottom: 40px; }
.btn-back-list {
    display: inline-flex; align-items: center; gap: 10px; padding: 16px 40px;
    background: #ff2c2c; border: 1px solid #ff2c2c;
    border-radius: 40px; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn-back-list:hover { background: #fff; border-color: #fff; color: #ff2c2c; }

/* 7. 라이트 모드 */
body.light-mode [id^="page-works0"] .project-detail-title,
body.light-mode [id^="page-works0"] .core-feature-title,
body.light-mode [id^="page-works0"] h1 { color: #0b0b0b !important; }
body.light-mode [id^="page-works0"] .project-detail-body,
body.light-mode [id^="page-works0"] .brand-desc { color: #444 !important; }
body.light-mode [id^="page-works0"] .vertical-divider,
body.light-mode [id^="page-works0"] .horizontal-divider { background: #0b0b0b !important; }
body.light-mode .btn-back-list { background: #ff2c2c; border-color: #ff2c2c; color: #fff; }
body.light-mode .btn-back-list:hover { background: #fff; border-color: #fff; color: #ff2c2c; }

/* ================================================================
   [모바일 전용 최적화] 시작점 하향 조정 및 텍스트 크기 통일
   ================================================================ */
@media (max-width: 768px) {
    /* 1. 시작점 조금 더 아래로 조정 (기존 85px -> 105px) */
    .works-detail-snap { 
        padding-top: 105px !important; 
    }
    
    .works-breadcrumb { font-size: 13px !important; margin-bottom: 10px !important; }
    [id^="page-works0"] h1 { font-size: 32px !important; margin-bottom: 10px !important; }

    /* 2. works02, 03, 04 서브 텍스트 크기를 works01과 동일하게 14px로 통일 */
    .brand-desc, 
    .brand-info-text, 
    .brand-intro-text { 
        font-size: 14px !important; 
        margin: 10px 0 20px 0 !important; 
        line-height: 1.4 !important;
    }

    /* 상세 정보 그리드 및 기타 요소 유지 */
    .project-detail-grid { grid-template-columns: 1fr !important; row-gap: 20px !important; margin-top: 24px !important; }
    .project-detail-title { font-size: 16px !important; margin-bottom: 6px !important; }
    .project-detail-body { font-size: 14px !important; line-height: 1.5 !important; }
    .feature-divider-wrapper { margin: 30px 0 !important; }
    .core-feature-title { font-size: 22px !important; }
    .works-image-wrapper, .video-container { margin-top: 24px !important; }
    .back-btn-wrapper { margin-top: 50px !important; }
    .btn-back-list { padding: 12px 30px !important; font-size: 14px !important; }
}