/* ========================================
   Series Page Styles
   ======================================== */

/* Series Hero */
.series-hero {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.series-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.series-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.series-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-white);
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--text-white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.series-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.series-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.series-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.series-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.series-meta-item i {
    font-size: 1.2rem;
}

/* Series Navigation */
.series-navigation {
    padding: 2rem 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid rgba(0, 71, 171, 0.1);
}

.series-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.2);
}

.series-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 71, 171, 0.3);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.series-nav-btn i {
    font-size: 1.2rem;
}

/* Series Overview */
.series-overview {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.overview-content h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.overview-content h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin: 2rem 0 1rem;
}

.overview-content p {
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dark);
}

.checklist li i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

/* Instructor Card */
.instructor-card {
    background-color: var(--light-blue);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.instructor-card h3 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.instructor-profiles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 0;
}

.instructor-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.instructor-image {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background-color: var(--bg-white);
    position: relative;
    z-index: 1;
}

.instructor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    position: relative;
    z-index: 1;
}

/* Individual instructor image positioning - perfectly centered */
.img-tanaka,
.img-nakamura,
.img-maeno,
.img-adachi {
    object-fit: cover;
    object-position: center center;
    transform: scale(1.0);
}

/* 岡崎先生の写真：頭が切れないよう上寄せ */
.instructor-image .img-okazaki {
    object-fit: cover;
    object-position: center top;
}

/* 小野先生の写真：頭が切れないよう上寄せ */
.instructor-image .img-ono {
    object-fit: cover;
    object-position: center top;
}

.instructor-info {
    width: 100%;
    position: relative;
    z-index: 1;
}

.instructor-info h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.instructor-title {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0;
}

.instructor-divider {
    display: none;
}

.instructor-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 71, 171, 0.15);
    font-style: italic;
}

/* Course Selection */
.course-selection {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.course-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.course-tab {
    padding: 1.5rem 2rem;
    background-color: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.course-tab-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.course-tab-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    position: relative;
}

.course-tab-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-tab-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.7;
}

/* Course Badges */
.course-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-family {
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC371 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.badge-adult {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.course-tab.is-active .course-badge,
.course-tab.active .course-badge {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.course-tab.is-active .badge-family,
.course-tab.active .badge-family {
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC371 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: 2px solid #FF6B9D;
}

.course-tab.is-active .badge-adult,
.course-tab.active .badge-adult {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: 2px solid #667EEA;
}

.course-tab:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Entry Tab (Active - Green) */
.course-tab.is-active,
.course-tab.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.7), rgba(102, 187, 106, 0.7));
    border-color: var(--accent-green);
    color: var(--text-white);
    cursor: pointer;
}

/* Disable hover effect for active entry tab */
.course-tab.is-active:hover,
.course-tab.active:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.7), rgba(102, 187, 106, 0.7));
    border-color: var(--accent-green);
    transform: none;
    box-shadow: none;
}

.course-tab.is-active .course-tab-icon,
.course-tab.active .course-tab-icon {
    color: var(--text-white);
}

/* Beginner Tab (Link Style) */
.course-tab-link {
    text-decoration: none;
}

/* Non-active (unselected) course tab - slightly dimmed */
.course-tab:not(.active) {
    opacity: 0.85;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-tab:not(.active):hover {
    opacity: 1;
    filter: none;
}

/* Beginner Tab (Inactive - Light Blue) */
.course-tab.beginner-tab {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.6), rgba(66, 165, 245, 0.6));
    border: 2px solid rgba(30, 136, 229, 0.8);
}

/* Beginner Tab (Hover - Darker Blue) */
.course-tab.beginner-tab:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1976D2 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.5);
    opacity: 1;
    filter: grayscale(0%);
}

.course-tab.beginner-tab .course-tab-icon {
    color: rgba(255, 255, 255, 0.95);
}

.course-tab.beginner-tab .course-tab-title {
    color: var(--text-white);
}

.course-tab.beginner-tab .course-tab-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.course-content {
    display: none;
}

.course-content.is-active,
.course-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.course-content[hidden] {
    display: none !important;
}

/* Active tab styling */
.course-tab.is-active {
    cursor: default;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.course-tab.is-active:hover {
    transform: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.course-notice p {
    margin: 0;
    color: #e65100;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.7;
}

.course-notice i {
    color: #ff9800;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.course-description {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.course-description h3 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.course-description p {
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.course-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.course-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.course-info i {
    font-size: 1.1rem;
}

/* Video List */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-item {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.video-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(5px);
}

.video-number {
    min-width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    padding: 0.5rem;
}

.video-info {
    flex: 1;
}

.video-info h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.video-meta i {
    margin-right: 0.3rem;
}

.video-btn {
    padding: 0.8rem 2rem;
    background-color: var(--primary-blue);
    color: var(--text-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.video-btn:hover {
    background-color: var(--dark-blue);
    transform: scale(1.05);
}

.video-btn i {
    font-size: 1rem;
}

/* Video Button Actions */
.video-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.video-btn-trial {
    padding: 0.8rem 2rem;
    background-color: #E91E63;
    color: var(--text-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.video-btn-trial:hover {
    background-color: #C2185B;
    transform: scale(1.05);
}

.video-btn-paid {
    padding: 0.8rem 2rem;
    background-color: var(--primary-blue);
    color: var(--text-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.video-btn-paid:hover {
    background-color: var(--dark-blue);
    transform: scale(1.05);
}

/* E-learning Notice */
.elearning-notice {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--accent-orange);
}

.notice-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.notice-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.notice-text {
    text-align: center;
}

.notice-text p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
    line-height: 1.8;
}

.notice-text i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.notice-text-only {
    text-align: center;
}

.notice-text-only p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
    line-height: 1.8;
}

.notice-text-only i {
    color: var(--accent-orange);
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn.primary {
    background-color: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--bg-white);
}

.cta-btn.primary:hover {
    background-color: transparent;
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-btn.secondary {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.cta-btn.secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .instructor-card {
        position: static;
    }

    .series-title {
        font-size: 2.5rem;
    }

    .video-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .video-btn {
        width: 100%;
        justify-content: center;
    }

    .video-actions {
        width: 100%;
        flex-direction: column;
    }

    .video-btn-trial,
    .video-btn-paid {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .series-hero {
        height: 200px;
    }

    .series-title {
        font-size: 1.5rem;
    }

    .series-subtitle {
        font-size: 0.95rem;
    }

    .series-meta {
        gap: 1rem;
    }

    .series-meta-item {
        font-size: 0.9rem;
    }

    .series-nav-btn {
        font-size: 1rem;
        padding: 0.9rem 2rem;
    }

    .course-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .course-tab {
        padding: 1rem 2rem;
    }

    .course-notice {
        padding: 1.2rem 1.5rem;
        font-size: 0.95rem;
    }

    .video-number {
        min-width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }

    .video-info h4 {
        font-size: 1.1rem;
    }

    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .instructor-profiles-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .instructor-image {
        width: 130px;
        height: 130px;
    }

    .instructor-info h4 {
        font-size: 1.1rem;
    }

    .instructor-title {
        font-size: 0.8rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-btn {
        width: 100%;
    }

    .elearning-notice {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .notice-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .series-hero {
        height: 250px;
    }

    .series-title {
        font-size: 1.5rem;
    }

    .series-subtitle {
        font-size: 1rem;
    }

    .series-overview,
    .course-selection,
    .cta-section {
        padding: 3rem 0;
    }

    .course-description {
        padding: 1.5rem;
    }

    .course-description h3 {
        font-size: 1.5rem;
    }

    .video-item {
        padding: 1.5rem;
    }
}

/* Profile Popup Styles */
.instructor-profile {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0s;
    z-index: 1;
}

.instructor-profile:hover {
    transform: translateY(-3px);
    z-index: 999997;
}

/* Overlay background */
.profile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.instructor-profile:hover .profile-popup-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Popup - fixed center position */
.profile-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-white);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 2rem;
    margin: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.instructor-profile:hover .profile-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.profile-popup-content h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.profile-popup-content .profile-reading {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
}

.profile-popup-content .profile-position {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.profile-popup-content .profile-bio {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
    white-space: pre-line;
}

.profile-popup-content .profile-note {
    font-size: 0.8rem;
    color: #FF0000;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 71, 171, 0.15);
    line-height: 1.6;
}

.profile-popup-content .profile-book {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-top: 0.5rem;
    font-style: italic;
}

.profile-popup-content .profile-link {
    color: var(--primary-blue);
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.3s ease;
}

.profile-popup-content .profile-link:hover {
    color: var(--accent-green);
    text-decoration: none;
}

/* Responsive popup */
@media (max-width: 768px) {
    .profile-popup {
        width: 450px;
        max-width: 92vw;
        padding: 1.75rem;
    }
    
    .profile-popup-content h5 {
        font-size: 1rem;
    }
    
    .profile-popup-content .profile-bio {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .profile-popup {
        width: 350px;
        max-width: 92vw;
        padding: 1.5rem;
    }
    
    .profile-popup-content h5 {
        font-size: 0.95rem;
    }
    
    .profile-popup-content .profile-bio {
        font-size: 0.8rem;
    }
    
    .profile-popup-content .profile-link {
        font-size: 0.75rem;
    }
}
