/* "Priče" (/price, Views/StoryChains/Index.cshtml): the stories with a chronology as one timeline down the page. The
   site's blocky look: square marks and corners, thin rules, the red accent, each story in its kind's colour (the
   header's strip); buttons outlined or red, never solid black, no arrows. A wide ad is a stop of its own on the line:
   a hollow mark, a dashed link, a box apart, labelled "Oglas". */

.stories-shell {
    padding-top: 0.75rem;
    padding-bottom: 3rem;
}

.stories-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.stories-crumbs a {
    color: #667085;
    text-decoration: none;
}

.stories-crumbs a:hover {
    color: var(--news-accent, #b42318);
}

/* ---- The head: what the page is and the totals ---- */

.stories-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.25rem 2rem;
    padding: 1.4rem 1.5rem 1.35rem;
    border: 1px solid var(--news-rule, #dfe3e8);
    border-top: 4px solid var(--news-accent, #b42318);
    background: #ffffff;
}

.stories-kicker {
    margin: 0 0 0.35rem;
    color: var(--news-accent, #b42318);
    font-family: var(--news-font-head);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.stories-hero h1 {
    margin: 0;
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.02;
}

.stories-lead {
    max-width: 44rem;
    margin: 0.75rem 0 0;
    color: var(--news-soft-ink, #374151);
    font-size: 1.02rem;
    line-height: 1.6;
}

.stories-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(5.6rem, auto));
    margin: 0;
    border: 1px solid var(--news-rule, #dfe3e8);
}

.stories-stats > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 0.3rem;
    padding: 0.75rem 0.9rem 0.7rem;
    border-left: 1px solid var(--news-rule, #dfe3e8);
}

.stories-stats > div:first-child {
    border-left: 0;
}

.stories-stats dd {
    margin: 0;
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stories-stats dt {
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-transform: uppercase;
}

.stories-stats > .is-lead {
    background: var(--news-accent, #b42318);
}

.stories-stats > .is-lead dd,
.stories-stats > .is-lead dt {
    color: #ffffff;
}

/* ---- The search and the filters ---- */

.stories-filter {
    display: grid;
    gap: 0.85rem;
    margin: 1rem 0 1.75rem;
    padding: 1rem;
    border: 1px solid var(--news-rule, #dfe3e8);
    background: #ffffff;
}

.stories-search {
    display: flex;
    min-width: 0;
}

.stories-search input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.9rem;
    padding: 0.5rem 0.85rem;
    border: 2px solid var(--news-ink, #111827);
    border-right: 0;
    border-radius: 0;
    color: var(--news-ink, #111827);
    background: #ffffff;
    font-size: 1rem;
}

.stories-search input:focus {
    outline: 3px solid rgba(180, 35, 24, 0.2);
    outline-offset: 0;
}

.stories-search-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0 1.15rem;
    border: 2px solid var(--news-accent, #b42318);
    border-radius: 0;
    color: #ffffff;
    background: var(--news-accent, #b42318);
    font-weight: 800;
}

.stories-search-button:hover,
.stories-search-button:focus-visible {
    border-color: #891b14;
    background: #891b14;
}

.stories-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.stories-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.65rem;
    border: 1px solid var(--news-rule-strong, #c9d0d8);
    color: var(--news-ink, #111827);
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.stories-chip::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    background: var(--kind, var(--news-ink, #111827));
}

.stories-chip small {
    color: #667085;
    font-size: 0.74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stories-chip:hover {
    border-color: var(--kind, var(--news-ink, #111827));
}

.stories-chip.is-active {
    border-color: var(--news-accent, #b42318);
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

.stories-chip.is-active::before {
    background: #ffffff;
}

.stories-chip.is-active small {
    color: rgba(255, 255, 255, 0.85);
}

.stories-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
}

.stories-seg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.stories-seg-label {
    margin-right: 0.6rem;
    color: #667085;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stories-seg a {
    margin-left: -1px;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--news-rule-strong, #c9d0d8);
    color: var(--news-soft-ink, #374151);
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.stories-seg-label + a {
    margin-left: 0;
}

.stories-seg a:hover {
    color: var(--news-accent, #b42318);
}

.stories-seg a.is-active {
    position: relative;
    border-color: var(--news-accent, #b42318);
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

.stories-result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--news-rule, #dfe3e8);
    color: var(--news-ink, #111827);
}

.stories-result a {
    color: var(--news-accent, #b42318);
    font-weight: 800;
}

/* ---- The page: the timeline and, on a computer, a column beside it ---- */

.stories-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 2rem;
}

.stories-main {
    min-width: 0;
}

/* The line: a thick ink rule from the newest story down; each story a stop on it. */
.stories-line {
    --spine: 5.25rem;
    --lane: 6.6rem;
    position: relative;
    margin: 0;
    padding: 0 0 0 var(--lane);
    list-style: none;
}

.stories-line::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    bottom: 0;
    left: var(--spine);
    width: 3px;
    background: linear-gradient(to bottom, var(--news-ink, #111827) calc(100% - 4rem), rgba(17, 24, 39, 0));
}

.stories-node {
    position: relative;
    margin: 0 0 1.25rem;
}

/* The stop's mark on the line, and the short rule from it to the story. */
.stories-mark {
    position: absolute;
    top: 1.15rem;
    left: calc(var(--spine) - var(--lane) + 1.5px - 0.6rem);
    z-index: 1;
    width: 1.2rem;
    height: 1.2rem;
    border: 3px solid var(--news-ink, #111827);
    background: #ffffff;
}

.stories-node::before {
    content: "";
    position: absolute;
    top: calc(1.15rem + 0.6rem - 1.5px);
    left: calc(var(--spine) - var(--lane) + 1.5px + 0.6rem);
    width: calc(var(--lane) - var(--spine) - 0.6rem - 1.5px);
    height: 3px;
    background: var(--news-ink, #111827);
}

.stories-node.is-new .stories-mark {
    border-color: var(--news-accent, #b42318);
    background: var(--news-accent, #b42318);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.16);
}

.stories-when {
    position: absolute;
    top: 0.95rem;
    left: calc(var(--lane) * -1);
    width: calc(var(--spine) - 1.15rem);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    text-align: right;
}

.stories-when b {
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.1;
}

.stories-when small {
    color: #667085;
    font-size: 0.74rem;
    font-weight: 700;
}

.stories-node.is-new .stories-when b {
    color: var(--news-accent, #b42318);
}

/* ---- A story ---- */

.story-card {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, 1fr);
    min-height: 11rem;
    border: 1px solid var(--news-rule, #dfe3e8);
    border-top: 3px solid var(--kind, var(--news-accent, #b42318));
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.story-card:hover {
    border-color: var(--news-rule-strong, #c9d0d8);
    border-top-color: var(--kind, var(--news-accent, #b42318));
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.story-card-media {
    position: relative;
    display: block;
    min-height: 100%;
    overflow: hidden;
    background: #f4f5f6 url("../img/brand/adios-article-placeholder.svg") center / cover no-repeat;
}

.story-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card-count {
    position: absolute;
    left: 0.6rem;
    bottom: 0.6rem;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.28rem 0.5rem;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.86);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.story-card-count b {
    font-family: var(--news-font-head);
    font-size: 1rem;
    letter-spacing: 0;
}

.story-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.95rem 1.1rem 0.9rem;
}

.story-card-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.story-card-kicker:empty {
    display: none;
}

.story-card-kind {
    color: var(--kind, var(--news-accent, #b42318));
}

.story-card-new {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--news-accent, #b42318);
}

.story-card-new::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    background: var(--news-accent, #b42318);
    animation: stories-pulse 1.8s ease-in-out infinite;
}

@keyframes stories-pulse {
    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-card-new::before {
        animation: none;
    }
}

.story-card-title {
    margin: 0;
    font-family: var(--news-font-head);
    font-size: clamp(1.1rem, 1rem + 0.45vw, 1.32rem);
    font-weight: 800;
    line-height: 1.24;
}

.story-card-title a {
    color: var(--news-ink, #111827);
    text-decoration: none;
}

.story-card-title a:hover {
    color: var(--news-accent, #b42318);
}

/* The chain of its stages: square marks on a rule, the newest hollow and bigger. */
.story-card-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: max-content;
    max-width: 100%;
    margin: 0.1rem 0;
    padding: 0;
    list-style: none;
}

.story-card-track::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.4rem;
    left: 0.3rem;
    border-top: 2px solid var(--kind, var(--news-accent, #b42318));
    opacity: 0.4;
}

.story-card-track li {
    position: relative;
    flex: 0 0 auto;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--kind, var(--news-accent, #b42318));
}

.story-card-track li.is-last {
    width: 1rem;
    height: 1rem;
    border: 3px solid var(--kind, var(--news-accent, #b42318));
    background: #ffffff;
}

.story-card-track li.is-gap {
    width: auto;
    height: auto;
    padding: 0 0.15rem;
    color: #667085;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

/* How it began and where it is now. */
.story-card-arc {
    display: grid;
    gap: 0.3rem;
    margin: 0;
}

.story-card-arc > div {
    display: grid;
    grid-template-columns: 6.4rem minmax(0, 1fr);
    gap: 0.5rem;
}

.story-card-arc dt {
    padding-top: 0.12rem;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.story-card-arc dd {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--news-soft-ink, #374151);
    font-size: 0.88rem;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.story-card-arc .is-latest dd {
    color: var(--news-ink, #111827);
    font-weight: 700;
}

.story-card-arc time {
    margin-left: 0.25rem;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.story-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.9rem;
    margin: auto 0 0;
    padding-top: 0.6rem;
    border-top: 1px solid var(--news-rule, #dfe3e8);
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.story-card-open {
    margin-left: auto;
    padding: 0.3rem 0.65rem;
    border: 2px solid var(--news-accent, #b42318);
    color: var(--news-accent, #b42318);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.story-card-open:hover,
.story-card-open:focus-visible {
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

/* ---- A wide ad: a stop of its own, hollow and dashed, its box apart from the stories ---- */

.stories-node.is-ad .stories-mark {
    border-style: dashed;
    border-color: #98a2b3;
    background: #ffffff;
    box-shadow: none;
}

.stories-node.is-ad::before {
    background: repeating-linear-gradient(90deg, #98a2b3 0 6px, transparent 6px 10px);
}

.stories-ad {
    padding: 0.55rem 0.75rem 0.75rem;
    border: 1px dashed var(--news-rule-strong, #c9d0d8);
    background: #fbfbf9;
}

.stories-ad .ad-slot {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.stories-node.is-ad:not(:has(.ad-slot)),
.stories-node.is-ad:has(.ad-slot.is-gone),
.ads-off .stories-node.is-ad {
    display: none;
}

/* ---- Partner deals (travel, Crno Jaje): a stop of its own, the mark in the accent, the row on white ---- */

.stories-node.is-deals .stories-mark {
    border-color: var(--news-accent, #b42318);
    background: #ffffff;
}

.stories-node.is-deals::before {
    background: var(--news-accent, #b42318);
    opacity: 0.5;
}

.stories-deals {
    min-width: 0;
}

.stories-deals .affiliate-strip {
    margin: 0;
}

.stories-node.is-deals:not(:has(.affiliate-strip)) {
    display: none;
}

/* ---- Pages ---- */

.stories-pages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.75rem 0 0;
    padding-left: 6.6rem;
}

.stories-page-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.6rem;
    padding: 0.4rem 1rem;
    border: 2px solid var(--news-accent, #b42318);
    color: var(--news-accent, #b42318);
    background: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.stories-page-link:hover,
.stories-page-link:focus-visible {
    color: #ffffff;
    background: var(--news-accent, #b42318);
}

.stories-page-now {
    color: #667085;
    font-size: 0.85rem;
    font-weight: 700;
}

.stories-empty {
    display: grid;
    justify-items: start;
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px dashed var(--news-rule-strong, #c9d0d8);
    background: #ffffff;
}

.stories-empty p {
    margin: 0;
    color: var(--news-soft-ink, #374151);
}

/* ---- The column beside: how a story comes about, an ad ---- */

.stories-aside {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 1rem;
}

.stories-about {
    padding: 1rem 1.1rem 1.05rem;
    border: 1px solid var(--news-rule, #dfe3e8);
    border-top: 3px solid var(--news-ink, #111827);
    background: #ffffff;
}

.stories-about h2 {
    margin: 0 0 0.75rem;
    color: var(--news-ink, #111827);
    font-family: var(--news-font-head);
    font-size: 1.02rem;
    font-weight: 800;
}

.stories-about p {
    margin: 0;
    color: var(--news-soft-ink, #374151);
    font-size: 0.9rem;
    line-height: 1.55;
}

.stories-about p + p {
    margin-top: 0.6rem;
}

.stories-about-fresh strong {
    color: var(--news-accent, #b42318);
}

.stories-about-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 0 0 0.85rem;
    padding: 0;
    list-style: none;
}

.stories-about-steps::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    right: 1rem;
    left: 1rem;
    border-top: 2px solid var(--news-ink, #111827);
}

.stories-about-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: #667085;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stories-about-steps span {
    width: 0.85rem;
    height: 0.85rem;
    background: var(--news-ink, #111827);
}

.stories-about-steps .is-now {
    color: var(--news-accent, #b42318);
}

.stories-about-steps .is-now span {
    border: 3px solid var(--news-accent, #b42318);
    background: #ffffff;
}

.stories-aside-ad .ad-slot {
    margin: 0;
}

/* ---- Narrower screens ---- */

@media (max-width: 1199.98px) {
    .stories-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .stories-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .stories-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .stories-aside {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .story-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .story-card-media {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .stories-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stories-stats > div {
        border-top: 1px solid var(--news-rule, #dfe3e8);
    }

    .stories-stats > div:nth-child(2n) {
        border-left: 0;
    }

    .stories-stats > .is-lead {
        grid-column: 1 / -1;
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: baseline;
        border-top: 0;
    }

    .stories-stats > .is-lead dd {
        font-size: 1.9rem;
    }
}

/* Phones: the line at the left edge, the day above each story. */
@media (max-width: 575.98px) {
    .stories-hero {
        padding: 1.1rem 1rem 1.05rem;
    }

    .stories-filter {
        padding: 0.8rem;
    }

    .stories-chips {
        flex-wrap: nowrap;
        margin: 0 -0.8rem;
        padding: 0 0.8rem 0.2rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .stories-chip {
        flex: 0 0 auto;
    }

    .stories-tools {
        display: grid;
        gap: 0.6rem;
    }

    .stories-line {
        --spine: 0.45rem;
        --lane: 1.55rem;
    }

    .stories-mark {
        top: 0.25rem;
        width: 1rem;
        height: 1rem;
        left: calc(var(--spine) - var(--lane) + 1.5px - 0.5rem);
    }

    .stories-node::before {
        display: none;
    }

    .stories-when {
        position: static;
        width: auto;
        flex-direction: row;
        align-items: baseline;
        gap: 0.45rem;
        margin: 0 0 0.4rem;
        text-align: left;
    }

    .stories-node.is-ad .stories-ad {
        margin-top: 0;
    }

    .story-card-body {
        padding: 0.85rem 0.9rem 0.85rem;
    }

    .story-card-arc > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }

    .story-card-open {
        margin-left: 0;
    }

    .stories-pages {
        padding-left: 0;
    }
}
