/*
 Theme Name: Lightning Keio Reap
 Template: lightning
 Description: Lightning Child Theme for Keio Leap
 Author: Vektor,Inc.
 Author URI: http://www.vektor-inc.co.jp
 Tags: lightning-child
 Version: 0.1.0
 */

/* News List Styling */
.news-section {
    margin-bottom: 2em;
}

.news-title {
    font-size: 1.5rem;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-item {
    border-bottom: 1px deferred #eee;
    padding: 0.5em 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.news-date {
    margin-right: 10px;
    font-size: 0.9rem;
    color: #666;
}

.news-category {
    white-space: nowrap;
}

.news-list-item a {
    color: inherit;
    text-decoration: none;
}

.news-list-item a:hover {
    text-decoration: underline;
}

/* FAQ Accordion Styling */
.vk_faq .vk_faq_content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0 !important;
}

.vk_faq.is-active .vk_faq_content {
    max-height: 1000px;
    /* Adjust as needed */
    padding-top: 1em;
    padding-bottom: 1em;
}

.vk_faq_title {
    position: relative;
    padding-right: 30px !important;
    padding-bottom: 0.5em !important;
    margin-bottom: 0 !important;
    cursor: pointer;
    border-bottom: none !important;
}

.vk_faq {
    margin-bottom: 0.5em !important;
    padding: 10px !important;
}

.vk_faq_title::after {
    content: '+';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.vk_faq.is-active .vk_faq_title {
    border-bottom: 1px solid #eee !important;
}

.vk_faq.is-active .vk_faq_title::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

/* Hide footer credits */
.site-footer-copyright p:nth-child(n+2),
.site-footer-copyright .powered-by,
.site-footer .poweredBy,
footer .poweredby,
footer address,
.siteFooter-copyRight p:nth-child(n+2),
#footer-copy p:nth-child(n+2),
.vk-footer-credits {
    display: none !important;
}

.footer-nav-list {
    text-align: center;
}

.footer-logo img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

.min-container {
    max-width: 900px;
    margin: 0 auto;
}

/* 画面端まで広げるクラス */
.full-width-bg {
    padding-top: 1px;
    margin-right: calc(50% - 50vw) !important;
    margin-left: calc(50% - 50vw) !important;
    padding-right: calc(50vw - 50%) !important;
    padding-left: calc(50vw - 50%) !important;
    width: auto !important;
    background-image: linear-gradient(#f1f7ff 1px, transparent 1px), linear-gradient(90deg, #edf2fc 1px, transparent 1px);
    background-size: 10px 10px;
    background-color: #fefefe;
}

/* 画面端まで広げるクラス2 */
.full-width-bg2 {
    padding-top: 1px;
    margin-right: calc(50% - 50vw) !important;
    margin-left: calc(50% - 50vw) !important;
    padding-right: calc(50vw - 50%) !important;
    padding-left: calc(50vw - 50%) !important;
    width: auto !important;
    background-color: #F2F6F8;
}

.faq-box {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 1px 1px 20px #eee;
}

.curriculum-box {
    width: 100%;
    background: #fafafa;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: calc(1em - 1px);
}

.faculty-list p,
.curriculum-box p {
    margin: 0;
    margin-block-end: 0 !important;
}

.curriculum-box p:not(:last-child) {
    margin-bottom: 2px !important;
}

.curriculum-box p:nth-of-type(1) {
    background: #eee;
    display: inline-block;
    padding: 3px 6px;
    font-size: .7em;
    line-height: 1;
}

.curriculum-box p:nth-of-type(2) {
    font-weight: 700;
    letter-spacing: .06em;
    padding: 2px 0;
}

.curriculum-box p:nth-of-type(3) {
    font-weight: 300;
    font-size: .9em;
    letter-spacing: .06em;
}

/* Graduate Voice Modal Styles */

/* Hide the source text columns */
.user-voice-txt {
    display: none !important;
}

/* Cursor indicator for triggers */
.user-voice>.wp-block-column {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Add spacing between image and name */
.user-voice>.wp-block-column img {
    margin-bottom: 10px;
}

.user-voice>.wp-block-column:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

/* Name Paragraph (1st paragraph) styling */
.user-voice>.wp-block-column p:nth-of-type(1) {
    margin-bottom: 0.2em !important;
    /* Force reduce bottom margin */
    font-weight: bold;
    /* Often name is bold, adding just in case or leaving as is if not requested? user just said margin. */
}

/* Reduce font size for Title/Organization (2nd paragraph) */
.user-voice>.wp-block-column p:nth-of-type(2) {
    font-size: 0.75em;
    /* 70% size */
    line-height: 1.4;
    margin-top: 0;
    /* Remove top margin to pull it closer to name if needed, or keep small */
}

/* Responsive Columns for Graduate Voices */
/* Override WP default stacking behavior below 782px usually */
@media (max-width: 781px) {
    .wp-block-columns.user-voice {
        flex-wrap: wrap !important;
        display: flex !important;
        justify-content: center !important;
        /* Center items for odd numbers */
        gap: 20px !important;
        /* Optional spacing */
    }

    .user-voice>.wp-block-column {
        flex-basis: calc(33.33% - 20px) !important;
        /* 3 columns logic */
        max-width: calc(33.33% - 20px) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Remove default WP margins that might interfere */
    .user-voice>.wp-block-column:not(:first-child) {
        margin-left: 0 !important;
    }
}

/* Smartphone: 2 columns */
@media (max-width: 480px) {
    .user-voice>.wp-block-column {
        flex-basis: calc(50% - 15px) !important;
        /* 2 columns logic */
        max-width: calc(50% - 15px) !important;
    }
}

/* Modal Overlay */
.graduate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.graduate-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Container */
.graduate-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 900px;
    /* Wide enough for side-by-side on desktop */
    max-height: 90vh;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

/* Close Button */
.graduate-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 10;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.graduate-modal-close:hover {
    color: #000;
}

/* Modal Body */
.graduate-modal-body {
    overflow-y: auto;
    padding: 40px;
}

/* Inner Layout (Image + Text) */
.graduate-modal-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .graduate-modal-inner {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Image in Modal */
.graduate-modal-image-wrapper {
    flex: 0 0 300px;
    /* Fixed width for image column on desktop */
    max-width: 100%;
}

.graduate-modal-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* Text in Modal */
.graduate-modal-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.graduate-modal-text p {
    margin-bottom: 1.5em;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .graduate-modal-body {
        padding: 25px;
    }

    .graduate-modal-image-wrapper {
        flex: none;
        width: 150px;
        margin: 0 auto;
    }

    .graduate-modal-inner {
        text-align: left;
    }
}

/* Curriculum Grid Styling */
.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .curriculum-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Smartphone (max-width: 600px) */
@media (max-width: 600px) {
    .curriculum-grid {
        grid-template-columns: 1fr;
    }
}

/* Faculty List Styling */
.faculty-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.faculty-member img {
    width: 350px;
    max-width: 100%;
}

.faculty-member p:nth-of-type(3) {
    background: #ddd;
    display: inline-block;
    padding: 6px;
    font-size: .7em;
    line-height: 1;
}

/* Graduate Voice Modal Text Adjustments */
.graduate-modal-text p:nth-of-type(1) {
    margin-bottom: 0.2rem;
    font-weight: bold;
}

.graduate-modal-text p:nth-of-type(2) {
    font-size: 0.8em;
    margin-top: 0;
}

/* Enhance Graduate Voice Clickability */
.user-voice>.wp-block-column {
    position: relative;
    padding: 10px;
    /* Add some padding for visual target */
    border-radius: 8px;
    /* Smooth corners */
    transition: all 0.3s ease;
    /* Smooth transition */
    background-color: #fff;
    /* Explicit white background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Subtle shadow by default */
    cursor: pointer;
    /* Explicit pointer */
}

/* Hover state enhancement */
.user-voice>.wp-block-column:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Stronger shadow on hover */
    transform: translateY(-5px);
    /* Lift effect */
    background-color: #fdfdfd;
    /* Very subtle background shift */
}

/* Optional: Add a 'View Detail' icon or overlay on the image if possible with pseudo-elements */
.user-voice>.wp-block-column::after {
    content: '';
    /* Empty by default */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    pointer-events: none;
    /* Let clicks pass through */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-voice>.wp-block-column:hover::after {
    opacity: 1;
}

/* Add hover text overlay */
.user-voice>.wp-block-column::before {
    content: 'タップして受講生の声を読む';
    /* Tap to read... (for mobile/tablet) */
    position: absolute;
    bottom: 20px;
    /* Position at bottom */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 50, 100, 0.8);
    /* Dark blue-ish semi-transparent bg */
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Change text to "クリックして" on PC */
@media (min-width: 768px) {
    .user-voice>.wp-block-column::before {
        content: 'クリックして受講生の声を読む';
    }
}

.user-voice>.wp-block-column:hover::before {
    opacity: 1;
    bottom: 30px;
    /* Slight lift up on hover */
}

/* Global Navigation - Override for current-page-ancestor and current-page-parent */
.global-nav-list>li.current-page-ancestor:hover:before,
.global-nav-list>li.current-page-ancestor[class*=current]:before,
.global-nav-list>li.current-page-parent:hover:before,
.global-nav-list>li.current-page-parent[class*=current]:before {
    width: 0% !important;
}

/* Override parent theme styles for outline style text */
.has-text-color.is-style-outline {
    background-color: #FFF !important;
}

.has-text-color.is-style-outline:hover {
    background-color: #FFF !important;
    color: inherit !important;
}

.has-text-color.is-style-outline:hover * {
    color: inherit !important;
}

/* Override FAQ Q color */
.vk_faq .vk_faq_title:before {
    color: #003264 !important;
}

/* Faculty Title Styling */
.faculty-title {
    font-size: 0.7em;
    color: #666;
    margin-top: 0.3em;
    line-height: 1.4;
    padding: 5px 10px;
}

/* Faculty Modal Code-Theme Styling */
.modal-code-theme {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    flex-wrap: wrap;
}

.modal-code-theme .modal-code,
.modal-code-theme .modal-theme {
    display: inline-block;
}

/* Faculty Modal Name Styling */
.modal-name {
    border-bottom: none;
}

/* Faculty Modal Title Styling */
.modal-title {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1em;
    margin-bottom: 1em;
}

/* Faculty Modal Profile Styling */
.modal-profile {
    font-size: 0.85em;
    line-height: 1.6;
}

/* Faculty Modal Overlay */
.faculty-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Faculty Modal Content */
.faculty-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.faculty-modal-content::-webkit-scrollbar {
    display: none;
}

/* Modal Data Wrapper */
.modal-data {
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal-data::-webkit-scrollbar {
    display: none;
}

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.faculty-item {
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}

.faculty-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faculty-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.faculty-name-label {
    padding: 10px;
    font-weight: bold;
    font-size: 0.95rem;
}

/* Modal */
.faculty-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.faculty-modal-overlay.active {
    display: flex;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-data p {
    margin: 10px 0;
    line-height: 1.6;
}

.modal-name {
    font-size: 1.4em;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px !important;
}

.modal-code {
    display: inline-block;
    background: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.modal-theme {
    font-weight: bold;
    color: #333;
}