/* 日本語フォント設定 */
body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
}

/* 薄い水色背景 */
.bg-light-cyan {
    background-color: #d4fbfd; /* 薄いシアン色 */
}

/* スムーススクロール */
html {
    scroll-behavior: smooth;
}

/* ヘッダー固定時のオフセット調整 */
section {
    scroll-margin-top: 80px;
}

/* カスタムボタンスタイル */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.2);
}

/* 楽器アイコンスタイル */
.instrument-icon {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: #f3f4f6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    border: 1px solid #e5e7eb;
}

/* モバイルでの楽器アイコン調整 */
@media (max-width: 767px) {
    .instrument-icon {
        padding: 2px 8px;
        font-size: 11px;
        margin: 1px;
    }
}

.instrument-icon.flute { background-color: #fef3c7; color: #92400e; }
.instrument-icon.oboe { background-color: #fde68a; color: #92400e; }
.instrument-icon.clarinet { background-color: #d1fae5; color: #065f46; }
.instrument-icon.saxophone { background-color: #dbeafe; color: #1e40af; }
.instrument-icon.bassoon { background-color: #e0e7ff; color: #3730a3; }
.instrument-icon.trumpet { background-color: #fed7d7; color: #c53030; }
.instrument-icon.horn { background-color: #fbb6ce; color: #97266d; }
.instrument-icon.trombone { background-color: #c6f6d5; color: #2d7d32; }
.instrument-icon.euphonium { background-color: #bee3f8; color: #2c5282; }
.instrument-icon.tuba { background-color: #d6f5d6; color: #2d7d32; }
.instrument-icon.percussion { background-color: #fed7fe; color: #86198f; }
.instrument-icon.other { background-color: #e2e8f0; color: #4a5568; }

/* 投稿カードスタイル */
.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 2rem;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* ローディングアニメーション */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* フォームスタイル */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* アラート */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* ヘッダー固定スタイル */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    padding-top: 80px; /* ヘッダー分のオフセット */
}

/* PCナビゲーション */
.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .desktop-nav a {
        color: #4b5563;
        font-weight: 500;
        transition: color 0.3s ease;
        padding: 0.5rem 0;
        border-bottom: 2px solid transparent;
    }
    
    .desktop-nav a:hover {
        color: #2563eb;
        border-bottom-color: #2563eb;
    }
    
    .desktop-nav a.active {
        color: #2563eb;
        border-bottom-color: #2563eb;
        font-weight: 600;
    }
    
    .nav-button {
        background: #2563eb;
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        font-weight: 600;
        transition: background-color 0.3s ease;
        border-bottom: none !important;
    }
    
    .nav-button:hover {
        background: #1d4ed8;
        color: white;
    }
}

/* モバイルメニュー（新スタイル） */
.mobile-menu-toggle {
    display: block;
    cursor: pointer;
    color: #4b5563;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #2563eb;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 40;
}

.mobile-dropdown.show {
    display: block;
}

.mobile-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.mobile-dropdown a:hover {
    background: #f9fafb;
    color: #2563eb;
}

.mobile-dropdown a:last-child {
    border-bottom: none;
}

/* ハンバーガーメニュー（旧スタイル - バックアップ用） */
.mobile-menu-button {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-button span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.25s ease-in-out;
}

.mobile-menu-button.active span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-button.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    padding-top: 80px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-menu-items {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-menu-items li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-items a {
    display: block;
    color: white;
    padding: 16px 24px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-menu-items a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 32px;
}

.mobile-menu-items .menu-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

/* コンテンツ幅の調整 */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.narrow-container {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .content-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .narrow-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
    
    .grid-cols-1.md\:grid-cols-4 {
        gap: 1rem;
    }
    
    .space-x-4 > * + * {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .inline-block {
        display: block;
        text-align: center;
    }
    
    /* モバイルメニュー表示 */
    .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-button {
        display: flex;
    }
    
    .desktop-menu {
        display: none !important;
    }
    
    /* ヘッダーのタイトルを小さく */
    .header-title {
        font-size: 1rem;
    }
    
    /* モバイルでのモーダル調整 */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* モバイルでの投稿カード */
    .post-card {
        margin-bottom: 1rem;
    }
    
    /* フォームボタンをフルワイドに */
    .mobile-full-width {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
    
    /* 検索フィルターのモバイル調整 */
    .search-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    
    .search-filters > * {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
    
    /* モバイルでのアクションボタン */
    .action-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    
    .action-buttons > * {
        width: 100% !important;
        justify-content: center !important;
        text-align: center;
    }
    
    /* タッチターゲットサイズの確保 */
    button, .btn, a[class*="btn"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* モバイルでのページネーション調整 */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination button {
        min-width: 40px;
        min-height: 40px;
    }

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* フォーカス表示 */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 印刷スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .post-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* 画像アップロード */
.image-upload-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.image-upload-container:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.image-upload-container.dragover {
    border-color: #2563eb;
    background: #dbeafe;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    width: 80%; 
    margin: 1rem 0;
}

.image-preview {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-remove-btn:hover {
    background: #dc2626;
}

/* 楽団カード用の画像スタイル */
.band-list-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.band-list-thumbnail:hover {
    opacity: 0.9;
}

/* デスクトップでの画像サイズ */
@media (min-width: 768px) {
    .band-list-thumbnail {
        width: 128px;
        height: 80px;
    }
}

.band-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.band-thumbnail:hover {
    transform: scale(1.05);
}

.band-card-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.band-card-image-link {
    display: block;
    text-decoration: none;
}

/* 画像なしの場合のプレースホルダー */
.no-image-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 楽団カード用のプレースホルダー */
.band-list-placeholder {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #9ca3af;
}

@media (min-width: 768px) {
    .band-list-placeholder {
        width: 128px;
        height: 80px;
    }
}