/* Navigation CSS - Complete Version with Language Switcher Support */
/* Use this file for both www and kor subdomains */

/* ========================================
   Desktop Language Flags
   ======================================== */

#desktop-language-flags {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

#desktop-language-flags .lang-flag {
    display: inline-block;
    transition: opacity 0.2s ease;
}

#desktop-language-flags .lang-flag:hover {
    opacity: 0.7;
}

#desktop-language-flags .lang-flag img {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Hide desktop flags on mobile */
@media (max-width: 991px) {
    #desktop-language-flags {
        display: none !important;
    }
}

/* ========================================
   Mobile Language Switcher
   ======================================== */

.language-switcher-mobile {
    display: none;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.language-switcher-mobile .lang-flag {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.language-switcher-mobile .lang-flag:hover {
    opacity: 0.7;
}

.language-switcher-mobile .lang-flag img {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Show mobile flags on mobile, hide on desktop */
@media (max-width: 991px) {
    .language-switcher-mobile {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .language-switcher-mobile {
        display: none !important;
    }
}

/* ========================================
   Mobile Header Adjustments
   ======================================== */

.mobile-header {
    background-color: #1a5f6f !important;
}

.mobile-header .navbar {
    padding: 0.5rem 1rem;
    background-color: #1a5f6f !important;
}

/* Hide mobile header on desktop */
@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
}

.mobile-header .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .navbar-toggler {
    order: 1;
    margin-right: auto;
}

.mobile-header .language-switcher-mobile {
    order: 2;
    margin-left: auto;
}

/* ========================================
   Hamburger Menu Button
   ======================================== */

.hamburger-menu {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hamburger-menu:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-text {
    font-size: 1rem;
    font-weight: 500;
    color: white;
}

/* ========================================
   Off-Canvas Mobile Navigation Panel
   ======================================== */

.mobile-nav-panel {
    background: #2c5f5d;
    color: white;
}

.mobile-nav-panel .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.mobile-nav-panel .offcanvas-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-nav-panel .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.mobile-nav-panel .btn-close:hover {
    opacity: 1;
}

.mobile-nav-panel .offcanvas-body {
    padding: 0;
}

/* ========================================
   Mobile Navigation List
   ======================================== */

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

.nav-list .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-list .nav-item > a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.nav-list .nav-item > a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-list .nav-item.active > a {
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* ========================================
   Mobile Navigation Submenus
   ======================================== */

.nav-list .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.1);
}

.nav-list .submenu .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-list .submenu .nav-item:last-child {
    border-bottom: none;
}

.nav-list .submenu .nav-item a {
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    font-size: 0.95rem;
}

.nav-list .submenu .nav-item.active a {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 575px) {
    .hamburger-menu {
        padding: 6px 10px;
    }
    
    .menu-text {
        font-size: 0.9rem;
    }
    
    .language-switcher-mobile .lang-flag img {
        width: 30px;
        height: auto;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .language-switcher-mobile {
        gap: 10px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.lang-flag:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.lang-flag[aria-current="page"] {
    position: relative;
}

.lang-flag[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    border-radius: 1px;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .mobile-header,
    .language-switcher-mobile,
    #desktop-language-flags {
        display: none !important;
    }
}

/* ========================================
   Bottom Navigation (Mobile)
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
    flex: 1;
    text-align: center;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.bottom-nav-item .nav-label {
    display: block;
    font-size: 0.7rem;
    white-space: nowrap;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus {
    color: #007bff;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #007bff;
    font-weight: 600;
}

/* Add padding to body to prevent content being hidden behind bottom nav */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
    }
}
