@keyframes top-banner-border-animation {
    100% {
        height: 100%;
    }
}
@keyframes top-hero-border-animation {
    100% {
        height: 150px;
    }
}

@keyframes top-hero-bottom-border-animation {
    100% {
        height: 12vh;
    }
}
@media screen and (max-width: 768px) {
    @keyframes top-hero-bottom-border-animation {
        100% {
            height: 10vh;
        }
    }
}
@keyframes top-course-border-animation {
    100% {
        height: 80vh;
    }
}
@media screen and (max-width: 768px) {
    @keyframes top-course-border-animation {
    100% {
        height: 50%;
    }
}
}

.content {
    padding: 0;
}
.main-wrapper {
    margin-top: -60px;
    &::after {
      background-color: white;
    }
  }
/* トップバナー全体のスタイル */

.top-banner {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    overflow: hidden;
    position: relative;

    .top-banner-border {
        position: absolute;
        top: 0;
        left: calc(52% - 4.5vw);
        width: 4.5vw;
        height: 0%;
        background-color: #00A73C;
        z-index: 2;
        animation: top-banner-border-animation 1s 2s 1 forwards;

        @media screen and (max-width: 768px) {
            width: 12vw;
            left: calc(52% - 8vw);
        }
    }
}



.top-content {
    &.display-pc-only {
        display: flex;
        align-items: stretch;
        min-height: 400px;
        position: relative;

        /* 左側の画像エリア */
        .top-image {
            flex: 2;
            position: relative;
            overflow: hidden;
        }

        .top-img {
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* 右側のテキストエリア */
        .top-text {
            flex: 1;
            padding: 60px 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            z-index: 3;
            left: -70px;
            top: 4vw;
        }

        .top-title {
            font-size: clamp(28px, 2.5vw, 40px);
            font-weight: bold;
            color: black;
            margin: 0 0 30px 0;
            line-height: 1.6;
            letter-spacing: 3px;
        }

        .top-description {
            font-size: clamp(16px, 1.1vw, 18px);
            line-height: 2;
            color: black;
            margin: 0;
            text-align: left;
        }
    }
}

/* Newsセクション */
.news-section {
    background: #fff;
    padding: 3vw 0 0;
}

.news-container {
    max-width: 65vw;
    margin: 0 auto;
    display: flex;
    gap: 5vw;
    padding: 0 40px;
}

/* 左側：Newsヘッダー */
.news-header {
    flex: 0 0 1vw;

    .button-group {
        margin-left: auto;
    }
    .action-button {
        font-size: clamp(14px, 1.0vw, 17px);
        width: 11vw;
        min-width: 165px;
        height: 4vw;

        img {
            width: 12px;
        }
    }
}

.news-title {
    font-size: clamp(40px, 3.5vw, 64px);
    font-weight: 400;
    color: #00a73c;
    margin: 0 0 10px 0;
    font-family: 'Book Antiqua', serif;
    line-height: 1;
}

.news-subtitle {
    font-size: clamp(24px, 1.4vw, 32px);
    color: #333;
    margin: 0 0 30px 0;
    font-weight: 600;
}

/* 右側：ニュースリスト */
.news-list {
    flex: 1;
    border-top: 1px solid #00a73c;
}

.news-item {
    border-bottom: 1px solid #00a73c;
    padding: 1.3vw;
    position: relative;
}

.news-item:last-child {
    border-bottom: 1px solid #00a73c;
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.news-item-container {
    display: flex;
}

.news-date {
    font-size: clamp(16px, 1.2vw, 22px);
    color: #00a73c;
    font-weight: 800;
    min-width: 6vw;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 5px;
    flex: 1;
}

.news-tag {
    padding: 0.1vw 0.5vw;
    border-radius: 20px;
    font-size: clamp(11px, 0.8vw, 15px);
    letter-spacing: 1px;
    font-weight: 400;
    color: #fff;
    width: 6vw;
    height: 1.5vw;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* タグの色分け */
.news-tag {
    background-color: #00a73c;
}



.news-arrow {
    color: #00a73c;
    font-size: clamp(20px, 1.4vw, 22px);
    font-weight: 600;
    align-items: center;
    position: absolute;
    right: 0;
    top: 35%;
    text-decoration: none;
}

.news-description {
    
    color: #333;
    margin: 0;
    line-height: 1.6;
    font-weight: 600;
    margin-top: 0.8vw;

    a {
        font-size: clamp(12px, 1.0vw, 18px);
        text-decoration: none;
        color: black;
        line-height: 1.6;
    }
}
/* 学科紹介セクション */
.department-introduction {
    background: #fff;
    padding: 80px 0;
}

.department-hero {
    background-color: black;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    
    .department-hero-image.display-pc-only{
        z-index: 1;
    }

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: calc(52% - 4.5vw);
        width: 4.5vw;
        height: 0px;
        background-color: #00A73C;
        animation: top-hero-border-animation 1s 4s 1 forwards;
    }

    &::after {
        content: '';
        position: absolute;
        top: 100%;
        left: calc(50% - 2.25vw);
        background-color: #00A73C;
        width: 4.5vw;
        height: 0px;;
        animation: top-hero-bottom-border-animation 1s 5s 1 forwards;
    }
}

.department-hero-img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.department-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.department-hero-text {
    text-align: center;
    color: #fff;
    position: absolute;
    top: 43%;
    font-family: "Zen Kaku Gothic Antique";

    @media screen and (max-width: 1200px) {
        top: 30%;
    }
    @media screen and (max-width: 768px) {
        /* top: 0; */
    }
}

.department-hero-title {
    font-size: clamp(26px, 1.8vw, 40px);
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 2px;
    font-family: "Zen Kaku Gothic Antique";
    text-shadow: 3px 3px 5px #00000080;
}

.department-hero-description {
    font-size: clamp(14px, 1.1vw, 20px);
    line-height: 2;
    margin: 0;
    font-weight: 400;
    color: #fff;
    text-shadow: 3px 3px 5px #00000080;
}

.about-images-container {
    overflow: hidden;
    position: absolute;
    bottom: 0;
    z-index: 2;

    @media screen and (max-width: 768px) {
        bottom: 148px;
        max-width: 100vw;
    }
    @media screen and (max-width: 480px) {
        bottom: 86px;
    }
}
.about-images-container-sp {
    display: none;

    @media screen and (max-width: 768px) {
        display: flex;
        bottom: 0px;
    }
}

  /* 学科コースセクション */
.department-courses {
    background: #fff;
    padding-top: 80px;
}

.department-courses-header {
    text-align: center;
    margin-bottom: 60px;
}

.department-courses-container {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;

    &::after {
        content: '';
        position: absolute;
        top: 25%;
        left: calc(50% - 2.25vw);
        width: 86px;
        height: 150px;
        background-color: #00A73C;
        width: 4.5vw;
        height: 80vh;
        /* height: 0px; */
        /* animation: top-course-border-animation 3s 6s 1 forwards; */
    }
}

.department-course-item {
    background: #f8f8f8;
    border: 1px solid black;
    margin-bottom: 90px;
    position: relative;
    display: flex;
    align-items: center;
    width: 90%;
    min-height: 25vw;
    z-index: 1;
}

/* 2つ目の要素（会計・金融コース）を右寄せ */
.department-course-item:nth-child(2) {
    margin-left: auto;
    margin-right: 0;
}

.department-course-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 4vw 6vw;
    gap: 2vw;
}

.department-course-text {
    flex: 1;
}

.department-course-name {
    font-size: clamp(20px, 1.8vw, 35px);
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.4;
    border-bottom: solid 2px #808080;
    padding-bottom: 1vw;
    position: relative;
    text-align: left;
}

.department-course-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3em;
    height: 2px;
    background-color: #00a73c;
}

.department-course-description {
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.8;
    color: black;
    letter-spacing: 0;
    margin: 0;
}

.department-course-illustration {
    flex: 0 0 25vw;
    text-align: center;
}

.department-course-img {
    max-width: 70%;
    height: auto;
}

.department-course-button {
    position: absolute;
    right: -3vw;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 5.5vw;
}

.department-course-btn {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.department-course-btn:hover {
    transform: scale(1.1);
}

/* 会計・金融コースの特別レイアウト */

.department-course-item:nth-child(2) .department-course-button {
    right: auto;
    left: -3vw;
}


/* Featureセクション */
.feature {
    background: #fff;
    margin-top: -60px;
}

.feature-hero {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.feature-hero-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.feature-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-text-boxes {
    position: absolute;
    top: 14%;
    left: 12%;
    z-index: 3;
    width: 10%;
}

.feature-description {
    position: absolute;
    bottom: 10vw;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
}

.feature-description-text {
    font-size: clamp(16px, 1.1vw, 20px);
    line-height: 2.0;
    text-align: center;
    color: white;
    text-shadow: 0 0 2px black;
}

.feature-button {
    position: absolute;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;

    .action-button {
        width: 16vw;
        height: 7vh;
        font-size: clamp(14px, 1.0vw, 14px);
    }
}

/* Bannerセクション */
.banner {
    background: #f8f8f8;
    margin-top: -30px;
    margin-bottom: -30px;
    padding: 10% 15%;
    position: relative;
}

.banner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
}

.banner-content {
    text-align: center;
}

.banner-sns {
    text-align: center;
}

.banner-sns-title {
    font-size: clamp(22px, 1.5vw, 26px);
    color: #00a73c;
    margin: 0 0 20px 0;
    font-weight: 400;
    font-family: "Zen Kaku Gothic Antique";
}

.banner-sns-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.banner-sns-bracket {
    position: relative;
    width: 20px;
    height: 120px;
}

.banner-sns-bracket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: #00a73c;
}

.banner-sns-bracket::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 2px;
    background: #00a73c;
}

.banner-sns-bracket-bottom {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10px;
    height: 2px;
    background: #00a73c;
}

.banner-sns-bracket-right {
    transform: scaleX(-1);
}

.banner-sns-icon-list {
    display: flex;
    gap: 1.5vw;
    align-items: center;
}

.banner-sns-icon {
    display: block;
    transition: transform 0.3s ease;
}

.banner-sns-icon:hover {
    transform: scale(1.1);
}

@media screen and (max-width: 1920px) {
    .top-banner {
        &::after {
            height: 73.7vh;
        }
    }
}

@media screen and (max-width: 1470px) {
    .top-banner {
        &::after {
            height: 78.2vh;
        }
    }
}
@media screen and (max-width: 1024px) {
    /* トップ画像 */
    .top-content {
        &.display-pc-only {
            .top-description {
                font-size: 12px;
            }
        }
    }

    /* Newsセクション */
    .news-container {
        max-width: 80vw;
        gap: 8vw;
    }

    .news-header {
        .action-button {
            width: 14vw;
            min-width: 140px;
            height: 5vw;

            img {
                width: 10px;
            }
        }
    }

    .news-item-container {
        gap: 2vw;
    }

    .news-tag {
        width: 8vw;
        height: 2vh;
    }

    .department-hero-title {
        font-size: 20px;
    }

    .department-hero-description {
        font-size: 12px;
    }

    /* 学科コースセクション */
    .department-courses-container {
        max-width: 85%;
    }
    .department-course-item {
        margin-bottom: 60px;
    }

    .department-course-button {
        width: 7.5vw;
    }

    .feature-text-boxes {
        top: 8%;
        left: 12%;
        width: 18%;
    }

    .feature-description {
        bottom: 12vw;
        left: 45%;

        .feature-description-text {
            width: 125%;
        }
    }

    .feature-button {
        .button-group {
            margin-bottom: 1vw;
        }
        .action-button {
            width: 25vw;
            min-width: 240px;
            height: 5vh;
        }
    }

    .banner-container {
        flex-direction: column;
    }

}

/* レスポンシブ対応 */
@media (max-width: 819px) {

    .top-banner {
        &::after {
            width: 12vw;
            height: 167.5vw;
            z-index: 1;
            left: calc(50% - 6vw);
        }
    }

    .top-content {
        &.display-pc-only {
            display: none;

        }
        &.display-sp-only {
            display: block;
            position: relative;

            .top-text {
                position: absolute;
                bottom: 0;
                padding: 40px 20px;
                z-index: 2;
            }
            
            .top-title {
                margin-bottom: 20px;
                color: #fff;
                text-shadow: 0px 3px 6px #0000004D;
                font-size: 40px;
            }
            
            .top-description {
                line-height: 1.8;
                color: #fff;
                letter-spacing: 0;
                text-shadow: 0px 3px 6px #0000004D;
                font-weight: 400;
                font-size: 18px;
            }
        }
    }
    
    
    /* Newsセクションのレスポンシブ */

    .news-section {
        padding: 0;
    }

    .news-container {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
        max-width: 95vw;
    }
    
    .news-header {
        display: flex;
        flex: none;
        text-align: center;

        .action-button {
            width: 28vw;
            height: 8vw;
        }
    }

    .news-item {
        padding: 3vw 0.5vw;
    }

    .news-item-container {
        display: flex;
        gap: 2vw;
    }

    .action-button {
        width: 45vw;
    }
    
    .news-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-title {
        margin: 0;
    }
    
    .news-tags {
        justify-content: flex-start;
    }
    .news-tag {
        width: 80px;
        height: 20px;
    }
    
    .news-arrow {
        margin-left: 0;
        align-self: flex-end;
    }

    .department-introduction {
        padding-top: 20px;
    }

    .department-hero-title {
        font-size: clamp(26px, 1.8vw, 40px);
    }

    .department-hero-description {
        font-size: clamp(14px, 1.1vw, 20px);
    }

    .department-hero {
        height: 75vh;

        &::before {
            width: 12vw;
            z-index: 0;
            left: calc(50% - 6vw);
        }

        &::after {
            width: 12vw;
            z-index: 0;
            left: calc(50% - 6vw);
        }
    }
    
    /* 学科紹介セクション */
    .department-courses-container {
        max-width: 95%;

        &::after {
            /* animation: top-course-border-animation 3s 6s 1 forwards; */
            height: 50%;
            top: 200px;
            left: calc(50% - 2.25vw);
        }
    }

    .department-course-item {
        margin-bottom: 50px;
    }

    .department-hero-image {
        z-index: 2;
    }

    .department-hero-text {
        top: 24vw;
    }

    .department-hero-description {
        line-height: 2.2;
        text-align: center;
    }
    
    .department-gallery-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .feature-description {
        bottom: 20vw;

        .feature-description-text {
            width: 100%;
        }
    }

    .feature-text-boxes {
        width: 18%;
    }

    .feature-button {
        .action-button {
            width: 35vw;
            height: 6vh;
            font-size: 16px;
        }
    }

    .banner-container {
        gap: 60px;
        padding: 0 20px;
    }
}
@media (max-width: 768px) {

    .top-content {
        &.display-sp-only {

            .top-description {
                font-size: 12px;
            }

            .top-title {
                font-size: clamp(28px, 2.5vw, 40px);
            }
        }
    }
    .news-item {
        padding: 5vw 0.5vw;
    }
    .news-header {
        .action-button {
            width: 40vw;
            height: 8vh;
            max-width: 150px;
            max-height: 50px;
            font-size: clamp(14px, 1.0vw, 14px);
        }
    }

    /* 学科コースセクション */
    .department-hero {
        height: 110vh;
        max-height: 155vw;
        min-height: 80%;
    }

    .department-hero-text {
        top: 56vw;
    }

    .department-courses {
        padding: 0;
        margin-bottom: 25vw;
    }
    
    .department-courses-container {
        padding: 0 20px;
        max-width: 100%;

        &::after {
            top: 30%;
            height: 50%;
            width: 12vw;
            left: calc(50% - 6vw);
        }
    }
    
    .department-course-content {
        flex-direction: column;
        padding: 50px 30px 70px 30px;
        gap: 30px;
        text-align: center;
    }

    .department-course-img {
        max-width: 85%;
    }

    .department-course-text {
        order: 2;
    }
    
    .department-course-name {
        margin-bottom: 15px;
        padding-bottom: 3vw;
    }
    
    .department-course-illustration {
        flex: none;
        width: 100%;
    }
    
    .department-course-button {
        top: auto;
        right: 0;
        bottom: -18vw;
        width: 20%;
    }

    .department-course-btn {
        width: 100%;
    }

    .department-course-item {
        width: 100%;
        min-height: 500px;
        margin-bottom: 50px;
    }
    
    /* 会計・金融コースのモバイルレイアウト */
    .department-course-item:nth-child(2) .department-course-content {
        flex-direction: column;
    }
    
    .department-course-item:nth-child(2) .department-course-button {
        &.display-sp-only {
            left: auto;
            right: 0;
        }
    }

    /* Featureセクション */
    .feature-hero {
        min-height: 80vh;
    }
    
    .feature-text-boxes {
        top: 15%;
        left: 5%;
        gap: 15px;
    }

    .feature-text-img {
        width: 22vw;
        display: flex;
        margin-inline: auto;
    }
    
    .feature-text-box {
        padding: 12px 20px;
    }
    
    .feature-description {
        bottom: 25vw;
        transform: translateX(13.5%);
        left: auto;
    }
    
    .feature-description-text {
        padding: 15px 20px;
    }

    /* Bannerセクション */
    .button-group {
        margin-bottom: 0;
    }

    .banner {
        padding: 30px 0 80px;
        margin-bottom: -30px;
    }
    
    .banner-container {
        gap: 60px;
        padding: 0 20px;
    }
    
    .banner-content {
        padding: 30px 40px;
    }
    
    .banner-sns-bracket {
        height: 50px;
    }

    .banner-sns-title {
        text-align: center;
    }

    .banner-sns-icons {
        gap: 15px;
    }
    
    .banner-sns-icon-list {
        gap: 12px;
    }
}


@media (max-width: 480px) {
    .department-hero {
        height: 105vh;
        max-height: 720px;
        min-height: 80%;
    }

    .feature-hero {
        min-height: 70vh;
    }
    
    .feature-text-boxes {
        top: 5%;
        left: 40vw;
        gap: 10px;
    }
    
    .feature-text-box {
        padding: 10px 15px;
    }
    
    .feature-description-text {
        padding: 12px 15px;
        font-size: clamp(14px, 1vw, 16px);
    }
    
    .feature-button {
        bottom: 5%;

        .action-button {
            width: 50vw;
            height: 16vw;
            max-height: 55px;
            font-size: clamp(14px, 1.0vw, 14px);
        }
    }

    .banner-container {
        gap: 30px;
        padding: 0 15px;
    }
    
    .banner-content {
        padding: 25px 30px;
    }
    
    .banner-sns-icons {
        gap: 10px;
    }
    
    .banner-sns-icon-list {
        gap: 20px;
    }
    
    .banner-sns-img {
        width: 40px;
    }
}