/* =========================
Timeline & Hot-box Styling
========================= */
.timeline-wrapper {
    position: relative;
    padding: 12px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    column-gap: 24px;
    padding: 12px 0;
    position: relative;
    align-items: start;
}

.timeline-row::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--e-global-color-ae70c18);
    z-index: 1;
}

.time-box {
    font-size: 12px;
    color: var(--e-global-color-accent);
    padding: 8px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--e-global-color-secondary);
    z-index: 2;
    position: relative;
    border:1px solid var(--e-global-color-ae70c18);
}

.time-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
    color: #222;
    text-align: center;
}

.time-unit {
    font-size: 12px;
    color: #777;
    line-height: 1.3;
    margin-top: 2px;
    text-align: center;
}

.timeline-body-link {
    text-decoration: none;
    color: #222;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.timeline-comment {
    font-size: 14px;
    line-height: 1.25em;
    font-weight: 500;
    padding-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-category {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-excerpt {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}

/* Most-read styling */
.most-read-wrapper {
    padding: 0;
    margin: 0;
    background: transparent;
}

.most-read-wrapper .timeline-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    column-gap: 24px;
    padding: 12px 0;
    align-items: start;
    border-bottom:1px solid var(--e-global-color-ae70c18);
}

.most-read-wrapper .timeline-row:last-child {
    border-bottom:none;
}

.most-read-wrapper .timeline-row::before {
    background: none;
}

.most-read-wrapper .time-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border:none;
}

.most-read-wrapper .time-number {
    font-size: 36px;
    font-weight: 700;
}

.most-read-wrapper .timeline-body-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #222;
    margin-top: -6px;
}

.most-read-wrapper .timeline-comment {
    font-size: 14px;
    line-height: 1.25em;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hot-box styling */
.hot-box-posts {
    display: block;
}

.hot-box-row {
    display: grid;
    grid-template-columns: 80px 180px 1fr;
    column-gap: 24px;
    padding: 12px 0;
    align-items: start;
}

.hot-box-row .time-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hot-box-image {
    width: 180px;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    position: relative; /* za overlay kategorije */
}

.timeline-body {
    display: flex;
    flex-direction: column;
}

/* Filter + Search wrapper */
.hot-box-filter-inline {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.hot-box-search {
    flex: 2;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.hot-box-category-select,
.hot-box-tag-select {
    flex: 1;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><polygon fill='black' points='0,0 10,0 5,6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px 6px;
    text-align: left;
    padding-right: 28px;
}

/* Spinner */
.hot-box-spinner {
    height: 40px;
    margin: 20px 0;
    position: relative;
}

.hot-box-spinner::after {
    content:"";
    width:32px;
    height:32px;
    border:3px solid #ccc;
    border-top-color:#222;
    border-radius:50%;
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    animation:hot-spin 0.8s linear infinite;
}

@keyframes hot-spin {
    to{transform:translate(-50%,-50%) rotate(360deg);}
}

.hot-box-load-more {
    display:block;
    margin:20px auto;
    padding:8px 16px;
    font-size:14px;
    cursor:pointer;
    border:1px solid #222;
    border-radius:4px;
    background:#fff;
    color:#222;
}

/* ===================
Mobile adjustments
=================== */
@media(max-width:768px){
    .hot-box-row {
        grid-template-columns:60px 80px 1fr;
        column-gap:12px;
    }
    .hot-box-image {
        width:80px;
        height:80px;
    }
    .timeline-excerpt {
        display:none;
    }

    .hot-box-filter-inline {
        display: flex;
        flex-direction: column;
        gap:8px;
        width:100%;
    }

    .hot-box-search {
        width:100%;
        flex:1 1 100%;
    }

    .hot-box-dropdowns {
        display:flex;
        flex-direction:row;
        gap:8px;
        width:100%;
    }

    .hot-box-category-select,
    .hot-box-tag-select {
        flex:1 1 50%;
        width:50%;
    }
}

/* =========================
HOT GRID
========================= */
.hot-grid-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* grid item */
.hot-grid-posts .hot-box-row {
    display: flex;
    flex-direction: column;
    border-bottom: none;
    padding: 0;
}

/* skrij timeline del */
.hot-grid-posts .time-box {
    display: none;
}

/* slika full width */
.hot-grid-posts .hot-box-image {
    width: 100%;
    height: 180px;
    margin-bottom: 8px;
}

/* text */
.hot-grid-posts .timeline-body {
    padding: 0;
}

.hot-grid-posts .timeline-comment {
    font-size: 15px;
    font-weight: 600;
}

.hot-grid-posts .timeline-excerpt {
    display: block;
    font-size: 13px;
}

/* ===================
HOT GRID – datum nad naslovom
========================= */
.hot-grid-date {
    font-size: 13px;
    color: #777;
    margin-bottom: 4px;
}

/* ===================
HOT GRID – overlay kategorija na sliki
========================= */
.hot-grid-cat-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    pointer-events: none;
}

/* ===================
HOT GRID – featured first post
========================= */
.hot-grid-posts .hot-box-row:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.hot-grid-posts .hot-box-row:first-child .hot-box-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.hot-grid-posts .hot-box-row:first-child .timeline-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hot-grid-posts .hot-box-row:first-child .timeline-comment {
    font-size: 20px;
    font-weight: 700;
}

.hot-grid-posts .hot-box-row:first-child .timeline-excerpt {
    font-size: 15px;
}

/* ===================
HOT GRID – responsive adjustments
========================= */
@media(max-width:1024px){
    .hot-grid-posts {
        grid-template-columns: repeat(2, 1fr);
    }
    .hot-grid-posts .hot-box-row:first-child {
        grid-template-columns: 2fr 1fr;
    }
}

@media(max-width:768px){
    .hot-grid-posts {
        grid-template-columns: repeat(2, 1fr); /* 2 posts per row on mobile */
        gap: 16px; /* ohrani razmik med elementi */
    }

    /* Featured first post full width */
    .hot-grid-posts .hot-box-row:first-child {
        grid-column: 1 / -1; /* featured element še vedno full width */
    }
    
    .hot-grid-posts .hot-box-row:first-child .hot-box-image {
        min-height: 200px;
    }
    .hot-grid-posts .timeline-excerpt {
        display: none;
    }
}

/* odstranitev vertikalne črte za GRID */
.hot-grid-posts .timeline-row::before {
    display: none;
}

/* =========================
Featured post – premium gradient full image (ready-to-copy)
========================= */

/* prvi (featured) post v GRID-u */
.hot-grid-posts .hot-box-row:first-child {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
}

/* slika z gradient overlay direktno na background */
.hot-grid-posts .hot-box-row:first-child .hot-box-image {
    width: 100%;
    height: 400px; /* desktop višina */
    position: relative;
    background-size: cover;
    background-position: center;
    /* gradient čez sliko */
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7)), url(""); /* image se nastavi preko JS/PHP obstoječe metode */
}

/* overlay tekst – naslov nad gradientom */
.hot-grid-posts .hot-box-row:first-child .timeline-body {
    position: absolute;
    bottom: 46px; /* dvignjeno za 30px */
    left: 16px;
    right: 16px;
    z-index: 2; /* nad gradient */
    color: #fff;
}

/* naslov */
.hot-grid-posts .hot-box-row:first-child .timeline-comment {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* kategorija – zgoraj levo */
.hot-grid-posts .hot-box-row:first-child .timeline-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* datum – badge nad naslovom */
.hot-grid-posts .hot-box-row:first-child .timeline-excerpt::before {
    content: attr(data-days) " dni nazaj";
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* skrij povzetek */
.hot-grid-posts .hot-box-row:first-child .timeline-excerpt {
    display: none;
}

/* =========================
Responsive – mobile adjustments
========================= */
@media(max-width:768px){

    .hot-grid-posts .hot-box-row:first-child .hot-box-image {
        height: 260px; /* manjša višina */
    }

    .hot-grid-posts .hot-box-row:first-child .timeline-body {
        bottom: 24px;
        left: 12px;
        right: 12px;
        padding: 0;
    }

    .hot-grid-posts .hot-box-row:first-child .timeline-comment {
        font-size: 18px;
    }

    .hot-grid-posts .hot-box-row:first-child .timeline-category {
        top: 12px;
        left: 12px;
        font-size: 11px;
    }

    .hot-grid-posts .hot-box-row:first-child .timeline-excerpt::before {
        font-size: 12px;
        margin-bottom: 6px;
    }
}


