/* 基本設定とリセット - Final Version (Corrected) */
:root {
    --primary-color: #001f3f; /* ネイビー */
    --primary-color-lightened: #003366; /* 少し明るいネイビー */
    --magical-glow-color: rgba(173, 216, 230, 0.5); /* 輝き色 */
    --secondary-color: #444;  /* ダークグレー */
    --light-gray-color: #f8f9fa; /* 明るいグレー */
    --border-color: #dee2e6; /* ボーダー */
    --light-color: #ffffff; /* ホワイト */
    --dark-text-color: #333; /* 基本テキスト */
    --accent-contrast: var(--light-color);
    --transition-speed: 0.3s;
    --transition-speed-fast: 0.2s;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--dark-text-color);
    background-color: var(--light-color);
    animation: fadeInAnimation ease var(--transition-speed);
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    overflow-x: hidden; /* 横スクロール防止 */
}

@keyframes fadeInAnimation {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

h1,h2,h3,h4,h5,h6 {
    color: var(--primary-color);
    margin-bottom: 0.7em;
    font-weight: 700;
    word-break: auto-phrase;
    overflow-wrap: break-word;
}

p {
    margin-bottom: 1.2em;
    color: var(--dark-text-color);
}

p.section-intro {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-bottom: 2.5em;
}

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

img.icon-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.button-wrapper {
    margin-top: 2em;
    text-align: center;
}

/* ヘッダー */
header {
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

header .logo img {
    height: 40px;
    width: 40px;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-text-color);
    font-weight: 700;
}

header h1 a,
header h1 a:hover {
    color: inherit;
    text-decoration: none;
}

header nav ul {
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    padding: 5px 10px;
    border-radius: 4px;
    color: var(--primary-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

header nav ul li a:hover {
    background-color: var(--light-gray-color);
    color: var(--secondary-color);
}

/* ヒーローセクション & 詳細ページヘッダー */
#hero,
.course-detail-header {
    position: relative;
    color: var(--light-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

#hero {
    height: 60vh;
}

.course-detail-header {
    height: 40vh;
}

.hero-background,
.course-detail-header .header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-background img,
.course-detail-header .header-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hero::before,
.course-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 31, 63, 0.6);
    z-index: -1;
}

#hero h2,
.course-detail-header h2 {
    font-weight: 700;
    color: var(--light-color);
    text-shadow: 0 0 8px rgba(200, 220, 255, 0.5), 1px 1px 3px rgba(0, 0, 0, 0.4);
}

#hero h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5em;
}

.course-detail-header h2 {
    font-size: 2.5rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2em;
    color: var(--light-color);
    max-width: 700px;
    text-shadow: 0 0 5px rgba(200, 220, 255, 0.3), 1px 1px 3px rgba(0, 0, 0, 0.4);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--accent-contrast);
    padding: 14px 35px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

#hero .cta-button {
    border-color: var(--light-color);
}

.cta-button:hover {
    background: var(--primary-color-lightened);
    color: var(--light-color);
    border-color: var(--primary-color-lightened);
    transform: scale(1.03) translateY(-1px);
    box-shadow: 0 0 15px 5px var(--magical-glow-color);
}

#hero .cta-button:hover {
    box-shadow: 0 0 15px 5px var(--magical-glow-color), 0 0 5px 2px var(--light-color) inset;
}


/* コンテンツセクション共通 */
.content-section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2em;
    position: relative;
    padding-bottom: 0.5em;
    font-weight: 700;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-color-lightened));
    border-radius: 2px;
}

/* 共感・問題提起セクション */
#empathy .detail-features {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--light-gray-color);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed-fast) ease, box-shadow var(--transition-speed) ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 31, 63, 0.08);
}

.feature-item div {
    flex: 1;
}

.feature-item h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.2em;
}

.feature-item p {
    font-size: 0.9em;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* 解決策・サブスクリプション共通レイアウト */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 0 0 40%;
    max-width: 450px;
}

.about-image img {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#solution .feature-highlight {
    background-color: var(--light-gray-color);
    border: 1px solid var(--border-color);
    padding: 1.5em 2em;
    margin-top: 2.5em;
    border-radius: 8px;
    text-align: center;
}

#subscription {
    background-color: var(--primary-color);
    color: var(--light-color);
}

#subscription h2,
#subscription h4 {
    color: var(--light-color);
}

#subscription p {
    color: var(--light-gray-color);
}

#subscription .cta-button {
    background-color: transparent;
    border-color: var(--light-color);
}

/* 体験ワークショップ */
#about-workshop {
    background-color: var(--light-gray-color);
}

.workshop-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.workshop-image {
    max-width: 500px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.workshop-text {
    text-align: left;
    max-width: 600px;
    width: 100%;
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.workshop-text h4 {
    text-align: center;
    font-size: 1.3rem;
}

.workshop-text ul {
    list-style: '✓ ';
    padding-left: 1.5em;
    margin-top: 1.5em;
}

.workshop-text ul li {
    margin-bottom: 0.8em;
}

#line-register {
    margin-top: 2.5rem;
    text-align: center;
}

#line-register p {
    margin-top: 1em;
    font-size: 0.9em;
}

/* コースセクション */
.course-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
}

.course-card {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px 5px var(--magical-glow-color), 0 5px 15px rgba(0, 31, 63, 0.1);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.card-image img {
    width: 100%;
    height: 100%;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.5rem;
}

.card-content .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.card-content ul {
    font-size: 0.9em;
    margin: 1em 0;
    padding-left: 1.2em;
}

.card-content ul li {
    list-style: disc;
    margin-bottom: 0.7em;
}

.card-button-wrapper {
    margin-top: auto;
    padding-top: 1rem;
}

.card-button-wrapper .cta-button {
    width: 100%;
    text-align: center;
}

/* 講師紹介 */
.instructor-profile {
    display: flex;
    align-items: center;
    gap: 3rem;
    background-color: var(--light-gray-color);
    padding: 3rem;
    border-radius: 10px;
}

.instructor-image {
    flex-basis: 30%;
    flex-shrink: 0;
    max-width: 250px;
}

.instructor-image img {
    border-radius: 50%;
    border: 4px solid var(--light-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1;
    width: 100%;
}

.instructor-info {
    flex-basis: 70%;
}

.instructor-info h2 {
    text-align: left;
}

.instructor-info h2::after {
    left: 0;
    transform: translateX(0);
}

.instructor-info .instructor-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 1em;
}

.instructor-info p {
    margin-bottom: 0;
    line-height: 1.8;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: auto;
}

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

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    margin-bottom: 0.5em;
}

.faq-item p {
    margin-bottom: 0;
}

/* 最終CTA */
#final-cta {
    background-color: var(--light-gray-color);
    text-align: center;
}

#final-cta h2 {
    color: var(--primary-color);
}

#final-cta p {
    color: var(--dark-text-color);
}

#final-cta .cta-button {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
}

/* サブスクリプションページ用 */
.plan-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
    grid-template-columns: 1fr;
}

.plan-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.plan-card.featured {
    border-width: 2px;
    border-color: var(--primary-color);
    position: relative;
}

.featured-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.3em 1em;
    border-radius: 0 0 8px 8px;
    font-size: 0.9em;
    font-weight: 700;
}

.plan-card h3 {
    text-align: center;
}

.plan-card .price {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

.plan-card .price .tax-included {
    font-size: 0.7em;
    font-weight: 400;
    color: var(--secondary-color);
}

.plan-card .plan-recommend {
    text-align: center;
    font-style: italic;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8em 0;
    margin: 1em 0;
}

.plan-features {
    flex-grow: 1;
    padding-left: 1.2em;
}

.plan-features li {
    list-style: '✓ ';
    padding-left: 0.5em;
    margin-bottom: 0.8em;
}

/* フッター */
footer {
    background-color: var(--primary-color);
    color: var(--light-gray-color);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 0;
    border-top: none;
}

footer .container p {
    margin-bottom: 0.5em;
    color: var(--light-gray-color);
}

footer .container p:last-child {
    margin-bottom: 0;
}

footer a {
    color: inherit !important;
    text-decoration: underline;
}

footer a:hover {
    text-decoration: none;
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
    #empathy .detail-features {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .plan-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    body {
        line-height: 1.6;
    }
    header .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    header nav ul {
        margin: 0;
        padding: 0.5rem 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 15px;
    }
    header nav ul li {
        margin-left: 0;
    }
    header nav ul li a {
        font-size: 0.85rem;
    }
    .content-section {
        padding: 3.5rem 0;
    }
    #hero {
        height: auto;
        min-height: 70vh;
    }
    #hero h2 {
        font-size: 2rem;
    }
    #hero h2 br {
        display: none;
    }
    #hero p {
        font-size: 1.1rem;
    }
    .about-content,
    .instructor-profile {
        flex-direction: column;
        text-align: center;
    }
    .about-image,
    .instructor-image {
        margin-top: 2rem;
    }
    .instructor-info h2 {
        text-align: center;
    }
    .instructor-info h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .instructor-image {
        max-width: 180px;
    }
    #subscription .about-image {
        order: -1;
    }
}

/* スクロールアニメーション用 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#courses .course-card:nth-child(1).animate-on-scroll.is-visible {
    transition-delay: 0.1s;
}

#courses .course-card:nth-child(2).animate-on-scroll.is-visible {
    transition-delay: 0.2s;
}

#courses .course-card:nth-child(3).animate-on-scroll.is-visible {
    transition-delay: 0.3s;
}
