/* ================================================================
   LP Event — ランディングページ風 イベントテンプレート
   ================================================================ */

/* --- Reset & base --- */
.lp-event {
    /* --lp-accent is set inline via PHP */
    --lp-accent-light: color-mix(in srgb, var(--lp-accent) 70%, white);
    --lp-accent-bg: color-mix(in srgb, var(--lp-accent) 6%, transparent);
    --lp-text: #0f172a;
    --lp-muted: #64748b;
    --lp-border: #e2e8f0;
    --lp-radius: 1rem;
    background: #ffffff;
    color: var(--lp-text);
    font-feature-settings: "palt";
}

/* ================================================================
   CONTENT
   ================================================================ */
.lp-event .lp-content {
    padding: 4rem 1.5rem 5rem;
    background: #ffffff;
}

.lp-event .lp-content__inner {
    max-width: 780px;
    margin: 0 auto;
}

/* --- プラグイン/テーマブロック内はテーマの装飾罫線を適用しない ---
   装飾見出しブロック(.shingaku-styled-heading__text)は自身のCSSで
   ::before/::after を使うため除外する */
.lp-event .lp-content__body [class*="shgk-"] h2:not(.shingaku-styled-heading__text),
.lp-event .lp-content__body [class*="shingaku-"] h2:not(.shingaku-styled-heading__text) {
    border-bottom: none;
    padding-bottom: 0;
}
.lp-event .lp-content__body [class*="shgk-"] h2:not(.shingaku-styled-heading__text)::before,
.lp-event .lp-content__body [class*="shingaku-"] h2:not(.shingaku-styled-heading__text)::before {
    content: none;
}
.lp-event .lp-content__body [class*="shgk-"] h3:not(.shingaku-styled-heading__text),
.lp-event .lp-content__body [class*="shingaku-"] h3:not(.shingaku-styled-heading__text) {
    border-left: none;
    padding-left: 0;
    margin: 0 0 var(--shgk-space-md, .75rem) 0;
}
.lp-event .lp-content__body [class*="shgk-"] h4:not(.shingaku-styled-heading__text),
.lp-event .lp-content__body [class*="shingaku-"] h4:not(.shingaku-styled-heading__text) {
    border: none;
    padding: 0;
}

/* --- リッチタイポグラフィ --- */
/* 装飾見出しブロック(.shingaku-styled-heading__text)は自身のCSSで制御するため除外 */
.lp-event .lp-content__body h2:not(.shingaku-styled-heading__text) {
    position: relative;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--lp-text);
    margin: 3.5rem 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 3px solid var(--lp-accent);
}

.lp-event .lp-content__body h2:not(.shingaku-styled-heading__text)::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 60px;
    height: 3px;
    background: var(--lp-accent-light);
    border-radius: 2px;
}

.lp-event .lp-content__body h3:not(.shingaku-styled-heading__text) {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lp-text);
    margin: 2.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--lp-accent);
}

.lp-event .lp-content__body p {
    font-size: 1rem;
    line-height: 1.9;
    color: #334155;
    margin: 0 0 1.25rem;
}

.lp-event .lp-content__body strong {
    color: var(--lp-text);
    font-weight: 700;
}

.lp-event .lp-content__body ul,
.lp-event .lp-content__body ol {
    margin: 1.25rem 0;
    padding-left: 0;
    list-style: none;
}

.lp-event .lp-content__body ul li {
    position: relative;
    padding: .625rem 0 .625rem 1.75rem;
    line-height: 1.7;
    border-bottom: 1px solid #f1f5f9;
}

.lp-event .lp-content__body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: .625rem;
    height: .625rem;
    background: var(--lp-accent);
    border-radius: 50%;
}

.lp-event .lp-content__body ol {
    counter-reset: lp-counter;
}

.lp-event .lp-content__body ol li {
    position: relative;
    padding: .625rem 0 .625rem 2.5rem;
    line-height: 1.7;
    counter-increment: lp-counter;
    border-bottom: 1px solid #f1f5f9;
}

.lp-event .lp-content__body ol li::before {
    content: counter(lp-counter);
    position: absolute;
    left: 0;
    top: .625rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-accent);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 50%;
}

/* テーブル */
.lp-event .lp-content__body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: .375rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.lp-event .lp-content__body thead th {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-light));
    color: #ffffff;
    font-weight: 700;
    font-size: .875rem;
    padding: .875rem 1rem;
    text-align: left;
}

.lp-event .lp-content__body tbody td {
    padding: .875rem 1rem;
    font-size: .9375rem;
    border-bottom: 1px solid #f1f5f9;
}

.lp-event .lp-content__body tbody tr:last-child td {
    border-bottom: none;
}

.lp-event .lp-content__body tbody tr:empty {
    display: none;
}

.lp-event .lp-content__body tbody tr:hover {
    background: var(--lp-accent-bg);
}

/* ストライプテーブル: 指定色 + 白の交互表示 */
.lp-event .lp-content__body .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: transparent;
}
.lp-event .lp-content__body .wp-block-table.is-style-stripes tbody tr:nth-child(even) {
    background-color: #fff;
}

/* wp-block-table のボーダーリセット */
.lp-event .lp-content__body .wp-block-table {
    border-bottom: none;
}
.lp-event .lp-content__body .wp-block-table td,
.lp-event .lp-content__body .wp-block-table th {
    border: none;
}

.lp-event .lp-content__body figure {
    margin: 1.5rem 0;
}

/* LP Mode — 全幅レイアウト */
body.shgk-lp-mode {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
.lp-event.lp-event--fullwidth {
    background: transparent;
}
.lp-event--fullwidth .lp-content.lp-content--fullwidth {
    padding: 0;
    max-width: none;
    background: transparent;
}

/* --- デフォルト: 全ブロック全幅 --- */
.lp-event--fullwidth .lp-content__body > * {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* --- テキスト系ブロック → 780px中央寄せ --- */
.lp-event--fullwidth .lp-content__body > p,
.lp-event--fullwidth .lp-content__body > h1,
.lp-event--fullwidth .lp-content__body > h2,
.lp-event--fullwidth .lp-content__body > h3,
.lp-event--fullwidth .lp-content__body > h4,
.lp-event--fullwidth .lp-content__body > h5,
.lp-event--fullwidth .lp-content__body > h6,
.lp-event--fullwidth .lp-content__body > ul,
.lp-event--fullwidth .lp-content__body > ol,
.lp-event--fullwidth .lp-content__body > blockquote,
.lp-event--fullwidth .lp-content__body > .wp-block-table,
.lp-event--fullwidth .lp-content__body > .wp-block-image:not(.alignfull):not(.alignwide),
.lp-event--fullwidth .lp-content__body > .wp-block-separator {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

/* --- alignwide → 1200px --- */
.lp-event--fullwidth .lp-content__body > .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ヒーローブロックのLP対応 --- */
.lp-event--fullwidth .shgk-lp-hero-block {
    width: 100%;
    max-width: none;
    margin-left: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .lp-event .lp-content {
        padding: 2.5rem 1.25rem 3rem;
    }

    .lp-event .lp-content__body h2:not(.shingaku-styled-heading__text) {
        font-size: 1.25rem;
        margin-top: 2.5rem;
    }

    .lp-event .lp-content__body h3:not(.shingaku-styled-heading__text) {
        font-size: 1.0625rem;
        margin-top: 2rem;
    }

    .lp-event .lp-content__body thead th,
    .lp-event .lp-content__body tbody td {
        padding: .625rem .5rem;
        font-size: .8125rem;
    }
}
