:root {
    --primary-color: #333;
    --accent-color: #ff6600;
    --light-bg: #f9f9f9;
    --border-color: #ddd;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: #fef0e7;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    /* Decreased from 20px */
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
}

.header-left {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
}

.header-left img {
    max-width: 100%;
    height: 88px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo img {
    max-width: 100%;
    height: 90px;
}

.logo-text {
    font-size: 1.2rem;
    margin-top: 10px;
}

.logo-text strong {
    color: #000;
    font-size: 1.5rem;
}

.mobile-menu-btn {
    display: none;
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Desktop Nav */
.nav-desktop {
    background: #fff;
    border-top: 1px solid var(--border-color);
}

.main-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: var(--max-width);
    margin: 0 auto;
}

.main-menu>li {
    position: relative;
}

.main-menu>li>a {
    display: block;
    padding: 15px 30px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-menu>li>a:hover {
    color: var(--accent-color);
}

/* Submenu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    min-width: 150px;
    display: none;
    list-style: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-menu>li:hover .sub-menu {
    display: block;
}

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.sub-menu li a:hover {
    background: var(--light-bg);
    color: var(--accent-color);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    z-index: 2000;
    padding: 20px;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    list-style: none;
}

.mobile-menu>li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu>li>a {
    display: block;
    padding: 15px 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-menu-mobile {
    display: none;
    padding-left: 20px;
    background: #f1f1f1;
}

.sub-menu-mobile li a {
    display: block;
    padding: 10px 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    aspect-ratio: 3.2 / 1;
    overflow: hidden;
    background: #fff;
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
}

/* Main Content */
.main-visual {
    padding: 40px 20px;
    background: #fff;
}

.section {
    max-width: var(--max-width);
    margin: 40px auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.section:nth-child(even) {
    flex-direction: row-reverse;
}

.section-img {
    flex: 1;
}

.section-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-text {
    flex: 1;
}

.section-text p.subtitle {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.section-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-text p.desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: #333;
    color: #ccc;
    padding: 60px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.company-info p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 20px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .header-left {
        display: none;
    }

    .nav-desktop {
        display: none;
    }

    .section {
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }

    .section-text h2 {
        font-size: 1.8rem;
    }

    .header-top {
        justify-content: flex-start;
    }

    .logo {
        margin: 0 auto;
        max-width: calc(100% - 100px);
    }

    .logo img {
        height: 55px !important;
    }

    .hero-slider {
        height: auto;
        aspect-ratio: 2.5 / 1;
    }
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(3px);
}

.popup-overlay.active {
    display: block;
}

.popup-layer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: auto;
    display: none;
    overflow: hidden;
    animation: popupFadeIn 0.3s ease-out;
}

.popup-layer.active {
    display: block;
}

@keyframes popupFadeIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.popup-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
}

.popup-footer a {
    font-size: 0.9rem;
    color: #666;
    transition: color 0.3s;
}

.popup-footer a:hover {
    color: var(--accent-color);
}

.x-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transition: transform 0.3s, color 0.3s;
}

.x-btn:hover {
    transform: rotate(90deg);
    color: var(--accent-color);
}

/* Scroll to Top Button (Bottom Left) */
#scrollTopBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background-color: #ff6600;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    #scrollTopBtn {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }

    /* Mobile Popup Optimization */
    .popup-layer {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        border-radius: 8px;
    }

    .popup-content img {
        width: 100% !important;
        height: auto !important;
    }

    .popup-footer {
        padding: 10px 15px;
    }
}