:root {
    /* Colors - Light Theme */
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-primary: #6200ea;
    /* Deep Purple */
    --color-secondary: #9d46ff;
    /* Lighter Purple */
    --color-accent: #00bfa5;
    /* Teal accent */
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-border: #e1e4e8;

    /* Typography */
    --font-main: 'Inter', 'Noto Sans JP', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    color: #ffffff;
    /* Default text color for subpages (transparent header) */
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--color-text);
    /* Revert to dark text on scroll */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    /* Default white logo */
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.site-header.scrolled .logo,
.home-page .site-header .logo {
    color: var(--color-primary);
    /* Primary color logo on scroll or home page */
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: inherit;
    /* Inherit from header color */
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: rgba(255, 255, 255, 0.8);
}

.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active,
.home-page .site-header .main-nav a:hover,
.home-page .site-header .main-nav a.active {
    color: var(--color-primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    /* White underline by default */
    transition: width 0.3s ease;
}

.site-header.scrolled .main-nav a::after,
.home-page .site-header .main-nav a::after {
    background-color: var(--color-primary);
    /* Primary underline on scroll or home page */
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    /* White hamburger by default */
    transition: 0.3s;
}

.site-header.scrolled .mobile-menu-toggle span,
.home-page .site-header .mobile-menu-toggle span {
    background-color: var(--color-text);
    /* Dark hamburger on scroll or home page */
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../image/background.png') center center / cover no-repeat;
    overflow: hidden;
}

/* .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.8) 0%, rgba(195, 207, 226, 0.8) 100%);
} */

.hero-content {
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fade-up 1s ease forwards 0.5s;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #00FFFF;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(98, 0, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 0, 234, 0.5);
}

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

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-accent {
    background: linear-gradient(90deg, #ff9100, #ff3d00);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3);
    border: none;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 61, 0, 0.5);
    color: #fff;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #00FFFF;
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background-color: #00FFFF;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-text);
}

.section-description {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

/* About Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* News Section */
.news-list {
    max-width: 800px;
    margin: 0 auto 40px;
}

.news-item {
    display: flex;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s ease;
}

.news-item:hover {
    background-color: rgba(98, 0, 234, 0.03);
}

.news-item time {
    width: 120px;
    color: var(--color-primary);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.news-item a {
    flex: 1;
    font-weight: 500;
    color: var(--color-text);
}

.news-item a:hover {
    color: var(--color-primary);
}

.view-more {
    text-align: center;
}

/* Footer */
.site-footer {
    background-color: #0f172a;
    /* Option 2: Midnight Blue */
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 1px solid var(--color-border);
    color: #ffffff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Subpage Styles */
.page-hero {
    background: linear-gradient(90deg, #6200ea, #9d46ff);
    /* Option 2: Purple Gradient */
    padding: 120px 0 60px;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.breadcrumbs {
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-primary);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .current-page {
    color: #e65100;
    font-weight: 600;
}

.content-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-text);
}

.content-body h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--color-primary);
}

.content-body p {
    margin-bottom: 20px;
}

.content-body ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.content-body li {
    margin-bottom: 10px;
}

.content-body figure {
    margin: 40px 0;
    text-align: center;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.content-body figcaption {
    margin-top: 10px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.link-list {
    margin-top: 20px;
}

.link-list a {
    display: block;
    padding: 10px 0;
    color: var(--color-primary);
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
}

.link-list a:hover {
    padding-left: 10px;
    background-color: rgba(98, 0, 234, 0.05);
}

/* Training Page Styles */
.training-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background-color: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.training-table th,
.training-table td {
    padding: 15px;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: middle;
}

.training-table th {
    background-color: rgba(98, 0, 234, 0.05);
    color: var(--color-primary);
    font-weight: 600;
}

.training-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

.training-chapter-title {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-size: 1.1rem;
}

.training-chapter-title h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
}

.training-chapter-title a {
    color: #fff;
    text-decoration: underline;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.file-link.pdf {
    background-color: #fff3e0;
    color: #e65100;
}

.file-link.pdf:hover {
    background-color: #ffe0b2;
}

.file-link.movie {
    background-color: #e3f2fd;
    color: #1565c0;
}

.file-link.movie:hover {
    background-color: #bbdefb;
}

/* Standard Page Styles */
.standard-list {
    list-style: none !important;
    padding: 0;
}

.standard-list>li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.standard-list>li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.standard-sublist {
    list-style: none !important;
    padding-left: 20px;
    margin-top: 10px;
}

.standard-sublist li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.standard-sublist li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-new {
    background-color: #ff6b6b;
    color: #fff;
}

/* Accordion Styles */
.accordion {
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background-color: var(--color-surface);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background-color: rgba(98, 0, 234, 0.05);
}

.accordion-header::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--color-primary);
    transition: transform 0.3s;
}

.accordion.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
    max-height: 10000px;
}

.accordion-body {
    padding: 20px;
    background-color: var(--color-bg);
}

/* Case Hub Grid */
.case-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.case-card {
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

.case-card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.case-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.case-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-text {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .news-item {
        flex-direction: column;
        gap: 5px;
    }

    .special-features-grid {
        grid-template-columns: 1fr;
    }
}

/* Home Page Specific Styles */
.home-page .site-header {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    /* Override gradient */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: var(--color-text);
    /* Force dark text on home page initial state */
}

.home-page .site-header.scrolled {
    position: fixed;
    top: 0;
    transform: none;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

.home-page .hero h1 {
    display: none;
}

.home-page .hero-content {
    padding-top: 160px;
    /* Push content down below the centered header */
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Special Features Section */
.special-features-section {
    background-color: var(--color-bg);
}

.special-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.special-feature-card {
    background-color: transparent;
    /* No background card style */
    border: none;
    /* No border */
    box-shadow: none;
    /* No shadow */
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-family: monospace;
}

.feature-category {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background-color: #ffd700;
    /* Yellow highlight */
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-topic {
    background-color: #ffd700;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
}

.feature-body {
    display: flex;
    gap: 15px;
}

/* Layout adjustment: Category on the left of the image/content */
.special-feature-card {
    flex-direction: row;
    align-items: flex-start;
}

.feature-header {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    margin-right: 15px;
    width: 30px;
    /* Fixed width for the side bar */
}

.feature-category {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background-color: transparent;
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
    height: auto;
    margin-bottom: 5px;
}

.feature-category::before {
    content: '●';
    color: #ffd700;
    font-size: 0.8rem;
    margin-bottom: 5px;
    display: block;
}

.feature-topic {
    background-color: #ffd700;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    writing-mode: horizontal-tb;
}

.feature-body {
    flex-direction: column;
    flex: 1;
    gap: 15px;
}

.feature-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.feature-text h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--color-text);
    font-weight: 700;
}

.feature-subtitle {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.feature-tags .tag {
    background-color: #f0f0f0;
    color: var(--color-text);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.special-feature-card time {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Feature Page Category Colors */
.feature-category.overview::before {
    color: #FFD700;
    /* Yellow */
}

.feature-category.report::before {
    color: #C71585;
    /* Red-Purple */
}

.feature-category.tutorial::before {
    color: #008000;
    /* Green */
}

.feature-category.overview {
    color: #000;
}

.feature-category.report {
    color: #000;
}

.feature-category.tutorial {
    color: #000;
}

/* Feature Search Styles */
.feature-search-container {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.search-bar {
    width: 100%;
    max-width: 600px;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background-color: transparent;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--color-surface);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Hidden state for filtering */
.special-feature-card.hidden {
    display: none;
}