/* ========================================
   書道専門クラス専用CSS
   ======================================== */

/* ページ固有のヒーロー画像 */
.page-calligraphy .hero-background img {
    content: url('../images/courses-calligraphy.jpg');
}

/* ヒーローセクションのコース名（1行目）を中央寄せ */
.page-calligraphy .hero-title .course-name {
    display: block;
    text-align: center;
    margin-bottom: 0; /* 下の余白を削除 */
}

/* コース名の後の改行を調整 */
.page-calligraphy .hero-title .course-name + br {
    display: none; /* 最初の改行を非表示 */
}

.page-calligraphy .hero-title .course-name + br + br {
    margin-top: 0.5em; /* 2番目の改行の上余白を調整 */
}

/* 書道専門クラスページ専用スタイル */
#calligraphy-gallery,
#calligraphy-contact {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

@media (min-width: 880px) {
    #calligraphy-gallery,
    #calligraphy-contact {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
}

/* 見出しイラスト */
#calligraphy-introduction .section-title::before {
    content: '';
    position: absolute;
    background-image: url('../images/brush.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(-15deg);
    width: 90px;
    height: 90px;
    left: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

#calligraphy-gallery .section-title::before {
    content: '';
    position: absolute;
    background-image: url('../images/book.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(-15deg);
    width: 80px;
    height: 80px;
    left: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

#calligraphy-introduction .section-title::after {
    content: '';
    position: absolute;
    background-image: url('../images/ink-stone.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(10deg);
    width: 95px;
    height: 95px;
    right: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

#calligraphy-gallery .section-title::after {
    content: '';
    position: absolute;
    background-image: url('../images/star.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(15deg);
    width: 80px;
    height: 80px;
    right: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

/* 体験授業のご案内セクションのイラスト（左側を墨、右側を筆に変更） */
#calligraphy-contact .section-title::before {
    content: '';
    position: absolute;
    background-image: url('../images/ink-stone.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(-10deg);
    width: 95px;
    height: 95px;
    left: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

#calligraphy-contact .section-title::after {
    content: '';
    position: absolute;
    background-image: url('../images/brush.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%) rotate(15deg);
    width: 90px;
    height: 90px;
    right: 0;
    top: 50%;
    z-index: -1;
    opacity: 0.7;
}

#calligraphy-gallery .section-title,
#calligraphy-contact .section-title {
    margin-bottom: 120px; /* 波線の下の余白を調整 */
}

.calligraphy-feature {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 0; /* 修正: 下部のマージンを削除 */
}

/* 教室の風景セクションの見出し上余白を調整 */
#calligraphy-gallery {
    padding-top: 20px !important;
}

@media (min-width: 880px) {
    #calligraphy-gallery {
        padding-top: 30px !important;
    }
}

.calligraphy-text {
    flex: 1;
}

.calligraphy-image {
    flex: 1;
}

.calligraphy-image img {
    width: 100%;
    border-radius: 8px;
}

.gallery-grid-calligraphy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.gallery-grid-calligraphy img {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.mobile-only-image {
    display: none;
}

@media (max-width: 879px) {
    .calligraphy-feature {
        flex-direction: column;
    }
    .calligraphy-image {
        display: none;
    }
    .mobile-only-image {
        display: block;
        width: 100%;
        margin-top: 30px;
        border-radius: 8px;
    }
    #calligraphy-contact .section-title {
        margin-bottom: 70px;
    }
}

#calligraphy-contact {
    text-align: center;
}
