/* ±âº» ³×ºñ°ÔÀÌ¼Ç ½ºÅ¸ÀÏ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    height: 80px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    display: block;
    transition: all 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

#navbar.scrolled .logo img {
    height: 40px;
}

/* PC ¸Þ´º ½ºÅ¸ÀÏ */
.desktop-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.desktop-menu > li {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 25px;
    height: 44px;
}

.dropdown-toggle:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

/* PC µå·Ó´Ù¿î ¸Þ´º */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.8rem 0;
    margin-top: 0;
    z-index: 1000;
}

.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
    z-index: 999;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding-left: 2rem;
}

/* ¼º°ø»ç·Ê ¸µÅ© */
.desktop-menu > li > a:not(.contact-btn) {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.8rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    height: 44px;
    display: flex;
    align-items: center;
}

.desktop-menu > li > a:not(.contact-btn):hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

/* ¹®ÀÇÇÏ±â ¹öÆ° */
.contact-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: white !important;
    padding: 0.8rem 1.8rem !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
}

/* ¸ð¹ÙÀÏ ÇÜ¹ö°Å ¹öÆ° */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ¸ð¹ÙÀÏ ¸Þ´º ¿À¹ö·¹ÀÌ - ¼öÁ¤µÈ ºÎºÐ */
.mobile-menu-overlay {
    position: fixed;
    top: 0 !important;  /* ÃÖ»ó´Ü °íÁ¤ */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;  /* ¸í½ÃÀû ³ôÀÌ ÁöÁ¤ */
    height: 100dvh; /* µ¿Àû ºäÆ÷Æ® ³ôÀÌ (ÃÖ½Å ºê¶ó¿ìÀú) */
    background: white;
    z-index: 99999;  /* z-index ´õ ³ô°Ô */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 20px;
    min-height: 100vh;
    min-height: 100dvh; /* µ¿Àû ºäÆ÷Æ® ³ôÀÌ */
    height: 100%;  /* ³ôÀÌ 100% Ãß°¡ */
    display: flex;
    flex-direction: column;
    background: white;  /* ¹è°æ»ö ¸í½Ã */
}

/* body ½ºÅ©·Ñ ¹æÁö Å¬·¡½º Ãß°¡ */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
}

/* ¸ð¹ÙÀÏ ³×ºñ°ÔÀÌ¼Ç ¸®½ºÆ® */
.mobile-nav-list {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
}

.mobile-nav-list > li {
    margin-bottom: 5px;
}

.mobile-nav-list > li > a {
    display: block;
    padding: 16px;
    color: #333;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-list > li > a:active {
    background: #f0f0f0;
    transform: scale(0.98);
}

/* ¸ð¹ÙÀÏ µå·Ó´Ù¿î */
.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.mobile-dropdown-toggle:active {
    background: #f0f0f0;
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    color: #666;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    display: none;
    list-style: none;
    padding: 0 0 10px 20px;
    margin: 0;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-dropdown-menu a {
    display: block;
    padding: 14px 16px;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-dropdown-menu a:active {
    background: #f0f0f0;
    color: #000000;
    transform: scale(0.98);
}

/* ¸ð¹ÙÀÏ ¹®ÀÇÇÏ±â ¹öÆ° */
.mobile-contact-btn {
    display: block;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white !important;
    padding: 16px;
    text-align: center;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 10px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-contact-btn:active {
    transform: scale(0.98);
}

/* ¸ð¹ÙÀÏ ÇÏ´Ü ¿¬¶ôÃ³ */
.mobile-menu-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.mobile-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.mobile-call-btn:active {
    transform: scale(0.98);
}

/* ¹ÝÀÀÇü ½ºÅ¸ÀÏ */
@media (max-width: 768px) {
    #navbar {
        height: 60px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    body {
        padding-top: 60px;
    }
}

/* iOS ¾ÈÀü ¿µ¿ª ´ëÀÀ */
@supports (padding: env(safe-area-inset-top)) {
    .mobile-menu-content {
        padding-top: calc(20px + env(safe-area-inset-top));
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* ÆäÀÌÁö ¿©¹é Á¶Á¤ */
body {
    padding-top: 80px;
}

/* ¸ð¹ÙÀÏ ¸Þ´º Çì´õ - ¼öÁ¤µÈ ºÎºÐ */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    height: 60px; /* ³ôÀÌ °íÁ¤ */
}

.mobile-logo {
    display: flex;
    align-items: center;
}

.mobile-logo img {
    height: 35px !important; /* °íÁ¤ ³ôÀÌ */
    width: auto !important;
    max-width: 150px; /* ÃÖ´ë ³Êºñ Á¦ÇÑ */
    display: block;
    object-fit: contain; /* ºñÀ² À¯Áö */
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0; /* Å©±â °íÁ¤ */
}

.mobile-menu-close i {
    font-size: 24px;
    color: #333;
    display: block;
    line-height: 1;
}

/* X ¹öÆ° È£¹ö/¾×Æ¼ºê È¿°ú Ãß°¡ */
.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

.mobile-menu-close:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}