/* Critical CSS - 즉시 로드 필요 (모바일 최적화) */
:root {
    --primary-color: #ff6b35;
    --secondary-color: #ff8c42;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    /* 모바일 터치 최적화 */
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2);
    touch-action: manipulation;
}

.navbar {
    background: white !important;
}

.loading {
    opacity: 0;
}

.loaded {
    opacity: 1;
}

/* 모바일 메뉴 버튼 - Critical (즉시 로드 필요) */
.navbar-toggler,
.main-navbar-toggler {
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.7rem !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1001 !important;
    min-width: 48px !important;
    min-height: 48px !important;
    cursor: pointer !important;
    /* 모바일 터치 최적화 */
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
    user-select: none;
    outline: none !important;
}

.navbar-toggler:focus,
.main-navbar-toggler:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #dee2e6 !important;
}

.navbar-toggler:active,
.main-navbar-toggler:active {
    transform: scale(0.95) !important;
    background: rgba(255, 107, 53, 0.1) !important;
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler-icon,
.main-navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em !important;
    height: 1.5em !important;
    display: block !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% !important;
}

/* 모바일 메뉴 링크 - Critical */
@media (max-width: 991px) {
    .main-nav-link {
        padding: 0.8rem 1.2rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        margin: 0.2rem 0 !important;
        background: #f8f9fa !important;
        border: 1px solid #e9ecef !important;
        width: 100% !important;
        color: #2c3e50 !important;
        transition: all 0.15s ease !important;
        /* 모바일 터치 최적화 */
        -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2);
        touch-action: manipulation;
        cursor: pointer;
    }

    .main-nav-link:active {
        background: var(--primary-color) !important;
        color: white !important;
        transform: scale(0.98) !important;
    }
}

/* 현대적 네비게이션 스타일 - 하얀색 배경 */
.main-navbar {
    background: white !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 0.8rem 0;
}

.main-navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.main-navbar-brand {
    font-weight: 800;
    color: #2c3e50 !important;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-container {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Bootstrap Critical - 필수 레이아웃만 (FOUC 방지) */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

@media (max-width: 991px) {
    .navbar-collapse {
        display: none;
    }

    .navbar-collapse.show {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}

/* 버튼 기본 스타일 */
button {
    cursor: pointer;
    border: none;
    background: transparent;
}

/* 링크 기본 스타일 */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}