/* 基本設定 */
:root {
    --main-bg-color: #fff7fa;
    --accent-color: #d89aaa;
    --text-color: #5b4b52;
    --sub-color: #f2dfe6;
    --card-bg-color: rgba(255, 255, 255, 0.92);
    --header-bg-color: #fffbfd;
    --muted-border-color: #e7cfd8;
    --table-header-bg: #faedf2;
    --warm-accent-color: #c78698;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    background-color: var(--main-bg-color);
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    line-height: 1.2;
}

h2, h3 {
    color: #6a545d;
}

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

/* ヘッダー */
header {
    background: var(--header-bg-color);
    border-bottom: 1px solid var(--sub-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 16px;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
}

header h1 a {
    font-weight: 700;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--sub-color);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    width: auto;
}

.site-logo {
    width: 96px;
    height: auto;
    display: block;
    flex-shrink: 0;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

header nav li a {
    padding: 10px 15px;
    display: block;
}

header nav li a:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.8em;
}

/* ヒーローセクション */
.hero {
    position: relative;
    text-align: center;
    color: white;
    height: 60vh;
    /* display: flex; justify-content: center; align-items: flex-end; box-sizing: border-box; は削除 */
}

.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: #fffafb; /* ダミー画像がロードされるまでの背景 */
    background-image: url(assets/images/hero-image.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 44% center;
}

.hero-message {
    background: rgba(255, 251, 253, 0.88);
    color: #4b362d;
    padding: 20px 40px;
    border-radius: 5px;
    position: absolute; /* 絶対配置 */
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    transform: none;
    width: fit-content;
    max-width: 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.hero-message h2 {
    color: #4b362d;
    font-weight: 800;
    margin-top: 0; /* 上の余白を削る */
    margin-bottom: 20px;
    font-size: 1.8rem;
    line-height: 1.35;
    white-space: nowrap;
}

.btn {
    background: var(--accent-color);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease; /* transitionの対象をallに */
    border: 1px solid #b57d8d; /* 境界線を追加 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 影を追加 */
}

.btn:hover {
    background: #b57d8d; /* 背景色を濃く */
    color: #ffffff; /* 文字色を明るく */
    transform: translateY(-2px); /* 少し浮き上がる */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* 影を広げる */
}

/* セクション */
main section {
    padding: 40px 0;
}

#intro h2 {
    text-align: center;
    margin-bottom: 40px;
}

#intro .intro-heading {
    white-space: nowrap;
    font-size: clamp(20px, 5vw, 28px);
}

#intro > p {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

#intro > .intro-message {
    white-space: nowrap;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.feature {
    background: var(--card-bg-color);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--sub-color);
}

/* フッター */
footer {
    background: #d99db0;
    color: #ffffff;
    text-align: center;
    font-weight: 450;
    padding: 8px 0;
}

footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    font-size: 0.95rem;
}

.footer-links a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    color: #ffffff;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.social-link:hover {
    opacity: 0.7;
}

.social-link svg {
    width: 22px;
    height: 22px;
}

/* お問い合わせ SNSセクション */
.sns-section {
    margin-bottom: 32px;
}

.sns-link-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--muted-border-color);
    border-radius: 10px;
    padding: 14px 22px;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.sns-link-card:hover {
    background-color: #fdf0f5;
    border-color: var(--accent-color);
}

.sns-link-card svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.form-note {
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.form-note a {
    text-decoration: underline;
}

.policy-lead {
    margin-bottom: 28px;
}

.policy-section + .policy-section {
    margin-top: 28px;
}

.policy-section ul {
    padding-left: 20px;
}

/* 先生紹介ページ */
.teacher-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.teacher-image {
    max-width: 150px;
}

.teacher-photo {
    width: 100%;
    height: 100%;
    border: 1px solid var(--muted-border-color);
}

/* お問い合わせCTAセクション */
#contact-cta {
    text-align: center;
}

#contact-cta p {
    margin-bottom: 30px;
}

.lesson-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.lesson-image-item {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--muted-border-color);
    box-sizing: border-box;
}

.table-wrap {
    overflow-x: auto;
}

.fees-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
    background: #ffffff;
}

.fees-table th,
.fees-table td {
    border: 1px solid var(--muted-border-color);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

.fees-table th {
    width: 38%;
    background: var(--table-header-bg);
}

.form-placeholder {
    border: 1px solid var(--sub-color);
    background: var(--card-bg-color);
    padding: 12px;
    box-sizing: border-box;
    border-radius: 12px;
}

.form-placeholder iframe {
    display: block;
    width: 100%;
    min-height: 1180px;
    border: 0;
}

/* レスポンシブ対応 (PC) */
@media (min-width: 768px) {
    header .container {
        gap: 24px;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .lesson-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-message h2 {
        font-size: 2.2rem;
    }

    .teacher-profile {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    .teacher-image {
        flex: 1;
        max-width: 200px;
    }

    .teacher-info {
        flex: 3;
    }

    .teacher-info h3 {
        margin-top: 0;
    }
}

@media (min-width: 768px) and (max-width: 1180px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    header nav {
        width: 100%;
    }

    header nav ul {
        justify-content: flex-start;
    }

    header nav li a {
        padding: 8px 12px;
    }

    .hero {
        height: 54vh;
        min-height: 420px;
    }

    .hero-message {
        padding: 18px 24px;
        max-width: 48%;
    }

    .hero-message h2 {
        font-size: 1.8rem;
        white-space: normal;
    }
}

@media (max-width: 767px) {
    header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .header-top {
        width: 100%;
    }

    header h1 {
        flex: 1;
    }

    .menu-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }

    header nav {
        width: 100%;
        display: none;
    }

    header nav.is-open {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
        padding-top: 4px;
    }

    header nav li a {
        padding: 10px 12px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.8);
    }

    .site-brand {
        gap: 8px;
    }

    .site-logo {
        width: 72px;
        height: auto;
    }

    .site-brand span {
        font-size: 1.5rem;
    }

    .hero {
        height: 46vh;
        min-height: 360px;
    }

    .slideshow {
        background-size: cover;
        background-position: 52% 82%;
    }

    .hero-message {
        padding: 8px 12px;
        bottom: 8px;
        top: auto;
        right: 16px;
        left: 16px;
        transform: none;
        width: auto;
        max-width: none;
        align-items: stretch;
    }

    .hero-message h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
        line-height: 1.3;
        white-space: normal;
    }

    .btn {
        display: inline-block;
        width: 100%;
        padding: 8px 12px;
        font-size: 0.8rem;
        box-sizing: border-box;
        text-align: center;
    }
}
