/* Navigation - layout/navigation.css */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    z-index: var(--z-navbar);
    padding: var(--spacing-sm) var(--spacing-lg);
    box-shadow: 0 2px 30px rgba(0,0,0,0.08);
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: inherit;
}

.logo img {
    width: 80px;
    height: 80px;
}

.logo-text {
    color: black;
}

.logo-main {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: black;
    /* background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; */
}

.logo-sub {
    font-size: var(--font-size-sm);
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
    color: black;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    margin-left: auto;
    margin-right: var(--spacing-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    padding: var(--spacing-xs) 0;
}

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

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-normal);
    padding: var(--spacing-xs) 0;
}

.dropdown-toggle:hover {
    color: var(--primary-color);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition-normal);
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    padding: var(--spacing-xs) 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: var(--z-dropdown);
    border: 1px solid var(--border-color);
    margin-top: var(--spacing-xs);
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 400;
    transition: all var(--transition-normal);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

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

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* Language Selector */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    height: 50px;
}

.language-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.language-toggle #current-lang {
    font-size: var(--font-size-base);
}

.flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
}

.flag.en { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="40" fill="%23B22234"/><path d="M0,0 L0,3.077 L60,3.077 L60,0 Z M0,6.154 L60,6.154 L60,9.231 L0,9.231 Z M0,12.308 L60,12.308 L60,15.385 L0,15.385 Z M0,18.462 L60,18.462 L60,21.538 L0,21.538 Z M0,24.615 L60,24.615 L60,27.692 L0,27.692 Z M0,30.769 L60,30.769 L60,33.846 L0,33.846 Z M0,36.923 L60,36.923 L60,40 L0,40 Z" fill="%23FFFFFF"/><rect width="24" height="17.143" fill="%23002868"/><g fill="%23FFFFFF"><circle cx="2" cy="2" r="0.3"/><circle cx="6" cy="2" r="0.3"/><circle cx="10" cy="2" r="0.3"/><circle cx="14" cy="2" r="0.3"/><circle cx="18" cy="2" r="0.3"/><circle cx="22" cy="2" r="0.3"/><circle cx="4" cy="4" r="0.3"/><circle cx="8" cy="4" r="0.3"/><circle cx="12" cy="4" r="0.3"/><circle cx="16" cy="4" r="0.3"/><circle cx="20" cy="4" r="0.3"/><circle cx="2" cy="6" r="0.3"/><circle cx="6" cy="6" r="0.3"/><circle cx="10" cy="6" r="0.3"/><circle cx="14" cy="6" r="0.3"/><circle cx="18" cy="6" r="0.3"/><circle cx="22" cy="6" r="0.3"/><circle cx="4" cy="8" r="0.3"/><circle cx="8" cy="8" r="0.3"/><circle cx="12" cy="8" r="0.3"/><circle cx="16" cy="8" r="0.3"/><circle cx="20" cy="8" r="0.3"/><circle cx="2" cy="10" r="0.3"/><circle cx="6" cy="10" r="0.3"/><circle cx="10" cy="10" r="0.3"/><circle cx="14" cy="10" r="0.3"/><circle cx="18" cy="10" r="0.3"/><circle cx="22" cy="10" r="0.3"/><circle cx="4" cy="12" r="0.3"/><circle cx="8" cy="12" r="0.3"/><circle cx="12" cy="12" r="0.3"/><circle cx="16" cy="12" r="0.3"/><circle cx="20" cy="12" r="0.3"/><circle cx="2" cy="14" r="0.3"/><circle cx="6" cy="14" r="0.3"/><circle cx="10" cy="14" r="0.3"/><circle cx="14" cy="14" r="0.3"/><circle cx="18" cy="14" r="0.3"/><circle cx="22" cy="14" r="0.3"/><circle cx="4" cy="16" r="0.3"/><circle cx="8" cy="16" r="0.3"/><circle cx="12" cy="16" r="0.3"/><circle cx="16" cy="16" r="0.3"/><circle cx="20" cy="16" r="0.3"/></g></svg>');  }
.flag.ja { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="40" fill="%23fff"/><circle cx="30" cy="20" r="12" fill="%23BC002D"/></svg>'); }
.flag.ko { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200"><rect width="300" height="200" fill="%23ffffff"/><g transform="translate(150,100)"><circle cx="0" cy="0" r="40" fill="%23C60C30"/><path d="M-40,0 A40,40 0 0,1 0,-40 A20,20 0 0,0 0,0 A40,40 0 0,1 40,0 A20,20 0 0,0 0,0 A40,40 0 0,1 0,40 A20,20 0 0,0 0,0 A40,40 0 0,1 -40,0 A20,20 0 0,0 0,0 z" fill="%230047A0"/></g><g fill="%23000000"><g transform="translate(75,50) rotate(-56.3)"><rect x="-30" y="-3" width="60" height="6"/><rect x="-30" y="6" width="60" height="6"/><rect x="-30" y="15" width="60" height="6"/><rect x="-30" y="-15" width="30" height="6"/><rect x="0" y="-24" width="30" height="6"/><rect x="0" y="24" width="30" height="6"/></g><g transform="translate(225,50) rotate(56.3)"><rect x="-30" y="-3" width="60" height="6"/><rect x="-30" y="15" width="60" height="6"/><rect x="-30" y="6" width="30" height="6"/><rect x="0" y="-12" width="30" height="6"/><rect x="-30" y="-21" width="30" height="6"/><rect x="0" y="24" width="30" height="6"/></g><g transform="translate(75,150) rotate(56.3)"><rect x="-30" y="-15" width="60" height="6"/><rect x="-30" y="3" width="60" height="6"/><rect x="-30" y="12" width="30" height="6"/><rect x="0" y="-6" width="30" height="6"/><rect x="-30" y="-24" width="30" height="6"/><rect x="0" y="21" width="30" height="6"/></g><g transform="translate(225,150) rotate(-56.3)"><rect x="-30" y="-12" width="60" height="6"/><rect x="-30" y="-3" width="60" height="6"/><rect x="-30" y="6" width="60" height="6"/><rect x="-30" y="15" width="30" height="6"/><rect x="0" y="-21" width="30" height="6"/><rect x="0" y="24" width="30" height="6"/></g></g></svg>'); }
.flag.zh-TW { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="40" fill="%23fe0000"/><rect width="30" height="20" fill="%23000095"/><polygon points="15,4 16.5,8.5 21,7 18,11 22,13.5 17,13.5 15,18 13,13.5 8,13.5 12,11 9,7 13.5,8.5" fill="%23fff"/></svg>'); }

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-xs);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    min-width: 150px;
    z-index: var(--z-dropdown);
}

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

.language-option {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
    padding: 0.8rem var(--spacing-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
    border:none;
    width: 100%;
    background: transparent;
    justify-content: flex-start;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--bg-light);
}

.language-option.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-normal);
}

.mobile-menu-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-normal);
    border-radius: 2px;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all var(--transition-normal);
    z-index: 999;
}

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

.mobile-menu-content {
    padding: var(--spacing-sm) 0;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.mobile-nav-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-lg);
    transition: all var(--transition-normal);
    border-left: 4px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.mobile-dropdown-menu {
    padding-left: var(--spacing-sm);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 300px;
}

.mobile-dropdown.active .mobile-dropdown-toggle {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary-color);
}

.mobile-dropdown.active {
    border-left: 4px solid var(--primary-color);
}

.mobile-dropdown-item {
    display: block;
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-normal);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.mobile-dropdown-item:hover {
    color: var(--primary-color);
}

.mobile-dropdown-item:last-child {
    border-bottom: none;
}