:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #0f766e;
    --accent: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 58, 138, 0.65) 50%, rgba(15, 23, 42, 0.8) 100%), url('header.jpg') center/cover no-repeat;
    color: white;
    padding: 40px 0 50px;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    align-items: center;
    z-index: 100;
}
header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}
header .container { position: relative; z-index: 1; }
h1 { 
    font-size: 1.8rem; 
    font-weight: 700; 
    margin-bottom: 4px; 
    letter-spacing: -0.5px; 
    line-height: 1.15;
}
h1 a { color: white; text-decoration: none; }
h1 span.tagline {
    display: block;
    font-size: 0.55em;
    font-weight: 500;
    opacity: 0.92;
    margin-top: 2px;
    letter-spacing: 0.2px;
}
.subtitle { font-size: 1rem; opacity: 0.9; max-width: 700px; margin-top: 4px; }
.update { margin-top: 8px; font-size: 0.8rem; opacity: 0.7; }

nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.nav-links { 
    display: flex; 
    gap: 4px; 
    justify-content: center; 
    flex-wrap: wrap;
    padding: 6px 0;
}
.nav-links a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 500; 
    font-size: 0.92rem;
    padding: 10px 18px;
    border-radius: 999px;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.1px;
}
.nav-links a:hover { 
    color: var(--primary); 
    background: #f1f5f9;
}
.nav-links a.active,
.nav-links a:active {
    color: white;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}
nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 52px;
}
.hamburger { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 8px; 
    position: absolute; 
    left: 12px; 
    top: 50%; 
    transform: translateY(-50%);
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.2s; }

footer { background: #1e293b; color: #94a3b8; padding: 30px 0; font-size: 0.9rem; text-align: center; margin-top: 40px; }
footer a { color: #60a5fa; text-decoration: none; }

.calc-wrapper { padding: 40px 0 60px; }
.calc-card { background: var(--card); border-radius: 16px; padding: 28px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 1rem; background: white; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
button.calc-btn { background: var(--primary); color: white; border: none; padding: 14px 28px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; }
button.calc-btn:hover { background: #1e40af; }
.results { margin-top: 28px; display: none; }
.results.show { display: block; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.result-box { background: #f1f5f9; border-radius: 12px; padding: 16px; text-align: center; }
.result-box .label { font-size: 0.85rem; color: var(--text-light); margin-bottom: 4px; }
.result-box .value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.result-box.highlight { background: #eff6ff; border: 1px solid #bfdbfe; }
.result-box.highlight .value { color: var(--accent); }
.info-box { background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%); border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 0 12px 12px 0; margin-top: 24px; font-size: 0.92rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 30px; position: relative; z-index: 20; }
.stat-card { background: var(--card); border-radius: 16px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid var(--border); }
.stat-card .label { font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 8px 0 4px; }
.stat-card .change { font-size: 0.9rem; font-weight: 600; }
.stat-card .change.up { color: var(--success); }
.stat-card .change.down { color: var(--accent); }
.stat-card .note { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

section { padding: 60px 0; }
section h2 { font-size: 2rem; margin-bottom: 8px; color: var(--primary); }
section .section-desc { color: var(--text-light); margin-bottom: 32px; font-size: 1.05rem; }
.chart-container { background: var(--card); border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 24px; }
.chart-wrapper { position: relative; height: 320px; width: 100%; min-height: 280px; }
.chart-wrapper canvas { width: 100% !important; height: 100% !important; display: block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; color: var(--primary); font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.highlight { font-weight: 600; color: var(--primary); }

.article-card { text-decoration: none; color: inherit; background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.08); border: 1px solid var(--border); transition: transform 0.2s ease, box-shadow 0.2s ease; display: block; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.article-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.article-card .content { padding: 18px 20px; }
.article-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--primary); }
.article-card p { font-size: 0.92rem; color: var(--text-light); margin-bottom: 12px; }
.article-card .more { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Region bar charts */
.region-item { margin-bottom: 14px; }
.region-name { display: flex; justify-content: space-between; font-size: 0.92rem; margin-bottom: 4px; font-weight: 500; }
.bar-bg { background: #e2e8f0; border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; }
.bar-fill.high { background: #dc2626; }
.bar-fill.mid { background: #ea580c; }
.bar-fill.low { background: #3b82f6; }
/* Banner na články */
.articles-banner {
    display: block;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0f766e 100%);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    padding: 28px 36px;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.articles-banner:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(30, 58, 138, 0.3); }
.articles-banner-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.articles-banner-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.articles-banner-desc { font-size: 1rem; opacity: 0.92; }
.articles-banner-btn { background: white; color: #1e3a8a; font-weight: 700; padding: 12px 24px; border-radius: 10px; white-space: nowrap; }

/* Banner VinoBrani.com */
.vinobrani-banner {
    display: block;
    background: linear-gradient(135deg, #7c2d12 0%, #b45309 50%, #d97706 100%);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    padding: 24px 32px;
    margin: 32px 0;
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vinobrani-banner:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(180, 83, 9, 0.3); }
.vinobrani-banner-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.vinobrani-banner-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.vinobrani-banner-desc { font-size: 0.95rem; opacity: 0.95; }
.vinobrani-banner-btn { background: white; color: #b45309; font-weight: 700; padding: 10px 22px; border-radius: 10px; white-space: nowrap; }

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    header { padding: 28px 0 36px; min-height: 130px; }
    h1 { font-size: 1.45rem; }
    .subtitle { font-size: 0.92rem; }
    .update { font-size: 0.75rem; }
    
    .hamburger { display: block; z-index: 300; }
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: white; 
        padding: 12px 16px; 
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        z-index: 250;
        gap: 4px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { 
        padding: 14px 18px; 
        font-size: 1rem;
        border-radius: 10px;
        text-align: left;
    }
    
    section { padding: 40px 0; }
    section h2 { font-size: 1.5rem; }
    section .section-desc { font-size: 0.95rem; margin-bottom: 24px; }
    
    .stats-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
    .stat-card { padding: 18px; }
    .stat-card .value { font-size: 1.7rem; }
    
    .article-card img { height: 160px; }
    .article-card .content { padding: 14px 16px; }
    .article-card h3 { font-size: 1.05rem; }
    .articles-grid { grid-template-columns: 1fr; gap: 16px; }
    .articles-banner { padding: 20px; margin-bottom: 24px; }
    .articles-banner-title { font-size: 1.2rem; }
    .articles-banner-desc { font-size: 0.92rem; }
    .articles-banner-btn { padding: 10px 20px; font-size: 0.95rem; }
    .vinobrani-banner { padding: 18px 20px; margin: 24px 0; }
    .vinobrani-banner-title { font-size: 1.15rem; }
    .vinobrani-banner-desc { font-size: 0.88rem; }
    .vinobrani-banner-btn { padding: 8px 18px; font-size: 0.9rem; }
    
    .chart-wrapper { height: 260px; min-height: 220px; }
    .chart-container { padding: 16px; }
    
    .table-wrap { margin: 0 -16px; padding: 0 16px; }
    th, td { padding: 10px 12px; font-size: 0.88rem; }
    
    .calc-card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; gap: 16px; }
    .result-grid { grid-template-columns: 1fr; }
    .result-box .value { font-size: 1.3rem; }
    
    .two-col { grid-template-columns: 1fr; gap: 16px; }
    .info-box { padding: 14px 16px; font-size: 0.88rem; }
    
    footer { padding: 24px 0; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    header { padding: 24px 0 32px; min-height: 120px; }
    h1 { font-size: 1.3rem; }
    h1 span.tagline { font-size: 0.5em; }
    
    .nav-links a { padding: 12px 14px; }
    
    section { padding: 32px 0; }
    section h2 { font-size: 1.35rem; }
    
    .stat-card { padding: 16px; }
    .stat-card .value { font-size: 1.5rem; }
    
    .article-card img { height: 140px; }
    .article-card h3 { font-size: 1rem; }
    .articles-banner { padding: 16px; border-radius: 12px; }
    .articles-banner-title { font-size: 1.1rem; }
    .articles-banner-inner { gap: 12px; }
    
    .chart-wrapper { height: 220px; min-height: 200px; }
    
    th, td { padding: 8px 10px; font-size: 0.82rem; }
    
    .calc-card { padding: 16px; }
    button.calc-btn { padding: 12px 20px; }
}
