#navwidth {
    width: 95%;
    justify-content: right;
    display: flex;
}

#ul1 {
    display: flex;
    font-family: "Lora", serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.1em;
    font-size: 18px;
    z-index: 1;
    margin-top: 45px;
}

#ul1 li,
#ul1 a {
    color: inherit;
}

.white-theme {
    color: white;
}

.black-theme {
    color: black;
}

.whiteback-theme {
    background-color: white;
}

.blackback-theme {
    background-color: black;
}

.ul1-li {
    margin-right: 50px;
}

#nav-container li:hover {
    opacity: 0.5;
}

@media screen and (min-width: 764px) {
    #g-nav {
        display: none;
    }
}


/*ここからスマホハンバーガー*/
@media screen and (max-width: 764px) {
    #logo {
        width: 37px;
        height: 37px;
        margin-top: 18px;
    }

    #ul1 {
        display: none;
    }

    /*========= ナビゲーションのためのCSS ===============*/
    #g-nav {
        /*position:fixed;にし、z-indexの数値を小さくして最背面へ*/
        position: fixed;
        z-index: -1;
        opacity: 0;
        /*はじめは透過0*/
        /*ナビの位置と形状*/
        top: 0;
        width: 100%;
        height: 100vh;
        /*ナビの高さ*/
        background: rgba(50, 62, 102, 0.9);
        /*動き*/
        transition: all 0.3s;
    }

    /*アクティブクラスがついたら透過なしにして最前面へ*/
    #g-nav.panelactive {
        opacity: 1;
        z-index: 999;
    }

    /*ナビゲーション*/
    #g-nav ul {
        display: none;
        /*ナビゲーション天地中央揃え*/
        position: absolute;
        z-index: 999;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    #g-nav.panelactive ul {
        display: block;
    }

    /*リストのレイアウト設定*/

    #g-nav li {
        list-style: none;
        margin-top: 30px;
        text-align: center;
        font-family: "Lora", serif;
        font-weight: 400;
        letter-spacing: 0.1em;
        font-size: 32px;
    }

    #g-nav li a {
        color: white;
        text-decoration: none;
        padding: 10px;
        display: block;
    }

    /*========= ボタンのためのCSS ===============*/
    .openbtn {
        position: fixed;
        z-index: 9999;
        /*ボタンを最前面に*/
        top: 13px;
        right: 10px;
        cursor: pointer;
        width: 60px;
        height: 60px;
    }

    /*×に変化*/
    .openbtn span {
        display: inline-block;
        transition: all .4s;
        position: absolute;
        left: 14px;
        height: 2px;
        border-radius: 2px;
        width: 45%;
    }

    .openbtn span:nth-of-type(1) {
        top: 15px;
    }

    .openbtn span:nth-of-type(2) {
        top: 23px;
    }

    .openbtn span:nth-of-type(3) {
        top: 31px;
    }

    .openbtn.active span:nth-of-type(1) {
        top: 18px;
        left: 18px;
        transform: translateY(6px) rotate(-45deg);
        width: 30%;
    }

    .openbtn.active span:nth-of-type(2) {
        opacity: 0;
    }

    .openbtn.active span:nth-of-type(3) {
        top: 30px;
        left: 18px;
        transform: translateY(-6px) rotate(45deg);
        width: 30%;
    }
}

/*ここまでスマホハンバーガー*/




/* 白石歯科英語タイトル線アニメーション*/
#english-title-wrapper {
    position: relative;
    z-index: 1;
    color: #c6b999;
    margin-bottom: 245px;
    top: 160px;
}

#english-title-wrapper:after {
    content: '';
    position: absolute;
    left: 0;
    width: 0%;
    margin-top: 5px;
    height: 1px;
    background: #c6b999;
    z-index: -1;
    transition: all 1s;
}

/* アクティブ状態：下線が左→右に伸びる */
#english-title-wrapper.active::after {
    width: 100%;
}

/* 白石歯科英語タイトル線アニメーション終了*/


/* 白石歯科英語タイトル内容タイトルフェードアニメ*/
#endlish-title-fadeanimation {
    font-size: 64px;
    font-family: "Lora", serif;
    font-weight: 200;
    letter-spacing: 0.02em;
    color: black;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    transition-delay: calc(var(--delay) * 1.5s);
}

#endlish-title-fadeanimation.visible {
    opacity: 1;
    transform: translateY(0);
    line-height: 1;
}

@media screen and (max-width: 764px) {
    #english-title-wrapper {
        margin-bottom: 160px;
        top: 100px;
    }

    #endlish-title-fadeanimation {
        font-size: 46px;
    }
}

@media screen and (max-width: 480px) {
    #english-title-wrapper {
        margin-bottom: 150px;
    }

    #endlish-title-fadeanimation {
        font-size: 28px;
    }
}

/* 白石歯科英語内容タイトルフェードアニメ終了*/




/* サークルここから*/
.block {
    width: 25vw;
    max-width: 360px;
    position: absolute;
    z-index: -1;
}

.circleText {
    overflow: visible;
    animation: rotation 18s linear infinite;
    position: absolute;
    bottom: -30px;
}

.circleText__circle {
    fill: none;
}

.circleText__text {
    fill: #c6b999;
    font-size: 10px;
    letter-spacing: 0.05em;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* サークルここまで*/

/*スクロール*/
#scroll-top {
    width: 100px;
    height: 100px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 100%;
    border: 2px solid #c6b999;
    font-size: 18px;
    color: #c6b999;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 100px;
    /* 中央揃え補強 */
    opacity: 0;
    transition: .6s;
    z-index: 100;
    pointer-events: none;
}

#scroll-top.show {
    pointer-events: auto;
    opacity: 1;
}

@media (hover: hover) {
    #scroll-top:is(:hover, :focus, :active) {
        color: white;
        background-color: #c6b999;
    }
}

@media (hover: none) {
    #scroll-top:is(:focus, :active) {
        color: white;
        background-color: #c6b999;
    }
}

@media screen and (max-width: 480px) {
    #scroll-top {
        width: 70px;
        height: 70px;
        font-size: 13px;
    }
}

/* スクロール終了*/





/*白石歯科内容ここから*/
#title-wrapper {
    margin-left: auto;
    margin-right: auto;
    width: 80vw;
    max-width: 1160px;
    position: relative;
}

#title-wrapper-img img {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    opacity: 0;
    animation: image-anime 2s ease forwards;
    animation-delay: 1s;
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 50px;
}

@keyframes image-anime {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media screen and (max-width: 764px) {

    #title-wrapper-img img {
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 480px) {

    #title-wrapper-img img {
        margin-bottom: 0px;
    }
}

/*白石歯科線*/
#line-wrapper {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in;
}

#line-wrapper.visible {
    opacity: 1;
}

.line {
    width: 30px;
    height: 1px;
    background-color: #000;
    margin: 0px 15px 0 15px;
}

#japaneseh1 {
    letter-spacing: 0.02em;
    font-size: 46px;
    text-align: center;
    font-family: "Noto Serif JP", serif;
    font-weight: 600;
}

/*白石歯科線終了*/

#top-txt-wrapper {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transition: opacity 1s ease-in;
}

#top-txt-wrapper.visible {
    opacity: 1;
    transition-delay: 0.1s;
}

#top-txt {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 50px;
}

@media screen and (max-width: 764px) {
    #japaneseh1 {
        font-size: 34px;
    }
}

@media screen and (max-width: 480px) {
    .line {
        width: 20px;
        margin: 30px 15px 0 15px;
    }

    #japaneseh1 {
        font-size: 26px;
        text-align: center;
        margin-top: 30px;
        font-family: "Noto Serif JP", serif;
        font-weight: 600;
    }

    #top-txt {
        padding-top: 25px;
        font-size: 13px;
    }
}

/*文の下ボタン*/
.button a {
    background: rgba(198,
            185,
            153,
            0.7);
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 50px auto 150px auto;
    max-width: 180px;
    padding: 15px 25px;
    color: black;
    transition: 0.3s ease-in-out;
    font-weight: 500;
}

.button a:before {
    content: '';
    position: absolute;
    top: calc(50% - 2px);
    right: -2em;
    transform: translateY(calc(-50% - 2px)) rotate(30deg);
    width: 12px;
    height: 1px;
    background-color: black;
    transition: 0.3s;
}

.button a:after {
    content: '';
    position: absolute;
    top: 50%;
    right: -2em;
    transform: translateY(-50%);
    width: 60px;
    height: 1px;
    background-color: black;
    transition: 0.3s;
}

.button a:hover:before,
.button a:hover:after {
    right: -2.5em;
}

.button a:hover {
    background: rgba(198,
            185,
            153,
            0.4);
    color: black;
}

@media screen and (max-width: 764px) {
    .button a {
        margin: 50px auto 140px auto;
    }
}

@media screen and (max-width: 480px) {
    .button a {
        margin: 30px auto 80px auto;
        max-width: 100px;
        padding: 10px 25px;
        font-size: 13px;
    }

    .button a:before {
        right: -1.5em;
    }

    .button a:after {
        right: -1.5em;
        width: 40px;
    }
}

/*文の下ボタン終了*/
/*白石歯科内容終了*/


/*サイト概要*/
#discription {
    width: 80%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#discription-wrapper {
    width: 80%;
    max-width: 800px;
    margin: 10px auto 200px auto;
}

dl {
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid #c0bfbf;
}

dl dt {
    width: 20%;
    padding-top: 50px;
    padding-bottom: 10px;
    padding-left: 30px;
    flex-shrink: 0;
    font-weight: bold;
}

.dd-txt {
    padding-bottom: 10px;
    padding-top: 50px;
    padding-left: 50px;
}

#period {
    flex-direction: column;
    padding-bottom: 10px;
    padding-top: 50px;
    padding-left: 50px;
}

@media (max-width: 764px) {
    #discription {
        width: 80%;
        font-size: 34px;
    }

    #discription-wrapper {
        width: 80%;
        margin: 30px auto 80px auto;
    }

    dl {
        display: block;
        border-bottom: 0px solid #c0bfbf;
    }

    dl dt {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-top: 0px;
        padding-left: 0px;
        padding-bottom: 3px;
        border-bottom: 1px solid #c0bfbf;
    }

    .dd-txt {
        padding-bottom: 30px;
        padding-top: 10px;
        padding-left: 20px;
    }

    #period {
        padding-bottom: 30px;
        padding-top: 10px;
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    #discription {
        font-size: 26px;
    }

    #discription-wrapper {
        font-size: 13px;
        margin: 30px auto 50px auto;
    }
}

/*サイト概要終了*/




/*All Works*/
#footer {
    width: 100%;
    background-color: #3e527a;
    padding-top: 80px;
}

#allworks {
    width: 80%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90%;
    max-width: 1160px;
    margin: 10px auto 60px auto;
}

.carousel-viewport {
    overflow: hidden;
    width: 80%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
    /* スライド間のスペースを一元管理 */
}


/* PC表示: 3枚表示 */
@media (min-width: 1025px) {
    .slide {
        flex: 0 0 calc(34% - 20px);
        /* 3枚表示 */
    }
}

/* タブレット表示: 2枚表示 */
@media (min-width: 765px) and (max-width: 1024px) {
    .slide {
        flex: 0 0 calc(50% - 10px);
        /* 2枚表示 */
        font-size: 14px;
        /* オプションでフォントサイズを調整 */
    }
}

/* スマホ表示: 1枚表示 */
@media (max-width: 764px) {
    .slide {
        flex: 0 0 100%;
        /* 1枚表示 */
    }
}



.year {
    margin-top: 10px;
}

.container {
    position: relative;
    margin-bottom: 5px;
    box-shadow: 0px 10px 30px -6px rgba(0, 0, 0, 0.3);
    display: inline-block;
    overflow: hidden;
}

.container-zoom {
    display: block;
    transition-duration: 0.5s;
    transition-timing-function: ease;
}

.container:hover .container-zoom {
    transform: scale(1.07);
}

.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* 半透明の黒いマスク */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    /* 文字に影をつけて視認性を向上 */
    opacity: 0;
    /* 初期状態では文字も非表示 */
    transition: opacity 0.3s ease;
}

.container:hover .overlay {
    opacity: 1;
    /* ホバーでオーバーレイを表示 */
}

.container:hover .overlay-text {
    opacity: 1;
    /* ホバーで文字が表示される */
}

.slide span {
    font-size: 13px;
    color: #c0bebe;
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0px 10px 30px -6px rgba(0, 0, 0, 0.3);
}

.slide p {
    color: white;
    line-height: 25px;
}

button.prev,
button.next {
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    margin-bottom: 65px;
}


button.prev::before,
button.next::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-top: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(225deg);
}

button.prev::before {
    margin-right: 10px;
}

button.next::before {
    transform: rotate(45deg);
}

@media (max-width: 764px) {
    .slide {
        flex: 0 0 100%;
        /* 1枚表示にする */
    }
}

@media (max-width: 480px) {
    #footer {
        padding-top: 50px;
    }

    #allworks {
        margin-bottom: 0px;
    }

    .carousel-wrapper {
        margin: 30px auto 30px auto;
    }
}

#copy {
    width: 80%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid gray;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: right;
    font-size: 10px;
    color: gray;
}

/*All Works終了*/