/* ============================================================
   index.css - イベント一覧ページ固有スタイル
   本番サイト(drone-event.info)に合わせた落ち着いたデザイン
   ============================================================ */

/* --- Main Content --- */
.main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }

/* --- Title Bar --- */
.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: var(--primary);
    border-radius: 2px;
}
.event-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* --- View Toggle --- */
.view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.view-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    background: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border-right: 1px solid var(--border);
}
.view-btn:last-child { border-right: none; }
.view-btn:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.view-btn.active { background: var(--primary); color: white; }
.view-btn svg { width: 16px; height: 16px; }

/* --- Area Filter --- */
.area-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.area-filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.area-filter-label svg { width: 16px; height: 16px; opacity: 0.5; }
.area-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.area-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.area-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================================
   EVENT CARDS
   ============================================================ */
.view-panel { display: none; }
.view-panel.active { display: block; }

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.event-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}
.event-card:hover {
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.card-top {
    padding: 1rem 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.card-category {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: white;
}
.card-days {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}
.card-body { padding: 0.5rem 1rem 1rem; flex: 1; }
.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    color: var(--text);
}
.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-light);
}
.card-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.card-meta-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 3px;
    opacity: 0.35;
}
.card-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.card-detail-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================================
   LIST SECTION
   ============================================================ */
.list-section { margin-top: 2rem; }
.list-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border);
}
.list-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}
.list-section-title svg { width: 18px; height: 18px; color: var(--primary); opacity: 0.6; }
.list-count { font-size: 0.82rem; color: var(--text-muted); }
.list-empty {
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

/* ============================================================
   CALENDAR
   ============================================================ */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.cal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    min-width: 150px;
    text-align: center;
    color: var(--text);
}
.cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.cal-nav-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.cal-nav-btn svg { width: 16px; height: 16px; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    width: 100%;
}
.cal-dow {
    background: #f0f0f0;
    color: var(--text);
    text-align: center;
    padding: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
}
.cal-dow:first-child { color: #cc3333; }
.cal-dow:last-child { color: #336699; }
.cal-cell {
    background: white;
    min-height: 85px;
    padding: 0.35rem;
    position: relative;
    min-width: 0;
    overflow: hidden;
}
.cal-cell.other { background: #fafafa; }
.cal-cell.today { background: #fffde6; }
.cal-day {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.15rem;
}
.cal-cell.today .cal-day { color: #cc6600; font-weight: 700; }
.cal-cell:nth-child(7n+1) .cal-day { color: #cc3333; }
.cal-cell:nth-child(7n) .cal-day { color: #336699; }
.cal-ev {
    display: block;
    padding: 0.1rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 2px;
    margin-bottom: 2px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
}
.cal-ev:hover { opacity: 0.85; }
.cal-ev.light { color: #333; }

/* Calendar Popup - fixed positioning via JS */
.cal-popup {
    position: fixed;
    z-index: 9999;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem;
    min-width: 220px;
    max-width: 280px;
    border: 1px solid var(--border);
    animation: popIn 0.15s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cal-popup-cat {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 2px;
    color: white;
    margin-bottom: 0.35rem;
}
.cal-popup-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.3rem; line-height: 1.4; }
.cal-popup-meta { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.1rem; }
.cal-popup-link {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}
.cal-popup-link:hover { text-decoration: underline; }

/* ============================================================
   MAP VIEW
   ============================================================ */
#event-map {
    height: 500px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    z-index: 1;
}
.map-list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.6rem;
}
.map-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background var(--transition);
    border: 1px solid var(--border-light);
}
.map-item:hover { background: var(--primary-light); text-decoration: none; }
.map-item-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.map-item-info { flex: 1; min-width: 0; }
.map-item-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-item-meta { font-size: 0.75rem; color: var(--text-light); }
.map-msg { text-align: center; padding: 1rem; color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.event-card {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.3s ease forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.event-card:nth-child(1) { animation-delay: .03s; }
.event-card:nth-child(2) { animation-delay: .06s; }
.event-card:nth-child(3) { animation-delay: .09s; }
.event-card:nth-child(4) { animation-delay: .12s; }
.event-card:nth-child(5) { animation-delay: .15s; }
.event-card:nth-child(6) { animation-delay: .18s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .event-grid { grid-template-columns: 1fr; }
    .title-bar { flex-direction: column; align-items: flex-start; }
    .cal-cell { min-height: 55px; }
    .cal-ev { font-size: 0.58rem; padding: 0.08rem 0.15rem; }
    #event-map { height: 350px; }
    .map-list { grid-template-columns: 1fr; }
    .area-filter { gap: 0.3rem; }
    .area-btn { padding: 0.25rem 0.6rem; font-size: 0.72rem; }
}
