/* イベント関連のスタイル */

/* ==============================
   共通コンポーネント
   ============================== */

/* ステータスバッジ */
.event-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: bold;
}

.event-status-badge--active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.event-status-badge--ended {
    background: #fafafa;
    color: #999;
    border: 1px solid #e0e0e0;
}

.event-status-badge--unknown {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* 共通ボタン */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background-color: #1557b0;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: #1a73e8;
    color: white;
}

/* 地域カテゴリーバッジ */
.event-category-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 5px;
    text-decoration: none;
}

.event-category-badge:hover {
    background: #bbdefb;
    color: #1565c0;
}

/* メタアイコン */
.meta-icon {
    margin-right: 8px;
    width: 20px;
    display: inline-block;
}

/* ==============================
   ショートコード表示
   ============================== */

.events-shortcode {
    margin: 20px 0;
}

.events-shortcode .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.event-grid-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.event-grid-item .event-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.event-grid-item .event-content {
    padding: 15px;
}

.event-grid-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.event-grid-item h4 a {
    color: #333;
    text-decoration: none;
}

.event-grid-item h4 a:hover {
    color: #1a73e8;
}

.event-grid-item .event-date,
.event-grid-item .event-location {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
}

.event-grid-item .event-excerpt {
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
}

.events-shortcode .events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-list-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    align-items: center;
}

.event-date-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a73e8;
    color: white;
    padding: 10px;
    border-radius: 5px;
    min-width: 60px;
    margin-right: 15px;
}

.event-date-small .date-day {
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
}

.event-date-small .date-month {
    font-size: 0.8em;
    line-height: 1;
}

.event-info {
    flex: 1;
}

.event-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.event-info h4 a {
    color: #333;
    text-decoration: none;
}

.event-info h4 a:hover {
    color: #1a73e8;
}

.event-info .event-time,
.event-info .event-location {
    font-size: 0.9em;
    color: #666;
    margin: 2px 0;
}

.event-more-link {
    text-align: center;
    margin-top: 20px;
}

/* ==============================
   アーカイブページ（archive-event.php）
   ============================== */

.event-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.event-archive .page-header {
    text-align: center;
    margin-bottom: 40px;
}

.event-archive .page-header h1 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 10px;
}

.event-archive .page-header .page-description {
    font-size: 1.1em;
    color: #666;
}

.event-archive .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.event-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.event-card--ended {
    opacity: 0.6;
}

.event-card .event-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-card .event-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-card .event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.event-card .event-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    line-height: 1.4;
}

.event-card .event-title a {
    color: #333;
    text-decoration: none;
}

.event-card .event-title a:hover {
    color: #1a73e8;
}

.event-card .event-meta {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
}

.event-card .event-meta > div {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.event-card .event-time-tag {
    margin-left: 10px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 0.8em;
}

.event-card .event-excerpt {
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
    font-size: 0.9em;
    flex: 1;
}

.event-card .event-categories {
    margin: 10px 0;
}

.event-card .event-actions {
    margin-top: auto;
    padding-top: 12px;
    text-align: center;
}

.event-archive .pagination-wrapper,
.taxonomy-event-archive .pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.event-archive .no-events {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

/* ==============================
   タクソノミーアーカイブ（taxonomy-event_category.php）
   ============================== */

.taxonomy-event-archive {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* パンくずナビ */
.event-breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.event-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.event-breadcrumb a:hover {
    text-decoration: underline;
}

/* タクソノミーヘッダー */
.taxonomy-event-archive .page-header {
    margin-bottom: 2em;
}

.taxonomy-event-archive .page-header h1 {
    font-size: 28px;
    margin-bottom: 0.5em;
}

.taxonomy-event-archive .page-header .page-description {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}

/* 都道府県ナビ */
.prefecture-nav {
    margin-bottom: 2em;
}

.prefecture-nav h2 {
    font-size: 20px;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 8px;
}

.prefecture-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.prefecture-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.prefecture-nav-link:hover {
    opacity: 0.85;
    color: white;
}

.prefecture-nav-link--active {
    background: #1a73e8;
}

.prefecture-nav-link--inactive {
    background: #9e9e9e;
}

.prefecture-nav-link .count-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 13px;
}

/* 統計サマリー */
.event-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.event-stat-card {
    border-radius: 10px;
    padding: 16px 24px;
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.event-stat-card--total {
    background: #e8f5e9;
}

.event-stat-card--active {
    background: #e3f2fd;
}

.event-stat-card--ended {
    background: #f5f5f5;
}

.event-stat-number {
    font-size: 28px;
    font-weight: bold;
}

.event-stat-card--total .event-stat-number {
    color: #2e7d32;
}

.event-stat-card--active .event-stat-number {
    color: #1565c0;
}

.event-stat-card--ended .event-stat-number {
    color: #999;
}

.event-stat-label {
    font-size: 13px;
    color: #555;
}

/* タクソノミーイベントカード */
.taxonomy-event-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s;
}

.taxonomy-event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.taxonomy-event-card--ended {
    opacity: 0.6;
}

.taxonomy-event-card .event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.taxonomy-event-card .event-card-header h2 {
    font-size: 18px;
    margin: 0;
    line-height: 1.4;
}

.taxonomy-event-card .event-card-header h2 a {
    text-decoration: none;
    color: #1a73e8;
}

.taxonomy-event-card .event-card-header h2 a:hover {
    text-decoration: underline;
}

.taxonomy-event-card .event-card-thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.taxonomy-event-card .event-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taxonomy-event-card .event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 14px;
    color: #555;
}

.taxonomy-event-card .event-card-target {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

.taxonomy-event-card .event-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    color: #1a73e8;
    text-decoration: none;
}

.taxonomy-event-card .event-card-link:hover {
    text-decoration: underline;
}

/* 情報ボックス */
.event-info-box {
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.event-info-box--warning {
    background: #fff3e0;
}

.event-info-box--info {
    background: #e3f2fd;
}

.event-info-box--light {
    background: #f5f5f5;
}

.event-info-box--white {
    background: white;
    border: 1px solid #e0e0e0;
}

.event-info-box h2 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 12px;
}

.event-info-box h2.text-warning {
    color: #e65100;
}

.event-info-box h2.text-info {
    color: #1565c0;
}

.event-info-box p {
    line-height: 1.8;
}

.event-info-box ul {
    line-height: 2;
}

.event-info-box .support-center-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 16px;
}

.event-info-box .support-center-card p:first-child {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 4px;
}

.event-info-box .support-center-card p:last-child {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 近隣県ナビ */
.sibling-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.sibling-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s;
}

.sibling-nav-link:hover {
    background: #1a73e8;
    color: white;
}

.sibling-nav-link .count-badge {
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 13px;
}

.sibling-nav-link:hover .count-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* 基礎知識リンク */
.knowledge-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.knowledge-link {
    display: inline-block;
    background: #f5f5f5;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.3s;
}

.knowledge-link:hover {
    background: #e8e8e8;
    color: #333;
}

/* 地域ナビ */
.region-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.region-nav-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.region-nav-link--default {
    background: #f5f5f5;
    color: #333;
}

.region-nav-link--default:hover {
    background: #e0e0e0;
    color: #333;
}

.region-nav-link--current {
    background: #1a73e8;
    color: white;
}

.region-nav-link--current:hover {
    background: #1557b0;
    color: white;
}

/* CTAフッター */
.event-cta-footer {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    margin-top: 24px;
}

.event-cta-footer .cta-title {
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 8px;
}

.event-cta-footer .cta-subtitle {
    color: #bbdefb;
    font-size: 14px;
    margin: 0 0 20px;
}

.event-cta-footer .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.event-cta-footer .cta-btn-primary {
    display: inline-block;
    background: white;
    color: #1a73e8;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
}

.event-cta-footer .cta-btn-primary:hover {
    background: #f0f0f0;
    color: #1a73e8;
}

.event-cta-footer .cta-btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-cta-footer .cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ==============================
   イベント詳細ページ（single-event.php）
   ============================== */

.event-single-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.event-single {
    margin-bottom: 40px;
}

.event-single .entry-header {
    margin-bottom: 30px;
}

.event-single .entry-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.event-single .event-meta-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.event-single .event-date-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a73e8;
    color: white;
    padding: 15px;
    border-radius: 8px;
    min-width: 80px;
}

.event-single .date-day {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
}

.event-single .date-month,
.event-single .date-year {
    font-size: 0.9em;
    line-height: 1;
}

.event-single .event-basic-info > div {
    margin: 8px 0;
    display: flex;
    align-items: center;
    font-size: 1.1em;
}

.event-single .event-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.event-single .event-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.event-single .entry-content {
    margin-bottom: 40px;
    line-height: 1.8;
}

.event-single .event-details-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.event-single .event-details-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 10px;
}

.event-single .event-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.event-single .detail-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.event-single .detail-label {
    font-weight: bold;
    width: 100px;
    flex-shrink: 0;
    color: #555;
}

.event-single .detail-value {
    flex: 1;
    margin-left: 20px;
}

.event-single .detail-value a {
    color: #1a73e8;
    text-decoration: none;
}

.event-single .detail-value a:hover {
    text-decoration: underline;
}

.event-single .event-categories-tags {
    margin-bottom: 30px;
}

.event-single .event-categories,
.event-single .event-tags {
    margin-bottom: 20px;
}

.event-single .event-categories h4,
.event-single .event-tags h4 {
    margin-bottom: 10px;
    color: #333;
}

.event-single .event-category,
.event-single .event-tag {
    display: inline-block;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.event-single .event-category {
    background: #e3f2fd;
    color: #1976d2;
}

.event-single .event-category:hover {
    background: #bbdefb;
}

.event-single .event-tag {
    background: #f3e5f5;
    color: #7b1fa2;
}

.event-single .event-tag:hover {
    background: #e1bee7;
}

.event-single .event-navigation {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* サイドバー */
.event-sidebar {
    padding-left: 20px;
}

.event-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.event-widget h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 5px;
}

.related-events-list {
    list-style: none;
    padding: 0;
}

.related-events-list li {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.related-events-list li:hover {
    background: #e9ecef;
}

.related-events-list a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
}

.related-event-date {
    font-weight: bold;
    color: #1a73e8;
    margin-right: 10px;
    min-width: 40px;
}

.related-event-title {
    flex: 1;
}

/* 同地域イベント・基礎知識セクション */
.event-region-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.event-region-nav h3 {
    margin: 0 0 12px;
    font-size: 1em;
    color: #333;
}

.event-region-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-region-nav li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.event-region-nav li:last-child {
    border-bottom: none;
}

.event-region-nav li a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9em;
}

.event-region-nav li a:hover {
    text-decoration: underline;
}

/* ==============================
   レスポンシブ
   ============================== */

@media (max-width: 768px) {
    /* ショートコード */
    .events-shortcode .events-grid {
        grid-template-columns: 1fr;
    }

    .event-list-item {
        flex-direction: column;
        text-align: center;
    }

    .event-date-small {
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* アーカイブ */
    .event-archive .page-header h1 {
        font-size: 1.8em;
    }

    .event-archive .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .event-card .event-content {
        padding: 15px;
    }

    /* タクソノミー */
    .taxonomy-event-archive .page-header h1 {
        font-size: 22px;
    }

    .prefecture-nav-list,
    .sibling-nav-list {
        gap: 8px;
    }

    .prefecture-nav-link,
    .sibling-nav-link {
        padding: 8px 14px;
        font-size: 14px;
    }

    .event-stats {
        gap: 8px;
    }

    .event-stat-card {
        padding: 12px 16px;
        min-width: 100px;
    }

    .event-stat-number {
        font-size: 22px;
    }

    .taxonomy-event-card .event-card-header {
        flex-direction: column;
    }

    .taxonomy-event-card .event-card-thumb {
        width: 100%;
        height: 120px;
    }

    .taxonomy-event-card .event-card-meta {
        gap: 6px 12px;
    }

    .knowledge-links {
        gap: 8px;
    }

    .knowledge-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .event-cta-footer {
        padding: 20px;
    }

    .event-cta-footer .cta-title {
        font-size: 18px;
    }

    .event-cta-footer .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* 詳細ページ */
    .event-single .event-meta-header {
        flex-direction: column;
        gap: 15px;
    }

    .event-single .event-details-grid {
        grid-template-columns: 1fr;
    }

    .event-single .detail-item {
        flex-direction: column;
    }

    .event-single .detail-label {
        width: auto;
        margin-bottom: 5px;
    }

    .event-single .detail-value {
        margin-left: 0;
    }

    .event-sidebar {
        padding-left: 0;
        margin-top: 30px;
    }
}
