/* Top Page Specific Styles */

/* Responsive Design and Animations */

/* CSS Variables for Breakpoints */
:root {
    --breakpoint-tablet: 768px;
    --breakpoint-mobile: 480px;
    --breakpoint-desktop: 1024px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

#recruitment .btn-wrap {
    margin-top: 40px;
}

/* Fade-in animation class */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 1024px以下のデバイスではフェードインアニメーションを無効化 */
@media (max-width: 1024px) {
    .fade-in {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }

    .fade-in.visible {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    section {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }

    /* インラインスタイルとの競合を防ぐ */
    section[style*="opacity"] {
        opacity: 1 !important;
    }
    
    section[style*="transform"] {
        transform: translateY(0) !important;
    }

    /* 背景とボタンの拡大縮小ループを防ぐ - トランジションを完全に無効化 */
    .desktop-1 .btn,
    .desktop-1 .btn-wrap,
    .desktop-1 .btn::after,
    .desktop-1 .btn-arrow,
    .secondary-button,
    a.cta-button {
        transition: none !important;
        animation: none !important;
    }

    /* 背景画像セクションのトランジションを無効化 */
    .desktop-1 .student,
    .desktop-1 .patient,
    .desktop-1 .medical,
    .desktop-1 .photo,
    section[class*="student"],
    section[class*="patient"],
    section[class*="medical"] {
        transition: none !important;
        animation: none !important;
        background-attachment: scroll !important;
        will-change: auto !important;
    }

    /* 背景画像の再計算を防ぐ（モバイルデバイス） */
    @media (max-width: 1024px) and (orientation: portrait),
           (max-width: 1024px) and (orientation: landscape) {
        .desktop-1 .student,
        .desktop-1 .patient,
        .desktop-1 .medical {
            background-size: cover !important;
            background-position: center center !important;
            background-repeat: no-repeat !important;
        }
    }

    /* ボタンのホバー効果も無効化（画面回転時の再計算を防ぐ） */
    .desktop-1 .btn:hover,
    .desktop-1 .btn:hover::after,
    .secondary-button:hover {
        transition: none !important;
        transform: none !important;
    }

    /* 見出しを除く全体的なテキストサイズを14pxに設定 */
    /* まず基本フォントサイズを設定 */
    body,
    .desktop-1 {
        font-size: 14px;
    }

    /* 本文テキスト要素を14pxに設定 */
    .desktop-1 .body-text,
    .desktop-1 .news-text,
    .desktop-1 .news-date,
    .desktop-1 p,
    .desktop-1 span:not(.dropdown-toggle):not(.section-title):not(.main-title):not(.section-heading),
    .desktop-1 li,
    .desktop-1 .text,
    .desktop-1 .text-1,
    .desktop-1 .text-20,
    .desktop-1 .text-38,
    .desktop-1 .text-46,
    .desktop-1 .text-55,
    .desktop-1 .phone,
    .desktop-1 .phone-3,
    .desktop-1 .body,
    .desktop-1 .message,
    .body-text,
    .news-text,
    .news-date,
    p,
    li {
        font-size: 14px !important;
    }

    /* ボタンのテキストも14pxに設定 */
    .desktop-1 .btn,
    .desktop-1 .btn-text,
    .secondary-button,
    a.cta-button {
        font-size: 14px !important;
    }

    /* 見出し要素は元のサイズに戻す（14pxの設定を上書き） */
    .desktop-1 .section-title {
        font-size: var(--font-size-xxxxxl) !important;
    }

    .desktop-1 .main-title {
        font-size: var(--font-size-xxxxxxl) !important;
    }

    .desktop-1 .section-heading {
        font-size: var(--font-size-xxxxl) !important;
    }

    .desktop-1 h1,
    h1 {
        font-size: var(--font-size-xxxxxxl) !important;
    }

    .desktop-1 h2,
    h2 {
        font-size: var(--font-size-xxxxxl) !important;
    }

    .desktop-1 h3,
    h3 {
        font-size: var(--font-size-xxxl) !important;
    }

    .desktop-1 h4,
    h4 {
        font-size: var(--font-size-xxl) !important;
    }

    .desktop-1 h5,
    h5 {
        font-size: var(--font-size-xl) !important;
    }

    .desktop-1 h6,
    h6 {
        font-size: var(--font-size-l) !important;
    }

    .section-title {
        font-size: var(--font-size-xxxxxl) !important;
    }

    .main-title {
        font-size: var(--font-size-xxxxxxl) !important;
    }

    .section-heading {
        font-size: var(--font-size-xxxxl) !important;
    }

    .desktop-1 .title_student,
    .desktop-1 .title_patient,
    .desktop-1 .title_medical {
        /* 画像要素のため、サイズは保持 */
        font-size: inherit !important;
    }

    /* ナビゲーションメニューは除外（別途設定されているため） */
    .desktop-1 .main-nav,
    .desktop-1 .nav-link,
    .main-nav,
    .nav-link {
        font-size: inherit;
    }
}


/* Unified heading styles */
.section-title {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xxxxxl);
    font-weight: 700;
    letter-spacing: 0;
    line-height: normal;
    align-self: stretch;
    margin-top: -1.00px;
}

.main-title {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xxxxxxl);
    font-weight: 900;
    letter-spacing: 0;
    line-height: normal;
    left: 0;
    position: absolute;
    top: -1px;
    width: 36px;
}

.section-heading {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xxxxl);
    font-weight: 700;
    letter-spacing: 0;
    line-height: normal;
    position: relative;
    width: fit-content;
}


/* Unified button styles */
a.cta-button {
    display: block;
    border: 1px solid #FFF;
    padding: .8em 2em;
    text-decoration: none;
    color: #FFF;
}

.secondary-button {
    align-items: center;
    background-color: #ffffff;
    border-radius: 30px;
    display: inline-flex !important;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: center;
    padding: 10px 30px;
    position: relative;
    color: #375090;
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: 0;
    line-height: normal;
    text-decoration: none;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

.secondary-button:hover {
    background-color: #375090;
    color: var(--white);
    border-color: #375090;
}



/* Unified text styles */
.body-text {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xxl);
    font-weight: 500;
    letter-spacing: 0;
    line-height: normal;
    align-self: stretch;
    position: relative;
}

.news-text {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xl);
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
    position: relative;
    width: fit-content;
}
.news-text a{
    color: var(--white);
    text-decoration: none;
}

.news-date {
    color: var(--white);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-m);
    font-weight: 700;
    letter-spacing: 0;
    line-height: normal;
    position: relative;
    width: fit-content;
}

.desktop-1 {
    align-items: flex-start;
    gap: 1px;
    min-height: 100vh;
}


.desktop-1 .main-img {
    text-align: center;
    background: #f3f3f3;
    width: 100%;
}

.desktop-1 .main-img img {
    max-width: 100%;
    height: auto;
}

.desktop-1 .topics {
    align-items: flex-start;
    align-self: stretch;
    background: url("../img/news_bg.jpg") no-repeat right center #375090;
    background-size: auto 100%;
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 23px 22px;
    position: relative;
    width: 100%;
}

.desktop-1 .wrapper-1 {
    align-items: center;
    display: flex;
    gap: 30px;
    position: relative;
    width: 1200px;
}

.desktop-1 .title-1 {
    align-items: center;
    border-color: var(--white);
    border-right-style: solid;
    border-right-width: 1px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    position: relative;
    width: 250px;
}


.desktop-1 .ar_right {
    aspect-ratio: 1;
    height: 24px;
    position: relative;
    width: 24px;
}

.desktop-1 .topics_body {
    align-items: flex-start;
    display: flex;
    flex: 1;
    flex-direction: column;
    flex-grow: 1;
    gap: 10px;
    position: relative;
}

.desktop-1 .item-1 {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex: 0 0 auto;
    gap: 40px;
    padding: 15px 0px;
    position: relative;
    width: 100%;
}

.desktop-1 .phone {
    letter-spacing: 0;
    line-height: normal;
    position: relative;
    width: fit-content;
}

.desktop-1 .item {
    align-items: center;
    align-self: stretch;
    display: flex;
    gap: 40px;
    min-height: 63.5px;
    padding: 15px 0px;
    position: relative;
    width: 100%;
}

.desktop-1 .student {
    align-items: center;
    align-self: stretch;
    background-image: url(../img/student.jpg);
    background-position: 50% 50%;
    background-size: cover;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /*min-height: 686px;*/
    padding: 100px 70px 80px;
    position: relative;
    width: 100%;
}

.desktop-1 .title_student {
    height: 75px;
    left: 0;
    position: absolute;
    top: 0;
    width: 1010px;
}

.desktop-1 .wrapper {
    align-items: flex-start;
    display: flex;
    flex: 1;
    flex-grow: 1;
    gap: 50px;
    position: relative;
    width: 1200px;
    max-width: 100%;
}

.desktop-1 .title {
    align-self: stretch;
    position: relative;
    width: 36px;
}

.desktop-1 .text {
    left: 0;
    letter-spacing: 0;
    line-height: normal;
    position: absolute;
    top: -1px;
    width: 36px;
}

.desktop-1 .body {
    align-items: flex-start;
    align-self: stretch;
    display: flex;
    flex: 1;
    flex-direction: column;
    flex-grow: 1;
    gap: 30px;
    position: relative;
}

.desktop-1 .greeting {
    display: flex;
    flex: 1;
    flex-grow: 1;
    gap: 30px;
    width: 100%;
}

.desktop-1 .photo {
    width: 400px;
    height: auto;
}

#about .photo {
    width: 186px;
}

.desktop-1 .photo img {
    max-width: 100%;
    height: auto;
}

.desktop-1 .message {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex: 1;
    flex-direction: column;
    flex-grow: 1;
    gap: 30px;
}


.desktop-1 .ar_white {
    aspect-ratio: 1;
    height: 24px;
    position: relative;
    width: 24px;
}


/* Unified button styles - 4 columns layout */
.desktop-1 .btn-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto;
    column-gap: 20px;
    row-gap: 20px;
    width: 100%;
}

.desktop-1 .btn {
    display: block;
    background-color: var(--white-2);
    padding: 20px 15px;
    text-decoration: none;
    color: var(--black);
    font-family: var(--font-family-noto_sans);
    font-size: var(--font-size-xxl);
    font-weight: 500;
    letter-spacing: 0;
    line-height: normal;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.desktop-1 .btn:hover {
    background-color: #666;
    color: #FFF;
}

.desktop-1 .btn:hover::after {
    transform: translateY(-50%) translateX(5px);
    background-image: url(../img/ar-white.svg);
}

/* Unified button text styles */
.desktop-1 .btn-text {
    margin-top: -1.00px;
    position: relative;
    width: fit-content;
    flex: 1;
}

/* Unified arrow styles */
.desktop-1 .btn-arrow {
    aspect-ratio: 1;
    height: 20px;
    position: relative;
    width: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: none;
    /* imgタグを非表示 */
}

.desktop-1 .btn::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url(../img/ar-right.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.desktop-1 .patient {
    align-items: center;
    align-self: stretch;
    background-image: url(../img/patient.jpg);
    background-position: 50% 50%;
    background-size: cover;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 424px;
    padding: 100px 70px 80px;
    position: relative;
    width: 100%;
}

.desktop-1 .title_patient {
    aspect-ratio: 5.32;
    height: 96px;
    left: 0;
    position: absolute;
    top: -6px;
    width: 505px;
}


.desktop-1 .text-20 {
    align-self: stretch;
    margin-top: -1.00px;
    position: relative;
    text-align: center;
}

.desktop-1 .medical {
    align-items: center;
    align-self: stretch;
    background-image: url(../img/medical.jpg);
    background-position: 50% 50%;
    background-size: cover;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 625px;
    padding: 100px 70px 80px;
    position: relative;
    width: 100%;
}

.desktop-1 .title_medical {
    height: 96px;
    left: 0;
    position: absolute;
    top: -6px;
    width: 1149px;
}

.desktop-1 .text-1 {
    align-self: stretch;
    position: relative;
}


.desktop-1 .phone-3 {
    letter-spacing: 0;
    line-height: normal;
    position: relative;
    width: fit-content;
}

.desktop-1 .text-38 {
    align-self: stretch;
    margin-top: -1.00px;
    position: relative;
}

.desktop-1 .text-46 {
    align-self: stretch;
    margin-top: -1.00px;
    position: relative;
}

.desktop-1 .text-55 {
    align-self: stretch;
    margin-top: -1.00px;
    position: relative;
}

/* Responsive Styles */

/* Tablet Styles */
@media (max-width: 1024px) {
    .desktop-1 {
        width: 100%;
    }


    .desktop-1 .wrapper,
    .desktop-1 .wrapper-1 {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    /* Responsive btn-wrap - 3 columns on tablet */
    .desktop-1 .btn-wrap {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        height: auto;
        min-width: auto;
        left: auto;
        top: auto;
    }

    .desktop-1 .btn {
        flex: 0 0 calc(33.333% - 7px);
        min-width: 150px;
        max-width: calc(33.333% - 7px);
        padding: 15px 10px;
    }


    .hamburger-menu {
        display: flex;
    }


    .desktop-1 .topics {
        padding: 15px;
        height: auto;
    }

    .desktop-1 .wrapper-1 {
        display: block;
        height: auto;
    }

    .desktop-1 .title-1 {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--white);
        padding-bottom: 20px;
        margin-bottom: 20px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .desktop-1 .student,
    .desktop-1 .patient,
    .desktop-1 .medical {
        padding: 50px 20px;
        height: auto;
        min-height: 400px;
    }

    .desktop-1 .medical .body {
        width: 100%;
    }

    .desktop-1 .medical .greeting {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        align-items: center !important;
        width: 100% !important;
    }

    .desktop-1 .wrapper {
        flex-direction: column;
        gap: 30px;
        width: 100%;
    }

    .section-title {
        font-size: var(--font-size-xxxl);
    }

    .desktop-1 .title_patient,
    .desktop-1 .title_student,
    .desktop-1 .title_medical {
        width: auto;
        height: 30px;
        margin-top: 3px;
    }

    .desktop-1 .title {
        width: 100%;
    }

    .main-title {
        position: static;
        width: 100%;
    }

    .desktop-1 .greeting {
        flex-direction: column;
        gap: 20px;
    }

    .desktop-1 .photo {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        text-align: center;
    }

    .desktop-1 .message {
        text-align: center;
    }

    /* モバイル時のボタンレイアウト - 縦並び */
    .desktop-1 .btn-wrap {
        gap: 10px;
    }

    .desktop-1 .btn {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding: 15px 10px;
        text-align: left;
        min-width: auto;
        flex-direction: column !important;
    }

    .desktop-1 .btn-wrap .btn {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        padding: 12px 10px !important;
    }

    .desktop-1 .btn {
        font-size: 14px !important;
    }

    .desktop-1 .btn-arrow {
        height: 18px;
        width: 18px;
    }

    /* タブレット時のドロップダウンメニュー */
    .dropdown .submenu {
        min-width: 180px;
    }

    .dropdown .submenu li a {
        font-size: 13px;
        padding: 6px 12px;
    }

}

/* Small Mobile Styles */
@media (max-width: 480px) {


    .desktop-1 .student,
    .desktop-1 .patient,
    .desktop-1 .medical {
        padding: 30px 15px;
        height: auto;
        min-height: 300px;
    }

    .desktop-1 .medical .body {
        width: 100%;
    }

    .desktop-1 .medical .greeting {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* 医療関係者セクションのみスマートフォンでも上下配置を強化 */
    .desktop-1 .medical .photo {
        order: 1 !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        flex: none !important;
    }

    .desktop-1 .medical .message {
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        flex: none !important;
    }

    .desktop-1 .wrapper,
    .desktop-1 .wrapper-1 {
        display: block;
        padding: 0 15px;
    }

    .mobile-menu {
        width: 100%;
        right: -100%;
    }

    .desktop-1 .btn {
        padding: 12px 8px;
        font-size: 14px;
    }

    .desktop-1 .btn-arrow {
        height: 16px;
        width: 16px;
    }

    /* モバイル時のドロップダウンメニュー */
    .dropdown .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        padding: 0;
        margin-top: 10px;
    }

    .dropdown .submenu li a {
        padding: 8px 0;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }

    .dropdown .submenu li:last-child a {
        border-bottom: none;
    }

    .dropdown-toggle::after {
        display: none;
    }

    /* モバイル時のサブメニュー表示 */
    .dropdown .submenu.is-open {
        display: block;
    }

    .dropdown .submenu {
        display: none;
    }
}