/*
 * Theme Name: shuzai_smrkon
 * Template: lightning
 *
 * CSS Version: Final 1.9 (Corrected Pagination Styles)
 */

/* ===================================
 * サイト共通の調整
 * =================================== */
.site-footer-copyright p:nth-child(2) { display:none !important; }
.site-footer-copyright p { text-align: center; font-size: var(--vk-size-text-xs); margin: 0.5rem; }
.page-header-title, h1.page-header-title { font-size: 1.8rem !important; }
.site-body { padding: 1rem 0 3.5rem; }
.page-header {min-height: 6rem !important;}

/* --- サイト全体のレイアウト調整 (最終修正版) --- */
@media (min-width: 992px) {
    .container {
        max-width: 900px !important;
    }
}
@media (max-width: 991px) {
    .container,
    .page-header-inner,
    .mobile-menu-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.page-header {min-height: 6rem !important;}

/* ===================================
 * イベント一覧 (main.php など)
 * =================================== */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.event-card {
    display: flex;
    align-items: center;
    /* gap: 20px; */ /* 個別マージンに変更 */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s ease;
}
.event-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
:root {
    --card-date-size-pc: 90px;
    --card-thumb-width-pc: 140px;
    --card-thumb-height-pc: 94px;
    --card-title-size-pc: 1.7rem;
    --card-meta-size-pc: 0.8rem;
    --card-details-size-pc: 0.95rem;
}
.card__date {
    --box-size: var(--card-date-size-pc);
    --triangle-color: #000033;
    --month-text-color: #ffffff;
    --day-text-color: #2c3e50;
    --dayname-text-color: #333333;
    --border-color: #cccccc;
    --border-radius: 8px;
    position: relative;
    width: var(--box-size);
    height: var(--box-size);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fdfdfd;
    margin-right: 8px;
}
.card__date .date__triangle {
    position: absolute; top: 0; left: 0; width: 0; height: 0;
    border-top: calc(var(--box-size) * 0.59) solid var(--triangle-color);
    border-right: calc(var(--box-size) * 0.59) solid transparent;
}
.card__date .date__month {
    position: absolute; top: calc(var(--box-size) * 0.06); left: calc(var(--box-size) * 0.08);
    color: var(--month-text-color); font-size: calc(var(--box-size) * 0.22);
    font-weight: bold; z-index: 1;
}
.card__date .date__day {
    font-size: calc(var(--box-size) * 0.35); color: var(--day-text-color);
    font-weight: 900; line-height: 1; margin-top: calc(var(--box-size) * 0.1);
}
.card__date .date__dayname {
    font-size: calc(var(--box-size) * 0.15); color: var(--dayname-text-color); font-weight: bold;
}
.card__thumbnail {
    width: var(--card-thumb-width-pc);
    height: var(--card-thumb-height-pc);
    border-radius: 6px;
    overflow: hidden;
    background-color: #f0f0f0;
    flex-shrink: 0;
    margin-right: 25px;
}
.card__thumbnail a, .card__thumbnail img {
    display: block; width: 100%; height: 100%; object-fit: cover;
}
.card__info { flex: 1; min-width: 0; }
.card__info a { text-decoration: none; color: inherit; }
.card__info .card__title a:hover { color: #e67e22; }
.card__meta {
    display: flex; flex-wrap: wrap; gap: 5px 15px;
    align-items: center; font-size: var(--card-meta-size-pc);
    color: #667; margin-bottom: 8px;
}
.meta-item--coverage {
    color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: bold;
    font-size: 0.75rem; min-width: 70px; text-align: center;
}
.meta-item--coverage.is-default-blue { background-color: #3498db; }
.meta-item--coverage.is-orange { background-color: #e67e22; }
.meta-item i { margin-right: 4px; }
.card__title {
    font-size: var(--card-title-size-pc);
    font-weight: 900; margin: 0 0 10px 0;
    line-height: 1.3; color: #2c3e50;
}
.card__details {
    font-size: var(--card-details-size-pc);
    color: #333;
}
.card__detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.card__detail-item:last-of-type { margin-bottom: 0; }
.card__detail-item i { margin-right: 6px; color: #8899a6; width: 1em; text-align: center; }

/* ===================================
 * 演者・イベント詳細ページ共通
 * =================================== */
.single-event .main-section,
.single-performer .main-section { max-width: 900px; margin: 0 auto; float: none; }
.image-gallery-section { margin-bottom: 3rem; }
.image-wrapper.has-two-images { display: flex; gap: 20px; align-items: flex-start; }
.image-wrapper.has-two-images .image-item { flex: 1; }
.image-wrapper.has-one-image .image-item { max-width: 75%; margin: 0 auto; }
.image-gallery-section img { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.info-section { margin-bottom: 3rem; }
.info-section h2 { font-size: 1.5rem; border-bottom: 3px solid #337ab7; padding-bottom: 0.5em; margin-bottom: 1.5em; display: flex; align-items: center; }
.info-section h2 i { margin-right: 0.7em; }
.performer-profile { line-height: 1.8; margin-bottom: 1.5em; }
.info-table { width: 100%; border-collapse: collapse; border: 1px solid #ddd; }
.info-table th, .info-table td { padding: 1em; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.info-table th { width: 180px; font-weight: bold; background-color: #f9f9f9; }
.info-table iframe { max-width: 100%; height: 350px; vertical-align: middle; border: none; border-radius: 4px; }
.info-table a { color: #337ab7; text-decoration: underline; }
.info-table a:hover { text-decoration: none; }
.single-performer .performer-page-title { font-size: 1.8rem !important; text-align: center !important; padding: 20px 0 !important; margin: 0; }
.custom-event-header { --icon-height: 60px; --title-font-size: 1.8rem; display: flex; align-items: center; gap: 15px; }
.event-header-icon img { height: var(--icon-height); width: auto; display: block; }
.event-header-title { font-size: var(--title-font-size); margin: 0; line-height: 1.3; }
.future-schedule-section { margin-bottom: 3rem; }
.future-schedule-list { display: flex; flex-direction: column; gap: 10px; }
.future-event-item {
    display: flex; align-items: center; padding: 15px; background-color: #f9f9f9;
    border: 1px solid #eee; border-radius: 8px; text-decoration: none;
    color: #333; transition: background-color 0.3s, box-shadow 0.3s;
}
.future-event-item:hover { background-color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.future-event__icon { width: 60px; flex-shrink: 0; margin-right: 15px; }
.future-event__icon img { max-width: 100%; height: auto; display: block; }
.future-event__date { font-weight: bold; margin-right: 10px; width: 80px; flex-shrink: 0; }
.future-event__shop { flex-grow: 1; }

/* ===================================
 * 演者一覧ページ
 * =================================== */
.performer-list-wrapper { width: 100%;  box-sizing: border-box;}

@media (max-width: 991px) {
    .performer-list-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.performer-list {
    display: grid;
    row-gap: 15px;
    column-gap: 10px; 
    grid-template-columns: repeat(2, 1fr); /* スマホ(デフォルト) */
}

.performer-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* 親要素の領域をアスペクト比を維持したまま埋めます */
    object-position: center; /* 画像の中央部分を常に表示します */
}

@media (min-width: 769px) {
    .performer-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
.performer-card {
    border: 1px solid #ddd; border-radius: 8px; overflow: hidden;
    background-color: #fff; transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.performer-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); transform: translateY(-5px); }
.performer-card__link { display: block; text-decoration: none; color: inherit; }
.performer-card__thumbnail {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.performer-card__info { padding: 1rem; }
.performer-card__name { font-size: 1.2rem; font-weight: bold; text-align: center; padding: 0; margin: 0; }
.event-date-overlay {
    position: absolute; top: 8px; left: 8px; background-color: rgba(0, 0, 0, 0.7);
    color: #fff; font-weight: bold; padding: 5px 10px;
    border-radius: 5px; font-size: 1rem; z-index: 10;
}
.latest-event-date {
    font-size: 0.9rem; font-weight: bold; color: #e67e22;
    text-align: center; margin-bottom: 0.5rem;
}

/* ===================================
 * ページネーション共通
 * =================================== */
.pagination-wrapper { margin-top: 40px; text-align: center; width: 100%; clear: both; }
/* --- WP-PageNavi用 --- */
.wp-pagenavi { display: inline-block; }
.wp-pagenavi a, .wp-pagenavi span {
    border: 1px solid #ddd; border-radius: 4px; padding: 8px 12px;
    margin: 0 3px; text-decoration: none; background: #fff; transition: background-color 0.2s;
}
.wp-pagenavi a:hover { background-color: #f5f5f5; border-color: #ccc; }
.wp-pagenavi span.current { background-color: #2a4b71; color: #fff; border-color: #2a4b71; }
.wp-pagenavi .pages { white-space: nowrap; }
/* --- paginate_links用 --- */
.page-numbers {
    display: inline-block; border: 1px solid #ddd; border-radius: 4px; padding: 8px 12px;
    margin: 0 3px; text-decoration: none; background: #fff; transition: background-color 0.2s;
}
a.page-numbers:hover { background-color: #f5f5f5; border-color: #ccc; }
span.page-numbers.current {
    background-color: #2a4b71; color: #fff; border-color: #2a4b71;
}
span.page-numbers.dots { border: none; background: none; padding: 8px 0; }

/* ===================================
 * 過去イベントへのリンクボタン
 * =================================== */
.past-events-link-container { text-align: center; margin: 40px 0; }
.btn-past-events {
    display: inline-block; background-color: #28a745; color: #ffffff; padding: 12px 25px;
    border-radius: 25px; text-decoration: none; font-weight: bold; transition: background-color 0.3s;
}
.btn-past-events:hover { background-color: #218838; color: #ffffff; }

/* ===================================
 * モバイル専用メニューバー
 * =================================== */
.mobile-menu-wrapper { display: none; }


/* ===================================
 * YourChannel プラグイン カスタムCSS
 * =================================== */
.yrc-video-date { font-size: 1.75em !important; }
.yrc-video-views { font-size: 2.75em !important; }
.yrc-item-title {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    width: 100%; display: block; margin-top: 15px !important;
    font-size: 1.15em !important; line-height: 1.25em;
}
.yrc-custom-stats {
    margin-top: 8px; display: flex; flex-direction: row; align-items: center;
    gap: 0.75em; font-size: 19px; color: #333;
}
.yrc-custom-stats span { display: inline-flex; align-items: center; margin-left: -5px; }
.yrc-custom-date::before {
    font-family: 'icomoon' !important; content: '\f017';
    margin-right: 5px; font-size: 0.9em;
}
.yrc-item .yrc-video-date { display: none !important; }
.yrc-custom-date { font-size: 14px; color: #008000; font-weight: bold; }
.yrc-custom-views { font-size: 14px; color: #800080; }
.yrc-item { position: relative; padding-bottom: 40px; }
.yrc-item:last-child { padding-bottom: 0; }
.yrc-item:last-child::after { display: none; }
.hr-simple {
    border: none; border-top: 1px solid #333;
    width: 90%; margin: 40px auto 0 auto;
}

/* ===================================
 * YourChannel プラグイン スマホ見切れ 修正対応
 * =================================== */

/* YourChannelプラグインのメインコンテナのスタイルを強制的に調整 */
.yrc-shell {
    box-sizing: border-box !important;
    margin-left: 0 !important;  /* はみ出しの原因となるマイナスマージンを解除 */
    margin-right: 0 !important; /* はみ出しの原因となるマイナスマージンを解除 */
    width: 100% !important;     /* 幅を親要素に合わせる */
}

/* スマホ・タブレット表示 (幅991px以下) で左右に余白を設定 */
@media (max-width: 991px) {
    .yrc-shell {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}


/* ===================================
 * イベント一覧メイン(main.php) スマホ表示調整
 * =================================== */

/* スマホ・タブレット表示 (幅991px以下) で左右に余白を設定 */
@media (max-width: 991px) {

    /* YourChannelプラグインのラッパーに余白を設定 */
    .yrc-shell-cover {
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    /* イベント一覧リストのラッパーに余白を設定 */
    .schedule-list {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}

/* ===================================
 * スマホ表示の調整 (@media)
 * =================================== */
@media (max-width: 768px) {
    /* --- モバイルメニュー --- */
    .mobile-menu-wrapper { display: block; margin: 1.5rem 0; }
    .mobile-menu {
        display: flex; justify-content: space-between; background: #fff;
        border: 1px solid #ccc; border-radius: 8px; overflow: hidden;
    }
    .mobile-menu .menu-item {
        flex: 1; text-align: center; text-decoration: none; padding: 8px 5px; color: #333;
        font-weight: bold; border-right: 1px solid #ddd; background: #ffffff;
        transition: background 0.3s; display: flex; flex-direction: column;
        align-items: center; justify-content: center; font-size: 10px;
    }
    .mobile-menu .menu-item:last-child { border-right: none; }
    .mobile-menu .menu-item i {
        font-size: 20px; margin-bottom: 5px; height: 22px; width: 22px;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .mobile-menu .menu-item.active { background: #e6f7ff; }

    /* --- イベント一覧のカード --- */
    .schedule-list .event-card,
    .event-card {
        gap: 10px;
        padding: 7px;
    }
    .schedule-list .card__date,
    .event-card .card__date {
        margin-right: 0;
    }
    .schedule-list .card__thumbnail,
    .event-card .card__thumbnail {
        margin-right: 0;
    }
    :root {
        --card-date-size-sp: 60px;
        --card-thumb-width-sp: 90px;
        --card-thumb-height-sp: 60px;
        --card-title-size-sp: 1rem;
        --card-meta-size-sp: 0.7rem;
        --card-details-size-sp: 0.8rem;
    }
    .schedule-list .card__date,
    .event-card .card__date {
        --box-size: var(--card-date-size-sp);
    }
    .schedule-list .card__thumbnail,
    .event-card .card__thumbnail {
        width: var(--card-thumb-width-sp);
        height: var(--card-thumb-height-sp);
        aspect-ratio: auto;
    }
    .schedule-list .card__title,
    .event-card .card__title {
        font-size: var(--card-title-size-sp);
    }
    .schedule-list .card__meta,
    .event-card .card__meta {
        font-size: var(--card-meta-size-sp);
    }
    .schedule-list .card__details,
    .event-card .card__details {
        font-size: var(--card-details-size-sp);
    }
    
    /* --- 詳細ページの左右余白 --- */
    .single-event .main-section,
    .single-performer .main-section { 
        padding-left: 15px;
        padding-right: 15px;
    }
    .image-wrapper.has-two-images { flex-direction: column; }

    /* --- イベント詳細ヘッダー --- */
    .custom-event-header { --icon-height: 60px; --title-font-size: 1.4rem; }
    .single-event .page-header-inner { display: flex; justify-content: center; }

    /* --- レスポンシブテーブル --- */
    .info-table tr, .info-table th, .info-table td {
        display: block; width: 100%; box-sizing: border-box;
    }
    .info-table tr { margin-bottom: 1.5rem; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
    .info-table td { padding: 0.75em 1em; text-align: left; border: none; border-bottom: 1px solid #ddd; }
    .info-table td:before {
        content: attr(data-label); display: block; font-weight: bold;
        background-color: #f2f2f2; padding: 0.75em 1em; margin: -0.75em -1em 0.75em -1em;
        border-bottom: 1px solid #ddd;
    }
    .info-table th { display: none; }
    .info-table tr:last-child td { border-bottom: none; }
    .info-table iframe { height: 250px; }

    /* --- スマホでのページネーション --- */
    .wp-pagenavi .pages,
    .page-numbers.dots { font-size: 0.9em; }
}