/* style.css */

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f8f8f8;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}
header {
    background-color: #fff;
    padding: 5px 0;    /*메뉴바 위아래 여백 */
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative; /* 모바일 메뉴를 위한 기준점 */
    z-index: 1000; /* 다른 요소 위에 오도록 설정 */
}
header .logo {
    float: left;
    font-size: 2em;
    font-weight: bold;
    color: #0056b3;
    text-decoration: none;
    line-height: 1; /* 로고 높이 조정 */
}
header nav {
    float: right;
    margin-top: 10px;
}
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
header nav ul li {
    display: inline-block;
    margin-left: 20px;
}
header nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    transition: color 0.3s ease;
}
header nav ul li a:hover {
    color: #007bff;
}

/* 모바일 메뉴 버튼 (햄버거 메뉴) */
.menu-toggle {
    display: none; /* 데스크톱에서는 숨김 */
    font-size: 2em;
    cursor: pointer;
    float: right;
    margin-right: 15px;
    line-height: 1;
    color: #0056b3;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('http://googleusercontent.com/image_generation_content/0') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    background-attachment: fixed; /* Parallax 스크롤 효과 (선택 사항) */
}
.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
.hero p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
.hero .btn {
    background-color: #007bff;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}
.hero .btn:hover {
    background-color: #0056b3;
}

/* 회사 소개 스타일 */
.about-image {
    max-width: 80%; /* 컨테이너 너비의 80%로 제한 */
    height: auto; /* 비율 유지 */
    display: block; /* 블록 요소로 만들어 margin auto 적용 */
    margin: 0 auto 30px auto; /* 중앙 정렬 및 하단 여백 추가 */
    border-radius: 8px; /* 모서리 둥글게 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* 그림자 효과 */
}

/* 섹션 스타일 */
.section {
    padding: 60px 0;
    text-align: center;
}
.section:nth-of-type(even) {
    background-color: #f0f0f0;
}
.section h2 {
    font-size: 2.5em;
    color: #0056b3;
    margin-bottom: 40px;
    position: relative;
}
.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #007bff;
    margin: 15px auto 0;
    border-radius: 2px;
}
.section p {
    font-size: 1.15em; /* 기존보다 폰트 크기를 키움 */
    max-width: 800px;
    margin: 0 auto; /* 가운데 정렬을 위해 추가 */
}

/* 서비스 섹션 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.service-item h3 {
    color: #007bff;
    font-size: 1.8em;
    margin-bottom: 15px;
}
.service-item p {
    font-size: 1.1em;
    color: #666;
}
.service-item img {
    display: block; /* 이미지 자체를 블록 요소로 만들어 정렬 용이 */
    margin: 0 auto 7px auto; /* 가운데 정렬 및 하단 여백 */
    /* width와 height는 HTML에서 인라인 스타일로 지정했으므로 여기서는 생략 가능 */
    /* 만약 모든 아이콘에 동일한 크기를 적용하고 싶다면 여기에 지정 */
}

/* 성공 사례 섹션 */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.case-study-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.case-study-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.case-study-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out;
}
.case-study-content {
    padding: 25px;
}
.case-study-content h3 {
    color: #007bff;
    font-size: 1.5em;
    margin-bottom: 10px;
}
.case-study-content p {
    font-size: 1em;
    color: #666;
}

/* 클라이언트 로고 그리드 */
.clients-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
    align-items: center;
}

.client-logo-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    transition: transform 0.3s ease;
}
.client-logo-item:hover {
    transform: scale(1.05);
}

.client-logo-item img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.client-logo-item img:hover {
    filter: grayscale(0%);
}

.clients-section-image {
    max-width: 80%; /* 컨테이너 너비의 70%로 제한 */
    height: auto; /* 비율 유지 */
    display: block; /* 블록 요소로 만들어 margin auto 적용 */
    margin: 0 auto 30px auto; /* 중앙 정렬 및 하단 여백 추가 */
    border-radius: 8px; /* 모서리 둥글게 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* 그림자 효과 */
}

/* 문의 섹션 */
.contact-section {
    background-color: #0056b3;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}
.contact-section h2 {
    color: #fff;
}
.contact-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
}
.contact-section .btn {
    background-color: #fff;
    color: #0056b3;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.contact-section .btn:hover {
    background-color: #eee;
    color: #003f80;
}

/* 푸터 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}
footer p {
    margin: 0;
}
footer a {
    color: #007bff;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* clearfix */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* style.css */

/* ... (기존 style.css 내용은 동일하게 유지) ... */


/* -------------------- 반응형 디자인 (모바일 최적화) -------------------- */
@media (max-width: 768px) {
    .container {
        width: 95%; /* 모바일에서 더 넓게 사용 */
        padding: 10px 0;
    }

    header {
        padding: 5px 0;
        text-align: center;
        position: relative; /* 모바일 메뉴를 위한 기준점 */
        z-index: 1000; /* 다른 요소 위에 오도록 설정 */
    }
    header .logo {
        float: none;
        display: block;
        text-align: center;
        margin-bottom: 10px; /* 로고와 메뉴 버튼 사이 간격 */
        line-height: 1; /* 로고 높이 조정 */
    }
    header nav {
        float: none;
        display: none; /* 기본적으로 숨김 (햄버거 메뉴로 토글) */
        width: 100%;
        margin-top: 0;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%; /* 헤더 아래에 위치 */
        left: 0;
        right: 0;
        z-index: 999;
    }
    header nav.active { /* JavaScript로 'active' 클래스 토글 */
        display: block;
    }
    header nav ul {
        text-align: center;
        padding: 10px 0;
    }
    header nav ul li {
        display: block; /* 세로로 나열 */
        margin: 0;
    }
    header nav ul li a {
        display: block; /* 전체 너비 클릭 가능 */
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
        color: #333;
    }
    header nav ul li:last-child a {
        border-bottom: none;
    }
    .menu-toggle {
        display: block; /* 모바일에서 햄버거 메뉴 표시 */
        position: absolute; /* 로고와 겹치지 않게 */
        top: 15px;
        right: 15px;
        font-size: 2em;
        cursor: pointer;
        line-height: 1;
        color: #0056b3;
    }

    .hero {
        padding: 80px 15px; /* 모바일에서 패딩 줄임 */
        background-attachment: scroll; /* 모바일에서 parallax 비활성화 */
    }
    .hero h1 {
        font-size: 2.2em; /* 모바일에서 글꼴 크기 조정 */
        line-height: 1.3;
    }
    .hero p {
        font-size: 1em; /* 모바일에서 글꼴 크기 조정 */
        margin-bottom: 30px;
    }
    .hero .btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    .about-image {
        max-width: 95%; /* 모바일에서는 더 넓게 사용 */
        margin-bottom: 20px; /* 모바일 하단 여백 조정 */
    }

    .section {
        padding: 40px 15px; /* 모바일에서 섹션 패딩 줄임 */
    }
    .section h2 {
        font-size: 2em; /* 모바일에서 섹션 제목 크기 조정 */
        margin-bottom: 30px;
    }
    .section h2::after {
        width: 60px; /* 제목 밑줄 길이 조정 */
    }
    .section p {
        font-size: 1em; /* 모바일에서는 다시 적절히 조절 */
    }

    .services-grid {
        grid-template-columns: 1fr; /* 서비스 그리드를 한 열로 변경 */
        gap: 20px; /* 간격 줄임 */
    }

    .case-studies-grid {
        grid-template-columns: 1fr; /* 성공 사례 그리드를 한 열로 변경 */
        gap: 20px; /* 간격 줄임 */
    }
    /* 메인 페이지에서 3개 초과하는 성공 사례 숨기기 */
    #case-studies-content-main .case-study-item:nth-child(n+4) {
        display: none;
    }

    .clients-logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 클라이언트 로고 그리드 열 수 조정 */
        gap: 20px; /* 간격 줄임 */
    }

    .service-item,
    .case-study-item,
    .client-logo-item {
        padding: 20px; /* 아이템 내부 패딩 조정 */
    }
    .service-item h3 {
        font-size: 1.5em;
    }
    .service-item p {
        font-size: 0.95em;
    }
    .case-study-item img {
        height: 180px; /* 성공 사례 이미지 높이 조정 */
    }
    .case-study-content h3 {
        font-size: 1.3em;
    }
    .case-study-content p {
        font-size: 0.9em;
    }

    .client-logo-item {
        height: 80px; /* 로고 아이템 높이 조정 */
    }
    .client-logo-item img {
        max-height: 50px; /* 로고 이미지 높이 조정 */
    }

    .clients-section-image {
        max-width: 90%; /* 모바일에서는 더 넓게 사용 */
        margin-bottom: 20px; /* 모바일 하단 여백 조정 */
    }

    .contact-section {
        padding: 50px 15px; /* 문의 섹션 패딩 조정 */
    }
    .contact-section h2 {
        font-size: 2em;
    }
    .contact-section p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }
    .contact-section .btn {
        padding: 12px 25px;
        font-size: 1.1em;
    }

    footer {
        padding: 20px 15px;
        font-size: 0.8em;
    }
}

/* -------------------- 아주 작은 화면 (예: iPhone SE) 대응 -------------------- */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8em;
    }
    .hero p {
        font-size: 0.9em;
    }
    .section h2 {
        font-size: 1.8em;
    }
    .service-item h3 {
        font-size: 1.3em;
    }
    .case-study-content h3 {
        font-size: 1.1em;
    }
}