/* --- Mobile Mega Menu Simplification --- */
@media (max-width: 768px) {
    /* Hide desktop mega menu columns and layout */
    .mega-menu {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        box-shadow: none !important;
        background: #fff !important;
        padding: 0 !important;
        border-radius: 0 !important;
        z-index: 1001;
        display: none;
        max-height: 60vh;
        overflow-y: auto;
    }
    .nav-item-mega.open .mega-menu {
        display: block;
    }
    .mega-menu-container {
        display: block !important;
        padding: 0 !important;
    }
    .mega-menu-column {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 0 12px 0 !important;
        border: none !important;
    }
    .mega-menu-title {
        font-size: 1.1rem !important;
        font-weight: 600;
        margin: 16px 0 4px 16px !important;
        color: #0F2854;
    }
    .mega-menu-list {
        padding: 0;
        margin: 0 0 0 8px;
        list-style: none;
    }
    .mega-menu-link,
    .dropdown-item {
        display: block;
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        color: #1C4D8D;
        background: none;
        border: none;
        text-align: left;
        text-decoration: none;
        border-radius: 0;
        transition: background 0.2s;
    }
    .mega-menu-link:active,
    .mega-menu-link:focus,
    .mega-menu-link:hover,
    .dropdown-item:active,
    .dropdown-item:focus,
    .dropdown-item:hover {
        background: #f0f4fa;
        color: #0F2854;
    }
    /* Make tap targets large enough */
    .mega-menu-link,
    .dropdown-item {
        min-height: 44px;
        line-height: 1.3;
    }
    /* Hide dropdown arrow icon if needed */
    .nav-dropdown-toggle .dropdown-icon {
        display: none !important;
    }
}
/* ===========================
   MODERN NAVBAR - KOREAN MINIMAL STYLE
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* NAVBAR CONTAINER */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E5E5;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* LOGO SECTION */
.navbar-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-2px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-badge {
    width: 42px;
    height: 42px;
    background: #14396a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo-link:hover .brand-badge {
    background: #1a4a87;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 2px;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #14396a;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1;
}

.brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: #14396a;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* DESKTOP NAVIGATION */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #222222;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3A68B8;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #3A68B8;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #3A68B8;
}

.nav-link.active::after {
    width: 100%;
}

/* DROPDOWN TOGGLE */
.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-family: inherit;
}

.nav-item-mega .nav-dropdown-toggle {
    color: #222222;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.nav-item-mega .nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3A68B8;
    transition: width 0.3s ease;
}

.nav-item-mega.active .nav-dropdown-toggle {
    color: #3A68B8;
}

.nav-item-mega.active .nav-dropdown-toggle::after {
    width: 100%;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-icon,
.nav-item-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    min-width: 260px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #222222;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.dropdown-item:hover {
    background: #F7F9FC;
    color: #3A68B8;
    padding-left: 24px;
}

.dropdown-icon-item {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* RIGHT SECTION */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: transparent;
    border: 2px solid #3A68B8;
    border-radius: 50px;
    color: #3A68B8;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: #3A68B8;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(58, 104, 184, 0.3);
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #222222;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* MOBILE MENU */
.mobile-menu {
    position: fixed;
    top: 85px;
    left: 0;
    width: 100%;
    height: calc(100vh - 85px);
    background: #FFFFFF;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-menu {
    list-style: none;
    padding: 30px 40px;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #F0F0F0;
}

.mobile-nav-link {
    display: block;
    padding: 18px 0;
    color: #222222;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #3A68B8;
    padding-left: 8px;
}

.mobile-dropdown-toggle {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}

.mobile-dropdown-toggle .dropdown-icon {
    transition: transform 0.3s ease;
}

.mobile-dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #F7F9FC;
    margin: 0 -40px;
    padding: 0;
}

.mobile-dropdown-toggle[aria-expanded="true"] + .mobile-dropdown-menu {
    max-height: 400px;
    padding: 8px 0;
}

.mobile-dropdown-item {
    display: block;
    padding: 14px 40px 14px 60px;
    color: #222222;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-dropdown-item:hover {
    background: #FFFFFF;
    color: #3A68B8;
    padding-left: 70px;
}

.mobile-nav-contact {
    border-bottom: none;
    padding-top: 20px;
}

.mobile-contact-btn {
    display: block;
    text-align: center;
    padding: 14px 0;
    background: #3A68B8;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.mobile-contact-btn:hover {
    background: #2E5399;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(58, 104, 184, 0.3);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 25px;
        height: 78px;
    }

    .nav-menu {
        gap: 24px;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .brand-badge {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .brand-sub {
        font-size: 0.68rem;
    }

    .contact-btn {
        padding: 9px 24px;
        font-size: 0.875rem;
    }

    .mobile-menu {
        top: 78px;
        height: calc(100vh - 78px);
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 18px;
        height: 72px;
        gap: 12px;
    }

    .nav-menu {
        display: none !important;
    }

    .navbar-right .contact-btn {
        display: none !important;
    }

    .navbar-right {
        gap: 0;
    }

    .menu-toggle {
        display: flex;
        padding: 6px;
        margin-left: auto;
    }

    .mobile-menu {
        top: 72px;
        height: calc(100vh - 72px);
    }

    .mobile-nav-menu {
        padding: 22px 18px;
    }

    .mobile-dropdown-menu {
        margin: 0 -18px;
    }

    .mobile-dropdown-item {
        padding: 14px 18px 14px 36px;
    }

    .mobile-dropdown-item:hover {
        padding-left: 42px;
    }

    .mobile-nav-contact {
        border-bottom: none;
        padding-top: 20px;
        margin-top: 10px;
    }

    .mobile-contact-btn {
        display: block;
        width: 100%;
    }

    .brand-badge {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
        border-radius: 7px;
    }

    .brand {
        gap: 10px;
    }

    .brand-name {
        font-size: 0.975rem;
    }

    .brand-sub {
        font-size: 0.63rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 14px;
        height: 68px;
    }

    .nav-menu {
        display: none !important;
    }

    .navbar-right .contact-btn {
        display: none !important;
    }

    .navbar-right {
        gap: 0;
    }

    .brand-badge {
        width: 34px;
        height: 34px;
        font-size: 1.15rem;
        border-radius: 6px;
    }

    .brand {
        gap: 9px;
    }

    .brand-name {
        font-size: 0.92rem;
    }

    .brand-sub {
        font-size: 0.6rem;
    }

    .mobile-menu {
        top: 68px;
        height: calc(100vh - 68px);
    }

    .mobile-nav-menu {
        padding: 18px 14px;
    }

    .mobile-dropdown-menu {
        margin: 0 -14px;
    }

    .mobile-dropdown-item {
        padding: 14px 14px 14px 32px;
    }

    .mobile-dropdown-item:hover {
        padding-left: 38px;
    }

    .mobile-nav-contact {
        border-bottom: none;
        padding-top: 18px;
        margin-top: 8px;
    }

    .mobile-contact-btn {
        display: block;
        width: 100%;
        padding: 13px 0;
        font-size: 0.95rem;
    }

    .menu-toggle {
        padding: 5px;
    }

    .menu-toggle span {
        width: 23px;
        height: 2px;
    }
}
/* ============================
   MEGA MENU STYLES
   ============================ */

.nav-item-mega .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 100vw;
    max-width: 1200px;
    background: #FFFFFF;
    padding: 45px 50px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s ease;
    pointer-events: none;
}

.nav-item-mega.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    max-height: 600px;
    pointer-events: auto;
}

.mega-menu-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 35px;
    max-width: 1100px;
    margin: 0 auto;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mega-menu-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222222;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3A68B8;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-menu-link {
    display: block;
    color: #555555;
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.mega-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #3A68B8;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.mega-menu-link:hover {
    background: rgba(58, 104, 184, 0.06);
    color: #3A68B8;
    padding-left: 20px;
}

.mega-menu-link:hover::before {
    width: 8px;
    left: 8px;
}

/* Services Mega Menu - Clean Minimal Style */
.services-mega {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 0;
}

.services-mega .mega-menu-column {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #E8E8E8;
}

.services-mega .mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    text-decoration: none;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mega-menu-service-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(58, 104, 184, 0.04);
    transition: height 0.3s ease;
    z-index: 0;
}

.mega-menu-service-link:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
    z-index: 1;
}

.mega-menu-service-link:hover .service-icon {
    transform: scale(1.15) translateY(-4px);
}

.service-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222222;
    text-align: center;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    z-index: 1;
}

.mega-menu-service-link:hover .service-title {
    color: #3A68B8;
}

/* Responsive */
@media (max-width: 1400px) {
    .nav-item-mega .dropdown-menu {
        max-width: 95vw;
        padding: 40px 35px;
    }
    
    .mega-menu-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 30px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-container {
        padding: 0 25px;
        height: 78px;
    }

    .nav-menu {
        gap: 24px;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .brand-badge {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .brand-sub {
        font-size: 0.68rem;
    }

    .contact-btn {
        padding: 9px 24px;
        font-size: 0.875rem;
    }

    .mobile-menu {
        top: 78px;
        height: calc(100vh - 78px);
    }
    
    .nav-item-mega .dropdown-menu {
        max-width: 90vw;
        padding: 35px 25px;
    }
    
    .mega-menu-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .nav-item-mega .dropdown-menu {
        max-width: 90vw;
        padding: 35px 25px;
    }
    
    .mega-menu-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* Disable mega menu on mobile - convert to regular link */
    .nav-item-mega .dropdown-menu {
        display: none;
    }
    
    .nav-item-mega .nav-dropdown-toggle {
        display: none;
    }
    
    /* Mobile menu keeps the mega menu structure for mobile navigation */
    .mobile-menu .nav-item-mega .dropdown-menu {
        display: block;
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 0;
        border-radius: 0;
        margin: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu .mega-menu-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mobile-menu .mega-menu-column {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
    }
    
    .mobile-menu .mega-menu-title {
        font-size: 0.85rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .mobile-menu .mega-menu-link {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}
