/* =========================================================================
   Student journey - interactive roadmap (hero, rail, photo panels, support)
   ========================================================================= */

/* ---------- Hero with photo ---------- */
.journey-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(420px, 62vh, 640px);
    padding-top: calc(var(--header-h) + 56px);
    padding-bottom: clamp(40px, 6vw, 72px);
    color: #fff;
    border-bottom: 0;
    background: #121722;
}

.journey-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.journey-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep Galata Tower (including the top) fully in frame */
    object-position: center 28%;
    transform: scale(1.02);
    animation: journeyHeroDrift 18s ease-in-out alternate infinite;
}

.journey-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(12, 18, 28, 0.78) 0%, rgba(12, 18, 28, 0.48) 42%, rgba(12, 18, 28, 0.18) 72%, rgba(12, 18, 28, 0.08) 100%),
        linear-gradient(0deg, rgba(12, 18, 28, 0.42), transparent 50%);
}

.journey-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
}

.journey-hero__content {
    max-width: 640px;
}

.journey-hero .eyebrow--on-dark {
    color: rgba(255, 255, 255, 0.82);
}

.journey-hero .eyebrow--on-dark::before {
    background: #fff;
}

.journey-hero__title {
    color: #fff;
    margin: 12px 0 16px;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.journey-hero__lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    max-width: 52ch;
}

.journey-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.journey-hero__ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.journey-hero__ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.journey-hero__stats {
    display: grid;
    gap: 12px;
    padding: clamp(16px, 2.2vw, 22px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.55);
}

.journey-stat {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.journey-stat:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.journey-stat__num {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    min-width: 84px;
}

.journey-stat__label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
}

@keyframes journeyHeroDrift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to   { transform: scale(1.08) translate3d(-1.2%, -1%, 0); }
}

/* ---------- Roadmap shell ---------- */
.journey-section {
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(227, 6, 19, 0.06), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.journey-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 16px;
}

.journey {
    display: grid;
    gap: clamp(26px, 4vw, 44px);
}

/* ---------- Progress rail ---------- */
.journey-rail {
    position: relative;
    padding: 10px 8px 0;
    overflow: visible;
}

.journey-rail__track {
    position: absolute;
    top: 46px;
    left: 10%;
    right: 10%;
    height: 3px;
    border-radius: 999px;
    background: var(--border-strong);
    overflow: hidden;
}

.journey-rail__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--red), var(--red-300));
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.journey-rail__list {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 10px;
    margin: 0;
}

.journey-rail__item {
    display: flex;
    justify-content: center;
}

.journey-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 6px 14px;
    background: none;
    border: 0;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-align: center;
    transition: color 0.25s ease, transform 0.25s ease;
}

.journey-node__media {
    position: relative;
    width: 78px;
    height: 78px;
    flex: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.journey-node__dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    border: 3px solid #fff;
    color: #fff;
    box-shadow:
        0 0 0 2px var(--border-strong),
        0 10px 24px -12px rgba(24, 34, 60, 0.45);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.journey-node__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(0.15) brightness(0.78);
    transition: filter 0.3s ease, transform 0.4s ease;
}

.journey-node__icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 14, 22, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
}

.journey-node__icon svg {
    width: 18px;
    height: 18px;
}

.journey-node__num {
    position: absolute;
    right: -6px;
    bottom: -4px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border-strong);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.journey-node__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.journey-node__badge {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.journey-node:hover .journey-node__media,
.journey-node:focus-visible .journey-node__media {
    transform: translateY(-3px);
}

.journey-node:hover .journey-node__photo,
.journey-node:focus-visible .journey-node__photo {
    filter: grayscale(0) brightness(0.9);
    transform: scale(1.08);
}

.journey-node.is-done .journey-node__dot {
    box-shadow:
        0 0 0 2px rgba(227, 6, 19, 0.45),
        0 10px 24px -12px rgba(227, 6, 19, 0.45);
}

.journey-node.is-active .journey-node__dot {
    box-shadow:
        0 0 0 3px var(--red),
        0 18px 36px -14px rgba(227, 6, 19, 0.7);
}

.journey-node.is-active .journey-node__media {
    transform: translateY(-2px);
}

.journey-node.is-active .journey-node__photo {
    filter: none;
    transform: scale(1.06);
}

.journey-node.is-active .journey-node__num {
    background: var(--red);
    border-color: #fff;
    box-shadow: 0 0 0 1px var(--red);
    color: #fff;
}

.journey-node.is-active .journey-node__badge {
    color: var(--accent);
}

/* ---------- Stage / panels ---------- */
.journey-stage {
    position: relative;
    padding: clamp(16px, 2.4vw, 28px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.journey-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.1fr);
    gap: clamp(18px, 3vw, 36px);
    align-items: stretch;
    animation: journeyPanelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.journey-panel[hidden] {
    display: none;
}

@keyframes journeyPanelIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.journey-panel__visual {
    position: relative;
    margin: 0;
    min-height: 280px;
    border-radius: calc(var(--radius-lg) - 4px);
    overflow: hidden;
    background: var(--surface-2);
}

.journey-panel__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.journey-panel.is-active .journey-panel__visual img {
    animation: journeyPhotoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes journeyPhotoIn {
    from { transform: scale(1.08); opacity: 0.7; }
    to   { transform: none; opacity: 1; }
}

.journey-panel__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10, 14, 22, 0.45));
    pointer-events: none;
}

.journey-panel__visual-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(10, 14, 22, 0.72);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.journey-panel__visual-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
}

.journey-panel__visual-icon svg {
    width: 18px;
    height: 18px;
}

.journey-panel__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4px, 1vw, 12px) 0;
}

.journey-panel__kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.journey-panel__chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(227, 6, 19, 0.1);
    color: var(--accent);
    letter-spacing: 0.06em;
}

.journey-panel__title {
    font-size: clamp(1.4rem, 2.6vw, 2.05rem);
    letter-spacing: -0.02em;
    margin: 14px 0 12px;
}

.journey-panel__text {
    color: var(--text-muted);
    font-size: 1.03rem;
    max-width: 58ch;
}

.journey-panel__text a {
    color: var(--accent);
    text-decoration: underline;
}

.journey-panel__tips-title {
    margin: 26px 0 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.journey-panel__tips {
    display: grid;
    gap: 10px;
    margin: 0;
}

.journey-panel__tips li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.96rem;
}

.journey-panel__tips svg {
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 3px;
    color: var(--accent);
}

/* ---------- Controls ---------- */
.journey-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(18px, 2.6vw, 28px);
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.journey-controls__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journey-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border-strong);
    transition: width 0.25s ease, background 0.25s ease;
}

.journey-dot.is-active {
    width: 26px;
    border-radius: 999px;
    background: var(--red);
}

.journey-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Support cards ---------- */
.journey-support__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.journey-support-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.journey-support-card:hover {
    transform: translateY(-4px);
    border-color: rgba(227, 6, 19, 0.3);
}

.journey-support-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}

.journey-support-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.journey-support-card:hover .journey-support-card__media img {
    transform: scale(1.05);
}

.journey-support-card__icon {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--accent);
    box-shadow: 0 10px 24px -14px rgba(24, 34, 60, 0.55);
}

.journey-support-card__icon svg {
    width: 21px;
    height: 21px;
}

.journey-support-card__body {
    padding: 20px 22px 24px;
}

.journey-support-card__title {
    font-size: 1.12rem;
    margin-bottom: 8px;
}

.journey-support-card__text {
    color: var(--text-muted);
    font-size: 0.97rem;
}

.journey-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- RTL ---------- */
html[dir="rtl"] .journey-node__num {
    right: auto;
    left: -6px;
}

html[dir="rtl"] .journey-panel__visual-badge,
html[dir="rtl"] .journey-support-card__icon {
    left: auto;
    right: 14px;
}

html[dir="rtl"] .journey-rail__fill {
    background: linear-gradient(270deg, var(--red), var(--red-300));
}

html[dir="rtl"] .journey-hero__scrim {
    background:
        linear-gradient(255deg, rgba(12, 18, 28, 0.78) 0%, rgba(12, 18, 28, 0.48) 42%, rgba(12, 18, 28, 0.18) 72%, rgba(12, 18, 28, 0.08) 100%),
        linear-gradient(0deg, rgba(12, 18, 28, 0.42), transparent 50%);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .journey-hero__inner {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .journey-hero__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .journey-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .journey-stat__num {
        min-width: 0;
    }
}

@media (max-width: 860px) {
    .journey-rail__track {
        display: none;
    }

    .journey-rail__list {
        grid-auto-flow: column;
        grid-auto-columns: minmax(140px, 1fr);
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .journey-rail__item {
        scroll-snap-align: center;
    }

    .journey-node {
        padding: 8px 4px 10px;
    }

    .journey-node__media {
        width: 64px;
        height: 64px;
    }

    .journey-node__num {
        width: 24px;
        height: 24px;
        right: -5px;
        bottom: -3px;
        font-size: 0.68rem;
    }

    .journey-node__label {
        font-size: 0.85rem;
    }

    .journey-node__badge {
        display: none;
    }

    .journey-panel {
        grid-template-columns: 1fr;
    }

    .journey-panel__visual {
        min-height: 220px;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 640px) {
    .journey-hero {
        padding-bottom: 36px;
    }

    .journey-hero__stats {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .journey-stat {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }

    .journey-hero__actions .btn,
    .journey-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .journey-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .journey-controls .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .journey-controls__dots {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 4px;
    }

    .journey-panel__tips li {
        font-size: 0.92rem;
    }

    .journey-stage {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journey-panel,
    .journey-panel.is-active .journey-panel__visual img,
    .journey-hero__media img {
        animation: none;
    }

    .journey-rail__fill,
    .journey-node__dot,
    .journey-node__photo,
    .journey-support-card__media img {
        transition: none;
    }
}
