@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Noto+Serif+KR:wght@700&family=Montserrat:wght@600;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #8D6E63;
    --gray-text: #666666;
    --border-color: #eeeeee;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --hero-overlay: rgba(0, 0, 0, 0.35);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: absolute;
    width: 100%;
    z-index: 10;
    background: transparent;
    left: 50%;
    transform: translateX(-50%);
}

header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #333;
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    transition: var(--transition);
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--accent-color);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Main Layout */

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 5rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 투명도를 0.2 -> 0.4 로, 0.5 -> 0.7 로 올려서 글자 가독성 확보 */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-content h2 {
    /* 기존 손글씨체 대신 명조체 적용 (Noto Serif KR) */
    font-family: 'Noto Serif KR', serif;
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 4rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

/* Content Container */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

/* Advanced Bento Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
}

.service-card {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: none;
}

/* Desktop Logic */
@media (min-width: 1024px) {

    /* 1. Remodeling (2x2) */
    .service-card:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* 3. 3D Design (2x1) */
    .service-card:nth-child(3) {
        grid-column: span 2;
    }

    /* 7. Lighting (2x1) */
    .service-card:nth-child(7) {
        grid-column: span 2;
    }
}

/* Tablet (2 cols) */
@media (max-width: 1023px) and (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 300px;
    }

    .service-card:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* Mobile Optimization */
@media (max-width: 767px) {

    /* 1. 헤더 레이아웃 변경 */
    header {
        position: relative;
        /* absolute에서 relative로 변경하여 본문을 밀어내도록 함 */
        flex-direction: column;
        /* 세로 정렬 */
        padding: 1.5rem 1rem;
        /* 패딩 축소 */
        background-color: #ffffff;
        /* 배경색 흰색 지정 (겹침 방지) */
        transform: none;
        left: auto;
        gap: 1.5rem;
        /* 로고와 메뉴 사이 간격 */
    }

    header h1 {
        font-size: 1.2rem;
    }

    /* 2. 네비게이션 메뉴 조정 */
    nav {
        display: flex;
        flex-wrap: wrap;
        /* 줄바꿈 허용 */
        justify-content: center;
        /* 가운데 정렬 */
        gap: 15px 20px;
        /* 상하 15px, 좌우 20px 간격 */
        width: 100%;
    }

    nav a {
        font-size: 0.9rem;
        /* 글자 크기 약간 축소 */
        white-space: nowrap;
        /* 글자 줄바꿈 방지 */
    }

    /* 3. 본문 여백 조정 */
    /* 헤더가 relative로 변했으므로 padding-top 불필요, 대신 시각적 균형 맞춤 */

    /* Hero Section (메인) 텍스트 크기 조정 */
    .hero-content h2 {
        font-size: 2rem;
        word-break: keep-all;
        /* 단어 단위 줄바꿈 */
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* 회사소개 등 서브페이지 제목 마진 조정 */
    .section-header {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    /* Bento Grid 모바일 최적화 (한 줄로 쌓기) */
    .services-grid,
    .cases-grid {
        grid-template-columns: 1fr;
        /* 1열 */
        grid-auto-rows: auto;
        /* 높이 자동 (컨텐츠에 맞춤) */
        gap: 2rem;
    }

    /* PC에서 크게 잡았던 카드들도 모바일에선 1칸만 차지하게 초기화 */
    .service-card:nth-child(1),
    .service-card:nth-child(3),
    .service-card:nth-child(6),
    .service-card:nth-child(7) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Service Card Hover & Info */
.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    z-index: 2;
}

.service-card:hover img {
    transform: scale(1.1);
}

.service-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    color: white;
    transform: translateY(10px);
    opacity: 0.9;
    transition: var(--transition);
}

.service-card:hover .service-info {
    transform: translateY(0);
    opacity: 1;
}

.service-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.service-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.case-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    height: 380px;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.case-card:hover img {
    transform: scale(1.08);
}

.case-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: white;
}

.case-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.case-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ---------------------------------------------------------
   [Contact Form Upgrade] 문의 폼 디자인 고도화
   - 전체적인 둥근 느낌(Border-radius) 통일
   - 포커스 시 애니메이션 효과 강화
   --------------------------------------------------------- */

/* 폼 컨테이너 스타일 */
.contact-form {
    background: white;
    padding: 3rem;
    /* 여백 넉넉하게 */
    border-radius: 24px;
    /* 카드보다 더 둥글게 */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    /* 깊은 그림자 */
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.contact-form h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* 입력창 스타일 변경 */
.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #f0f0f0;
    /* 테두리 연하게 */
    border-radius: 12px;
    /* 둥근 모서리 */
    font-size: 1rem;
    background-color: #fafafa;
    /* 아주 연한 회색 배경 */
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 입력창 클릭(포커스) 시 효과 */
.form-group input:focus,
.form-group textarea:focus {
    background-color: #fff;
    border-color: var(--accent-color);
    /* 포인트 컬러 */
    box-shadow: 0 0 0 4px rgba(141, 110, 99, 0.1);
    /* 은은한 번짐 효과 */
    outline: none;
}

.form-group textarea {
    height: 180px;
    /* 높이 조금 더 확보 */
    resize: none;
    /* 크기 조절 막기 (디자인 유지) */
}

/* 버튼 스타일 업그레이드 */
.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--accent-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-top: 1rem;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background-color: #6d4c41;
    /* 더 진한 색 */
    transform: translateY(-3px);
    /* 살짝 떠오름 */
    box-shadow: 0 10px 20px rgba(141, 110, 99, 0.3);
    /* 그림자 */
}

/* 오시는 길 박스 디자인 */
.contact-info-box {
    background: #f8f9fa;
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    border: 1px solid #eee;
}

.contact-info-box h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1.5rem;
    color: #333;
}

.contact-details p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* About Page (Team Grid) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-box {
    background: white;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.team-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--hover-shadow);
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--gray-text);
    font-size: 0.9rem;
    background: #f5f5f7;
}

/* CMS Content Font Sizes */
.blog-content .cms-fs-12 {
    font-size: 12px;
    line-height: 1.6;
}

.blog-content .cms-fs-14 {
    font-size: 14px;
    line-height: 1.6;
}

.blog-content .cms-fs-16 {
    font-size: 16px;
    line-height: 1.6;
}

.blog-content .cms-fs-18 {
    font-size: 18px;
    line-height: 1.6;
}

.blog-content .cms-fs-20 {
    font-size: 20px;
    line-height: 1.5;
}

.blog-content .cms-fs-24 {
    font-size: 24px;
    line-height: 1.4;
}

.blog-content .cms-fs-28 {
    font-size: 28px;
    line-height: 1.4;
}

.blog-content .cms-fs-30 {
    font-size: 30px;
    line-height: 1.4;
}

.blog-content .cms-fs-32 {
    font-size: 32px;
    line-height: 1.4;
}

.blog-content .cms-fs-36 {
    font-size: 36px;
    line-height: 1.4;
}

.blog-content .cms-fs-48 {
    font-size: 48px;
    line-height: 1.3;
}

.blog-content .cms-fs-60 {
    font-size: 60px;
    line-height: 1.2;
}

.blog-content .cms-fs-72 {
    font-size: 72px;
    line-height: 1.1;
}

/* ==========================================================================
   [PC/모바일 공통] 레이아웃 겹침 방지 (최종 수정)
   ========================================================================== */

/* 1. PC: 모든 페이지의 main에 상단 여백(padding)을 주어 헤더 공간 확보 */
main {
    padding-top: 160px;
    display: block;
}

/* 2. PC: 단, 메인 페이지의 .hero-section은 이미지가 헤더 뒤에 깔려야 하므로
      매이너스 마진으로 다시 올려줌 */
.hero-section {
    margin-top: -160px;
}

/* 3. 모바일 화면: 헤더 디자인 변경 및 여백 재조정 */
@media (max-width: 767px) {

    /* 모바일 헤더: 흰색 배경, 일반 배치(relative) */
    header {
        position: relative !important;
        background-color: #ffffff !important;
        transform: none !important;
        left: auto !important;
        padding: 1rem !important;
        flex-direction: column !important;
        gap: 1rem !important;
        height: auto !important;
    }

    /* 모바일에서는 헤더가 자리를 차지하므로, PC용 패딩/마진 초기화 */
    main {
        padding-top: 0 !important;
    }

    .hero-section {
        margin-top: 0 !important;
    }
}

/* ==========================================================================
   [V2 Gallery] Tag Chips (Pills) Style
   ========================================================================== */

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.8rem 0 1.2rem;
}

.tag-chip {
    display: inline-block;
    padding: 3px 14px;
    margin-right: 6px;
    margin-bottom: 4px;
    background-color: #f1f3f5;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    white-space: nowrap;
    transition: var(--transition);
}

.tag-chip:hover {
    background-color: #e9ecef;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Interior Gallery Post adaptation */
.blog-article .tag-chip {
    background-color: #f1f3f5;
    color: #495057;
    border-color: #dee2e6;
}

.space-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #333;
}

/* --- V2 Summary Area (Top of Post) --- */
.v2-summary {
    background: #fdfdfd;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.v2-summary .one-liner {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.v2-summary .exec {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

/* --- Space Group Layout --- */
.space-group {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.space-group:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.img-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s;
}

.img-wrapper:hover img {
    transform: scale(1.05);
}

.space-summary {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
}

/* --- Project Meta Footer (Tags at bottom) --- */
.project-tag-footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 2rem;
}

.project-tag-footer .tag-container {
    margin-top: 0;
    margin-bottom: 0;
}