@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css");
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@100;200;300;400;500;600;700;800&display=swap');

/* Variables */
:root {
    --primary-color: #f14f00;
    --secondary-color: #1b1b1b;
    --light-color: #fff5f2;
    --transition-time: 0.3s;
    --ss-color: #4a1a6b;
    --gr-color: #b8860b;
    --gc-color: #2e7d32;
}

/* Body */
body {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all var(--transition-time) ease;
}

a:hover {
    color: #0d6efd;
}

/* Buttons */
.btn {
    font-size: 14px;
    padding: 12px 30px !important;
    font-weight: 600;
}

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

.btn-primary:hover, .btn-primary:focus {
    background: #e14a00;
    border-color: #e14a00;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.shadow {
    box-shadow: 0 10px 40px 0 rgba(47,47,47,.1) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Navbar */
.app-nav a.nav-link.py-4 {
    padding-top: 35px !important;
    padding-bottom: 35px !important;
    color: #000;
    font-size: 15px;
}

.app-nav .navbar-nav .nav-link:hover,
.app-nav .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown:hover>.dropdown-menu {
    display: block;
    animation: dropdown-show 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes dropdown-show {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-menu:hover .dropdown-item {
    opacity: 0.6;
}

.dropdown-menu .dropdown-item:hover {
    opacity: unset;
    font-weight: 500;
}

.dropdown-item {
    transition: all 0.2s ease-in-out;
    padding-right: 40px;
}

.dropdown-item:hover {
    transform: translateX(3px);
}

.dropdown-item:after {
    content: "\ea6c";
    font-family: remixicon!important;
    position: absolute;
    right: 0;
    font-size: 14px;
    line-height: 24px;
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown-item:hover:after {
    opacity: unset;
}

/* Back To Top */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 10px 40px 0 rgba(47,47,47,.1) !important;
    background-color: #fff;
    color: #2d2a3e;
    width: 50px;
    border-radius: 100px;
    cursor: pointer;
    height: 50px;
    border: 3px solid #ebebeb;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 14px;
    z-index: 999;
}
#back-to-top:hover {
    box-shadow: 0 10px 40px 0 rgba(47,47,47,.1) !important;
    background-color: #2d2a3e;
    color: #ffffff;
}

/* Sidebar */
#sidebar .offcanvas-header .link-light {
    color: #000 !important;
}

#sidebar .offcanvas-body .nav-item .nav-link {
    text-align: center;
    padding: 15px 20px !important;
}

/* Page Loading */
.page-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all .4s .2s ease-in-out;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

.page-loading.active {
    opacity: 1;
    visibility: visible;
}

.page-loading-inner {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    transform: translateY(-50%);
    transition: opacity .2s ease-in-out;
    opacity: 0;
}

.page-loading.active > .page-loading-inner {
    opacity: 1;
}

.page-spinner {
    display: inline-block;
    width: 2.75rem;
    height: 2.75rem;
    background-color: #d7dde2;
    border-radius: 50%;
    opacity: 0;
    animation: spinner .75s linear infinite;
}

@keyframes spinner {
    0% {
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: none;
    }
}

/* Centering */
.center-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-fluid-2 {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.highlighted-text {
    padding-top: 25px;
    font-size: 1rem;
    text-align: left;
    line-height: 2;
}

span {
    font-weight: bold;
}

#custom-section {
    padding: 1px;
    margin: 20px auto;
    border-radius: 10px;
    max-width: 800px;
    text-align: left;
}

#custom-section .text-contents {
    padding-bottom: 20px;
    padding-top: 0px;
    font-size: 1.25em;
    color: var(--secondary-color);
    line-height: 1.5;
}

/* Scenario Background */
.bg_ss {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a0a2e 100%);
}
.bg_gr {
    background: linear-gradient(135deg, #b8860b 0%, #8b6508 100%);
}
.bg_gc {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.bg_rgba {
    background-color: rgba(255,255,255,.8)!important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
}

.hero-section .book-cover {
    max-width: 400px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
}

.hero-tagline {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

/* Scenario Cards */
.scenario-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 96%;
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.scenario-card .card-header {
    border-bottom: none;
    padding: 20px;
}

.scenario-card .card-body {
    padding: 25px;
}

.scenario-card .card-body ul {
    padding-left: 20px;
}

.scenario-card .card-body ul li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Scenario Chart */
.scenario-chart-section {
    padding: 40px 0;
}

.scenario-chart-section img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* New Feature Badge */
.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #f14f00);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.topic-item {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    border-left: 3px solid var(--primary-color);
}

/* TOC Part Header */
.toc-part-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, #1b1b1b 0%, #333 100%);
    border-radius: 10px;
    color: #fff;
}

.toc-part-label {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 20px;
    border: 2px solid #fff;
    border-radius: 6px;
    white-space: nowrap;
}

.toc-part-title {
    font-size: 1.3rem;
    font-weight: 700;
}

/* TOC Section */
.toc-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding: 10px 16px;
    background: #f0f0f0;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 6px 6px 0;
    color: var(--secondary-color);
}

.toc-section ul {
    padding-left: 0;
}

/* toc-titleを持つliのドットを消す */
li:has(> .toc-title) {
    list-style: none;
}

/* n-n 形式のタイトル装飾 */
.toc-title {
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.6;
    background: #faf6f2;
    border-left: 3px solid #b8860b;
    border-radius: 0 4px 4px 0;
}

.toc-section ul {
    padding-left: 1.2rem;
}

.toc-section ul li {
    margin-bottom: 3px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.toc-section ul ul {
    margin-top: 3px;
}

/* Cards Image Section */
.cards-image-section img {
    max-width: 100%;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section .book-cover {
        max-width: 280px;
        margin-bottom: 30px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .scenario-card {
        margin-bottom: 20px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }
}
