/* Global Styles */

:root {
    --primary-color: #004098;
    --secondary-color: #0056b3;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #fff;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    word-break: keep-all;
}

html,
body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* Header */
.header {
    width: 100%;
    height: 180px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
}

.logo-text-sub {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    margin-top: 5px;
}

/* Mega Menu Background Panel */
.gnb::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0;
    background: #e9ecef;
    z-index: 900;
    transition: height 0.3s ease-in-out;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    visibility: hidden;
}

/* Trigger Background on Header Hover */
.gnb:hover::after {
    height: 420px;
    /* Adjust based on longest menu */
    visibility: visible;
}

.gnb {
    height: 100%;
}

.gnb>ul {
    display: flex;
    justify-content: center;
    gap: 0;
    height: 100%;
    /* Removed gap, using li width instead */
}

.gnb>ul>li {
    position: relative;
    min-width: 180px;
    /* Ensure wide enough column */
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    /* Match parent li width */
    background-color: transparent;
    /* Transparent to show header background */
    box-shadow: none;
    z-index: 1000;
    border-radius: 0;
    padding: 20px 0;
    border: none;
}

/* Show ALL dropdowns when hovering the Navigation Area */
.gnb:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 0;
    /* Center align adjustments */
    color: #333;
    font-size: 0.95rem;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
}

.gnb a {
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.gnb a:hover {
    color: var(--primary-color);
}

/* Logo Image Style */
.logo-img {
    height: 150px;
    /* Adjust based on header height, usually 120px */
    width: auto;
    vertical-align: middle;
}

.logo-text-kr {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--secondary-color);
    line-height: 2.7;
    word-break: keep-all;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-switch a {
    color: #999;
    transition: color 0.3s;
}

.lang-switch a.active,
.lang-switch a:hover {
    color: var(--primary-color);
    font-weight: 700;
}

.lang-switch .divider {
    margin: 0 10px;
    color: #ddd;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero-slider {
    margin-top: 180px;
    height: 600px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* Business Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}

.grid-item {
    background: var(--white);
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* 4 Layout Logic */
/* All items Span 3 columns each (12 / 4 = 3) */
.grid-item {
    grid-column: span 3;
}

.grid-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* Business Grid - Product Images */
.product-img-box {
    margin-bottom: 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #f9f9f9;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* or contain, depending on image aspect ratio preference */
    transition: transform 0.3s;
}

.grid-item:hover .product-img-box img {
    transform: scale(1.05);
}

.icon-box {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    height: 200px;
    /* Match height of image box for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.grid-item p {
    color: #666;
    margin-bottom: 20px;
}

.btn-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
}

/* About Summary */
.about-summary {
    background: var(--light-gray);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: #2ecc71;
    /* Green color for sustainability */
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #555;
}

.stats-list li {
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.stats-list strong {
    display: block;
    font-size: 1.2rem;
    color: #000;
}

.about-image {
    flex: 1;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 350px;
    /* Fixed height for consistency */
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    transition: bottom 0.3s ease;
}

/* .portfolio-item:hover .portfolio-overlay {
    bottom: 0;
} */

.portfolio-overlay h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    color: #ddd;
}

/* Responsive adjustments for Portfolio */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Footer */
.footer {
    background: #222;
    color: #aaa;
    padding: 50px 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.footer-logo {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--white);
    line-height: 1.3;
    word-break: keep-all;
}

.footer-nav {
    margin-top: 10px;
    margin-bottom: 10px;
}

.footer-nav a {
    margin-right: 20px;
    font-size: 0.9rem;
    color: #ccc;
}

.footer-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer address {
    font-style: normal;
}

.footer-social {
    margin-top: 10px;
}

.footer-social a {
    color: #aaa;
    font-size: 1.2rem;
    margin-right: 15px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Auto height for header to fit stacked content */
    .header {
        height: auto;
        padding: 15px 0;
        position: relative;
        /* Disable sticky/fixed */
    }

    .header .container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    /* Reset GNB from drawer to visible block below logo */
    .header .gnb {
        display: block;
        position: static;
        width: 100%;
        height: auto;
        background: transparent;
        border: none;
        padding: 0;
        margin-top: 5px;
    }

    /* Hide Hamburger */
    .mobile-menu-btn {
        display: none;
    }

    .lang-switch {
        display: none;
    }

    .gnb ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        height: auto;
    }

    /* Button Style for Mobile Menu Items */
    .gnb>ul>li {
        min-width: unset;
        width: calc(50% - 5px);
        /* 2 items per row */
        height: 45px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 4px;
        margin: 0;
        padding: 0;
        display: flex;
        /* Flex to center text */
        align-items: center;
        justify-content: center;
    }

    .gnb>ul>li a {
        font-size: 0.95rem;
        font-weight: 500;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide dropdowns on mobile to keep button look clean */
    .gnb:hover .dropdown-menu {
        display: none;
    }

    /* Adjust Hero for new header alignment */
    .hero-slider {
        margin-top: 0;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .grid-item {
        padding: 20px 15px;
    }

    .product-img-box {
        height: 120px;
    }

    .grid-item h3 {
        font-size: 1.1rem;
    }

    .grid-item p {
        font-size: 0.85rem;
    }

    /* Reset grid spans on mobile */
    .grid-item:nth-child(n) {
        grid-column: auto;
    }

    /* Mobile Sub Header Adjustments */
    .sub-header {
        height: 200px;
        margin-top: 0;
        padding: 0 20px;
    }

    .sub-header h2 {
        font-size: 2rem;
        word-break: keep-all;
        text-align: center;
    }

    /* Mobile Product Nav Adjustments */
    .product-nav-list {
        grid-template-columns: repeat(2, 1fr);
        /* Enforce 2 columns */
        gap: 8px;
        /* Slightly increased gap */
    }

    .product-nav-list li {
        width: 100%;
    }

    .product-nav-list a {
        font-size: 0.8rem;
        padding: 5px;
        white-space: normal;
        /* Allow text wrapping */
        height: auto;
        min-height: 50px;
        line-height: 1.2;
        text-align: center;
    }




    .product-nav-section {
        display: none;
    }

    /* Fix for product detail layout on mobile */
    .product-detail-container {
        flex-direction: column;
    }

    .product-detail-section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        /* Prevent page-wide scroll if possible */
    }

    .product-image-box,
    .product-info-box {
        min-width: 100%;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .product-info-box {
        overflow-x: auto;
        /* Enable scrolling for this box */
        padding-bottom: 20px;
        /* Space for scrollbar */
    }

    .product-info-box * {
        /* Revert explicit forced break if scrolling is preferred, 
           or keep it for text but mostly for table */
        word-break: normal;
        word-wrap: normal;
    }

    .product-image-box {
        margin-bottom: 30px;
    }

    /* Fix table layout on mobile */
    .specs-table {
        width: 85%;
        /* Reduced width to ~85% (effectively Data column -20%) */
        margin: 0 auto;
        /* Center the narrower table */
        table-layout: fixed;
    }

    .specs-table th,
    .specs-table td {
        padding: 5px 8px;
        font-size: 0.9rem;
        word-break: break-all;
        white-space: normal;
    }

    .specs-table th {
        width: 75px;
        /* Reduced width (~10% less than 85px) */
        background-color: #f9f9f9;
        font-weight: 700;
        color: #333;
        text-align: right;
        padding-right: 5px;
    }

    .specs-table td {
        text-align: left;
        /* Left align value */
        padding-left: 5px;
        /* Close to border */
    }

    .about-content {
        flex-direction: column;
    }
}

/* Scrolled Header */
.header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 70px;

}

/* Contact Us Section */
.contact-section {
    background-color: #fff;
    padding: 40px 0;
}

.contact-box {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.btn-submit {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

.btn-call {
    display: block;
    text-align: center;
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-call:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-call i {
    margin-right: 8px;
}

/* Product Nav Styles */
.product-nav-section {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.product-nav-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.product-nav-list li {
    width: 100%;
}

.product-nav-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 2px;
    /* Square look */
    transition: all 0.3s;
    white-space: nowrap;
}

.product-nav-list a:hover,
.product-nav-list a.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 700;
}

/* Hero Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide {
    position: relative;
    overflow: hidden;
}

/* Machinery Sectors Styles */
.machinery-container {
    margin-top: 80px;
    border-top: 1px solid #eee;
    padding-top: 60px;
}

.machinery-sector {
    margin-bottom: 60px;
}

.machinery-sector:last-child {
    margin-bottom: 0;
}

.machinery-sector h4 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 5px solid var(--primary-color);
    font-weight: 700;
}

.machinery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.machinery-box {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1 / 1;
    /* Square box */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.machinery-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.machinery-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments for Machinery Grid */
@media (max-width: 768px) {
    .machinery-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 20px;
    }

    .machinery-sector h4 {
        font-size: 1.5rem;
    }
}