/**
 * イベントページ共通スタイル
 */

/* ----- 共通スタイル ----- */
.event_meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.event_meta span {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 5px;
}

.event_meta i {
    margin-right: 5px;
    color: #4a6f8a;
}

.read_more_btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4a6f8a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.read_more_btn:hover {
    background-color: #3a5a70;
    color: #fff;
}

/* ----- フィルター/検索フォーム ----- */
/* 絞り込み検索フォームのスタイル */
.filter_container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* フィルターヘッダー */
.filter_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.filter_heading {
    font-size: 1em;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

/* フィルター開閉ボタン（スマホ用） */
.filter_toggle {
    display: none;
    width: 100%;
    padding: 12px 15px;
    background-color: #4a6f8a;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}

.filter_toggle i {
    margin-right: 8px;
}

.filter_toggle:focus {
    outline: none;
}

/* スマートフォン (576px以下) */
@media (max-width: 576px) {
    .filter_toggle {
        display: flex;
    }
    
    .filter_form {
        display: none;
    }
    
    .filter_container.active .filter_form {
        display: block;
    }
    
    .filter_container {
        margin-bottom: 20px;
    }
    
    .filter_container.active {
        margin-bottom: 30px;
    }
    
    /* 開閉アイコンの切り替え */
    .filter_toggle .fa-chevron-down {
        display: inline-block;
    }
    
    .filter_toggle .fa-chevron-up {
        display: none;
    }
    
    .filter_container.active .filter_toggle .fa-chevron-down {
        display: none;
    }
    
    .filter_container.active .filter_toggle .fa-chevron-up {
        display: inline-block;
    }
}

.filter_section {
    margin-bottom: 20px;
}

.filter_section_title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
}

.filter_row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter_group {
    flex: 1;
    min-width: 200px;
}

.filter_group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.filter_group select,
.filter_group input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.category_checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.category_checkbox_item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    min-width: 150px;
}

.category_checkbox_item input[type="checkbox"] {
    margin-right: 8px;
}

.filter_actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.filter_button, .reset_button {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.filter_button {
    background-color: #4a6f8a;
    color: white;
    border: none;
}

.filter_button:hover {
    background-color: #3a5a70;
}

.reset_button {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    text-decoration: none;
}

.reset_button:hover {
    background-color: #e0e0e0;
}

.filter_button i, .reset_button i {
    margin-right: 5px;
}

/* ----- 一覧ページ（アーカイブ） ----- */
.content-header, .page_header {
    position: static !important; /* 固定位置を強制的に解除 */
    top: auto !important;
    left: auto !important;
    width: auto !important;
    z-index: auto !important;
    background: none !important;
    box-shadow: none !important;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #825724;
}

.content-title, .page_title {
    display: flex;
    align-items: center;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.content-title i, .page_title i {
    margin-right: 10px;
    color: #4a6f8a;
}

.content-title span, .page_title span {
    color: #4a6f8a;
}

.archive_description {
    color: #666;
    font-size: 1em;
}

.event_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
}

.event_item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
    position: relative;
}

.event_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.event_item_link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.event_item_link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.event_item:hover .event_item_link::before {
    background-color: rgba(255, 255, 255, 0.2);
}

.event_image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.event_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.event_item:hover .event_image img {
    transform: scale(1.05);
}

.event_content {
    padding: 14px;
    position: relative;
    z-index: 2;
}

.event_title {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.event_item:hover .event_title {
    color: #4a6f8a;
}

.event_excerpt {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* 検索結果なしメッセージ */
.no-content-message {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.no-content-inner {
    max-width: 600px;
    margin: 0 auto;
}

.no-content-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 20px;
    display: block;
}

.btn-icon-map {
    margin-right: 8px;
    color: white;
}

.no-content-message h3 {
    font-size: 24px;
    color: #343a40;
    margin-bottom: 15px;
}

.no-content-message p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
}

.no-content-actions {
    margin-top: 25px;
}

.btn-back-to-locations {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #F08A43;
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 15px;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
}

.btn-back-to-locations:hover {
    background-color: #d35400;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ページネーション */
.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination .page_numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination .page_numbers.current {
    background-color: #4a6f8a;
    color: #fff;
    border-color: #4a6f8a;
}

.pagination .page_numbers:hover:not(.current) {
    background-color: #f5f5f5;
}

/* ----- 詳細ページ ----- */
.event_single {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 詳細ページ（single-event.php）の見出しスタイル */
.event_single_header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    z-index: auto !important;
    background: none !important;
    box-shadow: none !important;
    margin: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.event_single_title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

/* 既存のアーカイブページ（archive-event.php）の見出しスタイルはそのまま維持 */
.content-header, .page_header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    z-index: auto !important;
    background: none !important;
    box-shadow: none !important;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a6f8a;
}

.content-title, .page_title {
    display: flex;
    align-items: center;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.content-title i, .page_title i {
    margin-right: 10px;
    color: #4a6f8a;
}

.content-title span, .page_title span {
    color: #4a6f8a;
}

/* 画像ギャラリーセクションのスタイル */
.event_gallery_section {
    margin-bottom: 30px;
}

.event_gallery_container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
}

.event_main_image {
    flex: 1;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1/1; /* 正方形にするための追加 */
}

.event_main_image a {
    display: block;
    width: 100%;
    height: 100%;
}

.event_main_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.event_sub_images {
    flex: 1;
    min-width: 300px;
}

.sub_images_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sub_image_item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 1/1;
}

.sub_image_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sub_image_item:hover img {
    transform: scale(1.05);
}

/* ライトボックスのスタイル */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}

/* イベント詳細テーブル */
.event_details {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.event_details h2 {
    font-size: 1.2em;
    margin: 0 0 20px;
    color:#825725;
}

.event_details_table {
    width: 100%;
    border-collapse: collapse;
}

.detail_row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.detail_row:last-child {
    border-bottom: none;
}

.detail_label {
    flex: 0 0 150px;
    padding: 15px 10px;
    font-weight: 600;
    background-color: #f9f9f9;
}

.detail_value {
    flex: 1;
    padding: 15px;
}

.event_description {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.event_description h2 {
    font-size: 1.2em;
    margin: 0 0 20px;
    color: #825725;
}

.description_content {
    line-height: 1.8;
    color: #666;
}

.event_features {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.event_features h2 {
    font-size: 1.2em;
    margin: 0 0 20px;
    color: #333;
}

.features_container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature_item {
    display: flex;
    gap: 20px;
    border: 1px solid #eee;
    padding: 10px;
}

.feature_image {
    flex: 0 0 240px;
    border-radius: 8px;
    overflow: hidden;
}

.feature_image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.feature_content {
    flex: 1;
    align-content: center;
}

.feature_content h3 {
    font-size: 1.2em;
    margin: 0 0 10px;
    color: #333;
}

.feature_content p {
    line-height: 1.8;
    color: #666;
}

.event_extra_details {
    margin: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.event_extra_details h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #825725;
}

.extra_details_content {
    line-height: 1.6;
}

.event_access {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.event_access h2 {
    font-size: 1.2em;
    margin: 0 0 20px;
    color: #825725;
}

.access_map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.access_map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.event_navigation {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.nav_links {
    display: flex;
    justify-content: space-between;
}

.nav_previous,
.nav_next {
    max-width: 45%;
}

.nav_previous a,
.nav_next a {
    display: inline-flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.nav_previous a:hover,
.nav_next a:hover {
    color: #4a6f8a;
}

.related_events {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.related_events h2 {
    font-size: 1.2em;
    margin: 0 0 20px;
    color: #333;
}

.related_events_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related_event_item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.related_event_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related_event_image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.related_event_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related_event_item:hover .related_event_image img {
    transform: scale(1.05);
}

.related_event_title {
    padding: 15px;
    font-size: 1.1em;
    margin: 0;
    color: #333;
}

.related_event_meta {
    padding: 0 15px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
}

.social_share {
    padding: 30px;
}

.social_share h3 {
    font-size: 1.3em;
    margin: 0 0 20px;
    color: #333;
}

.share_buttons {
    display: flex;
    gap: 10px;
}

.share_buttons a {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: opacity 0.3s;
}

.share_buttons a:hover {
    opacity: 0.9;
}

.twitter_share {
    background-color: #1da1f2;
}

.facebook_share {
    background-color: #3b5998;
}

.line_share {
    background-color: #00c300;
}

.email_share {
    background-color: #666;
}

/* イベント日付バッジ */
.event_date {
    color: #4a6f8a;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* カテゴリーバッジ */
.category {
    color: #4a6f8a;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ロケーションバッジ */
.location {
    color: #4a6f8a;
    padding: 3px 8px;
    border-radius: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .related_events_grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature_item {
        flex-direction: column;
    }
    
    .feature_image {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .detail_row {
        flex-direction: column;
    }
    
    .detail_label {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .event_grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .related_events_grid {
        grid-template-columns: 1fr;
    }
    
    .event_header,
    .event_description,
    .event_details,
    .event_features,
    .event_access,
    .event_navigation,
    .related_events,
    .social_share {
        padding: 20px;
    }
    
    .event_title {
        font-size: 1.8em;
    }
    
    .share_buttons {
        flex-wrap: wrap;
    }
    
    .share_buttons a {
        flex: 1 0 calc(50% - 5px);
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .filter_group {
        min-width: 100%;
    }
    
    .filter_actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter_button,
    .reset_button {
        width: 100%;
    }
    
    .event_grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .event_title {
        font-size: 1.5em;
    }
    
    .sub_images_grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .access_map {
        height: 300px;
    }
    
    .nav_previous,
    .nav_next {
        max-width: none;
    }
    
    .nav_links {
        flex-direction: column;
        gap: 15px;
    }
    
    .share_buttons a {
        flex: 1 0 100%;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.event_item {
    animation: fadeIn 0.5s ease-out, slideUp 0.5s ease-out;
}

/* 遅延アニメーション（一覧ページ用） */
.event_grid .event_item:nth-child(2) { animation-delay: 0.1s; }
.event_grid .event_item:nth-child(3) { animation-delay: 0.2s; }
.event_grid .event_item:nth-child(4) { animation-delay: 0.3s; }
.event_grid .event_item:nth-child(5) { animation-delay: 0.4s; }
.event_grid .event_item:nth-child(6) { animation-delay: 0.5s; }
.event_grid .event_item:nth-child(7) { animation-delay: 0.6s; }
.event_grid .event_item:nth-child(8) { animation-delay: 0.7s; }
.event_grid .event_item:nth-child(9) { animation-delay: 0.8s; }
.event_grid .event_item:nth-child(10) { animation-delay: 0.9s; }
