/* events.html 固有スタイル */

body { background: #F8F9FA; }

.page-hero { background: linear-gradient(135deg, var(--green) 0%, #4CAF78 100%); padding: 40px 24px 36px; }
.page-hero-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-left h1 { font-size: 28px; font-weight: 900; color: white; margin-bottom: 6px; }
.hero-left p { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.7; }
.hero-count { background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); border-radius: 16px; padding: 16px 24px; text-align: center; }
.hero-count-num { font-size: 36px; font-weight: 900; color: white; line-height: 1; }
.hero-count-label { font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 4px; }

.page-layout { max-width: 1200px; margin: 32px auto; padding: 0 24px; display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }

.filter-panel { background: white; border-radius: 20px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); position: sticky; top: 84px; }
.filter-panel-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.filter-section { margin-bottom: 20px; }
.filter-label { font-size: 11px; font-weight: 800; color: var(--gray); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { padding: 6px 12px; border: 1.5px solid #E0E0E0; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; background: white; color: #555; }
.filter-chip:hover { border-color: var(--green); color: var(--green); }
.filter-chip.active { background: var(--green); border-color: var(--green); color: white; }
.filter-reset { width: 100%; background: none; border: 1.5px solid #eee; border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 700; color: var(--gray); cursor: pointer; margin-top: 8px; transition: all 0.2s; }
.filter-reset:hover { border-color: var(--orange); color: var(--orange); }

.search-bar { background: white; border-radius: 16px; padding: 16px 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; }
.search-input { flex: 1; border: 1.5px solid #E0E0E0; border-radius: 12px; padding: 10px 16px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.search-input:focus { border-color: var(--green); }
.search-btn { background: var(--green); color: white; border: none; padding: 10px 20px; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.result-info { font-size: 13px; color: var(--gray); margin-bottom: 12px; font-weight: 600; }

.tab-bar { display: flex; gap: 8px; margin-bottom: 16px; background: white; border-radius: 16px; padding: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.tab-btn { flex: 1; padding: 10px 16px; border: none; background: none; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; color: #666; transition: all 0.2s; }
.tab-btn.active { background: var(--green); color: white; }

.events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.event-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.card-thumb { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cat-badge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 10px; }
.card-type-badge { position: absolute; bottom: 12px; left: 12px; font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 10px; background: rgba(255,255,255,0.9); color: var(--navy); }
.card-fav-heart { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.18); font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 3; transition: transform .12s; padding: 0; }
.card-fav-heart:hover { transform: scale(1.15); }
.card-body { padding: 16px 18px 20px; }
.card-title { font-size: 15px; font-weight: 800; color: var(--navy); line-height: 1.4; margin-bottom: 10px; }
.card-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.card-meta-item { font-size: 12px; color: #666; display: flex; align-items: center; gap: 6px; }
.card-footer { padding: 12px 18px; border-top: 1px solid #F5F5F5; display: flex; gap: 6px; flex-wrap: wrap; }
.card-tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 10px; background: #F0F0F0; color: #555; }
.card-tag.can-join { background: #E8F5E9; color: var(--green); }
.card-tag.can-help { background: #FFF8E1; color: #F57F17; }
.card-src { padding: 11px 18px; border-top: 1px solid #F5F5F5; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-src-from { font-size: 11px; color: var(--gray); }
.card-src-link { font-size: 12px; color: #666; font-weight: 700; white-space: nowrap; }

.cat-1 { background: #E8F5E9; color: #2D9E6B; }
.cat-2 { background: #E3F2FD; color: #1565C0; }
.cat-3 { background: #F3E5F5; color: #7B1FA2; }
.cat-4 { background: #FFF8E1; color: #F57F17; }
.cat-5 { background: #FCE4EC; color: #C2185B; }
.cat-6 { background: #E0F7FA; color: #00838F; }
.cat-7 { background: #FBE9E7; color: #BF360C; }
.cat-8 { background: #EFEBE9; color: #4E342E; }

.loading-wrap { text-align: center; padding: 60px 0; }
.spinner { width: 36px; height: 36px; border: 3px solid #eee; border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { background: white; border-radius: 20px; padding: 48px 24px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--gray); }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-sheet { background: white; border-radius: 24px 24px 0 0; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; }
.modal-handle { width: 40px; height: 4px; background: #ddd; border-radius: 2px; margin: 14px auto 0; }
.modal-header { padding: 20px 24px 16px; }
.modal-category-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 12px; margin-bottom: 12px; }
.modal-title { font-size: 22px; font-weight: 900; line-height: 1.4; margin-bottom: 6px; }
.modal-organizer { font-size: 13px; color: var(--gray); font-weight: 600; }
.modal-body { padding: 0 24px 32px; }
.modal-desc { font-size: 14px; line-height: 1.9; color: #333; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.info-item { background: #F8F9FA; border-radius: 12px; padding: 14px 16px; }
.info-label { font-size: 11px; font-weight: 700; color: var(--gray); margin-bottom: 4px; }
.info-value { font-size: 14px; font-weight: 700; color: var(--navy); }
.contact-box { background: linear-gradient(135deg, #F0FBF5, #E8F5E9); border-radius: 16px; padding: 20px; margin-top: 16px; border: 1.5px solid #A5D6A7; }
.contact-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.contact-email { font-size: 14px; color: var(--green); font-weight: 700; text-decoration: none; }
.modal-close-btn { position: fixed; top: 16px; right: 16px; background: rgba(0,0,0,0.5); color: white; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 1001; display: none; align-items: center; justify-content: center; }
.modal-close-btn.show { display: flex; }
.form-section { margin-top: 24px; border-top: 1px solid #f0f0f0; padding-top: 20px; }
.form-title { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.form-sub { font-size: 12px; color: var(--gray); margin-bottom: 16px; }
.form-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.form-tab { flex: 1; padding: 10px; border: 1.5px solid #E0E0E0; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; background: white; color: #666; transition: all 0.2s; }
.form-tab.active { background: var(--orange); border-color: var(--orange); color: white; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; border: 1.5px solid #E0E0E0; border-radius: 10px; padding: 10px 14px; font-size: 14px; outline: none; transition: border-color 0.2s; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--green); }
.form-group textarea { min-height: 80px; resize: vertical; }
.submit-btn { width: 100%; background: var(--orange); color: white; border: none; padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 800; cursor: pointer; margin-top: 8px; transition: opacity 0.2s; }
.submit-btn:hover { opacity: 0.9; }
.submit-btn:disabled { background: #ccc; cursor: default; }
.success-msg { display: none; background: #E8F5E9; border-radius: 12px; padding: 16px; text-align: center; font-size: 14px; font-weight: 700; color: var(--green); }

footer { margin-top: 48px; }

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .events-grid { grid-template-columns: 1fr; }
}
