/* H2見出しの下に挿入される画像のスタイル */

.h2-image-container {
    position: relative;
    width: 100%;
    margin: 20px 0 30px 0;
    overflow: hidden;
}

.h2-inserted-image {
    width: 100%;
    height: auto;
    display: block;
}

.h2-image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    color: #ffffff; 
    font-size: 38px;
    font-weight: bold;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
    word-wrap: break-word;
    padding: 0 20px;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .h2-image-text {
        font-size: 28px;
        padding: 0 15px;
        width: 95%;
    }
    
    .h2-image-container {
        margin: 15px 0 20px 0;
    }
}

@media (max-width: 480px) {
    .h2-image-text {
        font-size: 18px;
        padding: 0 10px;
    }
}