
/* スマホ用CTAボタンエリア */
.cta-heading {
    display: block;
    width: 100%;
}

.cta-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.cta-background {
    display: block;
    width: 100%;
}

.cta-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3% 0;
    box-sizing: border-box;
    gap: 2%;
}


.cta-button {
    width: 85%;
    max-width: 280px;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    margin: 1.5% 0;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    opacity: 0.8;
    transform: scale(1.02);
}


/* PC版CTAボタン（641px-1024px） */
@media screen and (min-width: 641px) and (max-width: 1024px) {
    .cta-background {
        width: 100% !important;
    }
    
    .cta-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2%;
        padding: 4% 10%;
        align-items: start;
        justify-items: center;
        width: 100%;
        height: 100%;
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cta-button {
        width: 95%;
        height: auto;
        max-width: 380px;
        margin: 0;
        object-fit: contain;
    }
}

/* PC版CTAボタン（1025px-1440px） */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .cta-background {
        width: 100% !important;
    }
    
    .cta-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2%;
        padding: 3% 10%;
        align-items: start;
        justify-items: center;
        width: 100%;
        height: 100%;
        max-width: 1100px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cta-button {
        width: 95%;
        height: auto;
        max-width: 530px;
        margin: 0;
        object-fit: contain;
    }
}

/* PC版CTAボタン（1441px-1919px） */
@media screen and (min-width: 1441px) and (max-width: 1919px) {
    .cta-background {
        width: 100% !important;
    }
    
    .cta-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2%;
        padding: 3% 10%;
        align-items: start;
        justify-items: center;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cta-button {
        width: 95%;
        height: auto;
        max-width: 580px;
        margin: 0;
        object-fit: contain;
    }
}

/* PC版CTAボタン（1920px以上）- 最後に配置して優先度を上げる */
@media screen and (min-width: 1920px) {
    .pc-item .cta-background {
        width: 100% !important;
    }
    
    .pc-item .cta-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2%;
        padding: 3% 10%;
        align-items: start;
        justify-items: center;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .pc-item .cta-button {
        width: 95%;
        height: auto;
        max-width: 580px;
        margin: 0;
        object-fit: contain;
    }
}

/* スマホ用CTAボタンエリア（375px以下） */
@media screen and (max-width: 375px) {
    .cta-buttons {
        padding: 2% 0;
        gap: 6%;
    }
    
    .cta-button {
        width: 90%;
        max-width: 300px;
        margin: 0;
    }
}

/* スマホ用CTAボタンエリア（376-390px） */
@media screen and (min-width: 376px) and (max-width: 390px) {
    .cta-buttons {
        padding: 2% 0;
    }
    
    .cta-button {
        width: 85%;
        max-width: 280px;
        margin: 1% 0;
    }
}

/* スマホ用CTAボタンエリア（391-430px） */
@media screen and (min-width: 391px) and (max-width: 430px) {
    .cta-buttons {
        padding: 3% 0;
        gap: 7%;
    }
    
    .cta-button {
        width: 92%;
        max-width: 300px;
        margin: 0;
    }
}

/* スマホ用CTAボタンエリア（431-540px） */
@media screen and (min-width: 431px) and (max-width: 540px) {
    .cta-buttons {
        padding: 4% 0;
        gap: 6%;
    }
    
    .cta-button {
        width: 95%;
        max-width: 350px;
        margin: 0;
    }
}

/* スマホ用ボタン重ね合わせ */
.button-overlay {
    position: relative;
    display: inline-block;
    width: 100%;
}

.button-bg {
    display: block;
    width: 100%;
}

.button-overlay-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: auto;
    max-width: 300px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.button-overlay-img:hover {
    opacity: 0.8;
}

/* スマホ用ボタン調整 */
@media screen and (max-width: 640px) {
    .button-overlay-img {
        width: 85%;
        max-width: 280px;
        top: auto;
        bottom: 60px;
        transform: translateX(-50%);
    }
}

/* スマホ用ボタン調整（391-430px） */
@media screen and (min-width: 391px) and (max-width: 430px) {
    .button-overlay-img {
        bottom: 80px;
    }
}

/* スマホ用ボタン調整（431-540px） */
@media screen and (min-width: 431px) and (max-width: 540px) {
    .button-overlay-img {
        width: 95%;
        max-width: 350px;
        bottom: 90px;
    }
}
/* 小型スマホ用ボタン調整 */
@media screen and (max-width: 390px) {
    .button-overlay-img {
        width: 80%;
        bottom: 60px;
    }
}


/* PC用ボタン調整（641px-1024px） */
@media screen and (min-width: 641px) and (max-width: 1024px) {
    .button-overlay-img {
        top: auto;
        width: 70%;
        max-width: 500px;
        bottom: 80px;
        transform: translateX(-50%);
    }
    
    .button-overlay-img:hover {
        transform: translateX(-50%);
    }
}

/* PC用ボタン調整（1025px-1440px） */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .button-overlay-img {
        top: auto;
        width: 80%;
        max-width: 700px;
        bottom: 80px;
        transform: translateX(-50%);
    }
    
    .button-overlay-img:hover {
        transform: translateX(-50%);
    }
}

/* PC用ボタン調整（1441px-1919px） */
@media screen and (min-width: 1441px) and (max-width: 1919px) {
    .button-overlay-img {
        top: auto;
        width: 82%;
        max-width: 900px;
        bottom: 100px;
        transform: translateX(-50%);
    }
    
    .button-overlay-img:hover {
        transform: translateX(-50%);
    }
}

 /* 1920px用ボタン調整（デザインカンプ対応） */
@media screen and (min-width: 1920px) {
    .button-overlay-img {
        top: auto;
        width: 85%;
        max-width: 1000px;
        bottom: 120px;
        transform: translateX(-50%);
    }
    
    .button-overlay-img:hover {
        transform: translateX(-50%);
    }
}


