/* ============================================
   NURIINFRA Layout Components
   헤더, 푸터, 네비게이션 공통 스타일
   (각 페이지 인라인 CSS에서 추출)
============================================ */

/* ==============================
   Skip Link (접근성)
============================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--color-accent-blue, #0066ff);
    color: var(--color-text-primary, #ffffff);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}

/* ==============================
   Header
============================== */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height, 80px); z-index: 1000; transition: background 0.3s ease, backdrop-filter 0.3s ease; }
.header.scrolled { background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

/* ==============================
   Logo
============================== */
.logo { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 700; }
.logo-img { height: 40px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 1.3rem; }
.logo-sub { font-size: 0.7rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); font-weight: 400; }

/* ==============================
   Navigation
============================== */
.nav { display: flex; align-items: center; gap: 40px; }
.nav-link { font-size: 0.95rem; color: var(--color-text-secondary, rgba(255, 255, 255, 0.7)); transition: color 0.2s ease; position: relative; }
.nav-link:hover { color: var(--color-text-primary, #ffffff); }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--color-accent-cyan, #00d4ff), var(--color-accent-blue, #0066ff)); transition: width 0.2s ease; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--color-text-primary, #ffffff); }
.nav-link.active::after { width: 100%; }

/* ==============================
   Header Actions & Buttons
============================== */
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: var(--radius-md, 8px); font-size: 0.95rem; font-weight: 600; transition: all var(--transition-base, 0.2s ease); }
.btn-primary { background: var(--gradient-primary, linear-gradient(135deg, #00d4ff 0%, #0066ff 50%, #8b5cf6 100%)); color: var(--color-white, white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow, 0 0 40px rgba(0, 212, 255, 0.3)); }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.3); color: var(--color-text-primary, #ffffff); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--color-accent-cyan, #00d4ff); }
.btn-text { background: none; border: none; color: rgba(255, 255, 255, 0.6); cursor: pointer; }
.btn-text:hover { color: var(--color-accent-cyan, #00d4ff); }
.btn-logout:hover { color: var(--color-error, #ef4444); }
.member-btns { display: flex; align-items: center; gap: 8px; }
/* 헤더 로그인 상태 버튼 크기 조정 */
.btn-mypage { font-size: 0.85rem; padding: 8px 14px; white-space: nowrap; }
.btn-logout { font-size: 0.85rem; padding: 8px 12px; }
/* 모바일 메뉴 내 액션 버튼 (로그인/마이페이지/로그아웃) */
.mobile-nav-actions .btn { font-size: 0.95rem; padding: 12px 20px; }

/* ==============================
   Mobile Menu Button
============================== */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; }
.mobile-menu-btn span { width: 24px; height: 2px; background: var(--color-text-primary, #ffffff); transition: all 0.2s ease; }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==============================
   Footer
============================== */
.footer { background: var(--color-bg-secondary, #12121a); padding: 80px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p { color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); font-size: 0.9rem; line-height: 1.7; margin-bottom: 24px; }
.footer-info { font-size: 0.85rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); }
.footer-info p { margin-bottom: 8px; }
.footer-title { font-size: 1rem; font-weight: 600; margin-bottom: 24px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--color-accent-cyan, #00d4ff); }
.footer-bottom { padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; align-items: center; }
.footer-copyright { font-size: 0.85rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 0.85rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); transition: color 0.2s ease; }
.footer-legal a:hover { color: var(--color-text-primary, #ffffff); }

/* 모바일 전용 요소 데스크톱에서 숨김 */
.mobile-nav-actions { display: none; }

/* ==============================
   Hover 효과 모바일 비활성화
============================== */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover { color: var(--color-text-secondary, rgba(255, 255, 255, 0.7)); }
    .nav-link:hover::after { width: 0; }
    .btn-primary:hover { transform: none; box-shadow: none; }
    .btn-outline:hover { background: none; border-color: rgba(255, 255, 255, 0.3); }
    .footer-links a:hover { color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); }
}

/* ==============================
   Mobile Responsive
============================== */
@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-menu-btn { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height, 80px);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        padding: 40px 24px;
        gap: 24px;
        z-index: 999;
        align-items: center;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* 모바일 메뉴 내 로그인/마이페이지 링크 영역 */
    .nav.mobile-open .mobile-nav-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; margin-top: 16px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
    .nav.mobile-open .mobile-nav-actions .btn { width: 100%; justify-content: center; }
    .nav.mobile-open .nav-link { font-size: 1.2rem; color: var(--color-text-primary, #ffffff); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
    .header-actions .btn-primary { display: none; }
    .header-actions .btn-outline,
    .header-actions .member-btns { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
