/**
 * Zamseed Journey Timeline Widget Styles
 *
 * Deep forest-green chronological milestone grid ("Our Journey Through
 * Time"). Base colour and glows map to theme tokens: --zs-dark-green
 * (#0f2418) and --zs-primary-light (rgb 76,140,68).
 *
 * @package Zamseed
 * @since 1.0.0
 */

.zs-journey-timeline {
    position: relative;
    padding: 100px 20px;
    background-color: var(--zs-dark-green, #0f2418);
    color: #ffffff;
}

/* Two subtle radial glows (top-left, bottom-right). Colours are driven
   by custom properties so they stay editable and are gated by the
   --glows modifier. */
.zs-journey-timeline--glows {
    background-image:
        radial-gradient(circle at 12% 0%, var(--zs-journey-glow-top, rgba(76, 140, 68, 0.18)) 0%, rgba(76, 140, 68, 0) 38%),
        radial-gradient(circle at 88% 100%, var(--zs-journey-glow-bottom, rgba(76, 140, 68, 0.12)) 0%, rgba(76, 140, 68, 0) 42%);
}

.zs-journey-timeline__inner {
    position: relative;
    z-index: 1;
    max-width: var(--zs-container-max, 1200px);
    margin: 0 auto;
}

/* Header */
.zs-journey-timeline__header {
    margin-bottom: 56px;
}

.zs-journey-timeline__eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zs-accent, #c48c33);
}

.zs-journey-timeline__heading {
    margin: 0;
    font-family: var(--zs-font-serif, 'Cormorant Garamond', serif);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    color: #ffffff;
}

.zs-journey-timeline__heading-primary {
    color: #ffffff;
}

.zs-journey-timeline__heading-highlight {
    color: #8fbf6a;
}

.zs-journey-timeline__description {
    margin: 16px 0 0;
    max-width: 46em;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
}

/* Grid */
.zs-journey-timeline__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 56px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-journey-timeline__item-wrap {
    min-width: 0;
}

.zs-journey-timeline__item {
    display: block;
    min-width: 0;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

a.zs-journey-timeline__item {
    transition: transform 0.25s ease;
}

a.zs-journey-timeline__item:hover {
    transform: translateY(-3px);
}

a.zs-journey-timeline__item:focus-visible {
    outline: 2px solid #8fbf6a;
    outline-offset: 6px;
    border-radius: 8px;
}

/* Media — aspect-ratio container reserves space (no layout shift). */
.zs-journey-timeline__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.04);
}

/* Qualified with the media class and the element — see the note in
   widget-feature-content.css. `.elementor img { height: auto }` at (0,1,1) beat
   this rule at (0,1,0), collapsing the milestone image inside its aspect-ratio
   media box. Seventh widget with the same cascade loss. */
.zs-journey-timeline__media img.zs-journey-timeline__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--zs-journey-image-fit, cover);
    object-position: var(--zs-journey-image-position, center);
}

/* Meta row: year + sequence */
.zs-journey-timeline__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.zs-journey-timeline__year {
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}

.zs-journey-timeline__sequence {
    flex-shrink: 0;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--zs-journey-accent, rgba(143, 191, 106, 0.7));
}

.zs-journey-timeline__badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--zs-dark-green, #0f2418);
    background-color: var(--zs-journey-accent, #8fbf6a);
    border-radius: 6px;
}

.zs-journey-timeline__phase {
    display: block;
    margin-bottom: 8px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zs-journey-accent, #8fbf6a);
}

.zs-journey-timeline__item-description {
    margin: 0;
    max-width: 34em;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

/* Editor-only empty state */
.zs-journey-timeline__empty {
    padding: 48px 24px;
    text-align: center;
    background-color: var(--zs-dark-green, #0f2418);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.zs-journey-timeline__empty p {
    margin: 0;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
}

/* The editor-only hint sits under the published Empty State Message. */
.zs-journey-timeline__empty p + p {
    margin-top: 10px;
    font-size: 0.875rem;
    opacity: 0.85;
}

/* ==========================================================================
   Responsive — chronological DOM order preserved (no CSS order reversal)
   ========================================================================== */

@media (max-width: 1024px) {
    .zs-journey-timeline__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
        row-gap: 44px;
    }
    .zs-journey-timeline { padding: 72px 20px; }
    .zs-journey-timeline__header { margin-bottom: 44px; }
}

@media (max-width: 767px) {
    .zs-journey-timeline__grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }
    .zs-journey-timeline { padding: 56px 18px; }
    .zs-journey-timeline__year { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
    a.zs-journey-timeline__item,
    a.zs-journey-timeline__item:hover {
        transition: none;
        transform: none;
    }
}
