/* ==========================================================================
   Investiční portál - styly nad rámec šablony (style.css)
   ==========================================================================
   Načítá se asynchronně (inc/header.php). Vše, co určuje vzhled a geometrii
   prvků NAD ohybem (logo, karty článků, hero, hlavička detailu, drobečky,
   admin lišta, homepage novinky, hero recenze), je v assets/css/critical.css.
   ========================================================================== */

/* Obrázky vložené v editoru (CKEditor figure.image) i prosté <img> v těle článku */
.article-body img, .pillar-intro img { max-width: 100%; height: auto; }
.article-body figure.image, .pillar-intro figure.image { margin: 18px 0; }
.article-body figure.image img, .pillar-intro figure.image img { display: block; margin: 0 auto; border-radius: 6px; }
.article-body figure.image > figcaption, .pillar-intro figure.image > figcaption {
    font-size: 0.85rem; color: #6b7280; text-align: center; margin-top: 6px;
}
.article-body figure.image-style-side { max-width: 50%; float: right; margin: 6px 0 12px 20px; }
.article-body figure.image-style-align-left { float: left; margin: 6px 20px 12px 0; }
.article-body figure.image-style-align-right { float: right; margin: 6px 0 12px 20px; }
/* Obtékání u INLINE obrázků (img se zarovnáním z editoru). Float dáváme PŘÍMO na
   obrázek - funguje i když je obrázek zabalený do glightbox odkazu (article.php
   inline <img> obaluje do <a>), protože plovoucí <img> se odpoutá z řádku i uvnitř
   inline odkazu a jeho procentní šířka se počítá z odstavce. Float na samotný odkaz
   NEfunguje: zmenší se na obsah a procentní šířka obrázku se rozbije. */
.article-body img.image-style-align-left, .pillar-intro img.image-style-align-left { float: left; margin: 6px 20px 12px 0; max-width: 50%; height: auto; }
.article-body img.image-style-align-right, .pillar-intro img.image-style-align-right { float: right; margin: 6px 0 12px 20px; max-width: 50%; height: auto; }
/* WordPress zarovnání z importu (alignleft/alignright/aligncenter/alignnone) -
   stejné chování jako editorové image-style-* třídy, aby text obrázek obtékal */
.article-body img.alignleft, .pillar-intro img.alignleft,
.article-body figure.alignleft, .pillar-intro figure.alignleft { float: left; margin: 6px 20px 12px 0; max-width: 50%; height: auto; }
.article-body img.alignright, .pillar-intro img.alignright,
.article-body figure.alignright, .pillar-intro figure.alignright { float: right; margin: 6px 0 12px 20px; max-width: 50%; height: auto; }
.article-body img.aligncenter, .pillar-intro img.aligncenter { display: block; margin: 12px auto; }
.article-body figure.aligncenter, .pillar-intro figure.aligncenter { margin: 18px auto; }
/* nadpisy nepodtékají plovoucí obrázek */
.article-body h2 { clear: both; }

/* Karty článků, hero, section-heading a hlavička detailu: assets/css/critical.css */

/* Blok hodnocení recenze od autora */
.author-rating {
    display: flex; align-items: center; gap: 18px;
    background: linear-gradient(135deg, #fffdf5, #fff8e8);
    border: 1px solid #fde9a1; border-radius: 14px;
    padding: 18px 22px; margin: 0 0 24px;
}
.author-rating__score { display: flex; align-items: baseline; gap: 2px; color: var(--primary-color, #1b3a5c); flex-shrink: 0; }
.author-rating__score .ar-num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.author-rating__score .ar-max { font-size: 1rem; font-weight: 700; color: #9ca3af; }
.author-rating__stars { position: relative; display: inline-block; font-size: 1.15rem; line-height: 1; }
.author-rating__stars::before { content: "★★★★★"; color: #e2e6ec; letter-spacing: 3px; }
.author-rating__stars::after { content: "★★★★★"; color: #f59e0b; letter-spacing: 3px; position: absolute; left: 0; top: 0; width: var(--ar-pct, 0%); overflow: hidden; white-space: nowrap; }
.author-rating__verdict { margin: 8px 0 4px; font-weight: 600; color: #4b3a13; font-size: 1.02rem; }
.author-rating__by { margin: 0; font-size: 0.85rem; color: #8a7b53; }
@media (max-width: 560px) {
    .author-rating { gap: 12px; padding: 14px 16px; }
    .author-rating__score .ar-num { font-size: 2rem; }
}

/* Odkaz na recenzi v sidebaru brokerů */
.sidebar-review-link { display: block; text-align: center; margin-top: 8px; font-size: 0.85rem; font-weight: 600; color: var(--primary-color); text-decoration: none; }
.sidebar-review-link:hover { text-decoration: underline; }

/* Základní typografie .article-body: assets/css/critical.css */

.article-visual { margin: 26px 0; text-align: center; }
.article-visual svg { max-width: 100%; height: auto; }
.article-visual img { max-width: 100%; height: auto; border-radius: 8px; }

.infoBox {
    background: #eff6ff;
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 20px 0;
}

.article-tags { margin: 26px 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags .tag {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 99px;
}

/* Sdílecí tlačítka */
.share-buttons { display: flex; gap: 10px; margin: 20px 0 30px; }
.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}
.share-x { background: #111; }
.share-fb { background: #1877f2; }
.share-li { background: #0a66c2; }
.share-buttons a:hover { opacity: 0.88; }

/* ==========================================================================
   Newsletter banner
   ========================================================================== */
.newsletter-banner {
    background: linear-gradient(120deg, var(--nav-gradient-start), var(--primary-light));
    border-radius: 12px;
    padding: 2rem;
    color: #fff;
    margin: 2.2rem 0;
}
.newsletter-banner h3 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.newsletter-banner p { color: #cbd5e1; margin-bottom: 18px; }
.newsletter-form .nl-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}
.newsletter-form button {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    cursor: pointer;
}
.newsletter-form button:hover { background: #fbbf24; }
.nl-options { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 0.88rem; }
.nl-options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #e2e8f0; }
.nl-options .nl-group-label { font-weight: 700; color: #fff; margin-right: 4px; }
.nl-message { padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; font-weight: 600; }
.nl-message.ok { background: #d1fae5; color: #065f46; }
.nl-message.err { background: #fee2e2; color: #991b1b; }
.nl-message a { color: inherit; font-weight: 700; text-decoration: underline; }
.nl-register-cta { display: block; margin-top: 8px; font-weight: 500; }
.nl-account-note { margin: 14px 0 0; font-size: 0.84rem; color: #94a3b8; }
.nl-account-note a { color: #fbbf24; text-decoration: underline; }

/* ==========================================================================
   Formuláře (login, registrace, subscribe, account)
   ========================================================================== */
.form-card {
    max-width: 460px;
    margin: 2rem auto;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}
.form-card.wide { max-width: 640px; }
.form-card h1 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 1.2rem; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="text"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
.form-field textarea { min-height: 110px; resize: vertical; }
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary {
    background: #f3f4f6;
    color: var(--text-color);
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.form-msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-weight: 600; }
.form-msg.ok { background: #d1fae5; color: #065f46; }
.form-msg.err { background: #fee2e2; color: #991b1b; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; cursor: pointer; }

/* ==========================================================================
   Komentáře
   ========================================================================== */
.comments-section { margin-top: 2.5rem; border-top: 2px solid var(--border-color); padding-top: 1.6rem; }
.comment {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
}
.comment .comment-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.comment .comment-author { font-weight: 700; font-size: 0.92rem; color: var(--primary-color); }
.comment .comment-date { font-size: 0.78rem; color: #9ca3af; }
.comment p { margin-bottom: 0; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary-color); color: #fff; font-size: 0.8rem; font-weight: 700; }

/* Přihlášení přes Google / Facebook */
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid var(--border-color); transition: filter .15s, background .15s; }
.oauth-btn i { font-size: 1.05rem; }
.oauth-google { background: #fff; color: #3c4043; }
.oauth-google:hover { background: #f7f8f8; }
.oauth-google i { color: #ea4335; }
.oauth-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.oauth-facebook:hover { filter: brightness(0.95); }
.oauth-divider { display: flex; align-items: center; text-align: center; color: #9ca3af; font-size: 0.82rem; margin: 0 0 1rem; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border-color); }
.oauth-divider span { padding: 0 12px; }
.comment-reply { margin-left: 28px; margin-top: 12px; border-left: 3px solid var(--border-color); background: #f9fafb; }
.comment-reply-btn { margin-top: 10px; padding: 3px 10px; font-size: 0.8rem; border: 1px solid var(--border-color); background: #fff; border-radius: 5px; cursor: pointer; color: var(--primary-color); }
.comment-reply-btn:hover { background: #f3f4f6; }
.comment-reply-form { margin-top: 12px; }
.comment-reply-form textarea { min-height: 70px; }

/* Moje komentáře */
.my-comment .my-comment-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.my-comment .my-comment-article { font-weight: 700; color: var(--primary-color); text-decoration: none; }
.my-comment .my-comment-article:hover { text-decoration: underline; }
.my-comment .my-comment-context { font-size: 0.86rem; color: #6b7280; background: #f9fafb; border-left: 3px solid var(--border-color); padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
.my-comment .my-comment-context .quote { font-style: italic; }
.my-comment .my-comment-body { margin-bottom: 0; }
.my-comment .my-comment-replies { margin-top: 14px; border-top: 1px dashed var(--border-color); padding-top: 12px; }
.my-comment .my-comment-replies-head { font-weight: 600; font-size: 0.9rem; color: var(--primary-color); margin-bottom: 10px; }
.my-comment .my-comment-noreply { margin-top: 12px; margin-bottom: 0; font-size: 0.86rem; color: #9ca3af; }

/* ==========================================================================
   Stránkování, kategorie
   ========================================================================== */
.category-header { margin-bottom: 1.6rem; }
.category-header h1 { font-size: 1.9rem; color: var(--primary-color); margin-bottom: 6px; }
.category-header p { color: #6b7280; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 2rem 0; }
.pagination a, .pagination span {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
}
.pagination .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-color); text-align: left; font-size: 0.92rem; }
.admin-table th { background: var(--primary-color); color: #fff; }
.admin-table tr:hover td { background: #f9fafb; }
.badge { padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; }
.badge.published { background: #d1fae5; color: #065f46; }
.badge.draft { background: #fef3c7; color: #92400e; }
.badge.hidden { background: #fee2e2; color: #991b1b; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions form { display: inline; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 5px; border: 1px solid var(--border-color); background: #fff; cursor: pointer; text-decoration: none; color: var(--text-color); }
.btn-sm:hover { background: #f3f4f6; }
.btn-sm.danger { color: #b91c1c; border-color: #fecaca; }
.admin-nav { display: flex; gap: 10px; margin-bottom: 1.6rem; flex-wrap: wrap; }

/* Scroll to top (přesunuto z footeru šablony) */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.scroll-to-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-left: 3px solid #fff;
    border-top: 3px solid #fff;
    transform: translate(-50%, -25%) rotate(45deg);
}
.scroll-to-top:hover { background: var(--primary-light); transform: translateY(0) scale(1.1); }
.scroll-to-top.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Mobil
   ========================================================================== */
@media (max-width: 768px) {
    .newsletter-banner { padding: 1.4rem; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .scroll-to-top { bottom: 15px; right: 15px; width: 35px; height: 35px; }
}

/* ==========================================================================
   v2: obsah článku, sidebar, témata, dashboard (breadcrumbs: critical.css)
   ========================================================================== */

/* Obsah článku (quick-nav evergreen) */
.article-toc {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 22px;
}
.article-toc strong { color: var(--primary-color); display: block; margin-bottom: 8px; }
.article-toc ul { margin: 0 0 0 18px; columns: 2; column-gap: 28px; }
.article-toc li { margin-bottom: 5px; font-size: 0.92rem; }
.article-toc a { color: var(--accent-blue); text-decoration: none; }

/* Dvousloupcový layout detailu (.article-layout, .sidebar-box): critical.css */
.sidebar-broker { border-top: 1px solid var(--border-color); padding: 14px 0; }
.sidebar-broker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sidebar-broker-head strong { font-size: 1.05rem; }
.sidebar-stars { color: var(--secondary-color); font-size: 0.78rem; }
.sidebar-broker ul { list-style: none; margin: 0 0 12px; font-size: 0.86rem; color: #4b5563; }
.sidebar-broker li { margin-bottom: 4px; }
.sidebar-broker li i { color: #10b981; margin-right: 6px; }
.sidebar-cta { display: block; text-align: center; font-size: 0.92rem; padding: 10px; }
.sidebar-disclaimer { font-size: 0.7rem; color: #9ca3af; margin: 12px 0 0; }

/* Související články */
.related-articles {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin: 26px 0;
}
.related-articles h2 { margin: 0 0 10px; font-size: 1.2rem; }
.related-pillars { font-size: 0.9rem; margin-bottom: 10px; }
.related-pillars a { color: var(--accent-blue); font-weight: 700; text-decoration: none; margin-right: 10px; }
.related-list { list-style: none; margin: 0; }
.related-list li { padding: 7px 0; border-bottom: 1px dashed var(--border-color); }
.related-list li:last-child { border-bottom: none; }
.related-list a { color: var(--text-color); font-weight: 600; text-decoration: none; }
.related-list a:hover { color: var(--primary-color); }
.related-meta { font-size: 0.76rem; color: #9ca3af; margin-left: 8px; }

/* Témata (pillar pages grid) */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 1.6rem;
}
.topic-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s, transform 0.15s;
}
.topic-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); }
.topic-card strong { color: var(--primary-color); font-size: 1.02rem; }
.topic-card span { color: #6b7280; font-size: 0.8rem; }

/* ==========================================================================
   Recenze brokerů (homepage sekce)
   ========================================================================== */
.broker-cards {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}
.broker-review-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 18px 16px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.broker-review-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 6px 18px rgba(27, 58, 92, 0.08);
    transform: translateY(-2px);
}
.brc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brc-logo {
    height: 36px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.brc-name { font-size: 1.1rem; font-weight: 800; color: var(--primary-color); line-height: 1.2; }
.brc-stars { position: relative; display: inline-block; font-size: 0.95rem; line-height: 1; margin-top: 3px; }
.brc-stars::before { content: "★★★★★"; color: #e2e6ec; letter-spacing: 2px; }
.brc-stars::after {
    content: "★★★★★"; color: #f59e0b; letter-spacing: 2px;
    position: absolute; left: 0; top: 0;
    width: var(--brc-pct, 0%); overflow: hidden; white-space: nowrap;
}
.brc-rating-num { font-size: 0.8rem; font-weight: 700; color: #6b7280; margin-left: 6px; vertical-align: 2px; }
.brc-benefits { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.brc-benefits li { position: relative; padding-left: 24px; font-size: 0.9rem; color: var(--text-color); line-height: 1.35; }
.brc-benefits li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: #16a34a; font-weight: 800;
}
.brc-deposit {
    font-size: 0.88rem; color: var(--text-color);
    padding: 8px 12px; background: #f8fafc; border-radius: 8px;
    margin-bottom: 14px;
}
.brc-deposit strong { color: var(--primary-color); }
.brc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.brc-btn {
    display: block; text-align: center; text-decoration: none;
    padding: 11px 14px; border-radius: 8px; font-weight: 700; font-size: 0.92rem;
    transition: background 0.15s, opacity 0.15s;
}
.brc-btn-secondary {
    background: #fff; color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.brc-btn-secondary:hover { background: #f1f5f9; }
.brc-btn-primary { background: var(--secondary-color); color: #fff; border: 1px solid var(--secondary-color); }
.brc-btn-primary:hover { background: #fbbf24; }
.brc-risk { margin-top: 12px; font-size: 0.7rem; line-height: 1.4; color: #9ca3af; }

@media (max-width: 600px) {
    .broker-review-card { flex-basis: 100%; }
}

.tag-pillar { background: #eef2ff !important; color: var(--accent-blue) !important; font-weight: 700; text-decoration: none; }
.pillar-intro { margin-bottom: 2rem; }
.pillar-header .follow-form { margin-top: 10px; }

.follow-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.follow-form input[type="email"], .follow-form input[type="text"], .follow-form input[type="search"], .follow-form select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Podnavigace účtu (taby) */
.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.6rem;
}
.account-nav-tab {
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.account-nav-tab:hover { color: var(--primary-color); }
.account-nav-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

/* Dashboard účtu */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Prázdný thumbnail karty (.card-thumb-empty): critical.css */

@media (max-width: 968px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .article-toc ul { columns: 1; }
}

/* Klikatelné obrázky v článku (lightbox) */
.article-body a.glightbox { display: inline-block; cursor: zoom-in; }
.article-body a.glightbox img { transition: opacity 0.15s; }
.article-body a.glightbox:hover img { opacity: 0.9; }

/* Galerie obrázků v článku - 2 sloupce s mezerou, miniatury z originálu */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0;
}
.article-gallery a { display: block; margin: 0; cursor: zoom-in; line-height: 0; }
.article-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
    transition: opacity 0.15s;
}
.article-gallery a:hover img { opacity: 0.9; }
@media (max-width: 560px) {
    .article-gallery { grid-template-columns: 1fr; gap: 10px; }
}

/* Výchozí styl tabulek v článcích (importované i nové) + scroll na mobilu */
.article-body .tableWrap,
.pillar-intro .tableWrap {
    overflow-x: auto;
    margin: 22px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}
.article-body table,
.pillar-intro table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: var(--card-background);
    margin: 0;
}
.article-body .tableWrap table,
.pillar-intro .tableWrap table { min-width: 480px; }
.article-body th, .article-body td,
.pillar-intro th, .pillar-intro td {
    padding: 11px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}
.article-body th,
.pillar-intro th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
}
/* první sloupec jako záhlaví řádku (typické u WP srovnávacích tabulek) */
.article-body table tr td:first-child,
.pillar-intro table tr td:first-child { font-weight: 600; color: var(--primary-color); }
.article-body tbody tr:nth-child(even) td,
.pillar-intro tbody tr:nth-child(even) td { background: #f8fafc; }
.article-body table tr:last-child td,
.pillar-intro table tr:last-child td { border-bottom: none; }
.article-body table p,
.pillar-intro table p { margin: 0; }
.article-body table img { margin: 0; }
/* WP souhrnná tabulka recenze (.revTable) - sémantické thead/th */
.article-body .revTable thead th, .pillar-intro .revTable thead th {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    font-size: 1.25rem;
    padding: 14px 16px;
}
.article-body .revTable tbody th, .pillar-intro .revTable tbody th {
    background: var(--card-background); /* bílá - přebije obecné navy "th" pravidlo */
    color: var(--primary-color);
    font-weight: 700;
    text-align: left;
    width: 42%;
    vertical-align: top;
}
/* zebra: celý řádek (popisek i hodnota) sdílí jedno pozadí; střídá se bílá/šedá */
.article-body .revTable tbody tr:nth-child(even) th,
.article-body .revTable tbody tr:nth-child(even) td,
.pillar-intro .revTable tbody tr:nth-child(even) th,
.pillar-intro .revTable tbody tr:nth-child(even) td { background: #f8fafc; }

/* CFD / risk varování (shortcode [cfdWarning ...]) - běžný text, bez boxu */
.riskWarning, .riskWarningSmall,
.article-body .riskWarning, .article-body .riskWarningSmall,
.pillar-intro .riskWarning, .pillar-intro .riskWarningSmall {
    display: block;
    margin: 18px 0;
    font-size: inherit;   /* stejná velikost písma jako okolní text */
    line-height: inherit;
}
.riskWarningSmall,
.article-body .riskWarningSmall,
.pillar-intro .riskWarningSmall { margin: 12px 0; }

/* Admin lišta, hero recenze + meta lišta a homepage "Novinky z trhů" (.mn-*):
   assets/css/critical.css (vše nad ohybem stránky) */

/* ==========================================================================
   Veřejné profily a zeď (mikropříspěvky)
   ========================================================================== */
.profile-page { max-width: 720px; }

/* Avatar (sdílí veřejný profil, zeď, karty lidí) */
.profile-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; }
.profile-avatar-fallback {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-color); color: #fff; font-weight: 700; line-height: 1;
}

/* Hlavička profilu */
.profile-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1rem; }
.profile-id { display: flex; align-items: center; gap: 16px; }
.profile-avatar-lg { border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.profile-name { color: var(--primary-color); font-size: 1.5rem; margin: 0; }
.profile-handle { color: #6b7280; font-size: 0.95rem; }
.profile-actions form { margin: 0; }

.profile-about { margin-bottom: 1rem; }
.profile-bio { color: var(--text-color); margin-bottom: 10px; white-space: pre-line; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 16px; color: #6b7280; font-size: 0.9rem; }
.profile-meta i { color: #9ca3af; margin-right: 4px; }
.profile-meta a { color: var(--accent-blue); }
.profile-about-empty { background: #f9fafb; border: 1px dashed var(--border-color); border-radius: 8px; padding: 14px 16px; }

.profile-stats { display: flex; gap: 20px; padding: 12px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin-bottom: 1.3rem; font-size: 0.92rem; color: #6b7280; }
.profile-stats strong { color: var(--text-color); }
.profile-stats a { color: #6b7280; text-decoration: none; }
.profile-stats a:hover { color: var(--primary-color); }

/* Pole pro psaní příspěvku */
.post-composer { background: var(--card-background); border: 1px solid var(--border-color); border-radius: 10px; padding: 14px; margin-bottom: 1.4rem; }
.post-composer textarea { width: 100%; border: none; resize: vertical; min-height: 70px; font-size: 1.05rem; font-family: inherit; outline: none; }
.post-composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 6px; }
.post-counter { font-size: 0.85rem; color: #9ca3af; font-variant-numeric: tabular-nums; }
.post-counter.over { color: #b91c1c; font-weight: 700; }

/* Příspěvky */
.post-list { display: flex; flex-direction: column; }
.post { display: flex; gap: 12px; padding: 16px 4px; border-top: 1px solid var(--border-color); position: relative; }
.post:first-child { border-top: none; }
.post-avatar-link { flex-shrink: 0; line-height: 0; }
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.post-author { font-weight: 700; color: var(--primary-color); text-decoration: none; }
.post-author:hover { text-decoration: underline; }
.post-handle, .post-date, .post-dot { color: #9ca3af; font-size: 0.86rem; }
.post-body { color: var(--text-color); white-space: pre-line; overflow-wrap: anywhere; }
.post-body a { color: var(--accent-blue); }
.post-mention { font-weight: 600; text-decoration: none; }
.post-mention:hover { text-decoration: underline; }
.post-delete { position: absolute; top: 12px; right: 4px; margin: 0; }
.post-del-btn { background: none; border: none; color: #cbd5e1; cursor: pointer; padding: 4px 6px; border-radius: 5px; font-size: 0.9rem; }
.post-del-btn:hover { color: #b91c1c; background: #fef2f2; }

/* Karty lidí (/lide, tipy na zdi) */
.people-suggest { margin-bottom: 1.6rem; }
.people-suggest h2, .post-list + section h2 { font-size: 1.15rem; color: var(--primary-color); margin-bottom: 0.9rem; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.person-card { border: 1px solid var(--border-color); border-radius: 10px; padding: 14px; background: var(--card-background); display: flex; flex-direction: column; gap: 8px; }
.person-card-head { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.person-card-id { display: flex; flex-direction: column; min-width: 0; }
.person-card-name { font-weight: 700; color: var(--primary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-card-handle { color: #9ca3af; font-size: 0.82rem; }
.person-card-bio { color: #6b7280; font-size: 0.88rem; margin: 0; }
.person-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.person-card-posts { font-size: 0.82rem; color: #9ca3af; }
.btn-sm-primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.btn-sm-primary:hover { background: var(--primary-light); }

/* Úprava profilu: prefix u handle, editace avataru */
.input-prefix { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.input-prefix span { padding: 11px 4px 11px 14px; color: #9ca3af; font-size: 0.95rem; white-space: nowrap; background: #f9fafb; }
.input-prefix input { border: none !important; border-radius: 0 !important; }
.avatar-edit { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.avatar-edit form { margin: 0; }
.avatar-edit input[type="file"] { display: block; margin-bottom: 10px; font-size: 0.9rem; }

@media (max-width: 560px) {
    .profile-header { flex-direction: column; }
    .profile-actions { width: 100%; }
    .profile-actions .btn-primary, .profile-actions .btn-secondary { width: 100%; text-align: center; }
}

/* Komentáře pod příspěvky */
.post-comments { margin: 4px 0 0 56px; }
.post-comments-count { font-size: 0.82rem; color: #9ca3af; margin-bottom: 8px; }
.pcomment { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--border-color); }
.pcomment-pending { background: #fffbeb; border-radius: 8px; padding: 9px 10px; border-top: none; }
.pcomment-avatar { flex-shrink: 0; line-height: 0; }
.pcomment-main { flex: 1; min-width: 0; }
.pcomment-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcomment-author { font-weight: 700; font-size: 0.88rem; color: var(--primary-color); text-decoration: none; }
.pcomment-author:hover { text-decoration: underline; }
.pcomment-date { font-size: 0.76rem; color: #9ca3af; }
.pcomment-badge { font-size: 0.72rem; font-weight: 700; color: #92400e; background: #fde68a; padding: 1px 7px; border-radius: 10px; }
.pcomment-body { font-size: 0.92rem; color: var(--text-color); overflow-wrap: anywhere; }
.pcomment-body a { color: var(--accent-blue); }
.pcomment-actions { display: flex; gap: 8px; margin-top: 6px; }
.pcomment-actions form { margin: 0; }
.pcomment-form { display: flex; gap: 8px; margin-top: 10px; }
.pcomment-form input[type="text"] { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 18px; font-size: 0.9rem; font-family: inherit; }
.pcomment-form button { flex-shrink: 0; }
.pcomment-form-login { align-items: center; text-decoration: none; }
.pcomment-form-login .pcomment-login-fake { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 18px; font-size: 0.9rem; color: #9ca3af; background: #fff; }
.pcomment-form-login .btn-sm { flex-shrink: 0; }
.pcomment-form-login:hover .pcomment-login-fake { border-color: var(--primary-light); }

/* Moderační fronta v účtu */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; background: #dc2626; color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 18px; text-align: center; border-radius: 9px; }
.mod-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 1.6rem; }
.mod-item { border: 1px solid var(--border-color); border-radius: 10px; padding: 12px 14px; background: var(--card-background); }
.mod-context { font-size: 0.8rem; color: #9ca3af; margin-bottom: 6px; }
.mod-context a { color: #6b7280; }
.mod-item .pcomment { border-top: none; padding: 0; background: none; }

/* Tabulky obalené v .stickyTable (persona je tak generuje): bez zebra pruhů -
   všechny řádky mají stejnou barvu (přebíjí starší střídavé pruhování). */
.article-body .stickyTable tbody tr td,
.article-body .stickyTable tbody tr:nth-child(odd) td,
.article-body .stickyTable tbody tr:nth-child(even) td,
.article-body .stickyTable tr td:first-child,
.article-body .stickyTable tr:nth-child(odd) td:first-child,
.article-body .stickyTable tr:nth-child(even) td:first-child {
    background: var(--card-background);
}

/* Tabulka klíč–hodnota: popisky jsou <th> v prvním sloupci KAŽDÉHO řádku
   (ne horizontální tabulka s hlavičkovým řádkem). .stickyTable z style.css jí
   vnucuje min-width:800px (zbytečný scroll) a zaoblené rohy + sticky na každém
   popisku, takže popisky vypadají jako oddělené bubliny. Tady to vrátíme do
   normálu - bez scrollu, popisek jako kompaktní levý sloupec. */
.article-body .stickyTable:has(tbody tr > th:first-child) table,
.pillar-intro .stickyTable:has(tbody tr > th:first-child) table { min-width: 0; }
.article-body .stickyTable tbody tr > th:first-child,
.pillar-intro .stickyTable tbody tr > th:first-child {
    position: static;
    border-radius: 0;
    width: 38%;
    vertical-align: top;
}

/* Popisek obrázku v článku */
.article-visual figcaption { font-size: 0.85rem; color: #6b7280; margin-top: 8px; }
