/* ============================
   OUR JOURNEY CLEAN CSS (2025)
============================ */
/* ======================
   LOCK BACKGROUND SCROLL
   (Mobile modal fix)
====================== */
html.modal-open,
body.modal-open {
  overflow: hidden;
  height: 100%;
  touch-action: none;   /* 🔥 mobile 关键 */
}

.journey-section {
    padding: 60px 0 120px;
    text-align: center;
}

.journey-section h2 {
    color: #1d2d50;
}

.journey-description {
    color: #666;
    margin-top: 8px;
    margin-bottom: 40px;
}

.journey-wrapper {
  position: relative;
}

/* ========================
   TIMELINE + SVG
======================== */

.timeline-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

.svg-container {
    position: relative;
    width: 100%;
    height: 260px; /* 必须与 SVG 一致 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.svg-container.show {
    opacity: 1;
    transform: translateY(0);
}

#journey-curve {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================
   MILESTONE FLAGS
======================== */

#milestone-wrap {
    position: absolute;
    top: -10px; /* 自动贴近你的曲线位置 */    
    left: 0;
    width: 100%;
    height: 260px;
    pointer-events: auto;
}

.milestone {
  position: absolute;
  transform: translate(-50%, -50%) translateY(25px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.milestone.show {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
}

.dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    border: 2px solid #4c5fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 95, 255, 0.25);
    transition: 0.25s;
}

.dot:hover {
    transform: scale(1.12);
    background: #4c5fff;
}

.dot img {
    width: 20px;
    height: 20px;
}

/* Hover Label */
.label {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    background: white;
    border-radius: 10px;
    color: #333;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    opacity: 0;
    transition: 0.2s;
}

.milestone:hover .label {
    opacity: 1;
    transform: translate(-50%, -5px);
}

/* ========================
   MODAL POPUP
======================== */

#journey-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 9999 !important;
}

.journey-modal {
    position: fixed;
    top: 55%;
    margin-top: 20px; /* navbar 高度 */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 900px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalPop 0.35s ease;
    padding-bottom: 25px;
    overflow: hidden;   /* 外壳不滚 */
    display: none;
    z-index: 1000;
    pointer-events: auto;
}

@keyframes modalPop {
    0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #e8f1ff, #c6ddff);
    padding: 25px 60px;
    border-radius: 22px 22px 0 0;
    box-shadow: inset 0 -1px 3px rgba(0,0,0,0.08);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title-group h3 {
    color: #1f2a4d;
}

.modal-title-group h4 {
    margin-top: 2px;
    color: #385078;
}

/* Close button fixed to top-right INSIDE modal */
.journey-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 40px;
  height: 40px;
  border-radius: 50%;

  background: #ffffff;
  border: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #333;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  /* 关键：立体感 */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);

  transition: all 0.25s ease;
}

.journey-close:hover {
    background: #f8f8f8;
    transform: scale(1.08);
}

.modal-content {
    padding: 30px 35px;
    max-height: calc(80vh - 160px);
    overflow-y: auto;
}

.modal-content ul {
    padding-left: 0;
    margin: 15px 0 25px 0;
    list-style: disc;                /* ✅ 打开圆点 */
}

.modal-content li {
    margin-bottom: 10px;
    color: #333;
}

.journey-images {
    margin-top: 20px;
    display: grid;              /* 如果你本来是 grid */
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;

    height: auto;               /* ✅ 必须 */
    max-height: none;           /* ✅ 必须 */
    overflow: visible;          /* 🔥 生死线 */
}

.journey-images img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 180px;         /* ✅ 可选：防止过高 */
    object-fit: contain;
    background: #f2f5ff;
    border-radius: 14px;
    padding: 14px;
    transition: 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modal-nav {
    position: absolute;
    top: 65%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: #4C5FFF;
    z-index: 100000 !important;
    pointer-events: auto !important;
    transition: 0.15s ease-out;
}

.modal-nav:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-50%) scale(1.07);
}

/* 左右按钮位置 */
.modal-nav.prev { left: 15px; }
.modal-nav.next { right: 15px; }

.journey-images img:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* === Curve Glow on Hover (STRONG Version) === */
#journey-path {
    transition: 0.25s ease;
}

.path-glow {
    stroke: #6c7bff !important;
    filter: drop-shadow(0 0 12px #6c7bff)
            drop-shadow(0 0 18px #6c7bff)
            drop-shadow(0 0 25px #6c7bff);
}

.journey-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    padding: 12px 18px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    color: #4c5fff;
    cursor: pointer;
    z-index: 9999;
    transition: 0.25s ease;
}

#journey-prev { left: 30px; }
#journey-next { right: 30px; }

.journey-arrow:hover {
    transform: translateY(-50%) scale(1.15);
    color: #3248ff;
    background: #fff;
}

/* ===== OUR JOURNEY TITLE / DESCRIPTION ANIMATION ===== */

.journey-title,
.journey-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.journey-title.show,
.journey-description.show {
    opacity: 1;
    transform: translateY(0);
}
