/* Loaded after app.min.css. Keep manual legacy card styles in that asset intact. */
.editorial-ticker-wrapper { overflow: hidden; }
#ticker.editorial-ticker { display: block; text-decoration: none; }
#ticker.editorial-ticker .ticker-item { font-weight: 400; }
#ticker.editorial-ticker .ticker-item a { color: inherit; font-weight: inherit; text-decoration: underline; }
#ticker.editorial-ticker .ticker-item strong,
#ticker.editorial-ticker .ticker-item b { font-weight: 700; }
#ticker.editorial-ticker:hover .ticker-text,
#ticker.editorial-ticker:focus-within .ticker-text { animation-play-state: paused; }
#ticker.editorial-ticker:focus,
#ticker.editorial-ticker a:focus { outline: 2px solid currentColor; outline-offset: -3px; }
/* Keyboard focus must reveal a link even when the old mobile marquee is offscreen. */
@media (max-width: 1024px) {
    #ticker.editorial-ticker:focus-within { padding-left: 10px; width: auto; }
    #ticker.editorial-ticker:focus-within .ticker-text { animation: none; padding-right: 0; transform: none; }
    #ticker.editorial-ticker:focus-within .ticker-item { white-space: normal; }
}

.editorial-tiles { min-width: 0; }
.editorial-tiles > .kategorija-cards {
    grid-template-columns: repeat(var(--tile-columns-desktop, 3), minmax(0, 1fr));
}
.editorial-tiles > .kategorija-cards > .custom-card-wrapper { min-width: 0; }
/* Grid tracks must size cards, even when uploaded images have different natural widths.
   The legacy mobile max-width on .custom-card remains centered inside its track. */
.editorial-tiles--grid > .kategorija-cards > .custom-card-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}
.editorial-tiles--grid .custom-card { width: 100%; }
.editorial-tiles--grid .custom-card img { width: 100%; height: auto; }
.editorial-tiles--slider > .kategorija-cards {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding: 10px 0 15px;
    -webkit-overflow-scrolling: touch;
}
.editorial-tiles--slider > .kategorija-cards > .custom-card-wrapper {
    flex: 0 0 calc((100% - 50px) / 3.5);
    scroll-snap-align: start;
}
.editorial-tiles--slider .custom-card { width: 100%; max-width: none; }
.editorial-tiles--slider .custom-card img { width: 100%; height: auto; }
.editorial-tiles--slider[data-editorial-ready="true"] > .kategorija-cards { scrollbar-width: none; cursor: grab; }
.editorial-tiles--slider[data-editorial-ready="true"] > .kategorija-cards::-webkit-scrollbar { display: none; }
.editorial-tiles--slider.editorial-tiles--dragging > .kategorija-cards { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.editorial-tiles--dragging .custom-card { transform: none; transition: none; }
.editorial-tiles--grid .custom-card-wrapper:focus { outline: 2px solid #b4008d; outline-offset: -2px; }
.editorial-tiles--slider .custom-card-wrapper:focus,
.editorial-tiles--slider > .kategorija-cards:focus { outline: none; }
.editorial-tiles--slider .custom-card-wrapper:focus-visible,
.editorial-tiles--slider:not([data-editorial-ready="true"]) > .kategorija-cards:focus-visible { outline: 2px solid #b4008d; outline-offset: -2px; }
.editorial-tiles-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0 8px;
}
.editorial-tiles-controls[hidden] { display: none; }
.editorial-tiles-controls button {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b4008d;
    cursor: pointer;
}
.editorial-tiles-controls button::before {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    border: 1px solid #d2d4d8;
    border-radius: 50%;
    background: #fff;
}
.editorial-tiles-controls button svg { position: relative; width: 14px; height: 14px; }
.editorial-tiles-controls button:disabled { color: #767676; cursor: default; opacity: .55; }
.editorial-tiles-controls button:focus,
.editorial-tiles-progress:focus { outline: none; }
.editorial-tiles-controls button:focus-visible,
.editorial-tiles-progress:focus-visible { outline: 2px solid #b4008d; outline-offset: 1px; border-radius: 4px; }
.editorial-tiles-progress { position: relative; flex: 1; height: 44px; cursor: pointer; touch-action: none; }
.editorial-tiles-progress::before { content: ''; position: absolute; top: 20px; left: 0; width: 100%; height: 4px; background: #e5e5e5; border-radius: 2px; }
.editorial-tiles-progress > span { position: absolute; top: 20px; left: 0; height: 4px; width: 0; background: #b4008d; border-radius: 2px; pointer-events: none; }
@media (max-width: 991px) {
    .editorial-tiles > .kategorija-cards { grid-template-columns: repeat(var(--tile-columns-tablet, 2), minmax(0, 1fr)); }
    .editorial-tiles--slider > .kategorija-cards > .custom-card-wrapper { flex-basis: calc((100% - 30px) / 2.5); }
}
@media (max-width: 550px) {
    .editorial-tiles > .kategorija-cards { grid-template-columns: repeat(var(--tile-columns-phone, 1), minmax(0, 1fr)); }
    .editorial-tiles--slider > .kategorija-cards > .custom-card-wrapper { flex-basis: calc((100% - 7px) / 1.35); }
}
@media (prefers-reduced-motion: reduce) {
    #ticker.editorial-ticker { padding-left: 10px; width: auto; }
    #ticker.editorial-ticker .ticker-text { animation: none; padding-right: 0; transform: none; }
    #ticker.editorial-ticker .ticker-item { white-space: normal; }
    .editorial-tiles .custom-card { transition: none; }
    .editorial-tiles--slider > .kategorija-cards { scroll-behavior: auto; }
}
