/* ================================================================
   LP Article — ランディングページ風 記事テンプレート
   ================================================================ */

/* --- Reset & base --- */
.lp-article {
    /* --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";
}

/* ================================================================
   HERO
   ================================================================ */
.lp-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70vh;
    padding: 6rem 1.5rem 4rem;
    overflow: hidden;
    text-align: center;
}

.lp-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, color-mix(in srgb, var(--lp-accent) 18%, transparent) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, color-mix(in srgb, var(--lp-accent) 8%, transparent) 0%, transparent 60%),
        linear-gradient(175deg, #f8fafc 0%, color-mix(in srgb, var(--lp-accent) 5%, #f8fafc) 40%, #faf5ff 100%);
}

.lp-hero__bg--image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.lp-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* 背景画像時のテキスト色 */
.lp-hero--has-image .lp-hero__breadcrumb,
.lp-hero--has-image .lp-hero__breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

.lp-hero--has-image .lp-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.lp-hero--has-image .lp-hero__breadcrumb a:hover {
    color: #ffffff;
}

.lp-hero--has-image .lp-badge--exam {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lp-hero--has-image .lp-badge--date {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lp-hero--has-image .lp-hero__title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lp-hero--has-image .lp-hero__lead {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.lp-hero--has-image .lp-hero__scroll {
    color: rgba(255, 255, 255, 0.6);
}

.lp-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2364748b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.lp-hero__inner {
    position: relative;
    z-index: 10;
    max-width: 860px;
    margin: 0 auto;
}

/* パンくず */
.lp-hero__breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--lp-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.lp-hero__breadcrumb a {
    color: var(--lp-muted);
    text-decoration: none;
}

.lp-hero__breadcrumb a:hover {
    color: var(--lp-accent);
    text-decoration: underline;
}

/* バッジ */
.lp-hero__badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .875rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: .02em;
}

.lp-badge--exam {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-light));
    color: #ffffff;
}

.lp-badge--date {
    background: #ffffff;
    border: 1px solid var(--lp-border);
    color: var(--lp-muted);
}

/* タイトル */
.lp-hero__title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -.02em;
    color: var(--lp-text);
    margin: 0 0 1.5rem;
}

/* リード文 */
.lp-hero__lead {
    font-size: clamp(.9375rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--lp-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* CTA */
.lp-hero__cta {
    margin-top: .5rem;
}

/* スクロールヒント */
.lp-hero__scroll {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--lp-accent-light);
    animation: lp-bounce 2s infinite;
}

@keyframes lp-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ================================================================
   BUTTON
   ================================================================ */
.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 2rem;
    font-size: .9375rem;
    font-weight: 700;
    border-radius: .75rem;
    text-decoration: none;
    transition: all .25s ease;
    cursor: pointer;
}

.lp-btn--primary {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-light));
    color: #ffffff;
    box-shadow:
        0 4px 14px color-mix(in srgb, var(--lp-accent) 35%, transparent),
        0 1px 3px rgba(0,0,0,.1);
}

.lp-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px color-mix(in srgb, var(--lp-accent) 40%, transparent),
        0 2px 6px rgba(0,0,0,.1);
}

.lp-btn--lg {
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
}

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

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

/* --- リッチタイポグラフィ --- */
.lp-content__body h2 {
    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-content__body h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 60px;
    height: 3px;
    background: var(--lp-accent-light);
    border-radius: 2px;
}

.lp-content__body h3 {
    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-content__body p {
    font-size: 1rem;
    line-height: 1.9;
    color: #334155;
    margin: 0 0 1.25rem;
}

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

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

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

.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-content__body ol {
    counter-reset: lp-counter;
}

.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-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-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-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-content__body tbody td {
    padding: .875rem 1rem;
    font-size: .9375rem;
    border-bottom: 1px solid #f1f5f9;
}

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

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

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

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

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

/* figureのマージンリセット */
.lp-content__body figure {
    margin: 1.5rem 0;
}

/* ================================================================
   SCHOOL SECTION
   ================================================================ */
.lp-school-section {
    padding: 3rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--lp-border);
}

.lp-school-section__inner {
    max-width: 780px;
    margin: 0 auto;
}

.lp-section-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lp-text);
    margin: 0 0 1.25rem;
}

.lp-section-heading i {
    color: var(--lp-accent);
}

.lp-school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.lp-school-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    text-decoration: none;
    transition: all .25s ease;
}

.lp-school-card:hover {
    border-color: var(--lp-accent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--lp-accent) 12%, transparent);
    transform: translateY(-2px);
}

.lp-school-card__thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: .75rem;
    flex-shrink: 0;
}

.lp-school-card__thumb-placeholder {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-accent-bg);
    border-radius: .75rem;
    color: var(--lp-accent-light);
    flex-shrink: 0;
}

.lp-school-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lp-text);
    margin: 0 0 .25rem;
}

.lp-school-card__link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8125rem;
    color: var(--lp-accent);
    font-weight: 600;
}

/* ================================================================
   BOTTOM CTA
   ================================================================ */
.lp-bottom-cta {
    padding: 4rem 1.5rem;
    background:
        radial-gradient(ellipse at 30% 50%, color-mix(in srgb, var(--lp-accent) 8%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, color-mix(in srgb, var(--lp-accent) 6%, transparent) 0%, transparent 50%),
        #f8fafc;
    border-top: 1px solid var(--lp-border);
    text-align: center;
}

.lp-bottom-cta__inner {
    max-width: 600px;
    margin: 0 auto;
}

.lp-bottom-cta__text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--lp-text);
    margin: 0 0 1.5rem;
}

/* ================================================================
   FOOTER / SHARE
   ================================================================ */
.lp-footer {
    padding: 2rem 1.5rem 4rem;
    background: #ffffff;
    border-top: 1px solid var(--lp-border);
}

.lp-footer__inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.lp-footer__label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--lp-muted);
    margin: 0 0 .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.lp-footer__share {
    display: flex;
    justify-content: center;
    gap: .75rem;
}

.lp-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: #f1f5f9;
    border-radius: 50%;
    color: var(--lp-muted);
    transition: all .2s ease;
}

.lp-share-btn:hover {
    background: var(--lp-accent);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .lp-hero {
        min-height: 55vh;
        padding: 4rem 1.25rem 3rem;
    }

    .lp-hero__title {
        font-size: 1.5rem;
    }

    .lp-content {
        padding: 2.5rem 1.25rem 3rem;
    }

    .lp-content__body h2 {
        font-size: 1.25rem;
        margin-top: 2.5rem;
    }

    .lp-content__body h3 {
        font-size: 1.0625rem;
        margin-top: 2rem;
    }

    .lp-school-card {
        flex-direction: column;
        text-align: center;
    }

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