/* ==========================================================================
   Images & Final CTA Styles
   ========================================================================== */

/* --- Body Global Background --- */
/* We add a subtle pattern to the body. Both modes use the same image, but dark mode blends. */
body.light-mode {
    background-image: url('../images/明るい石積み壁.webp');
    background-size: 200px;
    background-attachment: fixed;
}

body.dark-mode {
    background-image: url('../images/ChatGPT_Image_2026_02_28.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Remove background-blend-mode to make the image visible */
    background-color: transparent;
}

/* --- Hero Section Overrides --- */
.hero-section {
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 4px solid var(--color-border);
    /* Fill any leftover space (if aspect ratio leaves gaps) with the exact yellow from the image */
    background: #ffdf00 !important;
}

.hero-picture {
    width: 100%;
    display: block;
}

.hero-main-img {
    width: 100%;
    /* Keep it cover to ensure absolutely no white spaces left and right */
    object-fit: cover;
    /* Optional: Provide a fixed or minimum height so it doesn't get too thin on wide screens, but height:auto works for full image */
    height: auto;
    display: block;
}

.hero-action-container {
    width: 100%;
    padding: 3rem 0;
    /* Change background to fit AI images' yellow pop */
    background-color: #ffdf00;
}

/* --- Manga Slider (Auto scroll + drag) --- */
.manga-slider-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 14px 0 18px;
    border-top: 2px dashed var(--color-border);
}

.manga-slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    touch-action: pan-y;
    user-select: none;
}

.manga-slider::-webkit-scrollbar {
    display: none;
}

.manga-slider.dragging {
    cursor: grabbing;
}

.manga-slide-track {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    width: max-content;
}

.manga-sample-link {
    display: block;
    cursor: zoom-in;
    line-height: 0;
    flex: 0 0 auto;
    -webkit-user-drag: none;
}

.manga-sample-link img {
    height: 540px;
    width: auto;
    border: 3px solid var(--color-border);
    object-fit: contain;
    background-color: #fff;
    pointer-events: none;
}

body.modal-open {
    overflow: hidden;
}

.manga-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.84);
    cursor: zoom-out;
}

.manga-modal.active {
    display: flex;
}

.manga-modal-image {
    max-width: min(96vw, 1280px);
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px var(--color-border), 10px 10px 0 rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

.manga-modal-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--color-main);
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 #000;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 767px) {
    .manga-slide-track {
        gap: 14px;
    }

    .manga-sample-link img {
        height: 190px;
    }
}

/* --- Game Gallery --- */
.game-screenshots {
    border-top: 2px dashed var(--color-border);
    padding-top: 20px;
}

.game-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.game-gallery img {
    max-width: 48%;
    height: auto;
    border-width: 3px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .game-gallery img {
        max-width: 100%;
    }
}

/* --- Courses Section --- */
.courses-section {
    background-image: url('../images/ライトブルーのレンガ壁.webp');
    background-size: 200px;
    padding: 2rem 0;
    border-top: 4px solid var(--color-border);
    border-bottom: 4px solid var(--color-border);
    /* Set background to repeat */
    background-repeat: repeat;
}

body.dark-mode .courses-section {
    /* If dark mode, slightly darken the background to keep text readable */
    background-color: rgba(0, 0, 0, 0.5);
    background-blend-mode: multiply;
}

.courses-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-section {
    margin: 5rem 0;
    width: 100%;
}

.cta-container {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    width: 100%;
}

.cta-image-wrap {
    position: relative;
    width: 100%;
}

.cta-full-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.cta-image-button {
    position: absolute;
    right: 3.4%;
    bottom: 3.7%;
    z-index: 2;
    min-width: 13.5%;
    padding: 0.32em 0.68em 0.4em;
    color: #fff;
    background: linear-gradient(180deg, #1676d9 0%, #064b9d 100%);
    border: 0.18em solid #ffe21a;
    border-radius: 999px;
    box-shadow:
        0 0 0 0.18em #071946,
        0 0.3em 0 #071946;
    font-family: "DotGothic16", system-ui, sans-serif;
    font-size: clamp(10px, 1.15vw, 18px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.cta-image-button:hover,
.cta-image-button:focus-visible {
    transform: translateY(-0.12em);
    box-shadow:
        0 0 0 0.18em #071946,
        0 0.42em 0 #071946;
}

.cta-action-wrapper {
    width: 100%;
    padding: 3rem 20px;
    background-color: var(--bg-box);
    border-top: 4px solid var(--color-border);
    border-bottom: 4px solid var(--color-border);
}

.cta-lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    line-height: 1.6;
}

body.dark-mode .cta-lead {
    /* Slightly distinct color for dark mode reading */
    color: #ffd166;
}

.xl-btn {
    font-size: 1.5rem;
    padding: 15px 40px;
    background-color: #ff3f34;
    /* Bright red/orange for extreme CTA */
    border-color: #fff;
    box-shadow: 6px 6px 0 0 #000;
    color: #fff !important;
    text-decoration: none;
    letter-spacing: 2px;
}

.xl-btn:hover {
    background-color: #ff5e57;
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 0 #000;
}

@media (max-width: 480px) {
    .xl-btn {
        max-width: calc(100% - 24px);
        padding: 14px 18px;
        font-size: 1.1rem;
        letter-spacing: 0;
        white-space: normal;
    }
}
