:root {
    --kougi_color: #40bee9;
    --event_color: #ffae00;
    --orderjob_color: #6196ff;
}

/* フロントページ講義を見る */
.lecture-view__block {
    margin-bottom: 40px;
}
.lecture-view__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.lecture-view__categories .cat-item {
    background-color: var(--kougi_color);
    padding: 8px;
    border-radius: 4px;
}

.lecture-view__categories .cat-item a {
    color: #fff;
    text-decoration: none;
}

.fot_info_wrap p {
    padding: 8px;
    text-align: center;
}

.meibo_info {
    display: flex;
    gap: 20px;
}

.meibo_wrap__inner {
    margin-bottom: 40px;
}

.front-hero {
    max-width: 1300px;
    margin: auto;
    padding: 2.5rem 1rem 3.5rem;
}

.front-hero-banner {
    width: 100%;
}

.front-hero-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9.3;
}

.fot_info_wrap p {
    line-height: 1.3;
}

.fot_info_wrap .swell-block-column {
    border: solid 1px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40%;
}

.fot_info_wrap .swell-block-columns__inner {
    gap: 10px;
    justify-content: center;
    /* flex-wrap: unset; */
}

.lecture-view__links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.front_title {
    margin-bottom: 1rem !important;
}

.lecture-view__links .front_title {
    margin-bottom: 0 !important;
}

.lecture-view__links button {
    background-color: unset;
    border: none;
    padding: 0;
}

.-body-solid .p-breadcrumb.-bg-on {
    box-shadow: unset;
}

/* トップページのみのスタイル */
.top #content {
    padding: 0;
}
.front-main {
    width: 100%;
}

.l-container {
    max-width: 100%;
}
.front-main {
    padding: 1rem;
    max-width: 1080px;
    margin: auto;
    width: 100%;
}

.swiper-button-next {
    right: 0;
}
.swiper-button-prev {
    left: 0;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 0.7rem;
    padding: 0.7rem;
    background-color: #333;
    color: #fff;
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 0;
}

.lecture-swiper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.lecture-new__inner {
    margin-top: 20px;
}

/* ヘッダーメニューの調整 */
.-series .l-header__inner,
.l-fixHeader__inner {
    justify-content: space-between !important;
}

/* お知らせ動画 */
.labo-youtube iframe,
.labo-movie-section video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
}
.front_title_main {
    margin-bottom: 0 !important;
    font-size: 1.2rem;
    color: var(--color_main);
}

/* トップカテゴリーメニュー */
.lecture-view__menu ul {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.lecture-view__menu li a {
    padding: 8px;
    border-radius: 4px;
    border: solid 1px var(--kougi_color);
    flex: 1;
    text-align: center;
    font-weight: bold;
    display: block;
}

.lecture-view__menu .sub-menu li a {
    border-radius: 0;
    padding: 0;
    border: none;
    text-align: left;
}

/* サブメニューが開いている間も背景色を維持 */
.lecture-view__menu li:hover > a {
    background-color: var(--kougi_color);
    color: #fff;
}

.lecture-view__menu .sub-menu li:hover > a {
    background-color: unset;
}

.lecture-view__menu .sub-menu li:hover > a {
    color: unset;
    opacity: 0.5;
}

.lecture-view__menu a {
    color: var(--color_text);
    text-decoration: none;
}

/* サブメニュー */
.sub-menu {
    font-size: 0.85rem;
}
.lecture-view__menu .sub-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: solid 1px var(--kougi_color);
    border-radius: 6px;
    background-color: #fff;
    width: 100%;
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

/* 親要素ホバー */
.lecture-view__menu li:hover > .sub-menu {
    max-height: calc(100% - 1rem);
    opacity: 1;
    padding: 1rem 2rem;
    margin-top: 4px;
}

.lecture-view__menu .sub-menu li {
    border: none;
    text-align: left;
    padding: 10px;
    border-bottom: solid 1px #3333;
    border-radius: 0px;
    font-weight: normal;
}

.lecture-view__menu .sub-menu li:last-child {
    border-bottom: none;
}

/* アイコン */
.svg-inline--fa {
    padding: 0 6px;
}
/* 改行 */
.brsp {
    display: none !important;
}

.mov_wrap iframe {
    width: 100%;
}

hr {
    border: solid 0.5px #cacaca !important;
}

.is-style-crease {
    background-color: #fffad0;
}

.spider__arrow {
    background: #333;
    width: 1.75rem;
    height: 2rem;
    margin: 0 0.5rem;
}
.spider__arrow[data-direction="next"]:before {
    right: calc(50% - var(--spider--arrow-size) / 4);
}

.spider__arrow[data-direction="prev"]:before {
    left: calc(50% - var(--spider--arrow-size) / 4);
}

.p-postList__thumb:before {
    background: unset;
}

/* トップinfo */
.main_info_wrap {
    background: #ff9800;
    color: #fff;
    font-weight: bold;
    padding: 0.3rem;
    text-align: center;
}

.fot_info_wrap a {
    text-decoration: none;
}

.fot_info_wrap .swell-block-column:hover {
    background: #fff;
    color: var(--color_main);
}

.post-date {
    font-size: 12px;
}
.lecture-view__item a {
    text-decoration: none;
    color: #333;
}

.front-hero {
    position: relative;
}

.front-hero_pagination {
    position: absolute;
    bottom: 10% !important;
}

.swiper-pagination-bullet-active {
    background-color: var(--color_main) !important;
}

.selectLecture_posttitle {
    font-weight: bold;
}

/* 追加 */
.selectLecture_swiper .swiper-wrapper {
    align-items: stretch;
}
.selectLecture_swiper .swiper-slide {
    height: auto;
}

.selectLecture_slide {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 4px;
}

.selectLecture_title {
    --lh: 0.9;
    line-height: var(--lh);
    font-weight: 600;
    margin: 0;
    min-block-size: calc(2 * 1em * var(--lh));
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.selectLecture_link {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.selectLecture_link img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.is-url .selectLecture_posttitle {
    display: none;
}

.p-postList__meta {
    margin-top: auto;
}

/* フッターお問い合わせ */
.information_list_section h3 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.information_list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.information_list_item {
    display: flex;
}

.information_list_item a {
    flex: 1;
    text-decoration: none;
    border: solid 1px;
    padding: 12px;
    display: block;
    text-align: center;
    border-radius: 4px;
}

.information_list_item a:hover {
    background-color: #fff;
    color: var(--color_main);
    border: solid 1px var(--color_main);
}

.selectLecture_posttitle.p-postList.p-postList__title {
    font-size: 0.9rem;
    line-height: 1.3;
}
.main_container {
    padding: 1rem;
}
.main_section {
    margin-bottom: 3rem;
}
.front_title {
    font-size: 26px;
    color: var(--color_main);
}
.howtouse_inner h3 {
    font-size: 1.2rem;
    padding: clamp(0.3rem, 1vw, 0.5rem);
    background-color: var(--color_main);
    color: #fff;
}

.howtouse_item {
    margin-bottom: clamp(2rem, 3vw, 3rem);
}
.howtouse_text {
    padding: 0 clamp(0.5rem, 1vw, 1rem);
}
.main_container {
    max-width: 1280px;
    margin: auto;
}
/* .search_inner {
    margin-bottom: 2rem;
} */

/* ai */
/* 最初にfront-page.php上で表示するAI検索フォーム */
.rag-chat-start {
    width: 100%;
}
.AI_search_form {
    margin-bottom: clamp(1rem, 2vw, 2rem);
}
#rag-chat-start #rag-chat-input-area {
    /* display: flex; */
    width: 100%;

    /* overflow: hidden; */
}

#rag-chat-start #rag-chat-input {
    /* flex: 1; */
    border: none;
    padding: 0.75rem;
    resize: vertical;
    min-height: 48px;
    font-family: inherit;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
}

#rag-chat-start #rag-chat-send {
    border: none;
    background: var(--color_main);
    color: #fff;
    /* padding: 0 1.5rem; */
    cursor: pointer;
}

/* チャット開始後の全画面表示 */
#rag-chat-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 80dvh;
    background-image: linear-gradient(45deg, #eef9ff, #c5dfff);
    z-index: 1000;
    display: none;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 100px;
}

#rag-chat-container.is-open {
    display: flex;
}

#rag-chat-header {
    padding: 14px 16px;
    /* font-weight: 600; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 10px; */
}

#rag-chat-title {
    margin: 0;
    /* font-size: 16px; */
    font-weight: bold;
}

#rag-chat-close {
    background: transparent;
    border: none;
    /* color: #fff; */
    /* font-size: 20px; */
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
}

#rag-chat-history {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* max-width: 1280px;
    margin: auto; */
    background-color: #fff;
}

/* 全画面チャット内に移動した後の入力欄 */
#rag-chat-input-slot #rag-chat-input-area {
    display: flex;
    padding: 16px;
    /* border-top: 1px solid #ddd; */
    background: unset;
}

#rag-chat-input-slot #rag-chat-input {
    flex: 1;
    border: 1px solid #ccc;
    padding: 1rem;
    resize: vertical;
    min-height: 48px;
    max-height: 120px;
    font-family: inherit;
}

#rag-chat-input-slot #rag-chat-send {
    border: none;
    background: var(--color_main);
    color: #fff;
    padding: 0 1.5rem;
    cursor: pointer;
}

.rag-message {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 95%;
    line-height: 1.55;
}

.rag-user-message {
    background: #eef9ff;
    align-self: flex-end;
    white-space: pre-wrap;
    position: relative;
}
.rag-user-message::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    position: absolute;
    right: 0;
    bottom: -5px;
    border-top: 16px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #eef9ff;
}

.rag-ai-message {
    background: #f1f0f0;
    align-self: flex-start;
    position: relative;
}

.rag-ai-message::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #f1f0f0;
    position: absolute;
    left: 0;
    bottom: -5px;
}

.rag-ai-message .rag-sources {
    margin-top: 10px;
    font-size: 0.9em;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

.rag-ai-message a {
    color: #005a87;
    text-decoration: underline;
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#rag-chat-history p {
    margin: 0.5em 0;
}

#rag-chat-history ul,
#rag-chat-history ol {
    margin: 0.4em 1.2em;
}

.rag-loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rag-spinner {
    width: 1em;
    height: 1em;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: rag-spin 0.8s linear infinite;
}

@keyframes rag-spin {
    to {
        transform: rotate(360deg);
    }
}

body.rag-chat-locked {
    overflow: hidden;
}

.search_wrap {
    background-image: linear-gradient(45deg, #eef9ff, #c5dfff);
    padding: clamp(1rem, 2vw, 2rem);
    border-radius: clamp(10px, 3vw, 20px);
}
.search_wrap h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--color_main);
}
.search_wrap textarea {
    background-color: #fff;
}
.search_wrap input[type="text"] {
    background-color: #fff;
    width: clamp(200px, 50%, 400px);
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 50px 0 0 50px;
}
.AI_search_form button {
    background-color: var(--color_main);
    color: #fff;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    /* margin-top: 0.5rem; */
    border-radius: 4px;
}
.keyword_search_form button {
    border-radius: 0 50px 50px 0;
    background-color: var(--color_main);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    cursor: pointer;
}

.keyword_search_form form {
    width: 100%;
}

.main_container_event {
    padding: 0;
}

.event_item a {
    display: flex;
    gap: clamp(1rem, 2vw, 2rem);
    align-items: center;
    margin-bottom: clamp(1rem, 2vw, 2rem);
    color: var(--color_text);
    text-decoration: none;
}
.event_item_thumbnail {
    flex: 1;
}
.event_item_thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.event_item_content {
    flex: 2;
}

.event_category {
    display: inline-block;
    background-color: var(--event_color);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.event_item_text {
    border: 2px var(--event_color) dotted;
    padding: 1rem;
}

.report_title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--event_color);
}

.event_item_report {
    margin-top: 2rem;
}

.event_date_title {
    font-weight: bold;
}

.lecture_original .p-postList__item {
    width: 24.9999% !important;
}
.lectureallcategory_child_title::before {
    display: none !important;
}
.lectureallcategory_child_title {
    margin: 0 !important;
}
.lectureallcategory_title {
    background-color: var(--color_main);
    color: #fff;
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(2rem, 3vw, 3rem) !important;
    display: inline-block;
    border-radius: 0px 50px 50px 0px;
    margin: 0 !important;
    margin-bottom: 1rem !important  ;
}
.lectureallcategory_title::before {
    display: none !important;
}
.lectureallcategory_post_list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0;
    list-style: none;
    padding-left: 0 !important;
}

.lectureallcategory_post_item {
    width: calc(25% - 12px);
}

.lectureallcategory_post_item a {
    display: block;
    text-decoration: none;
}
.lectureallcategory_img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}
.lectureallcategory_post_title {
    margin-top: 0.5rem;
    color: var(--color_text);
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1 !important;
    font-weight: bold;
}
.lectureallcategory_child_wrapper {
    margin-bottom: 2rem;
}
.lectureallcategory_child_item {
    margin-bottom: 2rem;
}

/* book */
.book_child:nth-child(5n + 1) {
    background-color: rgb(199, 229, 246);
}
.book_child:nth-child(5n + 2) {
    background-color: rgb(164, 202, 253);
}
.book_child:nth-child(5n + 3) {
    background-color: rgb(154, 216, 213);
}
.book_child:nth-child(5n + 4) {
    background-color: rgb(31, 117, 186);
}
.book_child:nth-child(5n + 4) a {
    color: #fff;
}
.book_child:nth-child(5n + 5) {
    background-color: rgb(99, 154, 255);
}

.book_child img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}
.book_child {
    box-shadow: -2.25rem 0.625rem 1.875rem rgba(62, 62, 62, 0.16);
    padding: 1rem;
    width: 200px;
    height: auto;
}
.book_shelf {
    padding: 0 1rem;
}
.book_child_shelf {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 0;
    list-style: none;
    padding-left: 0 !important;
    position: relative;
    /* overflow-x: auto;
    overflow-y: hidden; */
}
.book_child_shelf::before {
    width: 100%;
    height: 58px;
    content: "";
    position: absolute;
    background-color: #fff;
    bottom: -31px;
    left: -30px;
}
.book_child a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--color_text);
    font-weight: bold;

    gap: 1rem;
}
.book_wrapper {
    margin-bottom: clamp(4rem, 6vw, 6rem);
}
.book_child:hover {
    transform: translateY(-4px);
    transition: 0.3s ease;
}

.book_section {
    max-width: 1280px !important;
    margin: auto;
}
.book_child_shelf:nth-child(even) {
    margin-top: clamp(3rem, 5vw, 5rem);
    margin-bottom: clamp(3rem, 5vw, 5rem);
}
