/* ============================================================
   HISTORIA — Timeline vertical (historia.astro)
   Uses design tokens from variables.css only.
   ============================================================ */

/* ============================================================
   TIMELINE
   ============================================================ */
.hist-timeline {
    position: relative;
    padding-left: var(--spacing-2xl);
    border-left: 2px solid var(--color-border-strong);
    margin-left: var(--spacing-md);
}

.hist-entry {
    position: relative;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
}

.hist-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.hist-marker {
    position: absolute;
    left: calc(-1 * (var(--spacing-2xl) + 8px));
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid var(--color-bg-alt);
    box-shadow: 0 0 0 2px var(--color-accent);
}

.hist-body {
    padding-top: 2px;
}

.hist-year {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

.hist-text {
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    text-align: justify;
}

.hist-image-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.hist-image {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* ============================================================
   TRIBUTE — OMZ
   ============================================================ */
.hist-tribute {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
}

.hist-tribute-photo {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.hist-tribute-body {
    flex: 1;
}

.hist-tribute-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.hist-tribute-years {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.hist-tribute-text {
    font-size: var(--font-size-base);
    color: var(--color-text);
    line-height: 1.7;
    text-align: justify;
}

/* ============================================================
   COST TABLE + IMAGE SIDE-BY-SIDE
   ============================================================ */
.hist-side {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-lg);
    align-items: start;
    margin-bottom: var(--spacing-md);
}

.hist-costs {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: var(--font-size-sm);
    color: var(--color-text-dark);
    line-height: 1.8;
}

.hist-costs-title {
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.hist-costs-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.hist-costs-row span:last-child {
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hist-timeline {
        padding-left: var(--spacing-lg);
        margin-left: var(--spacing-sm);
    }

    .hist-marker {
        left: calc(-1 * (var(--spacing-lg) + 8px));
    }

    .hist-image-row {
        flex-direction: column;
    }

    .hist-tribute {
        flex-direction: column;
        text-align: center;
    }

    .hist-tribute-photo {
        max-width: 200px;
    }

    .hist-side {
        grid-template-columns: 1fr;
    }
}
