/* ============================================
   뉴시스형 상단메뉴 스킨 (top_skin1.css)
   ============================================ */

/* 전체 초기화 */
.newsis_header * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.newsis_header {
    background: #fff;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    position: relative;
}

/* ======= 1. Top Utility Bar ======= */
.top_utility_bar {
    border-bottom: 1px solid #e9e9e9;
    padding: 12px 0;
    background: #fff;
    transition: all 0.3s ease;
}

.top_utility_container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* 왼쪽: 날씨 정보 (실시간) */
.weather_info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.weather_icon {
    font-size: 24px;
    line-height: 1;
}

.date {
    color: #333;
    font-weight: 600;
}

.temperature {
    color: #0066cc;
    font-weight: 700;
}

/* 중앙: 로고 */
.header_logo {
    text-align: center;
    flex: 1;
}

.logo_image {
    max-height: 60px;
    height: auto;
    vertical-align: middle;
    transition: opacity 0.3s;
}

.logo_image:hover {
    opacity: 0.8;
}

.logo_main {
    font-size: 36px;
    font-weight: 900;
    color: #2c3e50;
    letter-spacing: -1px;
    display: inline-block;
    position: relative;
    transition: color 0.3s;
}

.logo_main:hover {
    color: #667eea;
}

/* 오른쪽: 로그인 & 소셜미디어 */
.social_links_area {
    text-align: right;
}

.login_area {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.login_area a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login_area a:hover {
    color: #667eea;
}

.login_area .link_separator {
    color: #ddd;
    margin: 0 5px;
}

.social_icons_row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.social_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    border-radius: 3px;
}

.social_icon:hover {
    color: #667eea;
    background: #f8f9fa;
}

/* ======= 2. Main Navigation Bar ======= */
.main_nav_bar {
    border-bottom: 2px solid #000;
    background: #fff;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease;
}

.main_nav_container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 0 20px;
}

/* 검색 아이콘 - 뉴시스 스타일 */
.search_icon_btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.search_icon_btn:hover {
    opacity: 0.7;
}

.search_icon_btn svg {
    width: 20px;
    height: 20px;
    stroke: #000;
    stroke-width: 2;
    fill: none;
}

/* 1차 메뉴 - 뉴시스 스타일 정확히 반영 */
.nav_menu {
    display: flex;
    gap: 0;
    list-style: none;
    flex: 1;
    align-items: center;
}

.nav_menu li {
    position: relative;
}

.nav_menu a {
    position: relative;
    display: inline-block;
    padding: 20px 0;
    margin: 0 12px;
    font-weight: bold;
    font-size: 16px;
    color: #000;
    text-decoration: none;
    transition: color 0.2s;
}

/* 마우스 오버 시 하단 라인 */
.nav_menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #17a2b8;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav_menu a:hover::after {
    transform: scaleX(1);
}

/* 현재 페이지 활성 상태 */
.nav_menu a.active {
    color: #000;
}

.nav_menu a.active::after {
    transform: scaleX(1);
}

/* ======= 3. Breaking News Ticker Bar ======= */
.breaking_news_ticker {
    border-bottom: 1px solid #e9e9e9;
    padding: 12px 0;
    background: #fff;
}

.breaking_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.breaking_slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.breaking_item {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: none;
    transition: opacity 0.3s ease;
    line-height: 1.6;
}

.breaking_item:hover {
    opacity: 0.7;
}

.breaking_time {
    color: #999;
    margin-right: 10px;
    font-weight: 400;
}

.breaking_badge {
    color: #dc3545;
    font-weight: 700;
    margin-right: 8px;
}

.breaking_text {
    color: #333;
}

.breaking_controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breaking_prev,
.breaking_next {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.breaking_prev:hover,
.breaking_next:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.breaking_counter {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}

.current_index {
    font-weight: 700;
    color: #333;
}

/* ======= 4. 스크롤 시 고정 헤더 ======= */
.newsis_header.scrolled .top_utility_bar {
    display: none;
}

.newsis_header.scrolled .main_nav_bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.newsis_header.scrolled .main_nav_container {
    padding: 10px 20px;
    justify-content: space-between;
}

/* 스크롤 시 검색 아이콘과 메뉴 숨김 */
.newsis_header.scrolled .search_icon_btn {
    display: none;
}

.newsis_header.scrolled .nav_menu {
    display: none;
}

.newsis_header.scrolled .breaking_news_ticker {
    display: none;
}

/* 스크롤 시 왼쪽에 소셜 아이콘 표시 */
.scrolled_social_icons {
    display: none;
    gap: 8px;
    margin-right: 20px;
}

.newsis_header.scrolled .scrolled_social_icons {
    display: flex;
}

.scrolled_social_icons .social_icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

/* 스크롤 시 중앙 로고 */
.scrolled_logo {
    display: none;
    margin: 0 auto;
}

.newsis_header.scrolled .scrolled_logo {
    display: block;
}

.scrolled_logo img {
    height: 35px;
}

.scrolled_logo .logo_text {
    font-size: 24px;
    font-weight: 900;
    color: #2c3e50;
}

/* 스크롤 시 우측 검색창 - 뉴시스 스타일 */
.scrolled_search_bar {
    display: none;
    align-items: center;
    border: 1px solid #000;
    background: #fff;
}

.newsis_header.scrolled .scrolled_search_bar {
    display: flex;
}

.scrolled_search_bar input {
    width: 200px;
    padding: 8px 12px;
    border: none;
    font-size: 14px;
    outline: none;
    color: #999;
}

.scrolled_search_bar input::placeholder {
    color: #999;
}

.scrolled_search_bar input:focus {
    color: #333;
}

.scrolled_search_bar button {
    padding: 8px 12px;
    background: #fff;
    color: #000;
    border: none;
    border-left: 1px solid #000;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.scrolled_search_bar button:hover {
    opacity: 0.7;
}

/* 기본 상태에서는 메뉴만 표시 */
.newsis_header:not(.scrolled) .scrolled_social_icons,
.newsis_header:not(.scrolled) .scrolled_logo,
.newsis_header:not(.scrolled) .scrolled_search_bar {
    display: none;
}

/* ======= 5. 검색 모달 ======= */
.search_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search_modal.active {
    display: flex;
}

.search_modal_content {
    background: #fff;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.search_modal_header h3 {
    font-size: 24px;
    color: #2c3e50;
}

.search_modal_close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.search_modal_close:hover {
    color: #333;
}

.search_form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search_form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9e9e9;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search_form input:focus {
    border-color: #667eea;
}

.search_form button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.search_form button:hover {
    transform: translateY(-2px);
}

.search_tips {
    font-size: 13px;
    color: #999;
    line-height: 1.8;
}

/* ======= 반응형 디자인 ======= */
@media (max-width: 768px) {
    .top_utility_container {
        flex-direction: column;
        gap: 10px;
    }
    
    .weather_info,
    .social_links_area {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .social_icons_row {
        justify-content: center;
    }
    
    .main_nav_container {
        gap: 15px;
    }
    
    .nav_menu {
        gap: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav_menu a {
        font-size: 14px;
        padding: 15px 0;
        margin: 0 8px;
    }
    
    .breaking_container {
        flex-direction: column;
        gap: 10px;
    }
    
    .breaking_item {
        font-size: 13px;
    }
    
    .breaking_controls {
        width: 100%;
        justify-content: center;
    }
    
    .scrolled_search_bar input {
        width: 150px;
    }
    
    .search_modal_content {
        width: 95%;
        padding: 25px;
    }
}
