/*
Theme Name: Idővonal Magazin 1.10
Theme URI: https://tortenelmimagazin.ro/
Author: Riti József Attila
Author URI: https://tortenelmimagazin.ro/
Description: Reszponzív, szerkesztőségi jellegű WordPress magazinsablon történelmi és helytörténeti oldalakhoz.
Version: 1.10.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: idovonal-magazin
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
    --iv-bg: #f5f1e8;
    --iv-surface: #fffdf8;
    --iv-text: #202020;
    --iv-muted: #6e675d;
    --iv-line: #d8d3c8;
    --iv-accent: #7a2528;
    --iv-accent-dark: #59191c;
    --iv-gold: #a8874a;
    --iv-shadow: 0 12px 35px rgba(37, 30, 20, 0.08);
    --iv-radius: 3px;
    --iv-content: 1240px;
    --iv-reading: 760px;
    --iv-serif: Georgia, 'Times New Roman', serif;
    --iv-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--iv-bg);
    color: var(--iv-text);
    font-family: var(--iv-sans);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--iv-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--iv-accent-dark); }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
    clip: auto !important; width: auto; height: auto; margin: 0;
    padding: 12px 16px; top: 8px; left: 8px; z-index: 100000;
    background: #fff; color: #000;
}

.iv-container { width: min(calc(100% - 40px), var(--iv-content)); margin-inline: auto; }
.iv-site { min-height: 100vh; }
.iv-main { min-height: 55vh; }

/* Header */
.iv-topbar { background: #211e1a; color: #ede7da; font-size: 13px; letter-spacing: .03em; }
.iv-topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.iv-topbar a { color: #fff; text-decoration: none; }
.iv-topbar-links { display: flex; gap: 18px; align-items: center; }
.iv-branding { background: var(--iv-surface); border-bottom: 1px solid var(--iv-line); }
.iv-branding-inner { min-height: 116px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.iv-brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.iv-brand .custom-logo-link { flex: 0 0 auto; }
.iv-brand .custom-logo { max-height: 76px; width: auto; }
.iv-site-title { margin: 0; font-family: var(--iv-serif); font-weight: 700; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; }
.iv-site-title a { color: var(--iv-text); text-decoration: none; }
.iv-tagline { margin: 8px 0 0; color: var(--iv-muted); font-family: var(--iv-serif); font-style: italic; font-size: 17px; }
.iv-header-search { width: min(330px, 32vw); }
.search-form { display: flex; background: #fff; border: 1px solid var(--iv-line); }
.search-form label { flex: 1; }
.search-field { width: 100%; border: 0; padding: 11px 13px; background: transparent; color: var(--iv-text); }
.search-submit { border: 0; background: var(--iv-accent); color: #fff; padding: 10px 16px; cursor: pointer; }
.search-submit:hover { background: var(--iv-accent-dark); }

.iv-nav-wrap { background: var(--iv-surface); border-bottom: 3px solid var(--iv-accent); }
.iv-nav-inner { display: flex; align-items: stretch; justify-content: space-between; }
.iv-menu-toggle { display: none; border: 0; background: transparent; padding: 14px 0; font-weight: 700; cursor: pointer; }
.iv-primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; flex-wrap: wrap; }
.iv-primary-nav li { position: relative; }
.iv-primary-nav a { display: block; padding: 16px 15px 14px; color: var(--iv-text); text-decoration: none; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.iv-primary-nav a:hover, .iv-primary-nav .current-menu-item > a, .iv-primary-nav .current-menu-ancestor > a { color: var(--iv-accent); }
.iv-primary-nav .sub-menu { display: none; position: absolute; z-index: 50; left: 0; top: 100%; min-width: 230px; background: #fff; box-shadow: var(--iv-shadow); border-top: 2px solid var(--iv-accent); }
.iv-primary-nav li:hover > .sub-menu, .iv-primary-nav li:focus-within > .sub-menu { display: block; }
.iv-primary-nav .sub-menu a { padding: 12px 16px; text-transform: none; letter-spacing: 0; border-bottom: 1px solid #eee9df; }
.iv-support-link { align-self: center; white-space: nowrap; margin-left: 16px; padding: 9px 13px; background: var(--iv-accent); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; }
.iv-support-link:hover { background: var(--iv-accent-dark); color: #fff; }

/* Shared typography */
.iv-section { padding: 48px 0; }
.iv-section + .iv-section { padding-top: 48px; }
.iv-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--iv-line); }
.iv-section-title { position: relative; margin: 0 0 -1px; padding: 0 0 10px; border-bottom: 3px solid var(--iv-accent); font-family: var(--iv-serif); font-size: clamp(25px, 3vw, 34px); line-height: 1.2; }
.iv-section-link { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; text-decoration: none; }
.iv-kicker { display: inline-block; margin-bottom: 9px; color: var(--iv-accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; text-decoration: none; }
.iv-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--iv-muted); font-size: 13px; }
.iv-meta a { color: inherit; text-decoration: none; }
.iv-meta > * + *::before { content: '•'; margin-right: 10px; color: var(--iv-gold); }
.iv-title { font-family: var(--iv-serif); line-height: 1.15; }
.iv-title a { color: var(--iv-text); text-decoration: none; }
.iv-title a:hover { color: var(--iv-accent); }

/* Hero */
.iv-hero { padding: 28px 0 18px; }
.iv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(320px, .9fr); gap: 24px; }
.iv-lead { position: relative; min-height: 520px; background: #111; overflow: hidden; box-shadow: var(--iv-shadow); }
.iv-lead-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.iv-lead-image img { width: 100%; height: 100%; }
.iv-lead-image img { object-fit: cover; opacity: .82; }
.iv-lead::after { content: ''; position: absolute; inset: 25% 0 0; background: linear-gradient(to bottom, transparent, rgba(8,8,8,.9)); pointer-events: none; }
.iv-lead-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 34px; color: #fff; }
.iv-lead .iv-kicker { color: #f0d4a3; }
.iv-lead-title { margin: 0 0 14px; font-family: var(--iv-serif); font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; text-wrap: balance; }
.iv-lead-title a { color: #fff; text-decoration: none; }
.iv-lead-excerpt { max-width: 760px; margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: #eee9df; }
.iv-lead .iv-meta { color: #ddd6ca; }
.iv-secondary-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.iv-secondary-card { background: var(--iv-surface); border-bottom: 3px solid transparent; box-shadow: 0 7px 24px rgba(37,30,20,.06); }
.iv-secondary-card:hover { border-bottom-color: var(--iv-accent); }
.iv-secondary-card .iv-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #ddd7cb; }
.iv-secondary-card .iv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.iv-secondary-card:hover .iv-thumb img { transform: scale(1.03); }
.iv-secondary-card-body { padding: 15px 16px 17px; }
.iv-secondary-card .iv-title { margin: 0 0 10px; font-size: 20px; }

/* Cards and grids */
.iv-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 38px; align-items: start; }
.iv-front-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 38px; align-items: start; }
.iv-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
.iv-front-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.iv-front-sidebar { position: sticky; top: 24px; display: grid; gap: 24px; }
.iv-widget-plain { background: transparent; border: 1px solid var(--iv-line); box-shadow: none; }
.iv-category-links { list-style: none; margin: 0; padding: 0; display: grid; }
.iv-category-links li { border-bottom: 1px solid var(--iv-line); }
.iv-category-links li:last-child { border-bottom: 0; }
.iv-category-links a { display: flex; justify-content: space-between; padding: 9px 0; color: var(--iv-text); font-family: var(--iv-serif); font-weight: 700; text-decoration: none; }
.iv-category-links a:hover { color: var(--iv-accent); }
.iv-card { min-width: 0; }
.iv-card .iv-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #ddd7cb; }
.iv-card .iv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.iv-card:hover .iv-thumb img { transform: scale(1.025); }
.iv-card-body { padding-top: 15px; }
.iv-card .iv-title { margin: 0 0 10px; font-size: 25px; }
.iv-card-excerpt { margin: 10px 0 0; color: #4d4942; font-size: 15px; line-height: 1.55; }
.iv-card-list { display: grid; gap: 22px; }
.iv-horizontal-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--iv-line); }
.iv-horizontal-card .iv-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #ddd7cb; }
.iv-horizontal-card .iv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.iv-horizontal-card .iv-title { margin: 4px 0 10px; font-size: 28px; }
.iv-horizontal-card p { margin: 8px 0; color: #555047; }

/* Category bands */
.iv-category-band { background: #ebe5da; border-top: 1px solid var(--iv-line); border-bottom: 1px solid var(--iv-line); }
.iv-category-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; }
.iv-category-feature { background: var(--iv-surface); box-shadow: var(--iv-shadow); }
.iv-category-feature .iv-thumb { aspect-ratio: 16 / 8.5; overflow: hidden; }
.iv-category-feature .iv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.iv-category-feature-body { padding: 24px 25px 26px; }
.iv-category-feature .iv-title { margin: 0 0 10px; font-size: 35px; }
.iv-mini-list { display: grid; gap: 18px; }
.iv-mini-card { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--iv-line); }
.iv-mini-card:last-child { border-bottom: 0; }
.iv-mini-card .iv-thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #d8d1c5; }
.iv-mini-card .iv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.iv-mini-card .iv-title { margin: 3px 0 8px; font-size: 20px; }

/* Topic directory */
.iv-topics-section { background: var(--iv-surface); border-top: 1px solid var(--iv-line); }
.iv-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.iv-topic-card { min-height: 150px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--iv-line); border-top: 3px solid var(--iv-gold); background: var(--iv-bg); color: var(--iv-text); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.iv-topic-card:hover { transform: translateY(-2px); border-top-color: var(--iv-accent); color: var(--iv-text); }
.iv-topic-name { font-family: var(--iv-serif); font-size: 25px; font-weight: 700; line-height: 1.15; }
.iv-topic-count { margin-top: 7px; color: var(--iv-accent); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.iv-topic-description { margin-top: 12px; color: var(--iv-muted); font-size: 14px; line-height: 1.5; }

/* Sidebar */
.iv-sidebar { position: sticky; top: 26px; display: grid; gap: 28px; }
.iv-widget { background: var(--iv-surface); padding: 22px; border-top: 3px solid var(--iv-accent); box-shadow: 0 8px 24px rgba(37,30,20,.05); }
.iv-widget-title { margin: 0 0 18px; font-family: var(--iv-serif); font-size: 25px; }
.iv-popular-list { counter-reset: popular; display: grid; gap: 16px; }
.iv-popular-item { counter-increment: popular; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.iv-popular-item::before { content: counter(popular, decimal-leading-zero); color: var(--iv-gold); font-family: var(--iv-serif); font-size: 31px; line-height: 1; }
.iv-popular-item a { color: var(--iv-text); font-family: var(--iv-serif); font-weight: 700; line-height: 1.25; text-decoration: none; }
.iv-popular-item small { display: block; color: var(--iv-muted); margin-top: 4px; }
.widget ul { margin: 0; padding-left: 18px; }

/* Archive */
.iv-page-header { padding: 48px 0 28px; border-bottom: 1px solid var(--iv-line); }
.iv-page-title { margin: 0; font-family: var(--iv-serif); font-size: clamp(40px, 6vw, 70px); line-height: 1.02; }
.iv-page-description { max-width: 850px; margin: 16px 0 0; color: var(--iv-muted); font-family: var(--iv-serif); font-size: 20px; }
.iv-archive-main { padding: 38px 0 64px; }
.navigation.pagination { margin-top: 38px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { min-width: 40px; padding: 7px 12px; background: var(--iv-surface); border: 1px solid var(--iv-line); text-align: center; text-decoration: none; }
.page-numbers.current { background: var(--iv-accent); border-color: var(--iv-accent); color: #fff; }

/* Single article */
.iv-article-header { padding: 48px 0 32px; }
.iv-article-header-inner { width: min(calc(100% - 40px), 980px); margin-inline: auto; text-align: center; }
.iv-article-title { margin: 8px auto 18px; font-family: var(--iv-serif); font-size: clamp(42px, 6vw, 76px); line-height: 1.03; text-wrap: balance; }
.iv-article-deck { max-width: 820px; margin: 0 auto 18px; color: #4c473f; font-family: var(--iv-serif); font-size: clamp(20px, 2.3vw, 27px); line-height: 1.4; }
.iv-article-header .iv-meta { justify-content: center; }
.iv-featured-wide { width: min(calc(100% - 40px), 1240px); margin: 0 auto 42px; }
.iv-featured-wide img { width: 100%; max-height: 760px; object-fit: cover; box-shadow: var(--iv-shadow); }
.iv-article-layout { width: min(calc(100% - 40px), 1160px); margin: 0 auto 68px; display: grid; grid-template-columns: minmax(0, var(--iv-reading)) 300px; gap: 62px; justify-content: center; align-items: start; }
.iv-entry-content { font-family: var(--iv-serif); font-size: 20px; line-height: 1.82; }
.iv-entry-content > *:first-child { margin-top: 0; }
.iv-entry-content p { margin: 0 0 1.35em; }
.iv-entry-content h2, .iv-entry-content h3, .iv-entry-content h4 { color: var(--iv-text); line-height: 1.2; margin: 1.7em 0 .65em; }
.iv-entry-content h2 { font-size: 37px; }
.iv-entry-content h3 { font-size: 29px; }
.iv-entry-content blockquote { margin: 1.8em 0; padding: 8px 0 8px 24px; border-left: 4px solid var(--iv-gold); color: #4b463f; font-size: 23px; font-style: italic; }
.iv-entry-content figure { margin: 2em 0; }
.iv-entry-content figcaption { margin-top: 8px; color: var(--iv-muted); font-family: var(--iv-sans); font-size: 13px; line-height: 1.45; }

/* Szöveg körbefuttatása az egyedi cikkek önálló képei mellett.
   A széles/teljes szélességű képek és a galériák változatlanul teljes
   szélességben maradnak. A Gutenberg jobb igazítása jobbra úsztatja a képet,
   minden más normál kép alapértelmezetten balra kerül. */
@media (min-width: 901px) {
    .iv-entry-content > figure.wp-block-image:not(.alignwide):not(.alignfull),
    .iv-entry-content > .wp-block-image:not(.alignwide):not(.alignfull) {
        float: left;
        width: min(46%, 360px);
        max-width: 46%;
        margin: .28em 30px 18px 0;
    }

    .iv-entry-content > figure.wp-block-image.alignright,
    .iv-entry-content > .wp-block-image.alignright {
        float: right;
        margin: .28em 0 18px 30px;
    }

    .iv-entry-content > figure.wp-block-image.alignleft,
    .iv-entry-content > .wp-block-image.alignleft,
    .iv-entry-content > figure.wp-block-image.aligncenter,
    .iv-entry-content > .wp-block-image.aligncenter {
        float: left;
        margin: .28em 30px 18px 0;
    }

    .iv-entry-content > figure.wp-block-image:not(.alignwide):not(.alignfull) img,
    .iv-entry-content > .wp-block-image:not(.alignwide):not(.alignfull) img {
        width: 100%;
        height: auto;
    }

    /* Új tartalmi egységnél ne maradjon mellette egy előző kép. */
    .iv-entry-content > h2,
    .iv-entry-content > h3,
    .iv-entry-content > h4,
    .iv-entry-content > blockquote,
    .iv-entry-content > table,
    .iv-entry-content > .wp-block-table,
    .iv-entry-content > .wp-block-gallery,
    .iv-entry-content > .wp-block-columns,
    .iv-entry-content > .wp-block-separator,
    .iv-entry-content > .alignwide,
    .iv-entry-content > .alignfull {
        clear: both;
    }

    .iv-entry-content::after {
        content: "";
        display: block;
        clear: both;
    }
}

@media (max-width: 900px) {
    .iv-entry-content > figure.wp-block-image,
    .iv-entry-content > .wp-block-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 1.6em 0;
    }
}
.iv-entry-content table { width: 100%; border-collapse: collapse; font-family: var(--iv-sans); font-size: 15px; }
.iv-entry-content th, .iv-entry-content td { padding: 10px 12px; border: 1px solid var(--iv-line); text-align: left; }
.iv-entry-content .wp-block-footnotes, .iv-entry-content section[aria-label*='Lábjegyzet'], .iv-entry-content .sources, .iv-entry-content .forrasok { padding: 22px 26px; background: #eee8dd; border-left: 4px solid var(--iv-accent); font-family: var(--iv-sans); font-size: 15px; }
.iv-article-tags { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--iv-line); font-family: var(--iv-sans); font-size: 14px; }
.iv-author-box { margin-top: 34px; padding: 24px; display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 20px; background: var(--iv-surface); border-top: 3px solid var(--iv-gold); }
.iv-author-box img { border-radius: 50%; }
.iv-author-box h3 { margin: 0 0 6px; font-family: var(--iv-serif); }
.iv-author-box p { margin: 0; font-family: var(--iv-sans); font-size: 15px; line-height: 1.6; }
.iv-post-nav { width: min(calc(100% - 40px), 1160px); margin: 0 auto 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.iv-post-nav a { display: block; padding: 22px; background: var(--iv-surface); color: var(--iv-text); text-decoration: none; }
.iv-post-nav span { display: block; color: var(--iv-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.iv-post-nav strong { display: block; margin-top: 5px; font-family: var(--iv-serif); font-size: 20px; }
.iv-related { padding: 46px 0 68px; background: #ebe5da; border-top: 1px solid var(--iv-line); }

/* Pages and comments */
.iv-page-content { width: min(calc(100% - 40px), 920px); margin: 50px auto 70px; }
.iv-page-content .iv-entry-content { font-size: 19px; }
.comments-area { width: min(calc(100% - 40px), var(--iv-reading)); margin: 0 auto 70px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--iv-line); }
.comment-meta { font-size: 14px; }
.comment-content { font-family: var(--iv-serif); }
.comment-form textarea, .comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'] { width: 100%; padding: 11px; border: 1px solid var(--iv-line); background: #fff; }
.form-submit .submit { border: 0; padding: 11px 17px; background: var(--iv-accent); color: #fff; cursor: pointer; }

/* Footer */
.iv-footer { background: #211e1a; color: #ddd6ca; }
.iv-footer a { color: #fff; }
.iv-footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 46px; padding: 54px 0 42px; }
.iv-footer-title { margin: 0 0 16px; color: #fff; font-family: var(--iv-serif); font-size: 24px; }
.iv-footer p { margin: 0; font-size: 14px; }
.iv-footer-email { margin-top: 16px !important; }
.iv-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.iv-footer a { text-decoration: none; }
.iv-copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; color: #bdb5a9; font-size: 13px; }

/* WordPress alignment */
.alignwide { margin-left: max(-120px, calc((var(--iv-reading) - 100vw) / 2)); margin-right: max(-120px, calc((var(--iv-reading) - 100vw) / 2)); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption, .gallery-caption { color: var(--iv-muted); }
.sticky { outline: 1px solid transparent; }
.bypostauthor { outline: 1px solid transparent; }

@media (max-width: 1080px) {
    .iv-hero-grid { grid-template-columns: 1fr; }
    .iv-lead { min-height: 520px; }
    .iv-secondary-stack { grid-template-columns: repeat(4, 1fr); }
    .iv-secondary-card .iv-title { font-size: 18px; }
    .iv-content-grid, .iv-front-content-grid, .iv-article-layout { grid-template-columns: 1fr; }
    .iv-sidebar, .iv-front-sidebar { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .iv-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-header-search { width: 300px; }
}

@media (max-width: 820px) {
    .iv-container { width: min(calc(100% - 28px), var(--iv-content)); }
    .iv-topbar-inner { min-height: 34px; }
    .iv-topbar-links { display: none; }
    .iv-branding-inner { min-height: 112px; grid-template-columns: 1fr; gap: 15px; padding: 16px 0; }
    .iv-brand .custom-logo { max-height: 72px; }
    .iv-site-title { font-size: 37px; }
    .iv-header-search { width: 100%; }
    .iv-menu-toggle { display: block; }
    .iv-nav-inner { display: block; }
    .iv-primary-nav { display: none; padding-bottom: 10px; }
    .iv-primary-nav.is-open { display: block; }
    .iv-primary-nav ul { display: block; }
    .iv-primary-nav a { padding: 11px 0; border-bottom: 1px solid var(--iv-line); }
    .iv-primary-nav .sub-menu { position: static; display: block; min-width: 0; padding-left: 18px; box-shadow: none; border-top: 0; }
    .iv-support-link { display: none; }
    .iv-secondary-stack { grid-template-columns: repeat(2, 1fr); }
    .iv-category-layout { grid-template-columns: 1fr; }
    .iv-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-article-layout { width: min(calc(100% - 30px), 900px); gap: 30px; }
    .iv-article-header-inner, .iv-featured-wide { width: min(calc(100% - 28px), 980px); }
    .iv-entry-content { font-size: 19px; line-height: 1.75; }
    .iv-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .iv-hero { padding-top: 18px; }
    .iv-lead { min-height: 470px; }
    .iv-lead-content { padding: 22px; }
    .iv-lead-title { font-size: 36px; }
    .iv-lead-excerpt { display: none; }
    .iv-secondary-stack { grid-template-columns: 1fr 1fr; gap: 12px; }
    .iv-secondary-card-body { padding: 12px; }
    .iv-secondary-card .iv-title { font-size: 17px; }
    .iv-secondary-card .iv-meta { display: none; }
    .iv-card-grid { grid-template-columns: 1fr; }
    .iv-horizontal-card { grid-template-columns: 112px minmax(0,1fr); gap: 14px; }
    .iv-horizontal-card .iv-title { font-size: 21px; }
    .iv-horizontal-card p { display: none; }
    .iv-mini-card { grid-template-columns: 105px minmax(0,1fr); }
    .iv-sidebar, .iv-front-sidebar { grid-template-columns: 1fr; }
    .iv-front-card-grid, .iv-topic-grid { grid-template-columns: 1fr; }
    .iv-article-title { font-size: 42px; }
    .iv-article-deck { font-size: 20px; }
    .iv-entry-content { font-size: 18px; }
    .iv-entry-content h2 { font-size: 30px; }
    .iv-entry-content h3 { font-size: 25px; }
    .iv-author-box { grid-template-columns: 1fr; }
    .iv-post-nav { grid-template-columns: 1fr; }
    .iv-footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .iv-page-title { font-size: 44px; }
}


/* Compact editorial front page, version 1.3 */
.iv-section-tight { padding-top: 38px; padding-bottom: 38px; }
.iv-hero-grid-compact { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, .82fr); gap: 22px; }
.iv-lead-compact { min-height: 500px; }
.iv-hero-rail { display: grid; grid-template-rows: minmax(0, 1.55fr) auto auto; gap: 14px; }
.iv-rail-feature, .iv-rail-brief { background: var(--iv-surface); border: 1px solid var(--iv-line); }
.iv-rail-feature .iv-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.iv-rail-feature .iv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.iv-rail-body { padding: 15px 17px; }
.iv-rail-feature .iv-title { margin: 0 0 8px; font-size: 24px; }
.iv-rail-brief .iv-rail-body { padding: 14px 17px; }
.iv-rail-brief .iv-kicker { margin-bottom: 5px; }
.iv-rail-brief .iv-title { margin: 0; font-size: 20px; }
.iv-media-placeholder { display: grid !important; place-items: center; min-height: 160px; background: linear-gradient(135deg, #7a7063, #2d2924); color: #eee5d6; text-decoration: none; }
.iv-media-placeholder span { font-family: var(--iv-serif); font-size: 18px; letter-spacing: .03em; }
.iv-lead-image.iv-media-placeholder { min-height: 100%; }
.iv-lead-image.iv-media-placeholder span { opacity: .35; font-size: clamp(28px, 5vw, 64px); }
.iv-latest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.iv-latest-grid .iv-card .iv-title { font-size: 22px; }
.iv-latest-grid .iv-card-excerpt { font-size: 14px; }
.iv-category-showcase { background: #ebe5da; border-top: 1px solid var(--iv-line); border-bottom: 1px solid var(--iv-line); }
.iv-showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.iv-showcase-panel { min-width: 0; background: var(--iv-surface); border-top: 4px solid var(--iv-accent); padding: 20px; box-shadow: 0 8px 26px rgba(37,30,20,.05); }
.iv-showcase-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.iv-showcase-heading h3 { margin: 0; font-family: var(--iv-serif); font-size: 26px; }
.iv-showcase-heading a { font-size: 12px; font-weight: 800; text-transform: uppercase; text-decoration: none; }
.iv-showcase-feature .iv-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 13px; }
.iv-showcase-feature .iv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.iv-showcase-feature h4 { margin: 8px 0 14px; font-family: var(--iv-serif); font-size: 24px; line-height: 1.18; }
.iv-showcase-feature h4 a { color: var(--iv-text); text-decoration: none; }
.iv-showcase-links { display: grid; border-top: 1px solid var(--iv-line); }
.iv-showcase-links a { padding: 11px 0; border-bottom: 1px solid var(--iv-line); color: var(--iv-text); font-family: var(--iv-serif); font-weight: 700; line-height: 1.3; text-decoration: none; }
.iv-showcase-links a:last-child { border-bottom: 0; padding-bottom: 0; }
.iv-recommendation-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--iv-line); border-bottom: 1px solid var(--iv-line); }
.iv-recommendation-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 20px 18px; border-right: 1px solid var(--iv-line); }
.iv-recommendation-item:last-child { border-right: 0; }
.iv-recommendation-number { color: var(--iv-gold); font-family: var(--iv-serif); font-size: 30px; line-height: 1; }
.iv-recommendation-item .iv-kicker { margin: 0 0 5px; font-size: 10px; }
.iv-recommendation-item h3 { margin: 0; font-family: var(--iv-serif); font-size: 18px; line-height: 1.25; }
.iv-recommendation-item h3 a { color: var(--iv-text); text-decoration: none; }
.iv-topic-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.iv-topic-pill { display: flex; align-items: baseline; gap: 9px; padding: 10px 14px; background: var(--iv-surface); border: 1px solid var(--iv-line); color: var(--iv-text); text-decoration: none; }
.iv-topic-pill span { font-family: var(--iv-serif); font-weight: 700; }
.iv-topic-pill small { color: var(--iv-muted); }

@media (max-width: 1080px) {
    .iv-hero-grid-compact { grid-template-columns: 1fr; }
    .iv-hero-rail { grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: none; }
    .iv-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-showcase-grid { grid-template-columns: 1fr; }
    .iv-recommendation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-recommendation-item { border-bottom: 1px solid var(--iv-line); }
}

@media (max-width: 720px) {
    .iv-hero-rail { grid-template-columns: 1fr; }
    .iv-lead-compact { min-height: 460px; }
    .iv-latest-grid { grid-template-columns: 1fr; }
    .iv-recommendation-grid { grid-template-columns: 1fr; }
    .iv-recommendation-item { border-right: 0; }
}


/* Editorial pages, author profiles and compact sharing, version 1.7 */
.iv-page-shell {
    width: min(calc(100% - 40px), 1040px);
    margin: 48px auto 72px;
}
.iv-page-shell .iv-page-header {
    padding: 0 0 26px;
    margin-bottom: 32px;
}
.iv-page-featured {
    margin: 0 0 34px;
}
.iv-page-featured img {
    width: 100%;
    max-height: 640px;
    object-fit: cover;
    box-shadow: var(--iv-shadow);
}
.iv-page-shell .iv-entry-content {
    max-width: 860px;
    margin-inline: auto;
}

/* A régi sablonból származó, tartalomba ágyazott keretelemek ne jelenjenek meg. */
.iv-page-shell .ct-header,
.iv-page-shell .ct-footer,
.iv-page-shell .site-header,
.iv-page-shell .site-footer,
.iv-page-shell .ct-sidebar,
.iv-page-shell .widget-area,
.iv-page-shell .ct-drawer-canvas,
.iv-page-shell .ct-panel,
.iv-page-shell .ct-sticky-container {
    display: none !important;
}

/* A külső megosztóbővítmények hosszú gombsorait a sablon saját, rövid sora váltja fel. */
.single-post .sharedaddy,
.single-post .sd-sharing-enabled,
.single-post .heateor_sss_sharing_container,
.single-post .a2a_kit,
.single-post .addtoany_share_save_container,
.single-post .essb_links,
.single-post .ssba,
.single-post .sassy-social-share,
.single-post .wp-socializer,
.single-post .scriptlesssocialsharing {
    display: none !important;
}
.iv-share-tools {
    clear: both;
    margin-top: 34px;
    padding: 20px 0;
    border-top: 1px solid var(--iv-line);
    border-bottom: 1px solid var(--iv-line);
    font-family: var(--iv-sans);
}
.iv-share-title {
    margin: 0 0 12px;
    font-family: var(--iv-serif);
    font-size: 22px;
}
.iv-share-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.iv-share-link,
.iv-copy-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--iv-line);
    background: var(--iv-surface);
    color: var(--iv-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.iv-share-link:hover,
.iv-copy-link:hover,
.iv-copy-link.is-copied {
    background: var(--iv-accent);
    border-color: var(--iv-accent);
    color: #fff;
}

.iv-author-box-title a {
    color: var(--iv-text);
    text-decoration: none;
}
.iv-author-box-title a:hover { color: var(--iv-accent); }
.iv-author-box-link {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--iv-sans);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    text-decoration: none;
}

.iv-author-profile {
    width: min(calc(100% - 40px), 1160px);
    margin: 48px auto 72px;
}
.iv-author-profile-head {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 34px;
    background: var(--iv-surface);
    border-top: 4px solid var(--iv-gold);
    box-shadow: var(--iv-shadow);
}
.iv-author-profile-head img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}
.iv-author-profile-name {
    margin: 0 0 10px;
    font-family: var(--iv-serif);
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
}
.iv-author-profile-bio {
    max-width: 760px;
    margin: 0;
    color: var(--iv-muted);
    font-family: var(--iv-serif);
    font-size: 20px;
}
.iv-author-articles { margin-top: 48px; }

.iv-error-panel {
    width: min(calc(100% - 40px), 980px);
    margin: 55px auto 72px;
    text-align: center;
}
.iv-error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0 42px;
}
.iv-button {
    display: inline-block;
    padding: 10px 16px;
    background: var(--iv-accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}
.iv-button:hover { background: var(--iv-accent-dark); color: #fff; }
.iv-error-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    text-align: left;
}

@media (max-width: 720px) {
    .iv-page-shell,
    .iv-author-profile { width: min(calc(100% - 28px), 1040px); }
    .iv-author-profile-head { grid-template-columns: 1fr; padding: 24px; text-align: center; }
    .iv-author-profile-head img { margin-inline: auto; }
    .iv-error-grid { grid-template-columns: 1fr; }
    .iv-share-list { display: grid; grid-template-columns: 1fr 1fr; }
    .iv-share-link, .iv-copy-link { justify-content: center; }
}


/* 1.8: The theme provides its own compact sharing tools. Hide legacy plugin output everywhere. */
.scriptlesssocialsharing,
.scriptless-social-sharing,
[class*="scriptlesssocialsharing"],
.sharedaddy,
.sd-sharing-enabled,
.heateor_sss_sharing_container,
.addtoany_share_save_container,
.ssba,
.sassy-social-share,
.nc_socialPanel,
.essb_links,
.shareaholic-share-buttons-container {
    display: none !important;
}
