/*
Theme Name: IPLab
Theme URI: https://example.com/iplab
Author: IPLab Team
Author URI: https://example.com
Description: A modern WordPress theme for IPLab
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iplab
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    /* overflow-x: hidden; */
    word-break: break-all;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #111111;
    background-color: #fff;
    height: 100%;
    box-sizing: border-box;
}

/* Links */
a {
    color: #111111;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Typography */
p {
    font-size: 16px;
}

h1 {
    font-size: 32px;
    color: #111111;
}

/* Container */
.container {
    padding: 100px 80px;
    width: 100%;
}

/* Header Styles */
.site-header {
    background-color: rgba(255, 255, 255, 0.7);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.header_wrap {
    margin: 0 80px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-center {
    display: flex;
    justify-content: center;
}

.header-right {
    flex: 0.9;
    display: flex;
    justify-content: flex-end;
}

.language-switcher {
    display: flex;
    align-items: center;
    /* gap: 0.5rem; */
}

/* Language Switcher Styles */
.language-switcher ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher li {
    display: inline-block;
}

.language-switcher a,
.language-switcher li a {
    color: #111111;
    text-decoration: none;
    font-weight: 500;
    font-size: 21px;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.language-switcher a:hover,
.language-switcher li a:hover {
    color: #b0b0b0;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

/* Highlight current language */
.language-switcher .current-lang a {
    font-weight: 700;
}

/* Language separator */
.language-switcher li:not(:last-child)::after {
    content: "/";
    color: #666;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0.5rem;
    transform: rotate(10deg) translateY(-2px);
    ;
    display: inline-block;
}

.language-switcher span {
    color: #666;
    font-size: 16px;
    font-weight: 600;
    transform: rotate(10deg);
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: #333;
}

/* Navigation Menu */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.main-navigation a {
    color: #333;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 21px;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: #b0b0b0;
    opacity: 0.7;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* Main Content */
.site-content {
    min-height: calc(100vh - 200px);
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 767px) {
    .header_wrap {
        margin: 0 20px;
    }

    .header-inner {
        justify-content: space-between;
        align-items: center;
    }

    .header-left {
        flex: none;
    }

    .header-center {
        display: none;
    }

    .header-right {
        flex: none;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .language-switcher {
        order: 1;
        gap: 0.3rem;
    }

    .language-switcher a,
    .language-switcher li a {
        font-size: 16px;
    }

    .language-switcher li:not(:last-child)::after {
        margin: 0 0.3rem;
    }

    .content-area {
        flex-direction: column;
    }

    .secondary {
        flex: 1;
    }
}

/* Hide mobile navigation on desktop */
@media (min-width: 768px) {
    #mobile-navigation {
        display: none !important;
    }

    
}

/* Mobile navigation - initially hidden */
#mobile-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.70, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.40, 0.45, 0.94);
    visibility: hidden;
    opacity: 0;
}

#mobile-navigation.toggled {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

#mobile-navigation ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 100px 40px 40px;
    margin: 0;
    list-style: none;
}

#mobile-navigation a {
    display: block;
    padding: 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Mobile menu close button */
#mobile-navigation .menu-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    font-weight: 300;
}

/* Utility Classes */
.screen-reader-text {
    position: absolute;
    left: -9999px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

img.custom-logo {
    width: 100%;
    max-width: 120px;
}

.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.hero-image {
    height: calc(100vh - 90px);
    width: 100%;
    background-image: url(http://www-lip.ist.osaka-u.ac.jp/wp-content/uploads/2025/07/s-1536x1024_v-fms_webp_b83a411f-781e-4d5b-acfd-af2370e9e39c.png);
    background-size: cover;
    background-position: center 80px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 4s ease-in-out forwards;
    animation-delay: 0.5s;
    z-index: 10;
}

.hero-title {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 10px;
    opacity: 1;
}

/* Fade out animation */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.hero-inner-msg {
    position: absolute;
    bottom: 0;
    width: 455px;
    background-color: rgba(0, 0, 0, 0.5);
    right: 80px;
    padding: 10px;
    font-size: 11px;
    color: #fff;
}

.hero-inner-msg p {
    font-size: 11px;
    color: #fff;
}

span.hero-inner-msg_jp {
    font-size: 11px;
    margin-top: 10px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 1.1px;
}

.home-page h2 {
    /* font-size: 64px; */
        font-size: 32px;

    font-weight: 600;
    margin-bottom: 15px;
    color: #111111ff;
}

.home-page h3 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111111ff;
}

.home-page h4 {
    font-size: 20px;
    font-weight: 600;
}

.home-page p {
    color: #111111eb;
    font-size: 16px;
}

.view-more {
    font-family: "Cormorant Garamond", serif;
    color: #111111ff;
    transition: opacity 0.3s ease;
    font-size: 23px;
}

.view-more:hover {
    opacity: 0.7;
    color: #111111ff;
}

/* Home Page Layout */
.home-page .flex {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
}

.home-page .flex .left-col {
    width: 40%;
    display: flex;
    flex-direction: column;
}

.home-page .flex .right-col {
    width: 60%;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
}

.left-col img {
    border-radius: 0 12px 0 12px;
}

.home-page .right-col .wrap-view_more {
    text-align: right;
    margin-top: 30px;
}

.mt-100 {
    margin-top: 100px;
}

.news_wrap {
    padding: 20px 0;
}

.section_news p.description {
    line-height: 1.5;
    overflow-wrap: break-word;
    /* または */
    word-wrap: break-word;
    /* 古いブラウザ用 */

}

/* News section image styles */
.section_news .image_wrap {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.section_news .image_wrap p {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    margin: 0;
}

.section_news .image_wrap img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* All posts modal - initially hidden */
#all-posts-modal {
    display: none !important;
}

/* All posts modal styles - same as student message modal */
#all-posts-modal.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

#all-posts-modal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 60%;
    max-width: 60%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

#all-posts-modal .modal-body {
    padding: 30px;
    line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

#all-posts-modal .close {
    color: #999;
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
    line-height: 1;
}

#all-posts-modal .close:hover,
#all-posts-modal .close:focus {
    color: #666;
}

/* All posts modal hr */
#all-posts-modal .modal-hr {
    margin: 20px 0;
    border: none;
    height: 1px;
    background-color: #e0e0e0;
}

/* Material Symbols Outlined */
.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    color: #000;
    vertical-align: -6px;
    margin-right: 6px;
}

/* Material Symbols Outlined icon links */
a .material-symbols-outlined {
    color: #111111;
    transition: opacity 0.3s ease;
}

a:hover .material-symbols-outlined {
    opacity: 0.7;
}

#wanted_student {
    background-color: #000;
    padding: 40px;
    margin: 0 40px 100px 40px;
    border-radius: 12px;
}

#wanted_student h2 {
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1;
    /* font-size: 64px; */
    font-size: 32px;

    font-weight: 600;
}

#wanted_student .wanted_student_r_col p,
#wanted_student .wanted_student_r_col a {
    color: #fff;
    line-height: 1.5;
    font-weight: 600;
}

/* Home page specific - override template styles */
.home-page #wanted_student .wanted_student_r_col p,
.home-page #wanted_student .wanted_student_r_col a {
    font-weight: 600 !important;
}

#wanted_student .flex {
    gap: 50px;
    display: flex;
}

#wanted_student .flex.wrap_box {
    justify-content: space-between;
    margin-top: 15px;
    gap: 20px;
    align-items: center;
}

#wanted_student .flex.wrap_box>div {
    border: 1px solid #fff;
    width: 100%;
    cursor: pointer;
}

#wanted_student .flex.wrap_box>div:hover {
    color: #000;
    background-color: #fff;
    transition: 0.3s ease;
}

#wanted_student .flex.wrap_box>div:hover p,
#wanted_student .flex.wrap_box>div:hover a,
#wanted_student .flex.wrap_box>div:hover button {
    color: #000;
    transition: 0.3s ease;
}

/* Student Recruitment Box */
#wanted_student .message_box {
    width: 100%;
    display: inline-block;
    text-align: center;
    padding: 5px;
    background: none;
    border: 0px solid #fff;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600!important;
    text-decoration: none;
}

#wanted_student .left-col {
    width: 40%;
    display: flex;
    flex-direction: column;
}

#wanted_student .right-col {
    width: 60%;
    display: flex;
    flex-direction: column;
}

/* Student message modal - specific selectors to avoid conflicts */
#student-message-modal.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

#student-message-modal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 60%;
    max-width: 60%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

#student-message-modal .modal-body {
    padding: 30px;
    line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

#student-message-modal .modal-body .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
}

#student-message-modal .modal-body .modal-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 10px 0;
    color: #333;
    line-height: 1.4;
}

#student-message-modal .modal-body .modal-text {
    color: #555;
    /* margin-bottom: 15px; */
    font-size: 16px;
    line-height: 1.5;
}

#student-message-modal .modal-body .modal-list-item {
    color: #555;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
}

#student-message-modal .modal-body .modal-hr {
    margin: 20px 0;
    border: none;
    height: 1px;
    background-color: #e0e0e0;
}

#student-message-modal .close {
    color: #999;
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
    line-height: 1;
}

#student-message-modal .close:hover,
#student-message-modal .close:focus {
    color: #666;
}

/* Body when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Slick Carousel Wrapper */
.slick-carousel-wrapper {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    padding: 50px 0;
}

/* Slick Carousel Styles */
.slick-carousel {
    width: 100%;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Slick未初期化時のフォールバック */
.slick-carousel:not(.slick-initialized) {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.slick-carousel:not(.slick-initialized) .slide-item {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: center;
}

.slick-carousel .slick-slide {
    height: 300px;
    outline: none;
    padding: 0px;
}

.slide-item {
    position: relative;
    height: 300px;
}

.slide-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.slide-item:hover img {
    filter: grayscale(0%);
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
}

.home-page h3.slide-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.home-page p.slide-description {
    font-size: 15px;
    line-height: 1.7;
    color: #fff;
    margin: 0;
    letter-spacing: 1.2px;
}

/* Show Slick buttons */
.slick-prev,
.slick-next {
    z-index: 1;
}

.slick-prev {
    left: 25px;
}

.slick-next {
    right: 25px;
}

/* Slick dots */
.slick-dots {
    bottom: -40px;
}

.slick-dots li button:before {
    font-size: 12px;
}

.section_access hr {
    margin: 10px 0;
}

.traffic_method {
    margin-bottom: 10px;
}

.traffic_method_title {
    font-weight: 600;
}

.section_access p {
    line-height: 1.5;
}

.traffic_method p {
    line-height: 1.2;
}

.section_access hr,
hr.links_end {
    margin: 100px 0 0 0;
}

/* Access Section */
.section_access h2 {
    margin-top: -16px;
}

.section_links ul {
    list-style: none;
}

.section_links ul li {
    line-height: 1.4;
}

.section_links ul li a {
    color: #111111;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.section_links ul li a:hover {
    opacity: 0.7;
}

.link_inner_section hr {
    margin: 5px 0 10px 0;
}

.section_links .right-col hr {
    margin: 5px 0 10px 0;
    border: none;
    border-top: 1px solid #111;
}

/* Links Section */
.link_inner_section {
    margin-bottom: 20px;
}

.section_access .access_hr {
    margin: 10px 0;
}

.container.section_links {
    padding: 0 80px 100px 80px;
}

.section_links {
    padding: 40px 0;
    width: 100%;
}

.section_links .two-column {
    display: flex;
    gap: 50px;
    margin: 0 auto;
}

.footer-content .two-column {
    display: flex;
    gap: 50px;
}

.section_links h2 {
    margin-top: -16px;
}

/* Footer Styles */
.site-footer {
    background-color: #fff;
    padding: 60px 0 40px 0;
}

.site-footer .footer-content {
    width: 100%;
    padding: 0 80px;
}

.site-footer .two-column {
    display: flex;
    gap: 50px;
}

.footer-logo a {
    display: block;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.footer-logo a:hover {
    opacity: 0.7;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
}

.footer-logo p {
    font-size: 14px;
    color: #111111eb;
    line-height: 1.5;
    margin-bottom: 30px;
}

.footer-copyright p {
    font-size: 12px;
    color: #111111eb;
    margin: 0;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-navigation li {
    margin-bottom: 15px;
}

.footer-navigation a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.footer-navigation a:hover {
    opacity: 0.7;
}

/* Footer Logo */
.footer-logo {
    text-align: left;
}

.footer-logo p,
.footer-copyright {
    font-size: 11px;
    text-align: left;
}

.site-footer .left-col {
    width: 40%;
}

.site-footer .right-col {
    width: 60%;
}

ul#footer-menu {
    font-weight: 600;
    text-align: left;
    line-height: 13px;
}

@media (max-width: 768px) {
    .site-footer .two-column {
        /* flex-direction: column; */
        gap: 30px;
    }

    .site-footer .left-col {
        flex: none;
    }

  
}

/* Research Page */
#research_page h1,
#results_page h1,
#activity_page h1,
#members_page h1 {
    padding: 120px 80px 10px 80px;
}

hr.page_title_under_hr {
    border: none;
    border-bottom: 1px solid #111111eb;
    margin-top: -18px;
}

hr.research_hr {
    border: none;
    border-bottom: 1px solid #111111ed;
    padding-top: 100px;
    margin-bottom: 100px;
}

#research_page h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Research Page Flex Layout */
.research_flex {
    gap: 50px;
    align-items: stretch;
    justify-content: flex-start;
}

#research_page img {
    align-items: flex-start;
    border-radius: 0px 12px 0px 12px;
    filter: saturate(130%);
    flex: none;
    flex-direction: column;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 研究ページの画像ブロックの比率固定 */
#research_page .wp-block-image.research_img {
    width: 100%;
    max-width: 900px;
}

#research_page .wp-block-image.research_img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: 900/535;
}

#research_page p {
    line-height: 1.8;
}

/* 研究ページの2カラムレイアウト - 画像に合わせて高さ調整 */
#research_page .wp-block-columns {
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
}

#research_page .wp-block-column {
    display: flex;
    flex-direction: column;
}

/* 画像カラム - 画像サイズを維持 */
#research_page .wp-block-column:first-child {
    flex: 0 0 auto;
    max-width: 50%;
}

/* テキストカラム - 画像の高さに合わせて中央配置 */
#research_page .wp-block-column:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 30px;
}

/* 画像のレスポンシブ対応 */
#research_page .wp-block-column img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Student Recruitment Section - Generic for all page templates */
.template_page #wanted_student,
.research-page #wanted_student,
#research_page #wanted_student {
    background-color: #000 !important;
    padding: 40px !important;
    margin: 0 40px 100px 40px !important;
    border-radius: 12px !important;
}

.template_page #wanted_student h2,
.research-page #wanted_student h2,
#research_page #wanted_student h2 {
    color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.template_page #wanted_student .wanted_student_r_col p,
.template_page #wanted_student .wanted_student_r_col a,
.research-page #wanted_student .wanted_student_r_col p,
.research-page #wanted_student .wanted_student_r_col a,
#research_page #wanted_student .wanted_student_r_col p,
#research_page #wanted_student .wanted_student_r_col a {
    color: #fff !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
}

.template_page #wanted_student .flex,
.research-page #wanted_student .flex,
#research_page #wanted_student .flex {
    gap: 50px !important;
}

.template_page #wanted_student .flex.wrap_box,
.research-page #wanted_student .flex.wrap_box,
#research_page #wanted_student .flex.wrap_box {
    justify-content: space-between !important;
    margin-top: 15px !important;
    gap: 20px !important;
}

.template_page #wanted_student .flex.wrap_box>div,
.research-page #wanted_student .flex.wrap_box>div,
#research_page #wanted_student .flex.wrap_box>div {
    border: 1px solid #fff !important;
    width: 100% !important;
    cursor: pointer !important;
}

.template_page #wanted_student .flex.wrap_box>div:hover,
.research-page #wanted_student .flex.wrap_box>div:hover,
#research_page #wanted_student .flex.wrap_box>div:hover {
    color: #000 !important;
    background-color: #fff !important;
    transition: 0.3s ease !important;
}

.template_page #wanted_student .flex.wrap_box>div:hover p,
.template_page #wanted_student .flex.wrap_box>div:hover a,
.template_page #wanted_student .flex.wrap_box>div:hover button,
.research-page #wanted_student .flex.wrap_box>div:hover p,
.research-page #wanted_student .flex.wrap_box>div:hover a,
.research-page #wanted_student .flex.wrap_box>div:hover button,
#research_page #wanted_student .flex.wrap_box>div:hover p,
#research_page #wanted_student .flex.wrap_box>div:hover a,
#research_page #wanted_student .flex.wrap_box>div:hover button {
    color: #000 !important;
    transition: 0.3s ease !important;
}

.template_page #wanted_student .message_box,
.research-page #wanted_student .message_box,
#research_page #wanted_student .message_box {
    width: 100% !important;
    display: inline-block !important;
    text-align: center !important;
    padding: 5px !important;
    background: none !important;
    border: 1px solid #fff !important;
    color: #fff !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

/* Activity Page */
#activity_page h2 {
    font-size: 32px;
    font-weight: 600;
}

#activity_page h3 {
    font-size: 32px;
    font-weight: 600;
}

#activity_page .activity_page_flex {
    gap: 50px;
}

#activity_page .activity_page_flex img {
    margin-bottom: 12px;
}

#activity_page .term {
    justify-content: flex-start;
    gap: 0;
}

#activity_page .term_pdf_icon>img {
    width: 30px !important;
    margin-top: 10px;
}

#activity_page .term_pdf_icon>a>img {
    width: 30px !important;
    margin-top: 10px;
}

#activity_page p {
    line-height: 1.5;
}

#activity_page .activity_col>figure>img {
    height: 250px !important;
}

#activity_page hr.separator_line {
    margin: 35px 0 30px 0;
    border: none;
    border-top: 1px solid #111;
}

#activity_page p.summary {
    font-weight: 600;
}

#activity_page hr.content_separator {
    margin: 100px 0;
}

#activity_page img {
    width: 100% !important;
}

#activity_page .activity_col {
    padding: 12px;
    border: none !important;
    gap: 20px;
    margin-bottom: 20px;
}

#activity_page .activity_col hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #111;
}

#activity_page .activity_row {
    gap: 20px;
}

#members_page .members_hr {
    border: none;
    border-top: 1px solid #333;
    margin: 8px 0 10px 0;
}

#members_page p.introduction {
    line-height: 1.5;
    margin-bottom: 10px;
}

#members_page p.contact,
#members_page p.link {
    margin: 10px;
}

#members_page hr.member_hr {
    border: none;
    border-top: 1px solid #333;
    margin: 50px 0;
}

#members_page h2 {
    font-size: 32px;
    font-weight: 600;
    margin-top: -15px;
}

#members_page h2.font_cormorant_garamond {
    font-family: "Cormorant Garamond", serif;
}

#members_page .class_member {
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#members_page .class_member:hover {
    background-color: #000;
    color: #fff;
}

/* Members Page Hover Effects */
#members_page .class_member:hover * {
    color: #fff;
}

#members_page .class_member:hover hr,
#members_page .class_member:hover .members_hr {
    border-color: #fff;
}

#members_page .class_member:hover .material-symbols-outlined {
    color: #fff;
}

#members_page .member_name>strong {
    font-size: 20px;
    font-weight: 600;
}

#members_page .class_member p.contact {
    margin: 0;
}

#members_page .members_row {
    gap: 20px;
}

.container.new_single_post {
    padding-top: 0;
}

/*--------------------------------------------------------------
# Results Page
--------------------------------------------------------------*/
.results-container {
    display: flex;
    gap: 50px;
    margin-top: 40px;
}

.year-sidebar {
    width: 40%;
    flex-shrink: 0;
    max-width: 430px;
    border-right: 1px solid #333;
}

.year-item {
    padding-left: 10px;
    /* background: #f5f5f5; */
    /* margin-bottom: 10px; */
    cursor: pointer;
    font-size: 48px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s ease;
}

.year-item:hover {
    background: #333;
    color: #fff;
}

.year-item.active {
    background: #333;
    color: #fff;
}

.results-content {
    flex: 1;
    width: 60%;
}

.results-section {
    margin-bottom: 50px;
}

.results-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.result-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-month {
    width: 80px;
    flex-shrink: 0;
    font-weight: 500;
    color: #111;
}

.result-details {
    flex: 1;
}

.result-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-details .pdf-icon {
    font-size: 22px;
    margin-left: 5px;
    text-decoration: none;
    width: 39px;
}

#results_page .result-details .pdf-icon img {
    width: 22px !important;
    height: 22px !important;
}

.result-authors {
    font-size: 14px;
    color: #111;
    margin-bottom: 5px;
}

.result-journal {
    font-size: 14px;
    color: #111;
    font-style: italic;
    margin-bottom: 5px;
}

.result-doi {
    font-size: 14px;
    color: #111;
}

.result-doi a {
    color: #111;
    text-decoration: none;
}

.result-doi a:hover {
    text-decoration: underline;
}

/* Responsive for Results Page */
@media (max-width: 768px) {
    .results-container {
        gap: 20px;
    }

    .year-sidebar {
        max-width: 190px;
    }


    .year-item {
        flex: 1;
        min-width: 120px;
        text-align: left;
        margin-bottom: 0;
        font-size: 40px;
    }

    .result-item {
        flex-direction: column;
        gap: 10px;
    }

    .result-month {
        width: auto;
        font-size: 14px;
    }
}

/* Modal Section Title */
.modal-section-title {
    font-size: 20px;
    font-weight: 600;
}

/* Members page image effects */
#members_page .member_image img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    height: 100%;
    object-fit: cover;
    max-width: 600px;
    width: 100%;
    max-height: 450px;
}

#members_page .member_image:hover img {
    filter: grayscale(0%);
}

/* Senior Message Styles */
.senior-message-container {
    display: inline-block;
    margin: 10px 0;
}

.senior-message-trigger {
    width: auto;
    display: inline-block;
    text-align: center;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.senior-message-trigger:hover {
    transition: all 0.3s ease;
}

/* Senior Message Modal Styles */
.senior-message-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.senior-message-modal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    padding-bottom: 40px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.senior-message-modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.senior-message-modal .close:hover,
.senior-message-modal .close:focus {
    color: #000;
    text-decoration: none;
}

.senior-message-modal .modal-body {
    margin-top: 40px;
    line-height: 1.6;
    font-family: inherit;
    font-weight: normal;
}

.senior-message-modal .modal-body * {
    font-family: inherit;
    font-weight: normal;
}

.senior-message-modal .modal-section-title {
    margin-bottom: 10px;
    font-weight: normal;
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {

    /* Container padding adjustments */
    .container {
        padding: 100px 30px;
    }


    .container.section_links {
        padding: 0 30px 100px 30px;
    }

    .site-footer .footer-content {
        padding: 0 30px;
    }

    #research_page h1,
    #results_page h1,
    #activity_page h1,
    #members_page h1 {
        padding: 120px 30px 6px 30px;
    }

    /* Font size adjustments - 64px to 48px */
    h1,
    .home-page h2,
    #wanted_student h2,
    #activity_page h2,
    #members_page h2 {
        font-size: 24px;
    }

    #research_page .wp-block-column:last-child {
        padding-left: 0;
    }



    /* Font size adjustments - 32px to 24px */
    .home-page h3,
    #research_page h2,
    #activity_page h3,
    .slide-title {
        font-size: 24px;
    }

    #wanted_student {
        padding: 30px;
        margin: 0 30px 100px 30px;
    }

    #wanted_student .flex {
        gap: 30px;
    }

    #wanted_student .flex.wrap_box {
        gap: 12px;
        flex-wrap: wrap;
    }

    .slick-carousel .slick-slide {
        height: 200px;
    }

    .slide-item {
        height: 200px;
    }

    .slide-item img {
        height: 200px;
    }

    /* モバイル用フォールバックスタイル */
    .slick-carousel:not(.slick-initialized) .slide-item {
        width: 250px;
    }

    .slide-overlay {
        padding: 20px 15px 15px;
    }

    .home-page h3.slide-title {
        font-size: 24px;
    }

    .home-page p.slide-description {
        font-size: 15px;
        letter-spacing: 1.2px;
    }

    /* Slick carousel wrapper adjustment for mobile */
    .slick-carousel-wrapper {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 30px 0;
    }

    .header_wrap {
        margin: 0 30px;
    }

    .main-navigation a {
        font-size: 18px;
    }

    .language-switcher a,
    .language-switcher li a {
        font-size: 18px;

    }

    .language-switcher li:not(:last-child)::after {
        font-size: 14px;

    }

    .language-switcher {
        gap: 0;
    }

    hr.page_title_under_hr {
        margin-top: -10px;
    }

    .research_flex {
        gap: 30px;
    }

    #activity_page .activity_page_flex {
        gap: 30px;
        flex-direction: column;
    }

    

    .section_links .two-column,
    .footer-content .two-column {
        flex-direction: column;
        gap: 30px;
    }

}

@media (max-width: 782px) {
    #content #research_page .wp-block-columns:not(.is-not-stacked-on-mobile)>.research_page_left_col.wp-block-column {
        flex-basis: 40% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    #activity_page .activity_page_left_col {
        flex-basis: 40% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    #members_page .member_left_col {
        flex-basis: 40% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    .member_flex,
    .member_left_col {
        flex-wrap: nowrap !important;
    }

}

@media (max-width: 480px) {
    .hero-inner-msg {
        width: 100%;
        right: 0px;
        background-color: rgba(0, 0, 0, 0.7);
    }

    .hero-image {
        height: 350px;
        background-attachment: unset;
        background-position: unset;
    }

    img.custom-logo {
        max-width: 100px;
    }

    .header_wrap {
        margin: 0 15px;
    }

    .header-inner {
        height: 50px;
    }

    .home-page .flex {
        flex-wrap: wrap;
        gap: 15px;
    }

    .home-page .flex .left-col,
    .home-page .flex .right-col {
        width: 100%;
    }

    .hero-title {
        font-size: 18.5px;
        letter-spacing: 2px;
    }

    .view-more {
        font-size: 16px;
    }

    #all-posts-modal .modal-content,
    #student-message-modal .modal-content {
        max-width: 80%;
        width: 100%;
    }

    .modal-text p {
        line-height: 1.5;
    }

    .home-page p.slide-description {
        line-height: 1.5;
    }

    .container.section_access {
        padding-top: 80px;
    }

    .container.section_access>.flex {
        gap: 0;
    }

    div#google_map {
        margin-top: 10px;
    }

    .section_links .two-column,
    .footer-content .two-column {
        gap: 0;
    }

    .footer-content .two-column {
        display: block;
    }

    ul#footer-menu {
        display: flex;
        gap: 10px;
        margin-bottom: 30px;
    }

    .site-footer {
        padding-bottom: 50px;
    }

    .site-footer .left-col,
    .site-footer .right-col {
        width: 100%;
    }


    #wanted_student .left-col,
    #wanted_student .right-col {
        width: 100%;
    }

    #wanted_student .flex {
        flex-wrap: wrap;
    }

    .result-item {
        position: relative;
    }

    .result-details .pdf-icon {
        position: absolute;
        bottom: -6px;
        left: 0px;
        margin-top: 20px;
    }

    #results_page .result-details .pdf-icon img {
        margin-top: 50px;
        width: 27px !important;
        height: 27px !important;
        margin-left: -2px !important;
    }



    .result-details .pdf-icon {
        margin-left: 0;
    }

    .container.results-container {
        padding: 100px 30px 100px 0;
        margin-top: 0px;
    }

    .year-sidebar {
        max-width: 98px;
    }

    .year-item {
        min-width: 97px;
        font-size: 20px;
        padding: 4px 0;
        text-align: center;
    }

    #content #research_page .wp-block-columns:not(.is-not-stacked-on-mobile)>.research_page_left_col.wp-block-column {
        flex-basis: 100% !important;
    }

    /* タブレット・モバイル時のレイアウト調整 */
    #research_page .wp-block-columns {
        gap: 20px;
    }

    #research_page .wp-block-column:first-child {
        max-width: 60%;
    }

    #research_page .wp-block-column:last-child {
        padding-left: 20px;
    }
}

@media (max-width: 600px) {
    /* 小画面時のレイアウト調整 */
    #research_page .wp-block-columns {
        flex-direction: column;
        gap: 15px;
    }

    #research_page .wp-block-column:first-child {
        max-width: 100%;
    }

    #research_page .wp-block-column:last-child {
        padding-left: 0;
        justify-content: flex-start;
    }

    #research_page h1,
    #results_page h1,
    #activity_page h1,
    #members_page h1 {
        padding-top: 35px;
    }

    #activity_page .container {
        padding-top: 80px;
    }

    #activity_page .activity_page_flex {
        gap: 10px;
    }

    #activity_page .annual-report {
        flex-basis: 69px!important;
    }

    #activity_page .term_pdf_icon>a>img {
        margin-top: 3px;
    }

    #activity_page .term_pdf_icon>img {
        margin-top: 3px;
    }

    #members_page .member_flex {
        flex-wrap: wrap!important;
        gap: 30px;
    }

    #members_page .members_row {
        gap: 0;
    }

    
}

@media (max-width: 480px) {
h1 {
        font-size: 48px;
    }
.home-page h2, #wanted_student h2, #activity_page h2, #members_page h2 {
        font-size: 48px;
    }
}

.senior-advice {
    margin-top: 21px;
    gap: 9px;
}

.senior-advice p {
    margin: 0;
    font-weight: 600;
}