/* =========================================
   1. 기본 스타일 및 레이아웃
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', dotum, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #ffffff; /* 기본 배경색을 순백색으로 변경 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. 헤더 및 로고 (투명 헤더)
========================================= */
.transparent-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* 로고 정렬 (이미지 + 텍스트) */
.transparent-header .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: color 0.3s, text-shadow 0.3s;
}

.transparent-header .logo a img {
    height: 40px;
    width: auto;
    display: block;
}

/* =========================================
   3. 메가 메뉴 네비게이션
========================================= */
.nav-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu {
    display: flex;
    gap: 150px;
    height: 100%;
    margin-right: 0;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 80px;
}

.main-link {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
    z-index: 1001;
}

/* 호버 시 하늘색 밑줄 효과 */
.main-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b9ae1; /* 메인 하늘색 포인트 */
    transition: width 0.3s ease;
}
.menu-item:hover .main-link::after {
    width: 100%;
}

/* 서브 메뉴 설정 */
.sub-menu {
    position: absolute;
    top: 80px;
    left: 0; /* 50%에서 0으로 변경하여 메인 메뉴 시작점과 좌측을 맞춤 */
    width: 220px; /* 긴 글자도 한 줄에 들어가도록 150px에서 220px로 넓힘 */
    text-align: left; /* 가운데 정렬에서 좌측 정렬로 변경하여 깔끔하게 */
    padding: 5px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.sub-menu li a {
    display: block;
    color: #333;
    font-size: 15px;
    padding: 5px 0;
    font-weight: 500;
    transition: color 0.2s, font-weight 0.2s;
    /* 좌측 정렬 시 글자가 너무 딱 붙지 않도록 약간의 여백 추가 */
    padding-left: 10px; 
}
.sub-menu li a:hover {
    color: #3b9ae1; /* 하늘색 호버 효과 */
    font-weight: bold;
}

/* 서브 메뉴 흰색 배경창 */
.menu-bg {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: height 0.3s ease;
    z-index: 1000;
}

/* --- 헤더 Hover(마우스 오버) 액션 --- */
.transparent-header:hover {
    background-color: #ffffff;
}
.transparent-header:hover .logo a {
    color: #3b9ae1; /* 스크롤/호버 시 로고 하늘색 */
    text-shadow: none;
}
.transparent-header:hover .main-link {
    color: #333;
    text-shadow: none;
}
.transparent-header:hover .menu-bg {
    height: 250px;
}
.transparent-header:hover .sub-menu {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   4. 메인 비주얼 (사진 위에 텍스트 오버레이)
========================================= */
.hero-container {
    position: relative;
    width: 100%;
    height: 70vh; /* 슬라이드 전체 높이 (원하는 대로 조절 가능) */
    display: flex;
    align-items: center; /* 텍스트를 수직 중앙에 배치 */
    justify-content: center;
    overflow: hidden;
    background-color: #3b9ae1;
}

/* 텍스트 영역 (사진 위로 띄움) */
.hero-text-area {
    position: relative;
    z-index: 10; /* 숫자가 클수록 위로 올라옴 */
    text-align: center;
    padding-top: 80px; /* 투명 헤더 영역만큼 살짝 아래로 내림 */
}

.hero-title {
    color: #ffffff;
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* 글자에 그림자를 주어 더 또렷하게 */
}

.hero-subtitle {
    color: #ffffff;
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.btn-outline {
    display: inline-block;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-outline:hover {
    background-color: #ffffff;
    color: #3b9ae1; 
}

/* 하단 슬라이드 사진 전용 영역 (바닥에 꽉 차게 깔림) */
.slider-area {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; /* 가장 바닥 */
}

/* 반투명 오버레이 (사진과 텍스트 사이) */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 30, 60, 0.4); 
    z-index: 2; /* 사진(1)보다는 위, 텍스트(10)보다는 아래 */
}

/* 슬라이드 이미지 공통 스타일 */
.slide-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; 
    animation: slideAnimation 20s infinite; 
}

/* 4장의 이미지 및 딜레이 설정 */
.slide-1 { background-image: url('sl/sl2.jpg'); animation-delay: 0s; }
.slide-2 { background-image: url('sl/sl3.jpg'); animation-delay: 5s; }
.slide-3 { background-image: url('sl/sl1.jpg'); animation-delay: 10s; }
.slide-4 { background-image: url('sl/sl4.jpg'); animation-delay: 15s; }

/* 애니메이션 효과 */
@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1); }
    7.5% { opacity: 1; }
    25% { opacity: 1; }
    32.5% { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; transform: scale(1); }
}



}/* =========================================
   5. 자재 소개 섹션 공통 및 그리드
========================================= */
.section-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
    color: #111;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #3b9ae1; /* 제목 밑줄 하늘색 */
}

.products-summary {
    padding: 80px 0;
    background-color: #ffffff;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 한 줄에 3개씩 배치 */
    gap: 30px;
}
.product-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #eef4f9;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 154, 225, 0.1); /* 그림자도 아주 연한 하늘색 톤 */
    border-color: #bce0fb;
}
.product-img {
    width: 100%;
    height: 220px; /* 사진 세로 높이 (원하시는 대로 조절하세요) */
    object-fit: cover; /* 가로세로 비율이 안 깨지도록 남는 부분을 자동으로 잘라냄 */
    border-radius: 4px;
    margin-bottom: 15px;
    display: block; /* 하단 미세 여백 제거 */
}
.product-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #222;
}
.product-card p {
    font-size: 14px;
    color: #666;
}

@media (max-width: 768px) {
    .product-grid { 
        grid-template-columns: repeat(1, 1fr); /* 모바일에서는 한 줄에 1개씩 */
        gap: 20px; 
    }
}


/* =========================================
   7. 푸터 영역 (3개 회사 분할 레이아웃)
========================================= */
footer {
    background-color: #3b9ae1; 
    color: #ffffff;
    padding: 60px 0 30px; /* 위아래 여백 넉넉하게 */
    font-size: 14px;
    line-height: 1.8;
}

/* 3개 회사를 나란히 배치하는 그리드 */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3칸으로 동일하게 분할 */
    gap: 40px; /* 각 회사 사이의 간격 */
    margin-bottom: 40px; /* 하단 카피라이트와의 간격 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 은은한 구분선 추가 */
    padding-bottom: 40px;
}

.footer-company p {
    color: rgba(255, 255, 255, 0.9); /* 글자색 살짝 연하게 */
}

.footer-logo {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff !important;
    margin-bottom: 15px;
}

/* 맨 아래 공통 정보 (이메일, 카피라이트) */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}


/* =========================================
   8. 모바일 반응형 처리 (스마트폰 크기에서만 작동)
========================================= */
@media (max-width: 768px) {
    
    /* 1. 헤더 및 메뉴 모바일 처리 */
    .header-inner { flex-direction: column; padding: 20px 0; height: auto; }
    .nav-container { margin-top: 15px; }
    .nav-menu { gap: 20px; flex-direction: column; }
    .menu-item { height: auto; }
    .sub-menu, .menu-bg { display: none; }
    
    /* 2. 메인 화면 모바일 처리 */
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .product-grid { 
        grid-template-columns: repeat(1, 1fr); /* 모바일 자재사진 1줄 */
        gap: 20px; 
    }
    
    /* 3. 푸터 모바일 처리 */
    .footer-grid {
        grid-template-columns: 1fr; /* 모바일에서는 세로로 1줄 배치 */
        gap: 40px;
        text-align: center; /* 가운데 정렬 */
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* 4. 제품 카탈로그 페이지 (products.html) 모바일 처리 */
    .product-row, .product-row:nth-child(even) {
        flex-direction: column; 
        gap: 30px;
        margin-bottom: 60px;
    }
    .prod-image { width: 100%; }
    .prod-image img { height: 250px; }

    /* 5. 개별 상세 페이지 (euroform.html 등) 모바일 처리 */
    .single-product-grid {
        flex-direction: column;
        gap: 40px;
    }
    .spec-table th, .spec-table td {
        padding: 10px 5px;
        font-size: 13px; 
    }

/* 모바일용 온라인 문의 서식 정렬 */
    .contact-grid {
        flex-direction: column;
        gap: 30px;
    }
    .contact-info-box, .contact-form-box {
        width: 100%;
        padding: 25px 20px;
    }
    .main-contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }

} /* <-- ★가장 중요★ 모바일 코드를 닫아주는 이 괄호가 꼭 맨 마지막에 있어야 합니다! */

/* =========================================
   9. 품목별 단일 상세 페이지 스타일
========================================= */

/* 서브 페이지 상단 타이틀 영역 */
.sub-hero {
    background-color: #3b9ae1;
    padding: 140px 0 60px; 
    text-align: center;
    color: #fff;
}
.sub-hero h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
}
.sub-hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* ★ 이 부분이 빠져서 좌우로 나뉘지 않았던 것입니다! ★ */
.single-product-wrap {
    padding: 80px 0;
    background-color: #ffffff;
}
.single-product-grid {
    display: flex; /* 좌우로 나누는 핵심 설정 */
    gap: 60px; /* 좌측 사진과 우측 표 사이의 간격 */
    align-items: flex-start; /* 위쪽 선을 기준으로 정렬 */
}

/* 좌측 사진 영역 전체 틀 */
.single-prod-image {
    flex: 1; /* 사진 영역 비율 */
}

/* 메인 사진 2장 세로 나열 (동일 사이즈) */
.single-prod-image .main-photo {
    width: 100%;
    height: auto; 
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    margin-bottom: 25px; /* 첫 번째 사진과 두 번째 사진 사이 간격 */
    display: block;
}

/* 마지막 두 번째 사진 아래에는 불필요한 여백 제거 */
.single-prod-image .main-photo:last-child {
    margin-bottom: 0;
}

/* 우측 텍스트 및 표 영역 전체 틀 */
.single-prod-info {
    flex: 1.2; /* 표 영역을 사진보다 살짝 더 넓게 할당 */
}
.single-prod-info h3 {
    font-size: 26px;
    color: #0f4c81;
    margin-bottom: 20px;
    border-bottom: 2px solid #3b9ae1;
    padding-bottom: 10px;
    display: inline-block;
}
.single-prod-desc {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* 상세 규격표 (Table) 디자인 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    text-align: center;
}
.spec-table th {
    background-color: #f0f8ff;
    color: #333;
    padding: 15px;
    border-top: 2px solid #3b9ae1;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}
.spec-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}
.spec-table tr:hover {
    background-color: #fcfcfc;
}

/* 견적 문의 버튼 */
.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background-color: #3b9ae1;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-align: center;
    width: 100%; 
}
.btn-primary:hover {
    background-color: #2985c2;
}

/* =========================================
   10. 온라인 문의 페이지 (contact.html) 스타일
========================================= */
.contact-wrap {
    padding: 80px 0;
    background-color: #f8fba3; /* 연한 회색/하늘색 톤 배경으로 서식 집중도 높임 */
    background-color: #f9fbfd;
}

.contact-grid {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

/* 좌측 안내 박스 */
.contact-info-box {
    flex: 1;
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid #eef4f9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.contact-info-box h3 {
    font-size: 22px;
    color: #111;
    margin-bottom: 15px;
}
.info-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}
.info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.info-item {
    border-left: 3px solid #3b9ae1;
    padding-left: 15px;
}
.info-item strong {
    display: block;
    font-size: 15px;
    color: #0f4c81;
    margin-bottom: 5px;
}
.info-item p {
    font-size: 14px;
    color: #444;
}

/* 우측 서식 박스 */
.contact-form-box {
    flex: 2; /* 입력 공간을 더 넓게 설정 */
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eef4f9;
    box-shadow: 0 5px 15px rgba(59, 154, 225, 0.05);
}
.contact-form-box h3 {
    font-size: 22px;
    color: #111;
    margin-bottom: 25px;
}

/* 입력 서식 스타일 */
.main-contact-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.main-contact-form .form-row {
    display: flex;
    gap: 20px;
}
.main-contact-form .form-row .form-group {
    flex: 1;
}
.main-contact-form label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
.main-contact-form label .required {
    color: #e74c3c; /* 필수 입력 항목 빨간 점 */
}

.main-contact-form input[type="text"],
.main-contact-form input[type="tel"],
.main-contact-form input[type="email"],
.main-contact-form select,
.main-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dbdec2;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* 포커스 되었을 때 테두리 하늘색 하이라이트 효과 */
.main-contact-form input:focus,
.main-contact-form select:focus,
.main-contact-form textarea:focus {
    outline: none;
    border-color: #3b9ae1;
    box-shadow: 0 0 5px rgba(59, 154, 225, 0.2);
}

/* 동바리 개인정보 수집 동의 */
.form-privacy-agree {
    margin: 25px 0;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}
.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 전송 버튼 */
.btn-submit-form {
    width: 100%;
    padding: 15px;
    background-color: #3b9ae1;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-submit-form:hover {
    background-color: #2985c2;
}


/* =========================================
   11. 메인 페이지 - 오시는 길 (지도) 스타일
========================================= */
.location-wrap {
    padding: 80px 0 100px;
    background-color: #f9fbfd; /* 제품 섹션과 분리감을 주는 아주 연한 배경 */
}

/* 오시는 길 섹션 스타일 단순화 */
.location-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    position: relative;
    /* 장식선 관련 코드(::before, ::after)를 여기서 삭제하면 줄이 완전히 사라집니다 */
}

/* 추가 사업장 정보 영역도 정돈 */
.other-location-info {
    margin-top: 40px !important;
    padding-top: 30px;
    border-top: 1px solid #eee; /* 위쪽 구분선은 남겨두어 가독성 유지 */
}
/* 오시는 길 제목의 장식선 제거 */
.location-title::before, .location-title::after {
    display: none; /* 이 코드를 추가하면 줄이 사라집니다 */
}
.location-title::before { left: -80px; }
.location-title::after { right: -80px; }

/* 지도 및 정보 카드 레이아웃 */
.location-card {
    display: flex;
    gap: 40px;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eef4f9;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.location-card:last-child {
    margin-bottom: 0;
}

/* 좌측 지도 영역 */
.map-area {
    flex: 2; /* 지도를 정보창보다 넓게 설정 */
}
.map-area iframe {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 우측 텍스트 영역 */
.info-area {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.info-area h4 {
    font-size: 22px;
    color: #0f4c81;
    margin-bottom: 15px;
}
.info-area p {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}
.info-area .address {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* 새로운 1단 메뉴(flat-menu) 간격 조정 */
.nav-menu.flat-menu {
    gap: 25px; /* 메뉴 개수가 늘어났으므로 간격을 살짝 좁힘 */
}
.nav-menu.flat-menu .main-link {
    font-size: 16px;
    font-weight: 600;
}


/* =========================================
   12. 상단 1단 메뉴(두 줄 처리) 스타일 추가
========================================= */
.nav-menu.flat-menu {
    gap: 20px; /* 메뉴 사이 간격 조정 */
    align-items: center; /* 메뉴 세로 중앙 정렬 */
}

.nav-menu.flat-menu .main-link {
    text-align: center; /* 텍스트 가운데 정렬 */
    line-height: 1.3;   /* 위아래 줄 간격 */
    display: inline-block;
}

/* 괄호 안의 보조 텍스트 (두 번째 줄) */
.nav-menu.flat-menu .sub-name {
    display: block; /* 이 코드가 글씨를 밑으로 내려줍니다 */
    font-size: 13px; /* 괄호 글씨 크기를 메인 글씨보다 살짝 작게 */
    font-weight: 400; /* 글씨 굵기 얇게 */
    margin-top: 3px;
    opacity: 0.85; /* 색상을 살짝 부드럽게 */
}

/* =========================================
   13. 상단 메뉴 흰색 배경 & 검정 글씨 고정
========================================= */
.transparent-header {
    position: sticky !important; /* 스크롤을 내려도 상단에 고정됨 */
    top: 0;
    background-color: #ffffff !important; /* 흰색 배경 고정 */
    border-bottom: 1px solid #eef4f9; /* 메뉴판 아래 은은한 구분선 추가 */
    z-index: 1000; /* 항상 가장 위에 보이도록 설정 */
}

/* 로고 글씨 검정색으로 변경 */
.transparent-header .logo a span {
    color: #222222 !important;
}

/* 1단 메뉴 메인 글씨 검정색으로 변경 */
.transparent-header .nav-menu .main-link {
    color: #333333 !important;
}

/* 메뉴 괄호 안 글씨 진한 회색으로 변경 */
.transparent-header .nav-menu .sub-name {
    color: #777777 !important;
}

/* 마우스 커서 올렸을 때 포인트 컬러(파란색) 및 밑줄 유지 */
.transparent-header .nav-menu .main-link:hover {
    color: #3b9ae1 !important;
}