@charset "utf-8";

/* ========================================================================== 
   main-main-slider.css
   (どの画面幅でも垂直位置を固定し、見切れを完全に防止)
   ========================================================================== */

/* --- 1. BASE / WIDE SCREEN (1201px - 1920px) --- */
.hero-slider {
    width: 100%;
    background: #fff;
    margin-top: 0; /* 被り回避の重複マージンを排除 */
    /* 上部の余剰パディングを削り、下部のみ安全余白40pxをキープ */
    padding: 0 0 40px; 
    overflow: visible; 
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.hero-slider.is-ready { opacity: 1; visibility: visible; }

/* --- TRACK: 常に一定の高さを保持し、Flexboxで中身を中央に寄せる --- */
.slider-track {
    display: flex;
    justify-content: center;
    align-items: center; /* これによりスライドは常に垂直方向の真ん中に固定される */
    position: relative;
    width: 100%;
    /* 比率(aspect-ratio)を捨て、固定高さにすることで見切れ計算を一定化 */
    height: 420px; 
    perspective: 2000px;
    transform-style: preserve-3d;
    margin: 0 auto;
    overflow: visible; 
}

/* --- SLIDE --- */
.slide {
    position: absolute;
    /* 画面幅に依存しすぎないよう最大横幅を設定 */
    width: 850px; 
    max-width: 75%; 
    aspect-ratio: 2.5 / 1; 
    left: 50%;
    /* margin-leftを廃止し、translateX(-50%)で厳密に中央固定 */
    transform: translateX(-50%) scale(0.7) translateZ(-800px); 
    filter: none !important; 
    pointer-events: none;
    transition: transform 1.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 1.2s ease;
    will-change: transform, opacity;
}

.hero-slider.is-ready .slide.is-active {
    opacity: 1;
    /* translateYを0に固定。align-items:centerがあるため、これで常に垂直中央 */
    transform: translateX(-50%) scale(1) translateY(0) translateZ(150px);
    z-index: 10;
    pointer-events: auto;
}

.slide.is-prev {
    opacity: 0.6;
    /* 横移動を%ではなく固定に近い値にするため、計算しやすいよう調整 */
    transform: translateX(-125%) scale(0.8) translateY(0) translateZ(-400px);
    z-index: 5;
}

.slide.is-next {
    opacity: 0.6;
    transform: translateX(25%) scale(0.8) translateY(0) translateZ(-400px);
    z-index: 5;
}

/* --- TITLE ANIMATION --- */
.line-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.line-wrap .anim-child {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide.is-active .line-wrap .anim-child {
    transform: translateY(0);
}

/* --- CONTENT BASE --- */
.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(250px);
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- SLIDE 01 SPECIFIC --- */
.slide:first-child .content-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 35%; 
}

.slide:first-child .slide-subtitle.anim-child {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(10px, 1vw, 15px);
    font-weight: 700;
    color: #c5a059;
    margin-bottom: 8px;
    letter-spacing: 0.3em;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.slide.is-active:first-child .slide-subtitle.anim-child {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.6s;
}

.slide:first-child .slide-title {
    writing-mode: horizontal-tb;
    font-family: "Yu Mincho", "游明朝体", serif;
    font-weight: 900;
    font-size: clamp(18px, 3.2vw, 40px);
    color: #000 !important;
    line-height: 1.4;
}

.slide.is-active:first-child .line-wrap:nth-of-type(1) .anim-child { transition-delay: 0.9s; }
.slide.is-active:first-child .line-wrap:nth-of-type(2) .anim-child { transition-delay: 1.05s; }

.slide:first-child .slide-decor {
    width: 50px;
    height: 2px;
    background: #0054a4; 
    margin-top: 15px;
    transform: skewX(-30deg) scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide.is-active:first-child .slide-decor {
    transform: skewX(-30deg) scaleX(1);
    transition-delay: 1.4s;
}

/* --- OTHER SLIDES --- */
.slide:not(:first-child) .slide-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: "Hiragino Mincho ProN", serif;
    font-weight: 700;
    font-size: clamp(14px, 1.6vw, 20px);
    color: #000 !important;
}

.slide.is-active:not(:first-child) .line-wrap .anim-child {
    transition-delay: 0.8s;
}

.slide-content.is-horizontal {
    justify-content: flex-start;
    padding-left: 5%; 
}

.slide-content.is-horizontal .slide-title {
    writing-mode: horizontal-tb !important;
    font-family: "Eurostile", sans-serif;
    font-size: clamp(12px, 1.8vw, 22px);
    font-weight: 800;
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
    padding: 6px 12px 6px 18px; 
    position: relative;
    display: inline-flex;
    align-items: center;
    background: transparent;
}

.slide-content.is-horizontal .slide-title::before {
    content: "";
    position: absolute;
    left: 4px; 
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 14px;
    background-color: #ffffff;
    z-index: 2;
}

/* --- NAVIGATION --- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #ffffff;
    color: #ffffff;
    width: 45px; height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.3s;
}
.prev-arrow { left: 5%; }
.next-arrow { right: 5%; }
.slider-arrow:hover { background: #0054a4; }

/* --- DOTS --- */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px; 
    position: relative;
    z-index: 50;
}

.dot-item {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot-item.is-active {
    background: #0054a4;
    width: 24px; 
    border-radius: 6px;
    border-color: #0054a4;
}

/* --- IMAGE --- */
.slide-img { 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15); 
    border-radius: 4px; 
    background: #fff; 
}

.slide-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.slide:not(:first-child) .slide-content:empty { display: none; }

/* --- 2. ULTRA WIDE (1921px〜) --- */
@media (min-width: 1921px) {
    .slider-track { height: 450px; }
    .slide { width: 1000px; }
    .slide.is-prev { transform: translateX(-120%) scale(0.8) translateZ(-400px); }
    .slide.is-next { transform: translateX(20%) scale(0.8) translateZ(-400px); }
    .prev-arrow { left: calc(50% - 650px); }
    .next-arrow { right: calc(50% - 650px); }
}

/* --- 3. STANDARD PC (1025px - 1200px) --- */
@media (min-width: 1025px) and (max-width: 1200px) {
    .hero-slider { margin-top: 0; padding: 0 0 40px; }
    .slider-track { height: 380px; }
}

/* --- 4. TABLET (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-slider { margin-top: 0; padding: 0 0 30px; }
    .slider-track { height: 320px; }
    .slide { width: 85%; }
    .slide.is-prev { transform: translateX(-115%) scale(0.8) translateZ(-400px); }
    .slide.is-next { transform: translateX(15%) scale(0.8) translateZ(-400px); }
}

/* --- 5. MOBILE (max-width: 768px) --- */
@media (max-width: 768px) {
    .hero-slider { margin-top: 0; padding: 0 0 20px; }
    .slider-track { height: 260px; }
    .slide { width: 92%; }
    .slide.is-prev { transform: translateX(-105%) scale(0.8) translateZ(-200px); }
    .slide.is-next { transform: translateX(5%) scale(0.8) translateZ(-200px); }
    .slider-arrow { width: 34px; height: 34px; }
    .slider-dots { margin-top: 10px; }
    .slide:first-child .content-inner { padding-left: 8%; }
}