/* 기본 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 공통 컨테이너 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. 헤더 스타일 */
header {
    background-color: #002b49;
    color: #fff;
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 15px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: #ccc;
    transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #fff;
}

/* 2. 히어로 섹션 (배경 이미지 대신 색상 사용) */
.hero {
    background: linear-gradient(rgba(0, 43, 73, 0.8), rgba(0, 43, 73, 0.8)), url('https://source.unsplash.com/1600x900/?chemical,laboratory');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: #d9534f;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #c9302c;
}

/* 3. 핵심 가치 */
.features {
    padding: 60px 0;
    background: #f9f9f9;
    text-align: center;
}

.features .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.feature-item {
    flex: 1;
    margin: 10px;
    padding: 30px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 250px;
}

.feature-item h3 {
    color: #002b49;
    margin-bottom: 15px;
}

/* 4. 푸터 */
footer {
    background: #1a1a1a;
    color: #777;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 10px;
}

/* --- 아래 내용을 style.css 맨 밑에 추가하세요 --- */

/* 서브 페이지 상단 배너 */
.page-header {
    background: #002b49;
    color: white;
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: #ccc;
}

/* About 페이지 본문 */
.about-section {
    padding: 60px 0;
}

.about-content {
    margin-bottom: 50px;
}

.about-content h2 {
    color: #002b49;
    border-bottom: 2px solid #d9534f;
    display: inline-block;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.about-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #555;
}

/* 품목 카테고리 박스 스타일 */
.product-category {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.category-box {
    flex: 1;
    background: #f4f4f4;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    min-width: 300px;
}

.category-box h3 {
    color: #002b49;
    margin-bottom: 15px;
}

.category-box ul {
    list-style: disc;
    padding-left: 20px;
}

.category-box ul li {
    margin-bottom: 10px;
    color: #444;
}

/* --- 아래 내용을 style.css 맨 밑에 추가하세요 --- */

/* 제품 페이지 레이아웃 (사이드바 + 본문) */
.product-section {
    padding: 50px 0;
    background-color: #f9f9f9;
}

.product-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* 왼쪽 사이드바 스타일 */
.sidebar {
    flex: 0 0 250px;
    /* 너비 250px 고정 */
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    /* 스크롤 따라오기 기능 */
    top: 20px;
}

.sidebar h3 {
    color: #002b49;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 15px;
}

.sidebar ul li {
    margin-bottom: 10px;
    margin-left: 0;
}

.sidebar ul li a {
    color: #555;
    font-weight: 500;
    display: block;
    padding: 5px 0;
}

.sidebar ul li a:hover {
    color: #d9534f;
    transform: translateX(5px);
}

/* 오른쪽 본문 및 테이블 스타일 */
.product-content {
    flex: 1;
}

.category-group {
    margin-bottom: 60px;
    scroll-margin-top: 20px;
}

/* 링크 이동 시 위치 보정 */
.category-group h2 {
    color: #002b49;
    margin-bottom: 20px;
    border-left: 5px solid #d9534f;
    padding-left: 15px;
}

/* 테이블 디자인 (Reference 사이트 스타일) */
.product-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    border: 1px solid #e0e0e0;
}

.product-table thead {
    background-color: #002b49;
    color: white;
}

.product-table th,
.product-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.product-table th {
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.product-table tr:hover {
    background-color: #f1f1f1;
}

/* 마우스 올렸을 때 효과 */

/* 모바일 반응형 처리 */
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .product-table {
        display: block;
        overflow-x: auto;
    }

    /* 표가 화면보다 크면 가로 스크롤 */
}

/* Contact 페이지 레이아웃 */
.contact-section {
    padding: 60px 0;
    background: white;
}

.contact-layout {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

/* 왼쪽: 연락처 정보 */
.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    color: #002b49;
    margin-bottom: 20px;
    border-left: 5px solid #d9534f;
    padding-left: 15px;
}

.contact-info p {
    margin-bottom: 30px;
    color: #555;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.2rem;
    color: #d9534f;
    margin-right: 15px;
    margin-top: 5px;
    width: 20px;
    text-align: center;
}

.info-item h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.info-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* 오른쪽: 문의 폼 */
.contact-form-box {
    flex: 1.2;
    min-width: 300px;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-form-box h2 {
    color: #002b49;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #002b49;
    outline: none;
}

.submit-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .contact-layout {
        flex-direction: column;
        gap: 30px;
    }
}

/* 지도 스타일 추가 */
.map-container {
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* --- 아래 내용을 style.css 맨 밑에 추가하세요 --- */

/* Featured Products Section (Home Page) */
.featured-products {
    padding: 60px 0;
    text-align: center;
    background-color: #fff;
}

.featured-products h2 {
    color: #002b49;
    font-size: 2rem;
    margin-bottom: 40px;
}

.featured-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.featured-item {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
}

.featured-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}

.featured-item img:hover {
    transform: translateY(-5px);
}

.featured-item h3 {
    font-size: 1.1rem;
    color: #333;
}

/* Category Images (Products Page) */
.category-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}