/* css/style.css */

/* 기본적인 스타일 초기화 및 설정 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { /* 부드러운 스크롤 효과 추가 (선택 사항) */
    scroll-behavior: smooth;
}

body {
    /* 기본 글꼴을 '전기안전체 Regular TTF'로 변경 */
    font-family: '전기안전체 Regular TTF', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img { /* 이미지 반응형 기본 설정 */
    max-width: 100%;
    height: auto;
    display: block; /* 이미지 아래 불필요한 여백 제거 */
}

/* 레이아웃을 위한 컨테이너 */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
#header {
    background-color: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- Header Logo Styles --- */
#header-logo {
    height: 50px; /* 로고 높이 */
    width: auto;
    vertical-align: middle;
}
/* --- End Header Logo Styles --- */

#header h1 {
    margin: 0; /* 이미지 주변 불필요한 여백 제거 */
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header nav ul {
    display: flex;
    gap: 1.5rem;
}

#header nav a {
    font-weight: bold;
    transition: color 0.3s ease;
}

#header nav a:hover {
    color: #007bff; /* 예시 색상 */
}

/* 기본 섹션 스타일 */
.section {
    padding: 4rem 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #333;
}

.section p { /* 섹션 설명 텍스트 기본 스타일 */
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.7;
}

/* 배경색이 다른 섹션 */
.bg-light {
    background-color: #f8f9fa;
}

/* --- Hero Section Styles --- */
.hero {
    height: 70vh;
    background-image: url('../images/main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
/* --- End Hero Section Styles --- */


/* --- About Section Specific Styles --- */
#about .container p {
    font-size: 1.3rem;
    text-align: center;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0.5rem;
}
/* --- End About Section Specific Styles --- */


/* --- Service Section Styles --- */
.service-items {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    text-align: center;
    margin-top: 40px;
}

.service-item {
    flex-basis: 30%;
    min-width: 250px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Font Awesome 아이콘 사용 시 스타일 */
.service-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #191E80;
}
/* --- End Service Section Styles --- */


/* ==================================================
   Cases Section Styles (구 Patents)
   ================================================== */
.patent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.patent-item {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1 1 300px;
    text-align: center;
}

.patent-item .patent-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    max-width: 100%;
    margin-top: 15px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.patent-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.patent-item p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    text-align: left;
    max-width: none;
    margin-bottom: 10px;
}
/* --- End Cases Section Styles --- */


/* --- Process Section Styles --- */
.process-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 40px;
}

.process-step {
    flex: 1 1 200px;
    text-align: center;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.process-step .step-icon {
    font-size: 2.5rem;
    color: #191E80;
    margin-bottom: 1rem;
}

.process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.process-step p {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    max-width: none;
    margin-bottom: 0;
}

/* --- Process Example Images Styles --- */
.process-examples {
    display: flex; /* 이미지들을 가로로 나열 */
    flex-wrap: wrap; /* 화면 좁아지면 줄 바꿈 */
    justify-content: center; /* 이미지들을 가운데 정렬 */
    gap: 20px; /* 이미지 사이 간격 */
    /* margin-top: 4rem; */ /* HTML 인라인 스타일로 적용됨 */
}

.process-examples img {
    max-width: 100%; /* 이미지 최대 너비 */
    height: auto; /* 높이는 자동 */
    /* 필요하다면 각 이미지의 너비를 제한할 수 있습니다. 예: */
    /* flex-basis: 31%; */ /* 한 줄에 3개 정도 보이도록 */
    /* min-width: 250px; */
    border: 1px solid #eee; /* 이미지 테두리 (선택 사항) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* 그림자 효과 (선택 사항) */
}
/* --- End Process Example Images Styles --- */

/* --- End Process Section Styles --- */


/* --- Portfolio Section Styles --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 40px;
}

.portfolio-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.portfolio-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    width: 70%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.portfolio-item h4 {
    font-size: 1.1rem;
    margin: 1rem 1rem 0.5rem 1rem;
    text-align: center;
}

.portfolio-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 1rem 1rem 1rem;
    text-align: center;
    max-width: none;
    margin-bottom: 1rem;
}
/* --- End Portfolio Section Styles --- */


/* --- Contact Section Styles --- */
#contact address {
    text-align: center;
    font-style: normal;
    line-height: 1.8;
    margin-top: 2rem;
}

/* --- Contact Section Specific Styles --- */
#contact h2 {
    font-size: 1.5rem;
}

#contact address a {
    color: #007bff;
    transition: color 0.3s ease;
}

#contact address a:hover {
    color: #0056b3;
}

/* --- Contact Form Link Button Style --- */
.btn {
    display: inline-block;
    background-color: #191E80; /* 아이콘 색상과 통일 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #007bff; /* 호버 시 색상 변경 */
    color: #fff;
}

/* --- Contact Form Button Icon Spacing --- */
.btn i {
    margin-right: 8px; /* 아이콘 오른쪽 여백 추가 */
}
/* --- End Contact Section Styles --- */


/* --- Modal Styles --- */
.modal-overlay {
    position: fixed; /* 화면에 고정 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 반투명 검은 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 다른 요소들 위에 오도록 */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%; /* 모달 너비 */
    max-width: 700px; /* 최대 너비 */
    max-height: 90vh; /* 최대 높이 */
    overflow-y: auto; /* 내용 길면 스크롤 */
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

/* 모달 숨김 상태 */
.modal-hidden {
    opacity: 0;
    visibility: hidden;
}
/* --- End Modal Styles --- */


/* 푸터 스타일 */
#footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

#footer p {
    margin: 0;
    color: #ccc;
    font-size: 0.9em;
}

/* --- Scroll Margin for Sticky Header --- */
section[id] {
  scroll-margin-top: 80px; /* 헤더 높이에 맞춰 값을 조절 */
}
/* --- End Scroll Margin --- */

/* --- Footer Links Style --- */
.footer-links {
    margin-top: 0.5rem; /* 저작권 텍스트와의 간격 */
}

.footer-links a {
    color: #ccc; /* 푸터 텍스트 색상과 유사하게 */
    font-size: 0.85em;
    margin: 0 10px; /* 링크 사이 간격 */
    text-decoration: underline; /* 링크임을 표시 */
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff; /* 마우스 올리면 흰색으로 */
}
/* --- End Footer Links Style --- */