* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #ffffff; color: #202124; display: flex; flex-direction: column; min-height: 100vh; }

.main-center { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-grow: 1; padding: 30px 15px; text-align: center; }
.logo-lg { margin-bottom: 25px; display: inline-flex; justify-content: center; align-items: center; }
.logo-home-img { height: 60px; max-width: 280px; width: auto; object-fit: contain; display: block; }

.search-container { width: 100%; max-width: 750px; position: relative; }
.search-input { width: 100%; padding: 14px 20px 14px 45px; font-size: 16px; border: 1px solid #dfe1e5; border-radius: 24px; outline: none; background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%239aa0a6"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat 14px center; transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.2s; }
.search-input:focus { box-shadow: 0 1px 6px rgba(32,33,36,0.28); border-color: transparent; }

.search-input.has-autocomplete {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(32,33,36,0.15) !important;
    border-color: #dfe1e5 !important;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 8px 24px rgba(32, 33, 36, 0.15);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    text-align: left;
    margin-top: 0 !important;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    color: #202124;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.15s ease;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: #f1f3f4; }
.autocomplete-icon { font-size: 16px; flex-shrink: 0; }
.autocomplete-title { font-size: 14.5px; font-weight: 500; color: #1a0dab; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-badge { font-size: 11px; font-weight: 700; color: #5f6368; background: #f1f3f4; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; flex-shrink: 0; }

.results-container { width: 94%; max-width: 1250px; margin: 30px auto; flex-grow: 1; }

.search-tabs { 
    display: flex !important; 
    align-items: flex-end !important; 
    gap: 4px; 
    border-bottom: 2px solid #1a73e8 !important; 
    margin-bottom: 25px; 
    padding: 4px 4px 0 4px;
    overflow-x: auto; 
    white-space: nowrap; 
    width: 100%; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    position: relative; 
}
.search-tabs::-webkit-scrollbar { display: none; }

.tab-btn { 
    position: relative; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    text-decoration: none !important; 
    padding: 8px 14px; 
    font-size: 13.5px; 
    font-weight: 500; 
    color: #64748b; 
    background: #f8fafc; 
    border: 1px solid #cbd5e1; 
    border-bottom: none !important; 
    border-radius: 6px 6px 0 0; 
    margin-bottom: 0; 
    transition: all 0.15s ease-in-out; 
    white-space: nowrap; 
}
.tab-btn:hover { color: #1a73e8; background: #fff; }
.tab-btn.has-results { font-weight: 700; color: #1a73e8; }
.tab-btn.active { 
    background: #ffffff !important; 
    border: 2px solid #1a73e8 !important; 
    border-bottom: 4px solid #ffffff !important; 
    border-radius: 6px 6px 0 0 !important; 
    color: #1a73e8 !important; 
    font-weight: 800 !important; 
    margin-bottom: -2px !important; 
    padding-bottom: 8px !important; 
    position: relative !important; 
    z-index: 20 !important; 
}
.tab-btn.empty { color: #94a3b8; opacity: 0.75; }

.featured-card { border: 1px solid #e0e0e0; border-radius: 16px; padding: 28px; background: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); margin-bottom: 25px; }
.btn-primary-go { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; background: #1a73e8; color: #fff; font-weight: 600; text-decoration: none; border-radius: 8px; margin-top: 18px; font-size: 13px; transition: background 0.2s; }
.btn-primary-go:hover { background: #1557b0; }

.news-item { display: flex; flex-direction: row; gap: 16px; margin-bottom: 16px; border-bottom: 1px solid #f1f3f4; padding-bottom: 14px; align-items: flex-start; }
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-img { width: 110px; height: 75px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #f1f3f4; text-decoration: none; }
.news-title { font-weight: 600; color: #1a0dab; text-decoration: none; font-size: 16px; display: block; margin-bottom: 4px; line-height: 1.35; }
.news-title:hover { text-decoration: underline; }
.news-desc { font-size: 13.5px; color: #5f6368; line-height: 1.5; }
.news-meta { font-size: 12px; color: #70757a; margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.source-badge { font-weight: 700; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 10.5px; text-transform: uppercase; }

.news-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #f1f3f4; flex-wrap: wrap; }
.news-pagination a { padding: 6px 12px; font-size: 13px; color: #1a73e8; text-decoration: none; border: 1px solid #dadce0; border-radius: 6px; }
.news-pagination a.active { background: #1a73e8; color: #ffffff; border-color: #1a73e8; font-weight: 600; }
.news-pagination a:hover:not(.active) { background: #f8f9fa; }
.pagination-ellipsis { padding: 6px 8px; font-size: 13px; color: #70757a; font-weight: 600; }

.snippet-card { border: 1px solid #dadce0; border-radius: 12px; padding: 24px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 25px; }
.snippet-header { display: flex; gap: 18px; align-items: flex-start; flex-wrap: nowrap; }
.snippet-img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.snippet-title { font-size: 22px; color: #1a0dab; margin-bottom: 8px; font-weight: 600; }
.snippet-desc { font-size: 14.5px; color: #4d5156; line-height: 1.6; }
.wiki-more-text { margin-top: 12px; font-size: 14px; color: #3c4043; line-height: 1.6; border-top: 1px dashed #e0e0e0; padding-top: 12px; display: none; }
.wiki-more-text h3 { font-size: 16px; font-weight: 700; color: #202124; margin: 12px 0 6px 0; }
.wiki-more-text h4 { font-size: 14.5px; font-weight: 700; color: #3c4043; margin: 10px 0 4px 0; }
.btn-wiki-more { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: #1a73e8; font-size: 13.5px; font-weight: 600; cursor: pointer; margin-top: 10px; padding: 0; }
.btn-wiki-more:hover { text-decoration: underline; }

/* TRENDING TAGOVI NA NASLOVNICI */
.tags { 
    margin-top: 20px; 
    display: flex; 
    gap: 6px; 
    align-items: center; 
    justify-content: center; 
    max-width: 950px; 
    padding: 0 15px; 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    width: 100%; 
}
.tags::-webkit-scrollbar { display: none; }

.home-trend-tag { 
    background: none !important; 
    border: none !important; 
    padding: 0 !important; 
    border-radius: 0 !important; 
    font-size: 13px; 
    color: #475569; 
    text-decoration: none; 
    font-weight: 400; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    white-space: nowrap; 
    transition: color 0.15s ease; 
    display: inline-flex; 
    align-items: center; 
}
.home-trend-tag:hover { color: #1a73e8; text-decoration: underline; }
.home-trend-tag:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    margin-right: 2px;
    color: #cbd5e1;
    font-weight: normal;
}

.news-switch-tabs { display: inline-flex; background: #f1f3f4; border-radius: 8px; padding: 3px; gap: 3px; }
.news-switch-btn { border: none; background: none; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #5f6368; border-radius: 6px; cursor: pointer; transition: all 0.15s ease; }
.news-switch-btn.active { background: #ffffff; color: #1a73e8; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.home-news-pane { display: none; flex-direction: column; gap: 12px; }
.home-news-pane.active { display: flex; }

.home-teasers-container { width: 100%; max-width: 980px; margin-top: 40px; display: flex; flex-direction: column; gap: 25px; text-align: left; }
.home-teaser-card { background: #ffffff; border: 1px solid #e8eaed; border-radius: 16px; padding: 20px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03); }
.home-teaser-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #f1f3f4; padding-bottom: 10px; }
.home-teaser-title { font-size: 14px; font-weight: 800; color: #202124; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.home-teaser-link { font-size: 12.5px; color: #1a73e8; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.home-teaser-link:hover { text-decoration: underline; }

/* DESKTOP BENTO GRID (1 LEAD VIJEST + 4 SPOREDNE) */
.home-news-bento-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    align-items: stretch;
}

.home-news-lead-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.home-news-lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.home-news-lead-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f1f5f9;
    overflow: hidden;
}
.home-news-lead-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.home-news-lead-card:hover .home-news-lead-img {
    transform: scale(1.03);
}
.home-news-lead-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.home-news-lead-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #1a0dab;
    line-height: 1.35;
    margin: 6px 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-news-lead-card:hover .home-news-lead-title {
    text-decoration: underline;
}

.home-news-side-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.home-news-side-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.home-news-side-item:hover {
    background: #f8fafc;
}
.home-news-side-thumb {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f1f5f9;
}
.home-news-side-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #202124;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-news-side-item:hover .home-news-side-title {
    color: #1a0dab;
}

.teaser-carousel { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.teaser-carousel::-webkit-scrollbar { display: none; }

.snizenje-mini-card { flex: 0 0 170px; background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; position: relative; transition: transform 0.2s, box-shadow 0.2s; content-visibility: auto; contain-intrinsic-size: 170px 180px; }
.snizenje-mini-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
.snizenje-mini-img { width: 100%; height: 115px; object-fit: cover; background: #fafafa; }
.snizenje-badge-popust { position: absolute; top: 8px; right: 8px; background: #e65100; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 10px; }
.snizenje-mini-info { padding: 10px; display: flex; flex-direction: column; gap: 4px; }

.posao-mini-card { flex: 0 0 220px; background: #fdfdfd; border: 1px solid #eef0f2; border-left: 3px solid #34a853; border-radius: 10px; padding: 12px; text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: space-between; }
.posao-mini-card:hover { background: #f8faf8; }

.channel-mini-logo { max-height: 20px; max-width: 38px; object-fit: contain; vertical-align: middle; }

@keyframes blesak { 0% { background-color: #fff; } 50% { background-color: #fef3c7; border-color: #f59e0b; } 100% { background-color: #fff; } }
.prevedeno-efekat { animation: blesak 0.8s ease; }

@media (max-width: 768px) {
    .results-container { width: 95%; margin: 15px auto; }
    .logo-lg { margin-bottom: 18px; }
    .logo-home-img { height: 48px; max-width: 230px; }
    .featured-card, .snippet-card { padding: 16px; border-radius: 12px; }
    
    .tags { justify-content: flex-start; padding: 0 10px; gap: 4px; }
    
    .news-item { display: flex !important; flex-direction: row !important; gap: 12px !important; align-items: flex-start !important; }
    .news-img { width: 85px !important; height: 65px !important; min-width: 85px !important; max-width: 85px !important; }
    .snippet-img { width: 75px !important; height: 75px !important; min-width: 75px !important; }
    
    .news-title { font-size: 15px; line-height: 1.3; }
    .news-desc { display: none !important; }
    .news-meta { font-size: 11px; gap: 6px; }

    .weather-hero-box { flex-direction: column; align-items: flex-start !important; gap: 15px !important; }
    .weather-params-grid { grid-template-columns: 1fr 1fr !important; }
    
    .news-pagination a { padding: 5px 9px; font-size: 12px; }

    .search-tabs { flex-wrap: nowrap !important; overflow-x: auto !important; white-space: nowrap !important; -webkit-overflow-scrolling: touch !important; scrollbar-width: none !important; }
    .search-tabs::-webkit-scrollbar { display: none !important; }

    .home-teasers-grid { grid-template-columns: 1fr !important; }
    .snizenje-mini-card { flex: 0 0 145px; }
    .snizenje-mini-img { height: 95px; }
    .posao-mini-card { flex: 0 0 190px; }

    .home-news-bento-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .home-news-lead-card {
        display: none !important;
    }
    .home-news-mobile-first {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .home-news-mobile-first {
        display: none !important;
    }
}

.site-fallback-icon {
    width: 16px;
    height: 16px;
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

/* DISKRETNA ANIMACIJA ZA TAB VIJESTI */
.search-tabs .tab-btn.tab-highlight-nudge {
    position: relative;
    font-weight: 700 !important;
    animation: blagiNudgeVijesti 12s infinite ease-in-out;
}

/* Tačkica koja stalno lagano pulsira */
.search-tabs .tab-btn.tab-highlight-nudge::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
    animation: pulsTackica 2s infinite ease-in-out;
}

@keyframes blagiNudgeVijesti {
    /* Mirno stanje veći dio ciklusa (~10.5 sekundi mirnoće) */
    0%, 88%, 100% {
        transform: translateY(0);
        color: #1a73e8;
        border-color: #cbd5e1;
        background-color: #f8fafc;
        box-shadow: none;
    }
    /* Lagani skok i prelazak naziva i okvira u boju tačkice */
    91% {
        transform: translateY(-3px);
        color: #ef4444 !important;
        border-color: #ef4444 !important;
        background-color: #fef2f2 !important;
        box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
    }
    94% {
        transform: translateY(0);
        color: #dc2626 !important;
        border-color: #fca5a5 !important;
    }
    /* Mali drugi trzaj */
    96% {
        transform: translateY(-1.5px);
        color: #ef4444 !important;
        border-color: #ef4444 !important;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
    }
    98% {
        transform: translateY(0);
        color: #1a73e8;
        border-color: #cbd5e1;
        background-color: #f8fafc;
        box-shadow: none;
    }
}

@keyframes pulsTackica {
    0%, 100% { 
        opacity: 0.35; 
        transform: scale(0.85); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.25); 
    }
}