/*
Theme Name: Vodic-2026
Theme URI: https://pozeskivodic.com
Description: Lagana, brza tema za pozeskivodic.com news portal
Author: pozeskivodic.com
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: vodic-2026
*/

/* ===== INTER FONT (lokalno, bez CDN-a) ===== */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f0f0f0;
    color: #222;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== VREMENSKA PROGNOZA ===== */
.weather-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
}
.wb-icon { font-size: 1.1rem; line-height: 1; }
.wb-temp { font-weight: 700; font-size: 0.95rem; }
.wb-desc { opacity: 0.85; }
.wb-wind { opacity: 0.7; font-size: 0.72rem; }

.weather-forecast { overflow: hidden; }
.weather-days { padding: 8px 0; }
.weather-day {
    display: grid;
    grid-template-columns: 44px 28px 1fr auto;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.weather-day:last-child { border-bottom: none; }
.wd-name { font-weight: 600; font-size: 0.82rem; color: #1a1a1a; }
.wd-icon { font-size: 1.15rem; line-height: 1; text-align: center; }
.wd-desc { font-size: 0.78rem; color: #555; }
.wd-temps { display: flex; gap: 6px; font-size: 0.82rem; font-weight: 600; }
.wd-max { color: #c62828; }
.wd-min { color: #1565C0; }

/* ===== HEADER ===== */
#site-header {
    background: #008AD2;
    color: #fff;
    padding: 0;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: 1280px;
    margin: 0 auto;
}
.site-title a,
.site-title a:visited {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.site-title a:hover { text-decoration: none; color: #fff !important; opacity: 0.9; }
.site-title .custom-logo-link { display: block; line-height: 0; }
.site-title .custom-logo { max-height: 52px; width: auto; display: block; }
.site-tagline {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

/* ===== NAVIGATION ===== */
#site-nav {
    background: #0070AB;
    border-top: 1px solid rgba(255,255,255,0.15);
}
#primary-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 auto;
    padding: 0 16px;
    max-width: 1280px;
}
#primary-menu > li {
    position: relative;
}
#primary-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 13px;
    color: rgba(255,255,255,0.85);
    font-size: 0.79rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    line-height: 1;
}
#primary-menu > li > a:hover,
#primary-menu > li.current > a {
    color: #fff;
    background: rgba(0,0,0,0.2);
    text-decoration: none;
}
.arrow { font-size: 0.55rem; opacity: 0.6; }

/* Dropdown */
#primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 220px;
    background: #fff;
    border-top: 3px solid #008AD2;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
#primary-menu > li.has-sub:hover > .sub-menu,
#primary-menu > li.has-sub.open > .sub-menu {
    display: block;
}
#primary-menu .sub-menu li a {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}
#primary-menu .sub-menu li:last-child a { border-bottom: none; }
#primary-menu .sub-menu li a:hover,
#primary-menu .sub-menu li.current a {
    background: #008AD2;
    color: #fff;
    text-decoration: none;
}

/* ===== BANNER ZONE ===== */
.baner-zona {
    text-align: center;
    padding: 6px 0;
    background: #fff;
    border-bottom: 1px solid #ddd;
}
.baner-zona img { margin: 0 auto; max-width: 1200px; width: 100%; }

/* Slider – Vrh */
.baner-zona-slider { padding: 0; }
.vodic-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    aspect-ratio: 4 / 1;
    background: #000;
}
.vodic-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.vodic-slide.active { opacity: 1; }
.vodic-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== MAIN LAYOUT ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.page-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding: 24px 0;
}
.main-content { min-width: 0; }

/* ===== SIDEBAR ===== */
.sidebar { min-width: 0; }
.sidebar-widget {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}
.sidebar-widget-title {
    background: #008AD2;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
}
.sidebar-widget-content { padding: 12px; }
.sidebar-widget-content img {
    width: 100%;
    cursor: pointer;
    margin-bottom: 8px;
    border-radius: 3px;
    transition: opacity 0.2s;
}
.sidebar-widget-content img:hover { opacity: 0.88; }

/* ===== HERO BLOCK ===== */
.hero-block {
    margin-bottom: 28px;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
}

/* Big featured post */
.hero-main {
    position: relative;
    display: block;
    min-height: 320px;
    overflow: hidden;
}
.hero-main-full {
    min-height: 400px;
    border-bottom: 1px solid #eee;
}
.hero-main-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s;
}
.hero-no-img { background: #d0e8f5; }
.hero-main:hover .hero-main-img { transform: scale(1.03); }
.hero-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}
.hero-cat {
    display: inline-block;
    background: #008AD2;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    margin-bottom: 7px;
    letter-spacing: 0.4px;
}
.hero-main-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.hero-main-meta {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
}


/* Bottom grid of 6 (3+3) */
.posts-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #eee;
    border-top: 3px solid #008AD2;
}

/* ===== CATEGORY BLOCK (homepage) ===== */
.category-block {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 28px;
    border-radius: 4px;
    overflow: hidden;
}
.category-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #008AD2;
    padding: 10px 16px;
}
.category-block-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.category-block-more {
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    text-transform: uppercase;
}
.category-block-more:hover { color: #fff; text-decoration: underline; }

/* Featured post (first in category) */
.post-featured {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    border-bottom: 1px solid #eee;
}
.post-featured .post-thumb {
    overflow: hidden;
    height: 180px;
}
.post-featured .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-featured:hover .post-thumb img { transform: scale(1.03); }
.post-featured .post-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.post-featured .post-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.post-featured .post-title:hover { color: #008AD2; text-decoration: none; }
.post-excerpt {
    color: #555;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    color: #888;
    font-size: 0.78rem;
}
.post-meta span { margin-right: 10px; }

/* 4 small posts grid */
.posts-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #eee;
}
.post-small {
    background: #fff;
    padding: 0;
    overflow: hidden;
}
.post-small .post-thumb {
    height: 120px;
    overflow: hidden;
}
.post-small .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-small:hover .post-thumb img { transform: scale(1.05); }
.post-small-info { padding: 8px 10px 10px; }
.post-small .post-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}
.post-small .post-title:hover { color: #008AD2; text-decoration: none; }
.post-small .post-meta { font-size: 0.72rem; color: #999; margin-top: 4px; }
.post-no-thumb {
    height: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.75rem;
}

/* ===== ARCHIVE / INDEX LIST ===== */
.archive-header {
    background: #008AD2;
    color: #fff;
    padding: 14px 0;
    margin-bottom: 0;
}
.archive-header h1 { font-size: 1.3rem; font-weight: 700; }
.posts-list { }
.post-list-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.post-list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.post-list-item .post-thumb {
    height: 140px;
    overflow: hidden;
}
.post-list-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-list-info { padding: 14px 16px; }
.post-list-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.post-list-title:hover { color: #008AD2; }
.post-list-excerpt {
    color: #555;
    font-size: 0.88rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 20px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.88rem;
    color: #333;
}
.pagination a:hover { background: #1a1a1a; color: #fff; text-decoration: none; }
.pagination .current { background: #008AD2; color: #fff; border-color: #008AD2; }

/* ===== SINGLE POST ===== */
.single-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding: 24px 0;
}
.single-article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.single-article-header { padding: 20px 24px 16px; }
.single-article h1 {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #111;
}
.single-article .post-meta { margin-bottom: 0; }
.single-baner { padding: 12px 24px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; text-align: center; }
.single-featured { width: 100%; max-height: 480px; object-fit: cover; }
.single-content { padding: 20px 24px 24px; }
.single-content p { margin-bottom: 1.1em; font-size: 1rem; line-height: 1.75; color: #333; }
.single-content h2, .single-content h3 { margin: 1.4em 0 0.6em; }
.single-content img { margin: 1em auto; border-radius: 3px; }
.single-baner-dno { padding: 12px 24px; border-top: 1px solid #eee; text-align: center; }
.back-link { display: inline-block; margin: 16px 24px; color: #008AD2; font-size: 0.88rem; font-weight: 600; }
.back-link:hover { text-decoration: underline; }
.cat-tag,
.cat-tag:visited,
.cat-tag:hover,
.cat-tag:active {
    display: inline-block;
    background: #008AD2;
    color: #fff !important;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    margin-right: 8px;
    margin-bottom: 10px;
    letter-spacing: 0.4px;
    text-decoration: none !important;
}

/* ===== FOOTER ===== */
#site-footer {
    background: #1a1a1a;
    color: #777;
    padding: 24px 0;
    font-size: 0.82rem;
    margin-top: 24px;
}
#site-footer .container {
    text-align: center;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
    margin-bottom: 14px;
}
.footer-nav a {
    color: #aaa;
    font-size: 0.8rem;
    padding: 3px 12px;
    border-right: 1px solid #333;
    line-height: 1.4;
}
.footer-nav a:last-child { border-right: none; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-copy { color: #555; font-size: 0.76rem; }

/* ===== TTS BAR ===== */
.tts-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #f0f7fd;
    border-top: 1px solid #d0e8f5;
    border-bottom: 1px solid #d0e8f5;
}
.tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #008AD2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.tts-btn:hover  { background: #0070AB; }
.tts-btn.tts-active { background: #0070AB; }
.tts-icon { font-size: 0.75rem; }
.tts-stop {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 7px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #666;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.tts-stop:hover { border-color: #E40038; color: #E40038; }
.tts-info {
    margin-left: auto;
    font-size: 0.72rem;
    color: #aaa;
    letter-spacing: 0.3px;
}
.tts-no-voice-link {
    font-size: 0.82rem;
    color: #008AD2;
    font-weight: 500;
}
.tts-no-voice-link:hover { text-decoration: underline; }

/* ===== POST GALLERY ===== */
.post-gallery {
    margin: 24px 0 0;
    border-top: 3px solid #008AD2;
}
.post-gallery-title {
    background: #008AD2;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
}
.post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    padding: 3px;
    background: #eee;
}
.gallery-item {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.2s;
    cursor: pointer;
}
.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}
@media (max-width: 600px) {
    .post-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== POPULAR POSTS ===== */
.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.popular-list li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #222;
    font-size: 0.83rem;
    line-height: 1.4;
}
.popular-list li:last-child a { border-bottom: none; }
.popular-list li a:hover { background: #f5f5f5; text-decoration: none; color: #008AD2; }
.popular-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #008AD2;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.popular-list li:nth-child(1) .popular-num { background: #E40038; }
.popular-list li:nth-child(2) .popular-num { background: #d84315; }
.popular-list li:nth-child(3) .popular-num { background: #f57c00; }
.popular-title { flex: 1; }

/* ===== CITAT ===== */
.citat-widget {
    background: #fff;
    border-radius: 4px;
    padding: 28px 22px 22px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 2px 12px rgba(0,138,210,0.10);
    border-top: 3px solid #008AD2;
    overflow: hidden;
}
.citat-widget::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    right: 14px;
    font-size: 7rem;
    line-height: 1;
    color: #E40038;
    opacity: 0.12;
    font-family: Georgia, serif;
    pointer-events: none;
}
.citat-widget .textwidget,
.citat-widget p {
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
    color: #333;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    z-index: 2;
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    z-index: 2;
    padding: 12px 18px;
    background: rgba(0,0,0,0.35);
    border-radius: 3px;
    transition: background 0.2s;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(0,138,210,0.7); }
.lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 20px;
    user-select: none;
}
.lightbox-overlay img { transition: opacity 0.12s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .page-wrapper, .single-wrapper { grid-template-columns: 1fr; }
    .post-featured { grid-template-columns: 1fr; }
    .post-featured .post-thumb { height: 220px; }
    .posts-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-top { grid-template-columns: 1fr; }
    .hero-main { min-height: 260px; }
    .posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .header-top { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; }
    #primary-menu { padding: 0 8px; }
    #primary-menu > li > a { padding: 8px 10px; font-size: 0.75rem; }
    .container { padding: 0 12px; }
    .posts-grid-4 { grid-template-columns: 1fr 1fr; }
    .post-list-item { grid-template-columns: 120px 1fr; }
    .post-list-item .post-thumb { height: 110px; }
    .single-article h1 { font-size: 1.3rem; }
    /* Hero – mobitel */
    .hero-main { min-height: 200px; }
    .hero-main-title { font-size: 1rem; }
    .posts-grid-3 { grid-template-columns: 1fr 1fr; }
    .post-small .post-thumb img { height: 90px; object-fit: cover; }
}
