/* ========================================
   Event Page Styles
   WordPress化時: is_page('event')で条件分岐して読み込み
======================================== */

/* ===== Page-Specific Settings ===== */
.event-page,
.event-detail-page {
    background-color: #ffffff;
    font-family: 'Zen Kaku Gothic New', sans-serif;
}

/* Content Header - 白背景 */
.event-page .content-header,
.event-detail-page .content-header {
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    color: #333333 !important;
}

.event-page .content-header.scrolled,
.event-detail-page .content-header.scrolled {
    background: #ffffff !important;
    color: #333333 !important;
}

/* Header Location */
.event-page .header-location,
.event-detail-page .header-location {
    color: #333333 !important;
}

/* Hamburger Menu */
.event-page .hamburger-menu,
.event-detail-page .hamburger-menu {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
}

.event-page .hamburger-menu::before,
.event-page .hamburger-menu::after,
.event-page .hamburger-menu .hamburger-line,
.event-detail-page .hamburger-menu::before,
.event-detail-page .hamburger-menu::after,
.event-detail-page .hamburger-menu .hamburger-line {
    background: #333333 !important;
}

/* ===== Event Page Components ===== */

/* Hide unnecessary buttons */
button.share-event-btn,
button.print-event-btn,
button.back-to-top-btn {
    display: none !important;
}

/* Event Cards Grid (Archive Page) */
.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Event Title Center */
.event-title-center {
    font-size: 1.4rem;
    font-weight: 400;
    color: #333333;
    text-align: left;
    margin: 40px 0 30px;
    letter-spacing: 0.1em;
}

/* Event Main Image */
.event-main-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.event-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.event-main-image:hover img {
    transform: scale(1.05);
}

/* Event Info List */
.event-info-list {
    margin-bottom: 40px;
    padding: 30px 0;
    border-top: 1px solid rgba(51, 51, 51, 0.1);
    border-bottom: 1px solid rgba(51, 51, 51, 0.1);
}

.event-info-item {
    font-size: 1rem;
    color: #333333;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 15px 0;
    border-bottom: 1px solid rgba(51, 51, 51, 0.05);
}

.event-info-item:last-child {
    border-bottom: none;
}

/* Event Description Text */
.event-description-text {
    margin-bottom: 60px;
    padding: 30px 0;
}

.event-description-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333333;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Event Section Title */
.event-section-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
    position: relative;
}

/* Event Gallery */
.event-gallery {
    padding: 40px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: #ffffff;
    font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Event Map */
.event-map {
    padding: 40px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.1);
}

.map-container {
    margin-top: 30px;
    border-radius: 4px;
    overflow: hidden;
}

.map-container iframe {
    display: block;
}

/* Reservation Section */
.reservation-section {
    padding: 40px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.1);
}

.calendar-container,
.form-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
}

.calendar-container:first-child {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
}

/* イベントページ専用: subsection-title のカスタマイズ */
.event-page .subsection-title {
    font-size: 1.2rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-page .subsection-title i {
    color: #8a8a8a;
}

.form-description {
    color: #8a8a8a;
    margin-bottom: 20px;
    line-height: 1.8;
}

.calendar-container iframe,
.google-form-embed iframe {
    border-radius: 4px;
}

.alternative-contact {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(51, 51, 51, 0.1);
    text-align: center;
}

.alternative-contact p {
    margin: 0;
    color: #666666;
    font-size: 1rem;
    line-height: 1.8;
}

.alternative-contact a {
    color: #333333;
    text-decoration: none;
    font-weight: 400;
}

.alternative-contact a:hover {
    text-decoration: underline;
}

/* Back to List Button */
.back-to-list {
    text-align: center;
    margin: 60px 0 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: transparent;
    color: #333333;
    text-decoration: none;
    border: 1px solid rgba(51, 51, 51, 0.3);
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(51, 51, 51, 0.1);
    color: #333333;
    border-color: rgba(51, 51, 51, 0.5);
}

/* Image Modal */
#imageModal .modal-content {
    background: transparent;
    border: none;
}

#imageModal .modal-header {
    border: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}

#imageModal .btn-close {
    background: #fff;
    opacity: 1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

#imageModal .modal-body {
    padding: 0;
}

#imageModal img {
    border-radius: 8px;
}

/* ===== Pagination Styles ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0 40px;
    padding: 0;
}

.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    background: transparent;
    color: #333333;
    text-decoration: none;
    border: 1px solid rgba(51, 51, 51, 0.2);
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.pagination .page-numbers:hover {
    background: rgba(51, 51, 51, 0.05);
    border-color: rgba(51, 51, 51, 0.4);
    color: #333333;
}

.pagination .page-numbers.current {
    background: #333333;
    color: #ffffff;
    border-color: #333333;
    cursor: default;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    min-width: auto;
    padding: 0 5px;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
    border: none;
}

/* Previous/Next Arrows */
.pagination .prev,
.pagination .next {
    font-size: 1rem;
}

.pagination .prev i,
.pagination .next i {
    font-size: 0.875rem;
}

/* Disabled state */
.pagination .page-numbers.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive */
/* Tablet and Mobile */
@media (max-width: 1024px) {
    /* タブレット・スマホ時の最初のセクションにヘッダー分のpadding-topを追加 */
    .event-page .content-section:first-of-type,
    .event-detail-page .content-section:first-of-type {
        padding-top: 120px;
    }

    /* Event Cards Grid - タブレット対応 */
    .event-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* スマホ時のスクロール位置調整（ヘッダー領域を考慮） */
    .event-page,
    .event-detail-page {
        scroll-padding-top: 110px;
    }

    /* 最初のセクションにヘッダー分のpadding-topを追加（スマホ用に再定義） */
    .event-page .content-section:first-of-type,
    .event-detail-page .content-section:first-of-type {
        padding-top: 100px;
    }

    /* Event Cards Grid - スマホ対応 */
    .event-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .pagination {
        margin: 40px 0 30px;
    }

    .pagination ul {
        gap: 6px;
    }

    .pagination .page-numbers {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    /* Hide some page numbers on mobile */
    .pagination .page-numbers:not(.prev):not(.next):not(.current):not(.dots) {
        display: none;
    }

    .pagination .page-numbers:not(.prev):not(.next):not(.current):not(.dots):nth-child(-n+3),
    .pagination .page-numbers:not(.prev):not(.next):not(.current):not(.dots):nth-last-child(-n+3) {
        display: inline-flex;
    }
}
