/* ===== Vijesti24.ba — public site stylesheet ===== */

:root {
    --red: #e4002b;
    --red-dark: #a3001d;
    --ink: #14181f;
    --ink-soft: #3b414c;
    --gray-100: #f5f6f8;
    --gray-200: #e9ebef;
    --gray-300: #d7dae0;
    --gray-500: #7c8290;
    --white: #ffffff;
    --font-head: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: 1220px;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--gray-100);
    line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 .5em; line-height: 1.2; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--red); color: #fff;
    padding: .75rem 1rem; z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #b7bcc6; font-size: .78rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar-social { display: flex; gap: .75rem; }
.topbar-social a { color: #b7bcc6; font-weight: 600; }
.topbar-social a:hover { color: #fff; }

.main-nav { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.main-nav-inner { display: flex; align-items: center; gap: 1.25rem; height: 68px; }
.logo {
    font-family: var(--font-head); font-weight: 700; font-size: 1.65rem; color: var(--ink);
    letter-spacing: .3px; white-space: nowrap;
}
.logo span { color: var(--red); }
.logo small { font-weight: 400; opacity: .55; font-size: .55em; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: 0; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; }

.nav-search { margin-left: auto; display: flex; align-items: center; background: var(--gray-100); border-radius: 999px; padding: 4px 4px 4px 16px; width: 280px; }
.nav-search input { border: 0; background: transparent; flex: 1; font-family: var(--font-body); font-size: .9rem; outline: none; }
.nav-search button { border: 0; background: var(--red); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .85rem; }

.category-nav { background: var(--ink); position: relative; }
.category-nav .container { position: relative; padding: 0; max-width: none; }
.category-nav ul {
    display: flex; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
    max-width: var(--container); margin: 0 auto; padding: 0 16px;
}
.category-nav ul::-webkit-scrollbar { display: none; }
.category-nav a {
    display: block; padding: 12px 9px; color: #dfe2e8; font-weight: 600; font-size: .74rem;
    text-transform: uppercase; letter-spacing: 0; white-space: nowrap; border-bottom: 3px solid transparent;
}
.category-nav a:hover, .category-nav a.active { color: #fff; border-bottom-color: var(--red); }

/* Edge fade hints so an overflowing category list doesn't look abruptly cut off */
.category-nav::before, .category-nav::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; z-index: 2;
    opacity: 1; transition: opacity .2s ease;
}
.category-nav::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.category-nav::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.category-nav.at-start::before { opacity: 0; }
.category-nav.at-end::after { opacity: 0; }
.category-nav.no-overflow::before, .category-nav.no-overflow::after { display: none; }

/* ---------- Layout helpers ---------- */
.page-wrap { max-width: var(--container); margin: 0 auto; padding: 24px 16px 56px; }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px; align-items: start; }
.sidebar-sticky { position: sticky; top: 84px; display: flex; flex-direction: column; }
.section-title {
    font-size: 1.3rem; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 16px;
    padding-left: 12px; border-left: 5px solid var(--red);
}
.section-title a { color: inherit; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.section-head .more-link { font-size: .85rem; font-weight: 600; color: var(--red); }

/* ---------- Homepage hero ---------- */
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; margin-bottom: 32px; }
.hero-side { display: flex; flex-direction: column; gap: 14px; }

.card-tag {
    display: inline-block; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 4px; margin-bottom: 8px;
}
.card-meta { color: var(--gray-500); font-size: .78rem; }

.card-hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; }
.card-hero-img img { width: 100%; height: 420px; object-fit: cover; opacity: .92; }
.card-hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,0)); }
.card-hero-body h2 { font-size: 1.65rem; margin-bottom: 8px; }
.card-hero-body h2 a { color: #fff; }
.card-hero-body p { display: none; }
.card-hero-body .card-meta { color: #d9dce2; }

.card-sm { display: flex; gap: 12px; background: var(--white); border-radius: var(--radius); padding: 10px; }
.card-sm-img img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.card-sm-body h3 { font-size: .92rem; margin-bottom: 6px; }
.card-sm-body h3 a:hover { color: var(--red); }

.card-md { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); height: 100%; display: flex; flex-direction: column; }
.card-md-img img { width: 100%; height: 190px; object-fit: cover; }
.card-md-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-md-body h3 { font-size: 1.02rem; }
.card-md-body h3 a:hover { color: var(--red); }

.card-list { display: flex; gap: 16px; background: var(--white); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.card-list-img img { width: 220px; height: 148px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.card-list-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card-list-body h3 a:hover { color: var(--red); }
.card-list-body p { color: var(--ink-soft); font-size: .92rem; margin: 4px 0 8px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.breaking-bar { background: var(--red); color: #fff; }
.breaking-bar .container { display: flex; align-items: center; gap: 12px; height: 42px; }
.breaking-bar .breaking-label { background: #fff; color: var(--red); font-weight: 700; font-size: .72rem; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.breaking-bar a { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Sidebar ---------- */
.widget { background: var(--white); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.widget h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .3px; border-bottom: 2px solid var(--gray-200); padding-bottom: 10px; margin-bottom: 14px; }
.widget-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; gap: 10px; align-items: flex-start; }
.rank-num { font-family: var(--font-head); font-size: 1.4rem; color: var(--gray-300); font-weight: 700; width: 26px; flex-shrink: 0; }
.rank-item h3 { font-size: .88rem; }
.rank-item h3 a:hover { color: var(--red); }

.ad-slot { background: var(--gray-200); border: 1px dashed var(--gray-300); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: .75rem; min-height: 100px; margin-bottom: 20px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { background: var(--gray-100); padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.tag-cloud a:hover { background: var(--red); color: #fff; }

.widget-newsletter { background: linear-gradient(135deg, var(--ink), #262d38); color: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.widget-newsletter h4 { color: #fff; border-bottom-color: rgba(255,255,255,.15); }
.widget-newsletter p { color: #b7bcc6; font-size: .85rem; margin: 0 0 14px; }
.widget-newsletter form { display: flex; flex-direction: column; gap: 10px; }
.widget-newsletter input[type="email"] { padding: 10px 12px; border-radius: 8px; border: 0; font-family: var(--font-body); font-size: .88rem; }
.widget-newsletter button { background: var(--red); color: #fff; border: 0; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.widget-newsletter button:hover { background: var(--red-dark); }
.widget-newsletter .newsletter-msg { font-size: .8rem; padding: 8px 10px; border-radius: 6px; margin-bottom: 10px; }
.widget-newsletter .newsletter-msg.ok { background: rgba(11,110,79,.25); color: #6bdcae; }
.widget-newsletter .newsletter-msg.err { background: rgba(228,0,43,.2); color: #ff8fa3; }

.widget-social { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-social a { flex: 1; min-width: 45%; text-align: center; padding: 10px; border-radius: 8px; background: var(--gray-100); font-weight: 700; font-size: .82rem; color: var(--ink-soft); }
.widget-social a:hover { background: var(--ink); color: #fff; }


/* ---------- Article page ---------- */
.article-header { max-width: 820px; margin: 0 auto 20px; text-align: left; }
.article-header .card-tag { margin-bottom: 12px; }
.article-header h1 { font-size: 2rem; margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--gray-500); font-size: .85rem; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); padding: 10px 0; }
.article-figure { max-width: 900px; margin: 0 auto 24px; }
.article-figure img { width: 100%; border-radius: var(--radius); max-height: 520px; object-fit: cover; }
.article-body { max-width: 820px; margin: 0 auto; background: var(--white); padding: 28px clamp(16px, 4vw, 48px); border-radius: var(--radius); }
.article-content { font-size: 1.08rem; line-height: 1.8; color: var(--ink); }
.article-content p { margin: 0 0 1.2em; }
.article-content h2 { font-size: 1.4rem; margin: 1.4em 0 .6em; }
.article-content h3 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
.article-content img { border-radius: 8px; margin: 1.2em 0; }
.article-content ul, .article-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-content a { color: var(--red); text-decoration: underline; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.article-tags a { background: var(--gray-100); padding: 5px 12px; border-radius: 999px; font-size: .8rem; color: var(--ink-soft); }
.article-tags a:hover { background: var(--red); color: #fff; }
.share-row { display: flex; gap: 10px; margin-top: 20px; }
.share-row a { background: var(--gray-100); padding: 8px 14px; border-radius: 8px; font-size: .82rem; font-weight: 600; }
.share-row a:hover { background: var(--ink); color: #fff; }

.related-section { max-width: 900px; margin: 40px auto 0; }

/* ---------- Comments ---------- */
.comments-section { max-width: 820px; margin: 40px auto 0; }
.comment-form { background: var(--white); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.comment-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: 8px;
    font-family: var(--font-body); font-size: .92rem; margin-bottom: 12px;
}
.comment-form button { background: var(--red); color: #fff; border: 0; padding: 11px 22px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.comment-form button:hover { background: var(--red-dark); }
.honeypot-field { position: absolute; left: -9999px; opacity: 0; }
.comment-item { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.comment-item .c-name { font-weight: 700; }
.comment-item .c-date { color: var(--gray-500); font-size: .78rem; margin-left: 8px; }
.comment-item .c-content { margin-top: 6px; color: var(--ink-soft); }
.comment-notice { background: #eafaf0; color: #0b6e4f; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.comment-empty { color: var(--gray-500); font-size: .9rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.page-link { background: var(--white); padding: 8px 14px; border-radius: 6px; font-size: .88rem; font-weight: 600; }
.page-link.active { background: var(--red); color: #fff; }
.page-link:hover:not(.active) { background: var(--gray-200); }

/* ---------- Static pages ---------- */
.static-page { max-width: 820px; margin: 0 auto; background: var(--white); padding: clamp(20px,4vw,48px); border-radius: var(--radius); }
.static-page h1 { font-size: 1.8rem; margin-bottom: 1em; }
.static-page h2 { font-size: 1.25rem; margin-top: 1.6em; }
.static-page p, .static-page li { color: var(--ink-soft); line-height: 1.75; }
.static-page ul, .static-page ol { padding-left: 1.4em; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--gray-300); border-radius: 8px;
    font-family: var(--font-body); font-size: .95rem; margin-bottom: 14px;
}
.contact-form button { background: var(--red); color: #fff; border: 0; padding: 12px 26px; border-radius: 8px; font-weight: 600; cursor: pointer; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    background: var(--ink); color: #dfe2e8; box-shadow: 0 -4px 20px rgba(0,0,0,.25);
    transform: translateY(100%); transition: transform .3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
    max-width: var(--container); margin: 0 auto; padding: 16px; display: flex; align-items: center;
    justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; font-size: .85rem; max-width: 720px; }
.cookie-banner-inner a { color: #fff; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { border: 0; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: .85rem; cursor: pointer; }
.cookie-btn-accept { background: var(--red); color: #fff; }
.cookie-btn-accept:hover { background: var(--red-dark); }
.cookie-btn-ghost { background: transparent; color: #dfe2e8; border: 1px solid #444a55; }
.cookie-btn-ghost:hover { border-color: #fff; color: #fff; }

@media (max-width: 640px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-btn { flex: 1; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c3c7ce; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding: 44px 16px; }
.footer-brand p { color: #8b909b; font-size: .88rem; margin-top: 10px; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #b7bcc6; font-size: .88rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #262c36; padding: 16px; text-align: center; font-size: .8rem; color: #8b909b; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar-sticky { position: static; }
    .hero-grid { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-search { position: absolute; left: 0; right: 0; top: 68px; width: auto; margin: 0 16px; display: none; }
    .nav-search.open { display: flex; }
    .category-nav { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
    .category-nav.open { max-height: 400px; }
    .category-nav ul { flex-direction: column; }
    .card-hero-img img { height: 280px; }
    .card-list { flex-direction: column; }
    .card-list-img img { width: 100%; height: 200px; }
    .article-header h1 { font-size: 1.5rem; }
    .comment-form .row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .topbar-inner { font-size: .68rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
