/*
Theme Name: Logico Child
Template: logico
Description: Next-Tech child of Logico 1.1.3: post title h1 in single.php, blog card titles h2 in content.php, smaller h2-h6 inside the post text when the title is h1, Cyrillic glyphs for Space Grotesk from local Inter Tight (OFL). Everything else comes from the parent.
Author: Next-Tech
Version: 1.2.1
Text Domain: logico
*/

/* Single post: h1 uses theme h2 typography (same as page titles), keep the old gap under the date */
.content-wrapper .single-post > .post-title-single:not(:first-child) {
    margin-top: 40px;
}

/*
 * Headings inside the post text, only when the post title is printed as h1 (body class nt-post-title-h1, functions.php).
 * The theme gives h2 the same size as the h1 title (80px on desktop), so the text h2 looked like a second title.
 * Same font, weight, colour, uppercase and letter-spacing as the theme; only size and spacing change.
 * Breakpoints follow the theme typography (1200 / 840 / 660). h1 title: 80 / 60 / 50 / 32 px.
 * Margins: more space above than below, so a heading reads as the start of its section; the paragraph above keeps
 * its 1.7em bottom margin and collapses with margin-top. A heading right after a heading gets no extra top gap
 * (html prefix: must beat the margin shorthand in the media queries below).
 */
body.nt-post-title-h1 div.single-post > .post-content :is(h2, h3, h4, h5, h6):not([class*=logico-title-h]) {
    line-height: 1.2;
}
body.nt-post-title-h1 div.single-post > .post-content h2:not([class*=logico-title-h]) { font-size: 48px; margin: 60px 0 20px; }
body.nt-post-title-h1 div.single-post > .post-content h3:not([class*=logico-title-h]) { font-size: 36px; margin: 44px 0 16px; }
body.nt-post-title-h1 div.single-post > .post-content h4:not([class*=logico-title-h]) { font-size: 28px; margin: 36px 0 14px; }
body.nt-post-title-h1 div.single-post > .post-content h5:not([class*=logico-title-h]) { font-size: 24px; margin: 32px 0 12px; }
body.nt-post-title-h1 div.single-post > .post-content h6:not([class*=logico-title-h]) { font-size: 20px; margin: 32px 0 12px; }
html body.nt-post-title-h1 div.single-post > .post-content :is(h2, h3, h4, h5, h6):first-child,
html body.nt-post-title-h1 div.single-post > .post-content :is(h2, h3, h4, h5, h6) + :is(h2, h3, h4, h5, h6) {
    margin-top: 0;
}
@media only screen and (max-width: 1200px) {
    body.nt-post-title-h1 div.single-post > .post-content h2:not([class*=logico-title-h]) { font-size: 42px; }
    body.nt-post-title-h1 div.single-post > .post-content h3:not([class*=logico-title-h]) { font-size: 32px; }
    body.nt-post-title-h1 div.single-post > .post-content h4:not([class*=logico-title-h]) { font-size: 26px; }
    body.nt-post-title-h1 div.single-post > .post-content h5:not([class*=logico-title-h]) { font-size: 22px; }
    body.nt-post-title-h1 div.single-post > .post-content h6:not([class*=logico-title-h]) { font-size: 19px; }
}
@media only screen and (max-width: 840px) {
    body.nt-post-title-h1 div.single-post > .post-content h2:not([class*=logico-title-h]) { font-size: 36px; }
    body.nt-post-title-h1 div.single-post > .post-content h3:not([class*=logico-title-h]) { font-size: 28px; }
    body.nt-post-title-h1 div.single-post > .post-content h4:not([class*=logico-title-h]) { font-size: 24px; }
    body.nt-post-title-h1 div.single-post > .post-content h5:not([class*=logico-title-h]) { font-size: 20px; }
    body.nt-post-title-h1 div.single-post > .post-content h6:not([class*=logico-title-h]) { font-size: 18px; }
}
@media only screen and (max-width: 660px) {
    body.nt-post-title-h1 div.single-post > .post-content h2:not([class*=logico-title-h]) { font-size: 28px; margin: 40px 0 16px; }
    body.nt-post-title-h1 div.single-post > .post-content h3:not([class*=logico-title-h]) { font-size: 24px; margin: 32px 0 12px; }
    body.nt-post-title-h1 div.single-post > .post-content h4:not([class*=logico-title-h]) { font-size: 20px; margin: 28px 0 10px; }
    body.nt-post-title-h1 div.single-post > .post-content h5:not([class*=logico-title-h]) { font-size: 18px; margin: 24px 0 10px; }
    body.nt-post-title-h1 div.single-post > .post-content h6:not([class*=logico-title-h]) { font-size: 17px; margin: 24px 0 10px; }
}

/* Blog cards: h2 instead of h1, same look as before (Additional CSS sets h1.post-title to 26px) */
.standard-blog-item-wrapper:not(.logico-format-quote) .blog-item h2.post-title {
    font-size: 26px;
    line-height: 1.2em;
}

/*
 * Cyrillic for Space Grotesk (Space Grotesk has no Cyrillic, the theme sets it without fallback -> Times New Roman).
 * Same family name, Cyrillic unicode-range only: the browser takes Cyrillic letters from Inter Tight and everything
 * else (Latin, digits, punctuation) from the Elementor local Space Grotesk faces, so CZ/EN pages never load these files.
 * Files: Inter Tight v9 (Google Fonts, SIL OFL 1.1, fonts/OFL.txt), variable wght, subsets cyrillic and cyrillic-ext.
 * One face per weight that Elementor declares for Space Grotesk (300-700), so each weight stays one composite face.
 * U+0301 and U+20B4 left out on purpose: they overlap Space Grotesk ranges.
 */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic.woff2') format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-tight-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* 2026-10-14 Next-Tech: path label in dark blocks (/kontakty/, /recenze-nasi-prace/, en, ru) links to the emergency page, keeps the heading colour */
.nt-path-label .logico-title a {
    color: inherit;
    text-decoration: none;
}
.nt-path-label .logico-title a:hover {
    text-decoration: underline;
}
