/* ==========================================================================
   critical.css - styly potřebné k PRVNÍMU VYKRESLENÍ (nad ohybem)
   ==========================================================================
   Jediný blokující stylesheet webu (viz inc/header.php). Zbytek CSS
   (style.css, assets/css/news.css, assets/css/info-boxy.css) se načítá
   asynchronně, takže NESMÍ určovat geometrii prvků viditelných hned
   po načtení - jinak stránka po donačtení "poskočí" (CLS).

   Patří sem: proměnné, reset, základní typografie, navbar + menu,
   admin lišta, drobečky, kostry layoutů (homepage novinky, karty
   článků, detail článku, hero recenze).
   NEpatří sem: patička, formuláře, komentáře, tabulky v obsahu,
   newsletter, lightbox, tooltipy - vše pod ohybem drží původní soubory.
   ========================================================================== */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    /* Colors - investiční portál (tmavě modrá + jantarová) */
    --primary-color: #1B3A5C;
    --primary-light: #2D5985;
    --secondary-color: #F59E0B;
    --text-color: #1F2937;
    --background-color: #F9FAFB;
    --card-background: #ffffff;
    --border-color: #E5E7EB;
    --hover-gold: #F59E0B;
    --nav-gradient-start: #142C47;
    --nav-gradient-end: #1B3A5C;
    --accent-blue: #2563EB;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

p{
    margin-bottom: 20px;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 {
    font-size: 1.65rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}
table{
        margin-bottom: 25px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar-wrapper {
    background: linear-gradient(to right, var(--nav-gradient-start), var(--nav-gradient-end));
    width: 100%;
    border-bottom: 1px solid #142C47;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.logo {
    order: 1;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
.logo img{
    width: 200px;
}
.logo:hover {
    color: var(--hover-gold);
}

/* Textové logo v navbaru */
.logo-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo-text .logo-dot {
    color: var(--secondary-color);
}

/* Mobile Menu Button */
.mobile-menu-button {
    order: 2;
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.5rem;
}

.mobile-menu-button .menu-icon,
.mobile-menu-button .close-icon {
    transition: opacity 0.3s ease;
}

/* Navigation Menu */
.nav-menu {
    order: 3;
    display: flex;
    gap: 2rem;
    align-items: center;

    padding-bottom: 16px;
    padding-top: 13px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-link-cta {
    background: var(--secondary-color);
    color: var(--primary-color) !important;
    border-radius: 6px;
    padding: 8px 14px !important;
    font-weight: 700;
}
.nav-link-cta:hover { background: #fbbf24; }

/* ==========================================================================
   Dropdown Menu
   ========================================================================== */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 265px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1rem;
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown .dropdown-content a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.dropdown .dropdown-content a:hover {
    color: var(--hover-gold);
}

.dropdown .fa-chevron-down {
    transition: transform 0.3s ease;
}

.dropdown-content .fa-fw {
    padding-right: 6px;
}

/* ==========================================================================
   Overlay
   ========================================================================== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* ==========================================================================
   WordPress-style admin lišta nahoře (jen pro přihlášeného admina)
   ========================================================================== */
body.has-admin-bar { padding-top: 32px; }
#admin-bar {
    position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 100000;
    display: flex; justify-content: space-between; align-items: stretch;
    background: #1d2327; color: #c3c4c7;
    font-size: 13px; line-height: 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
#admin-bar .ab-group { display: flex; }
#admin-bar .ab-item {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; color: #c3c4c7; white-space: nowrap; text-decoration: none;
}
#admin-bar a.ab-item:hover { background: #2c3338; color: #72aee6; }
#admin-bar .ab-brand { font-weight: 700; color: #fff; }
#admin-bar .ab-edit { color: #fff; }
#admin-bar .ab-user { cursor: default; opacity: .85; }
/* mobilní menu (fixed) posuň pod lištu, ať se nepřekrývají */
body.has-admin-bar .nav-menu { top: 32px; }
@media (max-width: 640px) {
    #admin-bar .ab-user { display: none; }
    #admin-bar .ab-item { padding: 0 9px; }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.breadcrumbs a { color: #6b7280; text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs .bc-current { color: #9ca3af; }

/* ==========================================================================
   Karty článků
   ========================================================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.article-card a.card-link { text-decoration: none; color: inherit; display: block; }
.article-card .card-thumb { aspect-ratio: 3/2; overflow: hidden; background: #e8edf2; }
.article-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card .card-body { padding: 1rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.article-card h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: 8px; color: var(--text-color); }
.article-card .card-dek { color: #4b5563; font-size: 0.93rem; margin-bottom: 12px; flex: 1; }
.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #6b7280;
}
.cat-badge {
    display: inline-block;
    background: #eef2ff;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 99px;
    text-decoration: none;
}
.cat-badge:hover { background: #e0e7ff; }

/* Prázdný thumbnail karty */
.card-thumb-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; font-size: 2.4rem;
    background: linear-gradient(135deg, #eef2f7, #e2e8f0);
    aspect-ratio: 3/2;
}

/* Hero článek na homepage */
.hero-article {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2.2rem;
}
.hero-article .hero-thumb { min-height: 320px; background: #e8edf2; }
.hero-article .hero-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-article .hero-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.hero-article h2 { font-size: 1.8rem; line-height: 1.25; margin: 10px 0 12px; }
.hero-article h2 a { color: var(--text-color); text-decoration: none; }
.hero-article h2 a:hover { color: var(--primary-color); }
.hero-article .hero-dek { color: #4b5563; font-size: 1.02rem; margin-bottom: 16px; }

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 1.4rem;
    padding-bottom: 6px;
}
.section-heading h2 { margin-bottom: 0; }
.section-heading a { font-size: 0.9rem; color: var(--accent-blue); text-decoration: none; font-weight: 600; }

/* ==========================================================================
   Detail článku - hlavička a kostra layoutu
   ========================================================================== */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail .article-header h1 {
    font-size: 2.1rem;
    line-height: 1.25;
    color: var(--text-color);
    margin: 12px 0 10px;
}
.article-detail .article-dek { font-size: 1.15rem; color: #4b5563; margin-bottom: 14px; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: #6b7280;
    font-size: 0.88rem;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}
.article-meta .author { font-weight: 600; color: var(--text-color); }
.article-thumb-main { border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.article-thumb-main img { width: 100%; height: auto; display: block; }
/* SVG thumbnail (logo): plave vlevo, text ho obtéká; na mobilu plná šířka */
.article-thumb-main--svg { float: left; width: 30%; margin: 4px 28px 12px 0; border-radius: 0; overflow: visible; }
.article-thumb-main--svg img { width: 100%; }
@media (max-width: 768px) {
    .article-thumb-main--svg { float: none; width: 100%; margin: 0 0 24px; }
}

/* Základní typografie těla článku (geometrie textu nad ohybem) */
.article-body { font-size: 1.05rem; line-height: 1.75; }
.article-body h2 { margin-top: 2rem; }
.article-body h3 { margin-top: 1.4rem; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 6px; }

/* Dvousloupcový layout detailu (obsah + boční panel brokerů) */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.2rem;
    align-items: start;
}
.article-layout .article-detail { max-width: 800px; margin: 0; min-width: 0; }
.sidebar { position: sticky; top: 16px; }
.sidebar-box {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem;
}
.sidebar-box h3 { color: var(--primary-color); margin-bottom: 12px; }

/* ==========================================================================
   Recenze: hero box + meta lišta pod ním (obojí úplně nahoře na stránce)
   ========================================================================== */
/* přebarvení hero boxu na firemní navy (přebíjí zelenou z review.css) */
.review-hero.hero-section {
    background: linear-gradient(120deg, var(--nav-gradient-start), var(--primary-light));
    margin-bottom: 2rem;
}
.review-hero .cta-button {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    font-weight: 800;
}
.review-hero .cta-button:hover { background: #fbbf24; opacity: 1; }
.review-dek {
    font-size: 1.12rem;
    color: #4b5563;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

/* meta lišta pod hero (drobečky vlevo, autor + datum vpravo) */
.review-meta-bar {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    margin-bottom: 1.4rem;
}
.review-meta-bar .container {
    display: flex;
    align-items: center;          /* svisle na střed */
    justify-content: space-between;
    gap: 4px 24px;
    flex-wrap: wrap;
    margin-top: 0;                /* zruš 2rem svislý margin základního .container */
    margin-bottom: 0;
}
.review-meta-bar .breadcrumbs { margin: 0; }
.review-byline { display: flex; gap: 20px; font-size: 0.85rem; color: #6b7280; flex-wrap: wrap; }
.review-byline a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.review-byline i { margin-right: 5px; color: var(--primary-light); }
@media (max-width: 600px) {
    .review-meta-bar .container { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Breadcrumbs hned pod hero sekcí (detaily srovnání brokerů) - bez mezery */
.hero-section + .review-meta-bar {
    margin-top: -3rem; /* vyruší margin-bottom .hero-section */
    margin-bottom: 1.4rem;
}

/* ==========================================================================
   Homepage: Novinky z trhů (taby rubrik + featured blok + načíst další)
   ========================================================================== */
.market-news { margin: 0 0 2.5rem; }

/* Nadpis sekce + CTA tlačítko "Odběr novinek" napravo na stejném řádku */
.market-news .section-heading { align-items: center; gap: 12px; }
.market-news .section-heading .nav-link-cta { white-space: nowrap; }

/* Lišta rubrik */
.mn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.mn-tab {
    appearance: none;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mn-tab:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.mn-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Panel s obsahem rubriky (lead + grid), překryv při AJAX načítání */
.mn-panel { position: relative; min-height: 120px; transition: opacity 0.15s ease; }
.mn-panel.is-loading { opacity: 0.45; pointer-events: none; }
.mn-panel.is-loading::after {
    content: '';
    position: absolute;
    top: 60px; left: 50%;
    width: 34px; height: 34px;
    margin-left: -17px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: mn-spin 0.7s linear infinite;
}
@keyframes mn-spin { to { transform: rotate(360deg); } }

.mn-empty { color: #6b7280; padding: 1.5rem 0; }

/* Lead (velký článek) vlevo + reklamní box vpravo */
.mn-lead-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 371px;   /* reklama 371×247 */
    gap: 1.5rem;
    align-items: stretch;
    height: 247px;                                  /* = výška thumbnailu karty pod ním */
    margin-bottom: 1.5rem;
}
.mn-lead {
    display: grid;
    grid-template-columns: 371px minmax(0, 1fr);   /* obrázek = rozměr thumbnailu karty (3:2) */
    height: 100%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
/* obrázek vyplní výšku leadu = stejný rozměr jako thumbnail karty pod ním */
.mn-lead-thumb { height: 100%; background: #e8edf2; display: block; }
.mn-lead-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mn-lead-thumb .card-thumb-empty { height: 100%; }
.mn-lead-body { padding: 1.2rem 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.mn-lead-body h3 {
    font-size: 1.25rem; line-height: 1.28; margin: 4px 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mn-lead-body h3 a { color: var(--text-color); text-decoration: none; }
.mn-lead-body h3 a:hover { color: var(--primary-color); }
.mn-lead-dek {
    color: #4b5563; font-size: 0.92rem; line-height: 1.5; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Reklamní box vedle leadu (placeholder; sem přijde reklamní kód ~300×250) */
.mn-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #94a3b8;
    text-align: center;
    padding: 1rem;
    min-height: 200px;
}
.mn-ad-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
/* Promo banner místo placeholderu (obrázek vyplní box 371×247, poměr 3:2) */
.mn-ad--promo { padding: 0; border: 0; background: transparent; min-height: 0; overflow: hidden; border-radius: 12px; }
.mn-ad-link { display: block; width: 100%; height: 100%; }
.mn-ad-link img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

/* 3 malé karty + dávky z "načíst další" (article-card si nese vlastní styl) */
.mn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mn-actions { display: flex; justify-content: center; margin-top: 1.8rem; }
.mn-load-more {
    appearance: none;
    background: var(--card-background);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 12px 30px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.mn-load-more:hover { background: var(--primary-color); color: #fff; }
.mn-load-more[disabled] { opacity: 0.6; cursor: default; }
.mn-load-more[hidden] { display: none; }

@media (max-width: 992px) {
    /* na užších displejích reklama spadne pod lead (celá šířka) */
    .mn-lead-row { grid-template-columns: 1fr; height: auto; }
    .mn-lead { height: auto; }
    .mn-lead-thumb { height: auto; aspect-ratio: 3 / 2; }
    /* reklama drží poměr 371:247 a škáluje s šířkou displeje; na tabletu vycentrovaná a zastropovaná */
    .mn-ad { min-height: 0; aspect-ratio: 371 / 247; width: 100%; max-width: 420px; justify-self: center; }
}
@media (max-width: 900px) {
    .mn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    /* taby vodorovně rolovatelné, ať nezaberou půl obrazovky */
    .mn-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -16px 1.3rem;
        padding: 0 16px 4px;
    }
    .mn-tabs::-webkit-scrollbar { display: none; }
    .mn-lead-row { grid-template-columns: 1fr; height: auto; }
    .mn-lead { grid-template-columns: 1fr; height: auto; }
    .mn-lead-thumb { height: auto; aspect-ratio: 16 / 9; }
    .mn-lead-body { padding: 1.3rem; }
    .mn-lead-body h3 { font-size: 1.3rem; }
}
@media (max-width: 560px) {
    .mn-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Media Queries - navigace a layout nad ohybem
   ========================================================================== */
@media (min-width: 769px) {
    .nav-link:hover {
        color: var(--hover-gold);
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown:hover .fa-chevron-down {
        transform: rotate(180deg);
    }
}

@media (max-width: 968px) {
    .article-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    .logo {
 float: left;
    width: 80%;
}

.logo img {

    max-width: 100%;
}
    .mobile-menu-button {
        display: block;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--nav-gradient-start);
        padding: 2rem;
        flex-direction: column;
        align-items: flex-start;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        z-index: 1000;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-menu > * {
        margin: 4px 0;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        background: transparent;
        box-shadow: none;
        padding-left: 1rem;
    }

    .nav-menu .dropdown-content a {
        color: white;
        opacity: 0.8;
        padding: 1rem 0;
        margin-left: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .dropdown.active .fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .nav-menu .dropdown-content a:hover {
        color: var(--secondary-color);
    }

    /* hero + detail článku na mobilu */
    .hero-article { grid-template-columns: 1fr; }
    .hero-article .hero-thumb { min-height: 0; aspect-ratio: 3/2; }
    .hero-article .hero-body { padding: 1.3rem; }
    .hero-article h2 { font-size: 1.4rem; }
    .article-detail .article-header h1 { font-size: 1.55rem; }
    .article-body { font-size: 1rem; }
}

/* ==========================================================================
   Pojistka pro cookie lištu: cookies.css se načítá asynchronně (footer),
   takže než dorazí, drží tohle pravidlo lištu skrytou - jinak by mohla
   probléknout nenastylovaná. cookies.css ji pak zobrazí (display: flex).
   ========================================================================== */
.aviso {
    display: none;
}
