.main_banner {
    position: relative;
    height: 90vh !important;
}
@media screen and (max-width: 767px) {
    .main_banner {
        height: 80vh !important;
    }
}
.main_banner img {
    -o-object-fit: cover;
    object-fit: cover;
    height: 100%;
}
.hero-section-wrap{
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    margin: 0 auto;
}
.hero-section{
    display: flex;
    flex-direction: column;
    
}
@media screen and (max-width: 979px) {
    .hero-section {
        flex-direction: column;
        align-items: center;
    }
}

.hero-section-title{
    margin: 0 0 30px;
}
.hero-section-stats{
    margin: 0 0 60px;
}
.hero-section-btn{
    width: 240px;
}

.hero-section h1{
    font-size: 6rem;
    font-weight: 300;
    color: #fff;
    text-shadow: 0px 0px 20px #000000;
}
@media screen and (max-width: 1240px) {
    .hero-section h1{
        font-size: 4rem;
        margin: 0 0 30px;
    }   
}
@media screen and (max-width: 767px) {
    .hero-section h1{
        font-size: 3.6rem;
        margin: 0 0 30px;
    }
}
.section-title h2{
    font-size: 1.3rem;
    font-weight: 300;
}
.section-title .section-title-en{
    font-size: 6rem;
    font-weight: 300;
    font-family: "Libre Caslon Display", serif;
    margin: 0 0 30px;
}
@media screen and (max-width: 979px) {
    .section-title .section-title-en{
        font-size: 4rem;
    }
}

.grid-item {
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.grid-item-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
    object-fit: cover;
    border-radius: 5px;
}

.grid-item:hover .grid-item-bg {
    transform: scale(1.1);
    border-radius: 5px;
}

/* タッチデバイスではhover効果を無効化 */
@media (hover: none) and (pointer: coarse) {
    .grid-item:hover .grid-item-bg {
        transform: none;
    }
}

/* 従来のスマホ対応も残す */
@media screen and (max-width: 767px) {
    .grid-item:hover .grid-item-bg {
        transform: none;
    }
}


/* hover効果を持つグリッドアイテムのみを指定 */
.grid-item.history,
.grid-item.message,
.grid-item.philosophy,
.grid-item.numbers,
.grid-item.information {
    background-position: center;
    vertical-align: middle;
    border-radius: 5px;
}

.history {
    background-repeat: no-repeat;
}

.message {
    background-repeat: no-repeat;
}

.philosophy {
    background-repeat: no-repeat;
}

.numbers {
    background-repeat: no-repeat;
}

.information {
    background-repeat: no-repeat;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;  /* 2行分の高さを明示的に指定 */
    grid-template-areas: 
        "history message"
        "history philosophy"
        "numbers information";
    gap: 20px;
    width: 90%;
}

.history {
    grid-area: history;
    position: relative;
    border-radius: 5px;
}

.message {
    grid-area: message;
    position: relative;
    aspect-ratio: 880/520;
    border-radius: 5px;
}

.philosophy {
    grid-area: philosophy;
    position: relative;
    aspect-ratio: 880/520;
    border-radius: 5px;
}

.numbers {
    grid-area: numbers;
    position: relative;
    aspect-ratio: 880/350;
    border-radius: 5px;
}

.information {
    grid-area: information;
    position: relative;
    aspect-ratio: 880/350;
    border-radius: 5px;
}

.img-title-box {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 2;
}
@media screen and (max-width: 1240px) {
    .img-title-box{
        bottom: 30px;
        left: 30px;
    }
}
@media screen and (max-width: 767px) {
    .img-title-box{
        bottom: 20px;
        left: 20px;
    }
}
/* テキストの位置を調整 */
.img-title-box h3 {
    color: white;
    font-size: 5rem;
    font-family: "Libre Caslon Display", serif;
    font-weight: 300;
    line-height: 1;
}
@media screen and (max-width: 1240px) {
    .img-title-box h3 {
        font-size: 4rem;
    }
}
@media screen and (max-width: 767px) {
    .img-title-box h3 {
        font-size: 2.8rem;
    }
}
.img-title-box h2{
    color: white;
    font-size: 1.3rem;
    font-weight: 300;
    margin:0 0 5px;
}

.grid-item-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    height: 0;
    padding-top: calc(550 / 880 * 100%); /* 必要に応じて調整 */
}




.stats > div {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: #fff;
}
.stats > div:first-child {
    padding: 0 30px 0 0;
    flex-direction: column;
    align-items: center;
    text-shadow: 0px 0px 5px #333;
}
.stats > div:last-child {
    padding: 0 0 0 30px;
    flex-direction: column;
    align-items: center;
    text-shadow: 0px 0px 5px #333;
}
.stats span {
    font-size: 8rem;
    line-height: 0.75;
    font-family: "Libre Caslon Display", serif;
    margin: 0 5px;
}
@media screen and (max-width: 979px) {
    .stats span {
        font-size: 5rem;
    }
}
.stats .first-stats-number,.stats .second-stats-number{
    text-align: center;
    line-height: 1.5;
}
.stats .stats-number-box{
    display: flex;
    align-items: flex-end;
    margin: 10px 0 0;
}
.stats .stats-border{
    height: 90px;
    width: 1px;
    background-color: #fff;
}


.content-section{
    padding: 0 0 120px;
    background-color: #F0F0F0;
}
@media screen and (max-width: 979px) {
    .content-section {
        padding: 0 0 60px;
    }
}
@media screen and (max-width: 767px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "message message"
            "philosophy philosophy"
            "history information"
            "history numbers";
        gap: 20px;
    }
    .information,
    .numbers {
        aspect-ratio: 880/520;  /* 1段分の高さ */
    }
}

.stats {
    display: flex;
    color: #000;
    font-size: 1.5rem;
    line-height: 1;
}
@media screen and (max-width: 767px) {
    .history {
        aspect-ratio: 880/1700;  /* 2段分の高さに */
    }
}
@media screen and (max-width: 979px) {
    .numbers{
        aspect-ratio: 880/500;
    }
}
@media screen and (max-width: 767px) {
    .numbers{
        aspect-ratio: 880/800;
    }
}
@media screen and (max-width: 979px) {
    .information{
        aspect-ratio: 880/500;
    }
}
@media screen and (max-width: 767px) {
    .information{
        aspect-ratio: 880/800;
    }
}




.clinics-section{
    background-color: #005D72;
    padding: 120px 0;
}
@media screen and (max-width: 979px) {
    .clinics-section{
        padding: 60px 0;
    }    
}
.clinics-section > div{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.clinics-section .section-title{
    width: 40%;  /* グリッドアイテムなのでwidthは100%に */
    color: #fff;
}
@media screen and (max-width: 767px) {
    .clinics-section .section-title{
        width: 100%;
    }   
}



@media screen and (max-width: 767px) {
    .clinics-section > div {
        flex-direction: column-reverse;
    }
}
.clinics-img{
    width: 60%;  /* グリッドアイテムなのでwidthは100%に */
}
@media screen and (max-width: 767px) {
    .clinics-img{
        width: 100%;  /* グリッドアイテムなのでwidthは100%に */
    }
}
.clinics-img ul{
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* 4列のグリッド */
    gap: 10px;
}

.clinics-img li{
    width: 100%;
    aspect-ratio: 5/3;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    overflow: hidden;
}

.clinics-img li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.clinics-img li.fade-in {
    opacity: 1;
}

.clinics-img li.fade-in img {
    opacity: 1;
}

@media screen and (max-width: 979px) {
    .clinics-section > div {
        grid-template-columns: 1fr;  /* スマホ時は1列に */
        gap: 20px;
    }

}


.news-section{
    padding: 120px 0 60px;
}
@media screen and (max-width: 979px) {
    .news-section{
        padding: 60px 0 0;
    }
}
.news-section > div{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-section .section-title{
    width: 30%;
}
@media screen and (max-width: 979px) {
    .news-section .section-title{
        margin: 0 0 30px;
    }
}
.news-section .news-list{
    width: 70%;
    position: relative;
}
@media screen and (max-width: 979px) {
    .news-section .section-title{
        width: 100%;
    }
    .news-section .news-list{
        width: 100%;
    }
    .news-section > div {
        flex-direction: column;
        align-items: center;
    }
    
}

