/* ==========================================================================
   ヘッダーコンポーネント
   /assets/css/components/header.css
   ========================================================================== */

/* ==========================================================================
   ヘッダー全体のスタイル
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* トップページのヘッダーは透明に */
.site-header.transparent {
    background: rgba(255, 255, 255, 0);
    box-shadow: none;
}

.site-header.transparent .logo-title,
.site-header.transparent .nav-menu a,
.site-header.transparent .cta-secondary {
    color: white;
}

.site-header.transparent .cta-secondary {
    border-color: white;
}

.site-header.transparent .hamburger span {
    background: white;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.site-header.scrolled .logo-title,
.site-header.scrolled .nav-menu a,
.site-header.scrolled .cta-secondary {
    color: #333;
}

.site-header.scrolled .cta-secondary {
    border-color: #1a3d5c;
}

.site-header.scrolled .hamburger span {
    background: #333;
}

/* ==========================================================================
   ヘッダーコンテナ
   ========================================================================== */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* ==========================================================================
   ロゴエリア
   ========================================================================== */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: translateY(-2px);
}

.logo-text {
    margin-left: 15px;
}

.logo-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    color: #1a3d5c;
}

.site-header.transparent .logo-title {
    color: white;
}

.site-header.scrolled .logo-title {
    color: #1a3d5c;
}

.logo-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.site-header.transparent .logo-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.site-header.scrolled .logo-subtitle {
    color: #666;
}

/* 税理士法人名のスタイル */
.site-logo-text {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: #1a3d5c;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: #2e7d32;
}

.site-header.transparent .logo-link {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.site-header.transparent .logo-link:hover {
    color: #4ade80;
}

.site-header.scrolled .logo-link {
    color: #1a3d5c;
}

.site-header.scrolled .logo-link:hover {
    color: #2e7d32;
}

/* ==========================================================================
   ナビゲーション
   ========================================================================== */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
    color: #333;
}

.site-header.transparent .nav-menu a {
    color: white;
}

.site-header.scrolled .nav-menu a {
    color: #333;
}

/* お問い合わせを強調 */
.nav-menu li:last-child a {
    color: #2e7d32 !important;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid #2e7d32;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.site-header.transparent .nav-menu li:last-child a {
    color: white !important;
    border-color: white;
}

.site-header.scrolled .nav-menu li:last-child a {
    color: #2e7d32 !important;
    border-color: #2e7d32;
}

.nav-menu li:last-child a:hover {
    background: #2e7d32;
    color: white !important;
}

.site-header.transparent .nav-menu li:last-child a:hover {
    background: white;
    color: #2e7d32 !important;
}

/* ホバー時の下線エフェクト（お問い合わせ以外） */
.nav-menu li:not(:last-child) a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2e7d32;
    transition: width 0.3s ease;
}

.nav-menu li:not(:last-child) a:hover {
    color: #2e7d32 !important;
}

.nav-menu li:not(:last-child) a:hover::after {
    width: 100%;
}

/* ==========================================================================
   モバイルメニュー
   ========================================================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.site-header.transparent .hamburger span {
    background: white;
}

.site-header.scrolled .hamburger span {
    background: #333;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ==========================================================================
   モバイルナビゲーション
   ========================================================================== */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 999;
}

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

.mobile-nav .nav-menu {
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.mobile-nav .nav-menu li {
    border-bottom: 1px solid #eee;
    width: 100%;
    margin: 0;
}

.mobile-nav .nav-menu li:last-child {
    border-bottom: 1px solid #eee;
    margin-top: 0;
}

.mobile-nav .nav-menu a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    color: #333 !important;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.mobile-nav .nav-menu li:last-child a {
    text-align: center;
    background: #2e7d32;
    color: white !important;
    border: none;
    margin: 0;
    border-radius: 0;
    font-weight: 600;
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 20px;
    }
    
    .nav-menu a {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav {
        display: block !important;
    }
}

@media (max-width: 968px) {
    .header-main {
        padding: 15px 0;
    }
    
    .logo-title {
        font-size: 20px;
    }
}