/* ==========================================================================
   ContentFreaks モダンミニマルヘッダー専用CSS
   header.phpからの外部化
   ========================================================================== */

/* ヘッダー基本スタイル */
.minimal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.minimal-header.scrolled {
    background: rgba(26, 26, 26, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* ブランド/ホームリンク */
.brand-home {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.brand-link:hover {
    transform: translateY(-1px);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    font-size: var(--nav-primary);
    line-height: 1;
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-icon {
    transform: rotate(5deg);
}

.brand-logo-image {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.brand-text {
    font-size: var(--card-title);
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

/* 現在ページ表示 */
.current-page-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    display: none;
    margin: 0;
    line-height: 1;
}

/* ハンバーガーメニュー */
.menu-trigger {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.minimal-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    height: 44px;
    width: 44px;
}

.minimal-hamburger:hover {
    transform: translateY(-1px);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
    width: 20px;
    height: 14px;
}

.hamburger-icon .line {
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* メニューアクティブ時のハンバーガーアニメーション */
.minimal-hamburger.active .line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.minimal-hamburger.active .line-2 {
    opacity: 0;
    transform: scaleX(0);
}

.minimal-hamburger.active .line-3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* スライドメニュー */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-menu-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 85vw);
    background: #1a1a1a;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.slide-menu-container.active {
    transform: translateX(0);
}

.slide-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* メニューヘッダー */
.menu-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-brand-icon {
    font-size: 1.5rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-brand-icon .brand-logo-image {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.menu-brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-line {
    position: absolute;
    width: 16px;
    height: 2px;
    background: #999;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.close-line:first-child {
    transform: rotate(45deg);
}

.close-line:last-child {
    transform: rotate(-45deg);
}

/* メニューナビゲーション */
.menu-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 2rem 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nav-item {
    margin: 0;
    text-align: left;
    width: 100%;
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-link:active {
    background: rgba(255, 255, 255, 0.08);
}

.nav-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
    line-height: 1;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
}

/* プラットフォームリンク */
.platform-nav .nav-link {
    padding: 0.75rem 2rem;
}

.slide-menu-container .platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
}

.spotify-icon {
    background: #1DB954;
    color: white;
}

.apple-icon {
    background: #A855F7;
    color: white;
}

.youtube-icon {
    background: #FF0000;
    color: white;
}

.platform-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.platform-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e0e0e0;
}

.external-indicator {
    font-size: 0.8rem;
    color: #777;
    margin-left: auto;
}

/* メニューフッター */
.menu-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.copyright-text {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin: 0;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1.5rem;
        height: 60px;
        display: flex;
        align-items: center;
    }
    
    .minimal-hamburger {
        height: 40px;
        width: 40px;
        padding: 0.375rem;
    }
    
    .brand-text {
        font-size: 1.1rem;
        line-height: 1;
    }
    
    .brand-icon {
        font-size: 1.3rem;
        line-height: 1;
    }
    
    .brand-logo-image {
        width: 28px;
        height: 28px;
    }
    
    .current-page-indicator {
        display: none;
    }
    
    .slide-menu-container {
        width: min(350px, 90vw);
    }
    
    .menu-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.5rem;
    }
    
    .platform-nav .nav-link {
        padding: 0.75rem 1.5rem;
    }
    
    .section-title {
        margin: 0 1.5rem 1rem;
    }
    
    .menu-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
        height: 55px;
        display: flex;
        align-items: center;
    }
    
    .minimal-hamburger {
        height: 36px;
        width: 36px;
        padding: 0.25rem;
    }
    
    .hamburger-icon {
        width: 18px;
        height: 12px;
    }
    
    .brand-container {
        gap: 0.5rem;
    }
    
    .brand-text {
        font-size: 1rem;
        line-height: 1;
    }
    
    .brand-icon {
        font-size: 1.2rem;
        line-height: 1;
    }
    
    .brand-logo-image {
        width: 24px;
        height: 24px;
    }
    
    .slide-menu-container {
        width: 100vw;
    }
}

/* アニメーション */
@media (prefers-reduced-motion: no-preference) {
    .nav-link {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-link:hover {
        transform: translateX(4px);
    }
    
    .platform-link:hover .external-indicator {
        transform: translate(2px, -2px);
    }
}

/* フォーカス表示（アクセシビリティ） */
.brand-link:focus,
.minimal-hamburger:focus,
.menu-close:focus,
.nav-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    border-radius: 4px;
}

/* スクロール時のヘッダー効果 */
body {
    padding-top: 70px;
}

/* フロントページ専用調整 */
body.home {
    padding-top: 0;
}

body.home .podcast-hero {
    margin-top: 0;
    padding-top: 90px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    body.home {
        padding-top: 0;
    }
    
    body.home .podcast-hero {
        padding-top: 90px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
    
    body.home {
        padding-top: 0;
    }
    
    body.home .podcast-hero {
        padding-top: 90px;
    }
}
