/*
 * 新しいTOPページ（フラグ top_v2。テンプレートは template-parts/front/v2.php）
 *
 * TOPページでだけ読み込む。クラス名はすべて lala-top- で始める。
 * 余白は控えめに、1画面に入る情報量を増やす（旧TOPは余白が大きく間延びしていた）。
 */

.lala-top {
    background: #F8F9FA;
    color: var(--text-color);
}

/*
 * サイト共通の指定（style.css）の打ち消し。共通側は「見出しは中央寄せ・h2は青・h3は赤・段落とリストは左寄せ」を
 * 要素そのものに掛けているので、TOPの中では「親の指定を引き継ぐ」に戻す。
 * :where() で優先度を0にしてあるので、下のクラスの指定が必ず勝つ。
 */
:where(.lala-top) h1,
:where(.lala-top) h2,
:where(.lala-top) h3 {
    margin: 0;
    color: inherit;
    text-align: inherit;
}

:where(.lala-top) p,
:where(.lala-top) ul,
:where(.lala-top) ol,
:where(.lala-top) li {
    margin: 0;
    text-align: inherit;
}

:where(.lala-top) ul,
:where(.lala-top) ol {
    padding: 0;
    list-style: none;
}

/* 共通：セクションと見出し */
.lala-top-section {
    padding: 56px 0;
}

.lala-top-section:nth-of-type(even) {
    background: #fff;
}

.lala-top-title {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
    color: var(--dark-color);
    text-wrap: balance;
}

.lala-top-lead {
    max-width: 640px;
    margin: 10px auto 0;
    font-size: 0.98rem;
    line-height: 1.8;
    text-align: center;
    color: #5f6b76;
}

.lala-top-actions {
    margin: 28px 0 0;
    text-align: center;
}

.lala-top-actions .btn {
    padding: 12px 32px;
    font-size: 1rem;
}

.lala-top .btn-secondary {
    border: 2px solid #007E8C;
    background: #fff;
    color: #007E8C;
}

.lala-top .btn-secondary:hover {
    background: #007E8C;
    color: #fff;
}

.lala-top-more {
    color: #007E8C;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.lala-top-more:hover {
    text-decoration: underline;
}

.lala-top-note {
    max-width: 820px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #5f6b76;
}

/* ヒーロー */
.lala-top-hero {
    padding: 64px 0 60px;
    background: linear-gradient(135deg, #00A0A0 0%, #007E8C 100%);
    color: #fff;
    text-align: center;
}

/*
 * カスタマイザーで背景写真が設定されているとき：写真の上に、これまでのTOPと同じコーラル色を
 * 「オーバーレイの濃さ」の設定どおりに重ねる。文字の後ろだけ少し暗くして、白い文字を読みやすくする。
 */
.lala-top-hero.has-image {
    position: relative;
    overflow: hidden;
    padding: 96px 0 88px;
    background: #2D3436;
}

.lala-top-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 30%;
}

.lala-top-hero.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 60% 70% at center, rgba(20, 30, 40, 0.45) 0%, rgba(20, 30, 40, 0) 100%),
        linear-gradient(135deg, rgba(248, 131, 121, var(--lala-hero-overlay, 0.4)) 0%, rgba(245, 107, 95, var(--lala-hero-overlay, 0.4)) 100%);
}

.lala-top-hero.has-image .container {
    position: relative;
    z-index: 2;
}

.lala-top-hero.has-image .lala-top-hero-title,
.lala-top-hero.has-image .lala-top-hero-point,
.lala-top-hero.has-image .lala-top-hero-desc,
.lala-top-hero.has-image .lala-top-hero-links a {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.lala-top-hero.has-image .lala-top-hero-badge {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lala-top-hero-badge {
    display: inline-block;
    margin: 0 0 18px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.9rem;
    font-weight: 600;
}

.lala-top-hero-badge strong {
    color: var(--accent-color);
    font-size: 1.05rem;
}

.lala-top-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.3;
    text-wrap: balance;
}

.lala-top-hero-title span,
.lala-top-hero-desc span {
    display: inline-block; /* 読点・句点までのまとまりを1単位にして折り返す（語の途中で切らない） */
}

.lala-top-hero-point {
    margin: 14px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.lala-top-hero-desc {
    max-width: 760px;
    margin: 14px auto 0;
    font-size: 1rem;
    line-height: 1.9;
    opacity: 0.95;
}

.lala-top-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.lala-top .lala-top-hero-button {
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.lala-top-hero-links {
    display: flex;
    gap: 24px;
}

.lala-top-hero-links a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lala-top-hero-links a:hover {
    color: var(--accent-color);
}

/* お知らせ（1行の帯） */
.lala-top-news {
    padding: 14px 0;
    border-bottom: 1px solid #e6eaee;
    background: #fff;
}

.lala-top-news .container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.lala-top-news-title {
    flex-shrink: 0;
    padding: 3px 12px;
    border-radius: 50px;
    background: #E6F6F6;
    color: #007E8C;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.6;
}

.lala-top-news-list {
    flex: 1;
    min-width: 0;
}

.lala-top-news-list li {
    display: flex;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.9;
}

.lala-top-news-list time {
    flex-shrink: 0;
    color: #8a949e;
    font-size: 0.85rem;
}

.lala-top-news-list a {
    overflow: hidden;
    color: var(--text-color);
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lala-top-news-list a:hover {
    color: #007E8C;
    text-decoration: underline;
}

.lala-top-news .lala-top-more {
    flex-shrink: 0;
    line-height: 1.9;
}

/* 講師 */
.lala-top-instructor-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.lala-top-instructor-list a {
    display: block;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.lala-top-instructor-photo {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: #e9edf0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.lala-top-instructor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lala-top-instructor-list a:hover img {
    transform: scale(1.04);
}

.lala-top-instructor-name {
    display: block;
    margin-top: 10px;
    font-size: 0.98rem;
    font-weight: 800;
}

.lala-top-instructor-lang {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: #5f6b76;
}

/* コース・料金 */
.lala-top-course-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.lala-top-course {
    position: relative;
    padding: 24px 22px;
    border: 1px solid #e3e8ec;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.lala-top-course.is-popular {
    border: 2px solid #007E8C;
    box-shadow: 0 8px 24px rgba(0, 126, 140, 0.14);
}

.lala-top-course-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    padding: 3px 14px;
    border-radius: 50px;
    background: var(--accent-color);
    color: var(--dark-color);
    font-size: 0.78rem;
    font-weight: 800;
    transform: translateX(-50%);
    white-space: nowrap;
}

.lala-top-course h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #007E8C;
}

.lala-top-course h3 small {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5f6b76;
}

.lala-top-course-term {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.lala-top-course-price {
    margin-top: 14px;
    font-size: 0.95rem;
    color: #5f6b76;
}

.lala-top-course-price span {
    display: block;
    font-size: 0.78rem;
}

.lala-top-course-price strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-color);
}

.lala-top-course-summary {
    margin-top: 12px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #5f6b76;
}

/* 選ばれる理由 */
.lala-top-reason-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
    counter-reset: reason;
}

.lala-top-reason-list li {
    padding: 24px 22px;
    border-radius: 16px;
    background: #F0FAFA;
    counter-increment: reason;
}

.lala-top-reason-list li::before {
    content: "0" counter(reason);
    display: block;
    margin-bottom: 8px;
    color: #00A0A0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.lala-top-reason-list h3 {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.5;
}

.lala-top-reason-list p {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #4a5560;
}

/* お客様の声 */
.lala-top-voice-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.lala-top-voice {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid #e3e8ec;
    border-radius: 16px;
    background: #fff;
}

.lala-top-voice-lang {
    font-size: 0.82rem;
    font-weight: 700;
    color: #007E8C;
}

.lala-top-voice-lang span {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 50px;
    background: #FFF4CC;
    color: #6b5500;
    font-size: 0.72rem;
}

.lala-top-voice h3 {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.6;
}

.lala-top-voice-body {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.8;
    color: #4a5560;
}

.lala-top-voice-author {
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.88rem;
    font-weight: 700;
}

.lala-top-voice-author small {
    margin-left: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #8a949e;
}

.lala-top-voice-more {
    margin-top: 20px;
    text-align: center;
}

.lala-top-voice-more summary {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #cfd6dc;
    border-radius: 50px;
    color: #007E8C;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.lala-top-voice-more summary::-webkit-details-marker {
    display: none;
}

.lala-top-voice-more[open] summary {
    display: none;
}

.lala-top-voice-more .lala-top-voice-list {
    margin-top: 0;
    text-align: left;
}

/* 35言語 */
.lala-top-languages .container {
    max-width: 1000px;
}

.lala-top-region {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px 20px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid #e6eaee;
}

.lala-top-region:first-of-type {
    margin-top: 20px;
    border-top: 1px solid #e6eaee;
}

.lala-top-region h3 {
    padding-top: 6px;
    font-size: 0.95rem;
    font-weight: 800;
}

.lala-top-region h3 small {
    margin-left: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a949e;
}

.lala-top-region ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lala-top-region a {
    display: block;
    padding: 6px 14px;
    border: 1px solid #d5dbe1;
    border-radius: 50px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lala-top-region a:hover {
    border-color: #007E8C;
    background: #007E8C;
    color: #fff;
}

/* 法人向け */
.lala-top-corporate {
    padding: 40px 0;
    background: #fff;
}

.lala-top-corporate-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 32px;
    border-radius: 18px;
    background: #2D3436;
    color: #fff;
}

.lala-top-corporate-label {
    margin: 0 0 6px;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 800;
}

.lala-top-corporate h2 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.5;
}

.lala-top-corporate p {
    margin: 8px 0 0;
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.9;
}

.lala-top-corporate .btn {
    flex-shrink: 0;
    padding: 12px 28px;
    border-color: #fff;
    font-size: 0.98rem;
    white-space: nowrap;
}

/* 体験レッスン */
.lala-top-cta {
    padding: 56px 0;
    background: linear-gradient(135deg, #00A0A0 0%, #007E8C 100%);
    color: #fff;
    text-align: center;
}

.lala-top-cta h2 {
    font-size: 1.7rem;
    font-weight: 800;
}

.lala-top-cta p {
    margin: 10px 0 24px;
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* 記事 */
.lala-top-post-list {
    max-width: 820px;
    margin: 24px auto 0;
    border-top: 1px solid #e6eaee;
}

.lala-top-post-list a {
    display: flex;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px solid #e6eaee;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.7;
    text-decoration: none;
}

.lala-top-post-list a:hover span {
    color: #007E8C;
    text-decoration: underline;
}

.lala-top-post-list time {
    flex-shrink: 0;
    color: #8a949e;
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .lala-top-instructor-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .lala-top-section {
        padding: 40px 0;
    }

    .lala-top-title {
        font-size: 1.4rem;
    }

    .lala-top-hero {
        padding: 44px 0 40px;
    }

    .lala-top-hero.has-image {
        padding: 60px 0 52px;
    }

    .lala-top-hero-title {
        font-size: 1.8rem;
    }

    .lala-top-hero-point {
        font-size: 1.08rem;
    }

    .lala-top-hero-desc {
        font-size: 0.92rem;
    }

    .lala-top .lala-top-hero-button {
        width: 100%;
        max-width: 340px;
        padding: 15px 20px;
        font-size: 1.02rem;
    }

    .lala-top-news .container {
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .lala-top-news-list {
        flex-basis: 100%;
        order: 3;
    }

    .lala-top-news .lala-top-more {
        margin-left: auto;
    }

    .lala-top-instructor-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .lala-top-instructor-name {
        font-size: 0.85rem;
    }

    .lala-top-instructor-lang {
        font-size: 0.7rem;
    }

    .lala-top-course-list,
    .lala-top-reason-list,
    .lala-top-voice-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lala-top-region {
        grid-template-columns: 1fr;
    }

    .lala-top-region h3 {
        padding-top: 0;
    }

    .lala-top-corporate-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 22px;
    }

    .lala-top-corporate .btn {
        width: 100%;
        text-align: center;
    }

    .lala-top-cta {
        padding: 44px 0;
    }

    .lala-top-cta h2 {
        font-size: 1.4rem;
    }

    .lala-top-post-list a {
        flex-direction: column;
        gap: 2px;
    }
}

/* 最後の記事一覧は背景を地の色にして、フッター手前の余白とつなげる */
.lala-top .lala-top-posts {
    background: transparent;
}
