/**
 * 우리마음상담센터 - 헤더/푸터 스타일
 */

/* ========================================
   헤더 스타일
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0;
    background: linear-gradient(to right, #f0f0f0 0%, #ffffff 15%, #ffffff 85%, #f0f0f0 100%);
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0;
    border-bottom: none;
    line-height: 1;
}

.header-main-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.row-1 {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.row-2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* 로고 */
.site-logo .logo-link {
    display: block;
    width: 200px;
    height: 60px;
    background-image: url('../images/woorimaum logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    text-indent: -9999px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.site-logo .logo-link:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* 전화번호 버튼 */
.direct-number, .emergency-number {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    box-sizing: border-box;
}

.direct-number {
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    color: white;
}

.emergency-number {
    background: linear-gradient(135deg, #3498DB, #5DADE2);
    color: white;
}

.direct-number:hover {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
    color: white;
}

.emergency-number:hover {
    background: linear-gradient(135deg, #2980B9, #3498DB);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
    color: white;
}

/* ========================================
   네비게이션
   ======================================== */
.main-navigation {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 998;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 50px;
    border-bottom: 1px solid #f1f1f1;
}

.main-navigation .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

.nav-wrapper {
    height: 100%;
    width: 100%;
}

.desktop-menu {
    height: 100%;
}

/* 메뉴 스타일 */
.main-menu {
    display: flex;
    height: 50px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

.main-menu li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin: 0;
    padding: 0;
    border-right: 1px solid #f1f1f1;
}

.main-menu li:last-child {
    border-right: none;
}

.main-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    padding: 0 clamp(2px, 0.8vw, 5px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    text-align: center;
}

.main-menu a:hover {
    color: #27AE60;
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    transform: scale(1.02);
}

/* 모바일 메뉴 토글 */
.mobile-menu-toggle {
    display: none;
}

/* ========================================
   푸터
   ======================================== */
.site-footer {
    background: #ffffff;
    color: #333;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #27AE60;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #666;
}

.contact-info-item strong {
    min-width: 60px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    color: #888;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

/* 작은 화면에서 메뉴 추가 조정 */
@media (max-width: 1200px) {
    .main-menu a {
        font-size: clamp(0.85rem, 1.3vw, 0.9rem);
        padding: 0 clamp(1px, 0.6vw, 4px);
    }
    
    .main-menu a:hover {
        font-size: clamp(0.9rem, 1.4vw, 0.95rem);
        transform: scale(1.01);
    }
}

@media (max-width: 900px) {
    .main-menu a {
        font-size: clamp(0.8rem, 1.1vw, 0.85rem);
        padding: 0 clamp(1px, 0.4vw, 3px);
    }
    
    .main-menu a:hover {
        font-size: clamp(0.85rem, 1.2vw, 0.9rem);
        transform: scale(1.01);
    }
}

/* ========================================
   반응형 헤더/푸터
   ======================================== */
@media (max-width: 768px) {
    /* 헤더 배경 완전 불투명 */
    .site-header {
        background: linear-gradient(to right, #f0f0f0 0%, #ffffff 10%, #ffffff 90%, #f0f0f0 100%) !important;
    }
    
    /* 헤더 모바일 스타일 - 3단 구조 */
    .header-main-flex {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .row-1 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .row-2 {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    .site-logo {
        flex: 1;
    }
    
    .mobile-menu-toggle {
        order: 2;
        display: block !important;
    }
    
    .hamburger-btn {
        display: flex !important;
    }
    
    /* 네비게이션 숨기기 */
    .main-navigation {
        height: 0px !important;
        overflow: hidden !important;
        border-bottom: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* 햄버거 버튼은 보이도록 */
    .hamburger-btn {
        visibility: visible !important;
        display: flex !important;
    }
    
    .desktop-menu,
    .main-menu {
        display: none !important;
    }
    
    /* 모바일 메뉴 토글 보이기 */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* 전화번호 버튼 모바일 조정 */
    .direct-number, .emergency-number {
        min-width: 120px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        box-sizing: border-box;
    }
    
    /* 모바일 호버 효과 */
    .direct-number:hover {
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4);
    }
    
    .emergency-number:hover {
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    }
    
    /* 푸터 모바일 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-content {
        padding: 2rem 0 1rem;
    }
}

/* 아이폰 같은 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    .header-main-flex {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .row-1 {
        gap: 1rem;
    }
    
    .row-2 {
        gap: 0.5rem;
    }
    
    /* 전화번호 버튼 더 작게 */
    .direct-number, .emergency-number {
        min-width: 100px;
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        height: 35px;
        border-radius: 20px;
    }
    
    /* 로고 크기 조정 */
    .site-logo .logo-link img {
        max-height: 35px;
    }
    
    /* 햄버거 메뉴 버튼 크기 조정 */
    .hamburger-btn {
        width: 35px;
        height: 35px;
        padding: 0.3rem;
    }
    
    .hamburger-btn span {
        height: 2px;
    }
}
