/*
    File: /css/top-page.css
    Purpose: A return to a classic, robust, CSS-first architecture.
             JS is now only responsible for applying a padding to the first section.
*/

/* The body must not have its own scrollbar. */
body.page-template-snap-scroll-template {
    overflow: hidden;
}

/* The container is a simple, full-viewport scrollable area. No more JS positioning. */
#snap-scroll-container {
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
}

/* Each section is the full height of the viewport. */
.scroll-section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

/* The header must float above the container. */
.page-template-snap-scroll-template .wp-site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

/* Adjust for admin bar. */
.admin-bar.page-template-snap-scroll-template .wp-site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar.page-template-snap-scroll-template .wp-site-header { top: 46px; }
}

/* Content box styling. */
.content-wrapper {
    /* max-width: 800px; */
    width: 100%;
    /* padding: 2rem; */
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    text-align: left;
    max-height: calc(100% - 4rem);
    overflow-y: auto;
    font-family: serif;
}

/* Nav dots styling. */
#scroll-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#scroll-nav .dot {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

#scroll-nav .dot.active {
    background-color: #333;
    transform: scale(1.2);
}

/* Responsive visibility rules. */
.show-on-mobile { display: none; }
.show-on-desktop { display: block; }
@media (max-width: 782px) {
    .show-on-mobile { display: block; }
    .show-on-desktop { display: none; }
    /* .content-wrapper { padding: 1.5rem; } */
    #scroll-nav { right: 10px; }
}

#section-about {
    /* Background video is used instead of image */
}

#section-services {
    background-image: url('../images/metosera.png');
    background-repeat: no-repeat;
    background-position: right top;
    background-size: auto 60%; /* 画像の高さをセクションの高さの60%に設定し、幅は自動調整 */
}

#section-clinic {
    background-image: url('../images/takumin.png');
    background-repeat: no-repeat;
    background-position: right top;
    background-size: auto 60%; /* 画像の高さをセクションの高さの60%に設定し、幅は自動調整 */
}

/* 画面幅が782px以下の場合（タブレットやスマートフォン） */
@media (max-width: 782px) {
    #section-about {
        background-size: 80% auto; /* 画像の幅をコンテナの50%に設定 */
        background-position: right -10% top; /* 画像がテキストに重なりすぎないよう、少し右にずらす */
    }
    #section-services {
        background-size: 80% auto; /* 画像の幅をコンテナの50%に設定 */
        background-position: right -10% top; /* 画像がテキストに重なりすぎないよう、少し右にずらす */
    }
    #section-clinic {
        background-size: 80% auto; /* 画像の幅をコンテナの50%に設定 */
        background-position: right -10% top; /* 画像がテキストに重なりすぎないよう、少し右にずらす */
    }
}