/* ========================================
   ナチュラル・ヘッダーデザインシステム
   ======================================== */

/* CSS変数（ヘッダー専用） */
:root {
    --header-height: 100px;
    --header-message-height: 35px;
    --mobile-menu-z-index: 9999;
    --header-z-index: 1000;
    --admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
    :root {
        --admin-bar-height: 46px;
        --header-height: 80px;
        --header-message-height: 30px;
    }
}

/* ========================================
   ヘッダーメッセージエリア
   ======================================== */
.header-message {
    background: linear-gradient(135deg, var(--bg-sage) 0%, var(--bg-cream) 100%);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(143, 188, 143, 0.2);
    position: relative;
    overflow: hidden;
}

.header-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header-message-text {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: center;
    color: var(--text);
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.message-icon {
    font-size: 1rem;
    opacity: 0.8;
    animation: float 2s ease-in-out infinite;
}

.message-icon:nth-child(3) {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* ========================================
   メインヘッダー
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--header-z-index);
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-sage) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 管理バー対応 */
.admin-bar .site-header {
    top: var(--admin-bar-height);
}

.header-main {
    padding: var(--space-lg) 0;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========================================
   サイトブランディング（ロゴエリア）
   ======================================== */
.site-branding {
    flex: 0 0 auto;
}

/* カスタムロゴ */
.custom-logo-wrapper {
    position: relative;
}

.custom-logo-link {
    display: block;
    transition: transform 0.3s ease;
}

.custom-logo-link:hover {
    transform: scale(1.05);
}

.custom-logo {
    height: auto;
    max-height: 120px;
    width: auto;
    max-width: 400px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* サイトタイトル（ロゴがない場合） */
.site-identity {
    position: relative;
}

.site-title {
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
}

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

.site-title-main {
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: 2px;
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.site-title-sub {
    font-size: 1rem;
    color: var(--text-soft);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ========================================
   デスクトップナビゲーション
   ======================================== */
.desktop-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-sm);
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.8px;
    padding: var(--space-sm) var(--space-md);
    transition: all 0.3s ease;
    position: relative;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    text-transform: lowercase;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(143, 188, 143, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-menu a:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--sage));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(143, 188, 143, 0.3);
    border-color: var(--primary);
}

.nav-menu a::after {
    display: none;
}

/* ========================================
   ヘッダーアクション
   ======================================== */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: var(--space-xl);
    margin-left: var(--space-lg);
}

/* お問い合わせボタン */
.header-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--sage));
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px rgba(143, 188, 143, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(143, 188, 143, 0.3);
    background: linear-gradient(135deg, var(--sage), var(--primary));
}

.btn-icon {
    font-size: 1rem;
}

/* モバイルメニュートグル */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
}

.mobile-menu-toggle:hover {
    background: rgba(143, 188, 143, 0.1);
}

.hamburger-box {
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger-inner {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-inner::before {
    top: -6px;
}

.hamburger-inner::after {
    top: 6px;
}

.toggle-text {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* アクティブ状態 */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner {
    background: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ========================================
   ヘッダースクロール時のスタイル
   ======================================== */
.site-header.header-scrolled {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-sage) 100%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

/* ========================================
   コンテンツエリアの調整
   ======================================== */
.site-content {
    padding-top: calc(var(--header-height) + var(--header-message-height));
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.admin-bar .site-content {
    padding-top: calc(var(--header-height) + var(--header-message-height) + var(--admin-bar-height));
}

/* コンテナの中央配置 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ヒーローセクションの調整 */
.hero-section {
    margin-top: calc(-1 * (var(--header-height) + var(--header-message-height)));
    padding-top: calc(var(--header-height) + var(--header-message-height));
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.admin-bar .hero-section {
    margin-top: calc(-1 * (var(--header-height) + var(--header-message-height) + var(--admin-bar-height)));
    padding-top: calc(var(--header-height) + var(--header-message-height) + var(--admin-bar-height));
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 768px) {
    .site-header {
        position: fixed;
    }

    .header-main {
        padding: var(--space-md) 0;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--space-sm);
        padding: 0 var(--space-md);
        width: 100%;
        box-sizing: border-box;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .site-branding {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        order: 1;
        min-width: 0;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        flex-shrink: 0;
        order: 2;
        margin-left: auto;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-xs);
        padding: var(--space-xs);
        background: none;
        border: none;
        cursor: pointer;
        min-width: 50px;
        max-width: 50px;
        flex-shrink: 0;
    }
    
    .header-message-text {
        padding: 0 var(--space-md);
        font-size: 0.85rem;
    }
    
    .site-title-main {
        font-size: 2.2rem;
    }
    
    .custom-logo {
        max-height: 90px;
        max-width: 250px;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .header-cta {
        display: none;
    }
    
    .header-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
        min-width: auto;
        white-space: nowrap;
    }
    
    .header-btn .btn-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: var(--space-sm) 0;
    }

    .header-content {
        gap: var(--space-xs);
        padding: 0 var(--space-sm);
        max-width: 100vw;
    }
    
    .site-branding {
        flex: 1;
        order: 1;
        min-width: 0;
    }
    
    .mobile-menu-toggle {
        min-width: 45px;
        max-width: 45px;
        padding: var(--space-xs);
    }
    
    .header-actions {
        order: 2;
        gap: 0;
    }
    
    .header-message-text {
        font-size: 0.8rem;
        padding: 0 var(--space-sm);
    }
    
    .site-title-main {
        font-size: 1.8rem;
    }
    
    .custom-logo {
        max-height: 70px;
        max-width: 180px;
    }
    
    .message-icon {
        display: none;
    }
    
    .header-btn {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .toggle-text {
        font-size: 0.7rem;
    }
} 