/* ヘッダー・フッター用CSS変数 */
:root {
    /* Color Palette */
    --primary-color: #354ab4;
    --primary-hover: #2a3a94;
    --secondary-color: #5364c9;
    --text-color: #1e293b;
    --gray-50: #fafbfc;
    --gray-200: #e2e8f0;
    --gray-600: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    
    /* Layout */
    --max-width: 1200px;
    --container-padding: 20px;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", 
                   "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 6px;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    background: #ffffff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: inline-block;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.logo a:hover .logo-img {
    transform: scale(1.05);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-normal);
    position: relative;
}

.nav-list a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-list a:hover {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #333333;
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 40px;
    height: 40px;
    transition: all var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.nav-toggle span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.nav-toggle span:nth-child(1) {
    top: 10px;
}

.nav-toggle span:nth-child(2) {
    top: 50%;
    transform: translate(-50%, -50%);
}

.nav-toggle span:nth-child(3) {
    bottom: 10px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: var(--white);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-normal);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }
    
    .nav-list a {
        font-size: 1.1rem;
    }
    
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* body要素に必要なpadding（ヘッダー固定のため） */
body {
    padding-top: 60px;
}