/* ベーススタイル */
:root {
    --primary-color: #4A90E2; /* アクセントカラー (青系) */
    --secondary-color: #F5A623; /* サブアクセントカラー (オレンジ系) */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --dark-bg: #333;
    --white: #fff;
    --border-color: #eee;
    --spacing-lg: 80px;
    --spacing-md: 40px;
    --spacing-sm: 20px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif; /* 見出しにエレガントなフォント */
    margin-bottom: var(--spacing-sm);
    color: #222;
}

.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: var(--spacing-sm) auto 0;
}

.section-description {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.1em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-spacing {
    padding: var(--spacing-lg) 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.bg-dark {
    background-color: var(--dark-bg);
    color: var(--white);
}

.text-white {
    color: var(--white);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 25px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #3a7bd2;
    color: var(--white);
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 1.1em;
    padding: 15px 30px;
}

.btn-cta:hover {
    background-color: #d8901f;
}

.btn-lg {
    font-size: 1.2em;
    padding: 18px 35px;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.highlight-text {
    color: var(--primary-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ヘッダー */
.header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8em;
    margin: 0;
    line-height: 1;
}

.site-title a {
    color: var(--text-color);
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-toggle {
    display: none; /* PCでは非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.nav-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* メインビジュアル (Hero Section) */
.hero {
    background-color: #eef4fb;
    padding: 100px 0;
    display: flex;
    align-items: center;
    min-height: 600px;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* スマホ対応 */
}

.hero-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.hero-subheading {
    font-size: 1.1em;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


/* 教室について (About Us) */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}


/* コース案内 (Courses) */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.course-card h4 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.course-card p {
    margin-bottom: 25px;
    font-size: 0.95em;
}

/* 生徒さんの字 (Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    height: 250px; /* 一定の高さに統一 */
    object-fit: cover; /* 画像がはみ出さないように */
    border-bottom: 1px solid var(--border-color);
}

.gallery-item .caption {
    padding: 15px;
    font-size: 0.95em;
    text-align: center;
    font-style: italic;
    color: #666;
}

/* よくある質問 (FAQ) */
.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.faq-question {
    background-color: transparent;
    border: none;
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question::after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"]::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer p {
    padding-bottom: 15px;
    line-height: 1.7;
}

/* お問い合わせ (Contact) */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Noto Sans JP', sans-serif; /* 入力欄のフォントも合わせる */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.form-group .required {
    color: #e74c3c;
    margin-left: 5px;
}

.contact-form .btn-cta {
    width: 100%;
    margin-top: var(--spacing-sm);
}

/* フッター */
.footer {
    background-color: #2c3e50; /* 濃いめの色 */
    color: #ecf0f1;
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9em;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #ecf0f1;
}

/* =========================================
   レスポンシブデザイン (モバイルファースト)
   ========================================= */

/* スマートフォン向けスタイル (デフォルト) */
.hero .container {
   /* flex-direction: column-reverse; /* スマホでは画像が下 */
    text-align: center;
}
.hero-content {
    text-align: center;
}
.hero-image {
    max-width: 80%; /* スマホで大きすぎないように */
    margin-bottom: var(--spacing-md);
}

.about-content {
    flex-direction: column;
    text-align: center;
}
.about-text, .about-image {
    min-width: unset; /* 固定幅を解除 */
    flex: none;
}
.about-image img {
    width: 80%; /* スマホで大きすぎないように */
}

/* ナビゲーションのハンバーガーメニュー */
.nav-toggle {
    display: block; /* スマホで表示 */
}

.nav-list {
    display: none; /* デフォルトで非表示 */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: var(--spacing-sm) 0;
    z-index: 999;
}

.nav-list.active {
    display: flex; /* アクティブ時に表示 */
}

.nav-list li {
    text-align: center;
    margin: 0;
}

.nav-list a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-list li:last-child a {
    border-bottom: none;
    margin-top: 10px; /* CTAボタンの上にスペース */
}

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
    /* ここを編集 */
    padding: 10px 15px; /* 上下左右にパディングを追加 */
    display: block; /* パディングを適用するためにブロック要素にする */
    transition: background-color 0.3s ease, color 0.3s ease; /* ホバー効果もスムーズに */
}

.nav-list a:hover {
    background-color: rgba(0, 0, 0, 0.05); /* ホバー時の背景色を追加 */
    color: var(--primary-color); /* ホバー時の文字色も変える */
}

/* ナビゲーショントグルのスタイル（ハンバーガーメニュー） */
.nav-toggle {
    display: none; /* PCでは非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px; /* ここもタップしやすいようにパディングを追加 */
    position: relative;
    z-index: 1001;
    width: 44px; /* タップターゲットの最小サイズ推奨（WCAG 2.1） */
    height: 44px;
    display: flex; /* アイコンを中央に配置するためにflexbox */
    justify-content: center;
    align-items: center;
}

/* スマートフォン向けのスタイル (767px以下の画面幅に適用) */
@media (max-width: 767px) {
    .nav-list {
        /* スマートフォン表示時のリスト全体のスタイル */
        /* 以前の display: none; は active クラスで制御 */
        flex-direction: column;
        width: 100%;
    }

    .nav-list li {
        margin: 0;
    }

    .nav-list a {
        padding: 15px 20px; /* スマホではさらに大きく（指でタップしやすく） */
        border-bottom: 1px solid var(--border-color); /* 区切り線 */
        text-align: center; /* リンクのテキストを中央寄せに */
    }

    .nav-list li:last-child a {
        border-bottom: none;
        margin-top: 10px;
    }

    /* ハンバーガーメニューがアクティブになった際のナビゲーションリストのスタイル */
    .nav-list.active {
        display: flex; /* JavaScriptで制御 */
    }

    /* CTAボタンがナビゲーション内にあれば、スマホで幅を広げる */
    .nav-list .btn-primary {
        display: block; /* ボタンも幅いっぱいに広げる */
        margin: 15px auto; /* 中央寄せに */
        max-width: 250px; /* ボタンの最大幅 */
    }
}

/* PC向けのスタイル (768px以上の画面幅に適用) */
@media (min-width: 768px) {
    .nav-toggle {
        display: none; /* PCでは非表示に戻す */
    }
    .nav-list {
        display: flex; /* PCでは横並びに戻す */
        position: static; /* 位置指定をリセット */
        flex-direction: row;
        box-shadow: none;
        padding: 0;
    }
    .nav-list a {
        padding: 10px 15px; /* PCでのパディング（スマホより小さめでもOK） */
        border-bottom: none; /* PCでは区切り線なし */
        text-align: left; /* テキストの配置を元に戻す */
    }
    .nav-list li:last-child a {
        margin-top: 0; /* PCではマージンをリセット */
    }
}

/* タブレット向けスタイル */
@media (min-width: 768px) {
    .section-title {
        font-size: 3em;
    }
    .hero .container {
        flex-direction: row; /* タブレット以上で左右に並べる */
        text-align: left;
    }
    .hero-content {
        text-align: left;
    }
    .hero-image {
        margin-bottom: 0;
    }
    .about-content {
        flex-direction: row;
        text-align: left;
    }
    .about-image img {
        width: 100%;
    }
    .nav-toggle {
        display: none;
    }
    .nav-list {
        display: flex;
        position: static;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
    }
    .nav-list a {
        border-bottom: none;
        padding: 0;
    }
}

/* PC向けスタイル */
@media (min-width: 1024px) {
    .section-title {
        font-size: 3.5em;
    }
    .hero-title {
        font-size: 4.5em;
    }
    .hero-image {
        max-width: 600px;
    }
    .about-content {
        gap: 60px;
    }
    .course-grid, .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 基本スタイル (PCを含む全てのデバイスに適用) */
.sp-only-br {
    /* PCでは非表示にする */
    display: none;
}

/* スマートフォン向けのスタイル (767px以下の画面幅に適用) */
@media (max-width: 767px) {
    .sp-only-br {
        /* スマートフォンでは改行を有効にする */
        display: block; /* <br>タグの場合はblock */
        /* もし<span>タグに適用する場合、display: inline; でもOKですが、
           <br>タグのように強制的に改行させるならdisplay: block; または inline-block; が適切です。
           <br>タグそのものにdisplay: block; を適用すると改行が強く効きます。
           純粋な改行であれば、<br class="sp-only-br"> で display: block; が最もシンプルです。
        */
    }
}

/* PC向けスタイル */
@media (min-width: 768px) {
    /* 主要なテキストを含む要素（例: .about-text p, .hero-description, .section-description など）に適用 */
    .about-text p,
    .hero-description,
    .section-description,
    .course-card p,
    .faq-answer p {
        max-width: 700px; /* 例えば700pxが読みやすい最大幅 */
        margin-left: auto; /* 中央寄せにしたい場合 */
        margin-right: auto; /* 中央寄せにしたい場合 */
        /* もし左寄せのまま幅を制限するなら、margin-left: unset; や margin-right: unset; で調整 */
    }

    /* 特定のセクション内のテキストコンテナの幅を調整 */
    .about-content .about-text {
        max-width: 750px; /* aboutセクションのテキスト部分の最大幅 */
        /* flex-growやflex-shrinkとの兼ね合いで調整 */
    }

    /* 全体のコンテンツ幅をもう少し広げる、または狭める */
    .container {
        max-width: 1200px; /* サイト全体の最大コンテンツ幅を調整 */
    }
}

.map-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比を維持 (高さ / 幅 = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden; /* はみ出したコンテンツを隠す */
    max-width: 100%; /* 親要素の幅を超えないようにする */
    margin: 0 auto; /* 中央寄せにする場合 */
    border-radius: 8px; /* 角を丸める */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 影を追加して立体感を出す */
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* 親要素の幅いっぱいに */
    height: 100%; /* 親要素の高さいっぱいに */
    border: 0; /* iframeのデフォルトの枠線を消す */
}

/* スマホでの地図の縦幅を少し調整したい場合 */
@media (max-width: 767px) {
    .map-container {
        padding-bottom: 75%; /* スマホでは4:3など、縦長にしたい場合に調整 (高さ / 幅 = 3 / 4 = 0.75) */
    }
}