@charset "utf-8";

:root {
    /* color */
    --white: #fff;
    --text-black: #222;
    --line: #A2A8D3;
    --primary: #38598B;
    --primary-dark: #1e3d6f;
    --light-bg: #F9FAFB;
}

/* Common */
section {
    padding: 60px 0;
}

section h2 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
    color: #222;
}

@media screen and (max-width:480px) {
    .section-title {
        text-align: center;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo a img {
    height: 40px;
    width: auto;
}

nav>ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

@media screen and (max-width:1090px){
    nav>ul{
        padding-left: 20px;
        gap:10px;
    }
}

@media screen and (max-width:1050px){

}


nav li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 1rem 0;
}

.dropdown.mega-menu {
    min-width: 400px;
}

nav li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown li {
    position: static;
}

.dropdown a {
    padding: 0.7rem 1.5rem;
    color: #666;
    font-weight: 400;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.dropdown a:hover {
    background: #f8f9fa;
    color: var(--primary);
    padding-left: 2rem;
}

.dropdown li:last-child a {
    border-bottom: none;
}

/* Multi-column dropdown for products */
.products-dropdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-width: 500px;
    padding: 1.5rem;
}

.dropdown-column h4 {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0 0 0.5rem 0;
    border-bottom: 2px solid #e9ecef;
}

.dropdown-column ul {
    margin-top: 0.5rem;
}

.dropdown-column a {
    padding: 0.4rem 0;
    border-bottom: none;
    font-size: 0.85rem;
}

.dropdown-column a:hover {
    padding-left: 1rem;
    background: transparent;
}

/* Main menu item with arrow indicator */

@media screen and (max-width:480px) {
    .has-dropdown>a::after {
        content: '▼';
        font-size: 0.7rem;
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }

    .has-dropdown:hover>a::after {
        transform: rotate(180deg);
    }

    .has-dropdown>a[href="program.html"]::after,
    .has-dropdown>a[href="list.html?cate=008"]::after {
        content: none !important;
    }
}


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

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #4a90e2;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
    color: #999;
}

.adm {
    display: block;
    margin-top: 20px;
}

.side {
    position: fixed;
    right: 50px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.side a {
    display: block;
    width: 70px;
    line-height: 70px;
    text-align: center;
    background: #fff;
    color: #000;
    border-radius: 50%;
    box-shadow: 3px 5px 10px 0px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 3px 5px 10px 0px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: 3px 5px 10px 0px rgba(0, 0, 0, 0.5);
    font-size: 18px;
}

@media screen and (max-width:480px) {
    .side {
        right: 10px;
        bottom: 20px;
        gap: 5px
    }

    .side a {
        display: block;
        width: 40px;
        line-height: 40px;
        font-size: 15px;
    }
}

@media screen and (max-width:480px) {
    footer {
        padding-right: 15px;
        padding-left: 15px;
        font-size: 12px;
    }
}

@media (max-width: 980px) {
    nav {
        display: none;
    }

    nav.mobile-slide-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 2000;
        padding: 2rem 1rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
    }

    nav.mobile-slide-menu.active {
        left: 0;
    }

    nav.mobile-slide-menu>ul {
        flex-direction: column;
        gap: 0;
    }

    nav.mobile-slide-menu li {
        border-bottom: 1px solid #eee;
    }

    nav.mobile-slide-menu li>a {
        display: block;
        padding: 1rem;
        font-size: 1rem;
        color: #222;
    }

    nav.mobile-slide-menu .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    nav.mobile-slide-menu .dropdown.open {
        max-height: 500px;
        /* 충분히 큰 값 */
    }

    nav.mobile-slide-menu .dropdown a {
        padding-left: 2rem;
        background: #f9f9f9;
        font-size: 0.9rem;
    }

    .mobile-menu-btn {
        display: block;
    }
}