/* 기본 초기화 */
* {
    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: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo img {
    height: 32px;
    margin-right: 10px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

#nav-check {
    display: none;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: #ccc;
    transition: 0.3s;
    font-size: 0.95rem;
}

nav ul li a:hover,
nav ul li a.active {
    color: #fff;
}

/* Dropdown Menu CSS */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #002b49;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 4px;
    top: 100%; /* Position right below the parent */
}

/* Create a transparent bridge to prevent menu from closing when moving mouse */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown-content a {
    color: #ccc !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #002b49;
        transition: 0.4s ease-in-out;
        z-index: 1001;
        padding-top: 80px;
        box-shadow: -10px 0 20px rgba(0, 0, 0, 0.2);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    #nav-check:checked~nav {
        right: 0;
    }

    /* Handle Dropdown on Mobile */
    .dropdown-content {
        position: static;
        display: block;
        background: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        margin-top: 10px;
    }

    /* Blur background when menu open */
    #nav-check:checked~.menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    #nav-check:checked~.menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    #nav-check:checked~.menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

@media (min-width: 992px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown:hover>a {
        color: #fff !important;
    }
}

/* 2. 히어로 섹션 */
.hero {
    background: linear-gradient(rgba(0, 43, 73, 0.75), rgba(0, 43, 73, 0.75)), url('https://source.unsplash.com/1600x900/?chemical,factory');
    background-size: cover;
    background-position: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.hero-content {
    width: 100%;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .hero {
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.3rem;
    }
}

.btn {
    display: inline-block;
    background: #d9534f;
    color: white;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.3);
}

.btn:hover {
    background: #c9302c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 83, 79, 0.4);
}

/* 3. 핵심 가치 */
.features {
    padding: 60px 0;
    background: #fdfdfd;
    text-align: center;
}

.features .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .features .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    padding: 40px 30px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    transition: 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    color: #002b49;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* 4. 푸터 */
footer {
    background: #002b49;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin-bottom: 12px;
}

/* --- 아래 내용을 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: 80px 0;
    text-align: center;
    background-color: #fff;
}

.featured-products h2 {
    color: #002b49;
    font-size: 2.2rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 25px;
}

@media (min-width: 576px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.featured-item {
    text-align: center;
    text-decoration: none;
}

.featured-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.featured-item:hover img {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.featured-item h3 {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

/* Category Images (Products Page) */
.category-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}