﻿/* =============================================
   GEAL Hero Carousel (Swiper)
   ============================================= */

.hero-carousel-section {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 4px 0;
    overflow: visible;
    position: relative;
}

.hero-swiper {
    width: 100%;
    max-width: var(--geal-max-width);
    margin: 0 auto;
    height: auto;
    padding: 4px 0;
    overflow: visible;
    position: relative;
}

.hero-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    height: auto;
    align-items: flex-start;
    position: relative;
}

.swiper-fallback {
    display: flex;
}

/* バナー未設定時のフォールバック (on-brand・Section 9-1 紫青グラデ禁止を回避し near-black + ブランド色) */
.hero-fb {
    align-items: center;
    justify-content: center;
    padding: 0;
}
.hero-fb-earth     { background: linear-gradient(135deg, #07140d 0%, #0e3a27 58%, #15803D 125%); }
.hero-fb-knowledge { background: linear-gradient(135deg, #0a0a0a 0%, #0c2f2c 58%, #0E7490 125%); }
.hero-fb-circular  { background: linear-gradient(135deg, #0a0a0a 0%, #241046 58%, #6B21A8 125%); }
.hero-fb-inner {
    text-align: center;
    max-width: 82%;
    padding: 24px;
}
.hero-fb-eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.6rem, 1.4vw, 0.78rem);
    letter-spacing: 0.28em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 0.9em;
}
.hero-fb-title {
    font-size: clamp(1.3rem, 3.6vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
    line-height: 1.22;
    font-feature-settings: "palt" 1;
}
.hero-fb-sub {
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    line-height: 1.6;
    font-feature-settings: "palt" 1;
}

.hero-swiper .swiper-slide {
    height: auto;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.4s var(--geal-ease-smooth),
                transform 0.4s var(--geal-ease-smooth);
    opacity: 0.6;
    transform: scale(0.92);
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    flex-shrink: 0;
}

.hero-swiper .swiper-slide-active,
.hero-swiper .swiper-slide-duplicate-active {
    opacity: 1 !important;
    transform: scale(1) !important;
    z-index: 10;
}

.hero-swiper .swiper-slide-prev,
.hero-swiper .swiper-slide-next,
.hero-swiper .swiper-slide-duplicate-prev,
.hero-swiper .swiper-slide-duplicate-next {
    opacity: 0.4;
    transform: scale(0.88);
    z-index: 5;
    pointer-events: auto;
}

.hero-swiper .swiper-slide-duplicate {
    opacity: 0.6;
    transform: scale(0.92);
    z-index: 1;
    pointer-events: auto;
}

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--geal-radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.4s var(--geal-ease-smooth);
    will-change: box-shadow;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hero-swiper .swiper-slide-active img,
.hero-swiper .swiper-slide-duplicate-active img {
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.25);
}

/* --- Navigation Buttons --- */

.swiper-button-next,
.swiper-button-prev {
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background-color var(--geal-transition-smooth);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    transition: opacity var(--geal-transition-smooth), transform var(--geal-transition), background-color var(--geal-transition-smooth);
    opacity: 0.8;
    z-index: 20;
}

.hero-swiper:hover .swiper-button-next,
.hero-swiper:hover .swiper-button-prev {
    opacity: 1;
    transform: scale(1.08);
}

.hero-swiper.swiper-transition .swiper-button-next,
.hero-swiper.swiper-transition .swiper-button-prev {
    pointer-events: none;
}

/* --- Pagination --- */

.swiper-pagination {
    position: relative;
    margin-top: 20px;
    z-index: 15;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--geal-accent);
    opacity: 0.45;
    transition: all 0.4s var(--geal-ease-smooth);
    cursor: pointer;
}

.swiper-pagination-bullet:hover {
    opacity: 0.5;
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 32px;
    border-radius: var(--radius-md);
    background: var(--geal-gradient-accent);
    box-shadow: var(--geal-shadow-accent-sm);
}

.swiper-pagination-bullet-active-main {
    opacity: 1 !important;
}

.swiper-pagination-bullet-active-prev,
.swiper-pagination-bullet-active-next {
    opacity: 0.4 !important;
}

/* =============================================
   Carousel - Responsive
   ============================================= */

@media (max-width: 768px) {
    .hero-carousel-section {
        margin-top: 0;
        margin-bottom: 4px;
        padding: 2px 0;
        background: var(--geal-bg-primary);
        overflow: visible;
    }

    .hero-swiper {
        max-height: 240px;
        padding: 4px 0;
        overflow: visible;
    }

    .hero-swiper .swiper-wrapper {
        transition-timing-function: var(--geal-ease-smooth) !important;
    }

    .hero-swiper .swiper-slide {
        height: auto;
        aspect-ratio: 16 / 9;
        opacity: 0.5;
        transform: scale(0.88);
        transition: opacity 0.4s var(--geal-ease-smooth),
                    transform 0.4s var(--geal-ease-smooth);
        will-change: opacity, transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        flex-shrink: 0;
    }

    .hero-swiper .swiper-slide-active {
        opacity: 1 !important;
        transform: scale(1) !important;
        z-index: 10;
    }

    .hero-swiper .swiper-slide-prev,
    .hero-swiper .swiper-slide-next {
        opacity: 0.35;
        transform: scale(0.85);
    }

    .hero-swiper .swiper-slide-duplicate {
        opacity: 0.5;
        transform: scale(0.88);
    }

    .hero-swiper .swiper-slide-duplicate-active {
        opacity: 1 !important;
        transform: scale(1) !important;
    }

    .hero-swiper .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: var(--geal-radius-lg);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
        transition: box-shadow 0.4s var(--geal-ease-smooth);
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        image-rendering: -webkit-optimize-contrast;
    }

    .hero-swiper .swiper-slide-active img,
    .hero-swiper .swiper-slide-duplicate-active img {
        box-shadow: 0 10px 32px rgba(124, 58, 237, 0.2);
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 32px;
        height: 32px;
        background-color: rgba(255, 255, 255, 0.95) !important;
        color: var(--geal-accent) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background-color: rgba(255, 255, 255, 1) !important;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 12px !important;
        font-weight: 700;
    }

    .swiper-pagination {
        bottom: -4px !important;
        position: relative;
    }

    .swiper-pagination-bullet {
        background: var(--geal-accent);
        opacity: 0.25;
        width: 7px;
        height: 7px;
        margin: 0 3px;
    }

    .swiper-pagination-bullet-active {
        opacity: 1;
        width: 20px;
        border-radius: 4px;
        background: var(--geal-gradient-accent);
    }

    .hero-carousel-section > .card-link {
        display: none;
    }
}

