/* ==========================================================================
   IEF Inner Pages — Design System (hp2-)
   Instytut Edukacji Finansowej
   --------------------------------------------------------------------------
   Styles for: single.php, archive.php, 404.php, search.php
   Reuses hp2- variables from ief-v3.css (loaded separately on front page).
   Inner pages load THIS file instead, with variables defined here.
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. CSS CUSTOM PROPERTIES (same as homepage)
   -------------------------------------------------------------------------- */
:root {
    /* Ink */
    --hp2-ink:          #0A192F;
    --hp2-ink-soft:     #3F5F7D;
    --hp2-ink-faint:    #8194A6;

    /* Rules / borders */
    --hp2-rule:         #E8ECF1;
    --hp2-rule-strong:  #C7D0DB;

    /* Surfaces */
    --hp2-paper:        #FAFAF8;
    --hp2-white:        #FFFFFF;

    /* Accents */
    --hp2-mint:         #0AC689;
    --hp2-mint-ink:     #08A372;
    --hp2-sky:          #60B8CD;

    /* Fonts */
    --hp2-font-display: 'Manrope', system-ui, sans-serif;
    --hp2-font-cover:   'Archivo Black', 'Impact', system-ui, sans-serif;
    --hp2-font-body:    'Montserrat', system-ui, sans-serif;

    /* Layout */
    --hp2-max-w:        1320px;
    --hp2-pad-x:        56px;
    --hp2-section-gap:  120px;
    --hp2-gutter:       32px;

    /* Radii */
    --hp2-pill:         999px;
    --hp2-radius-sm:    8px;
    --hp2-radius-md:    12px;
}


/* --------------------------------------------------------------------------
   1. RESETS & BASE (same as homepage)
   -------------------------------------------------------------------------- */
body.hp2-body {
    margin: 0;
    padding: 0;
    font-family: var(--hp2-font-body);
    font-size: 17px;
    color: var(--hp2-ink);
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hp2-page {
    /* intentionally no overflow-x: hidden – breaks position: sticky */
}

html {
    overflow-x: hidden;
}

/* Universal box-sizing */
.hp2-page *, .hp2-page *::before, .hp2-page *::after { box-sizing: border-box; }

/* Element resets -- :where() keeps specificity at 0 */
.hp2-page :where(img) { max-width: 100%; height: auto; display: block; }
.hp2-page :where(a) { text-decoration: none; color: inherit; }
.hp2-page :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
.hp2-page :where(p, h1, h2, h3, h4, h5, h6) { margin: 0; }
.hp2-page :where(h1, h2, h3, h4) { text-transform: none; font-weight: 400; }
.hp2-page :where(button, input, select, textarea) {
    font: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
}
.hp2-page :where(button) { cursor: pointer; }

/* Container */
.hp2-wrap {
    max-width: var(--hp2-max-w);
    margin: 0 auto;
    padding: 0 var(--hp2-pad-x);
}


/* --------------------------------------------------------------------------
   2. HEADER (identical to homepage)
   -------------------------------------------------------------------------- */
.hp2-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 250, 248, 0.88);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    backdrop-filter: blur(16px) saturate(1.6);
    border-bottom: 1px solid var(--hp2-rule);
    transition: background 0.3s;
}

.hp2-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 72px;
}

.hp2-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hp2-header__brand svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.hp2-header__brand-name {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hp2-ink);
    line-height: 1.3;
}

.hp2-header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
    justify-self: center;
}

.hp2-header__link {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--hp2-ink);
    opacity: 0.6;
    transition: opacity 0.25s;
    letter-spacing: 0.01em;
}

.hp2-header__link:hover {
    opacity: 1;
}

/* Dropdown */
.hp2-header__dropdown {
    position: relative;
}

.hp2-header__dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 12px;
    background: var(--hp2-white);
    border: 1px solid var(--hp2-rule);
    border-radius: var(--hp2-radius-sm);
    box-shadow: 0 8px 32px rgba(10, 25, 47, 0.10);
    min-width: 200px;
    padding: 8px 0;
    z-index: 1001;
}

.hp2-header__dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.hp2-header__dropdown:hover .hp2-header__dropdown-menu {
    display: block;
}

.hp2-header__dropdown-item {
    display: block;
    padding: 10px 20px;
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--hp2-ink);
    transition: background 0.15s, color 0.15s;
}

.hp2-header__dropdown-item:hover {
    background: var(--hp2-paper);
    color: var(--hp2-mint-ink);
}

.hp2-header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-self: end;
}

.hp2-header__login {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--hp2-ink);
    opacity: 0.55;
    transition: opacity 0.25s;
}

.hp2-header__login:hover {
    opacity: 1;
}

.hp2-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--hp2-pill);
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.hp2-header__cta:hover {
    background: #0d2240;
    transform: translateY(-1px);
}

.hp2-header__actions-mobile {
    display: none;
}

.hp2-header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    justify-self: end;
}

.hp2-header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--hp2-ink);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 2px;
}


/* --------------------------------------------------------------------------
   3. FOOTER (identical to homepage)
   -------------------------------------------------------------------------- */
.hp2-footer {
    background: var(--hp2-ink);
    color: rgba(255, 255, 255, 0.55);
    padding: 80px 0 0;
}

.hp2-footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp2-footer__brand {
    max-width: 400px;
}

.hp2-footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.hp2-footer__logo svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.hp2-footer__logo-text {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hp2-white);
    line-height: 1.3;
}

.hp2-footer__mission {
    font-family: var(--hp2-font-body);
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.45);
}

.hp2-footer__links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.hp2-footer__col-title {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 20px;
}

.hp2-footer__col-list li {
    margin-bottom: 12px;
}

.hp2-footer__col-list a {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.25s;
    white-space: nowrap;
}

.hp2-footer__col-list a:hover {
    color: var(--hp2-white);
}

.hp2-footer__legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    font-family: var(--hp2-font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.hp2-footer__legal a {
    color: var(--hp2-mint);
    transition: color 0.25s;
}

.hp2-footer__legal a:hover {
    color: var(--hp2-white);
}

.hp2-footer__bar {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp2-footer__bar-mark {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.hp2-footer__disclaimer {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.6;
    max-width: 720px;
    padding: 20px 0 0;
    margin: 0 auto;
    text-align: center;
}


/* --------------------------------------------------------------------------
   4. READING LIST (reused from homepage for related/archive/search)
   -------------------------------------------------------------------------- */
.hp2-reading {
    padding: 80px 0;
    background: var(--hp2-paper);
}

.hp2-reading--archive,
.hp2-reading--search {
    padding-top: 0;
    padding-bottom: 80px;
}

.hp2-reading--suggestions {
    padding: 80px 0;
}

.hp2-reading__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--hp2-ink);
}

.hp2-reading__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--hp2-ink);
}

.hp2-reading__all {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
    transition: color 0.25s;
}

.hp2-reading__all:hover {
    color: var(--hp2-ink);
}

.hp2-reading__list {
    list-style: none;
}

.hp2-reading__item {
    display: grid;
    grid-template-columns: 56px 1fr 280px;
    gap: 32px;
    align-items: start;
    padding: 32px 0;
    border-bottom: 1px solid var(--hp2-rule);
}

.hp2-reading__item:last-child {
    border-bottom: none;
}

.hp2-reading__num {
    font-family: var(--hp2-font-display);
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
    color: var(--hp2-rule-strong);
    letter-spacing: -0.04em;
}

.hp2-reading__meta {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
    margin-bottom: 8px;
}

.hp2-reading__meta span {
    color: var(--hp2-mint);
}

.hp2-reading__item-title {
    font-family: var(--hp2-font-display);
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--hp2-ink);
    margin-bottom: 10px;
    transition: color 0.25s;
}

.hp2-reading__item-title a {
    color: inherit;
}

.hp2-reading__item-title a:hover {
    color: var(--hp2-ink-soft);
}

.hp2-reading__excerpt {
    font-family: var(--hp2-font-body);
    font-size: 14px;
    line-height: 1.65;
    color: var(--hp2-ink-soft);
    max-width: 540px;
}

.hp2-reading__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 4px;
}

.hp2-reading__difficulty-label {
    font-family: var(--hp2-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
}

.hp2-reading__difficulty-bar {
    display: flex;
    gap: 4px;
}

.hp2-reading__difficulty-bar span {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: var(--hp2-rule);
}

.hp2-reading__difficulty-bar span.is-filled {
    background: var(--hp2-mint);
}

.hp2-reading__difficulty-text {
    font-family: var(--hp2-font-body);
    font-size: 12px;
    color: var(--hp2-ink-faint);
    margin-top: 2px;
}


/* --------------------------------------------------------------------------
   5. NEWSLETTER (compact variant for inner pages)
   -------------------------------------------------------------------------- */
.hp2-newsletter--compact {
    padding: 64px 0;
    border-top: 1px solid var(--hp2-rule);
}

.hp2-newsletter--compact__inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: center;
}

.hp2-newsletter--compact__heading {
    font-family: var(--hp2-font-display);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--hp2-ink);
    margin-top: 12px;
}

.hp2-newsletter__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hp2-mint);
}

.hp2-newsletter__eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--hp2-mint);
    flex-shrink: 0;
}

.hp2-newsletter__form {
    display: flex;
    border: 1px solid var(--hp2-ink);
    border-radius: var(--hp2-pill);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.hp2-newsletter__form:focus-within {
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.08);
}

.hp2-newsletter__input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-family: var(--hp2-font-body);
    font-size: 14px;
    color: var(--hp2-ink);
    outline: none;
    min-width: 0;
}

.hp2-newsletter__input::placeholder {
    color: var(--hp2-ink-faint);
}

.hp2-newsletter__submit {
    padding: 16px 28px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border-radius: 0 var(--hp2-pill) var(--hp2-pill) 0;
    margin: -1px -1px -1px 0;
}

.hp2-newsletter__submit:hover {
    background: #0d2240;
}

.hp2-newsletter__legal {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    color: var(--hp2-ink-faint);
    margin-top: 16px;
    line-height: 1.5;
    max-width: 480px;
}

.hp2-newsletter__legal a {
    color: var(--hp2-ink-soft);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ==========================================================================
   6. SINGLE POST — Article Header
   ========================================================================== */
.hp2-article-header {
    padding: 64px 0 48px;
}

.hp2-article-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hp2-mint);
    margin-bottom: 24px;
}

.hp2-article-header__eyebrow::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--hp2-mint);
    flex-shrink: 0;
}

.hp2-article-header__eyebrow a {
    color: inherit;
    transition: color 0.25s;
}

.hp2-article-header__eyebrow a:hover {
    color: var(--hp2-mint-ink);
}

.hp2-article-header__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--hp2-ink);
    max-width: 900px;
    margin-bottom: 24px;
}

/* Meta line */
.hp2-article-header__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: var(--hp2-font-body);
    font-size: 13px;
    color: var(--hp2-ink-faint);
    margin-bottom: 40px;
}

.hp2-article-header__meta-author {
    font-weight: 600;
    color: var(--hp2-ink-soft);
}

.hp2-article-header__meta-sep {
    color: var(--hp2-rule-strong);
}

.hp2-article-header__meta-diff {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hp2-article-header__diff-bar {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.hp2-article-header__diff-bar span {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: var(--hp2-rule);
}

.hp2-article-header__diff-bar span.is-filled {
    background: var(--hp2-mint);
}

/* Featured image */
.hp2-article-header__hero {
    margin: 0;
}

.hp2-article-header__hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--hp2-radius-md);
    aspect-ratio: 21 / 9;
    object-fit: cover;
}


/* ==========================================================================
   7. SINGLE POST — Article Content Typography
   ========================================================================== */
.hp2-article {
    padding: 56px 0 64px;
}

.hp2-article-content {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--hp2-font-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--hp2-ink);
}

/* Headings */
.hp2-article-content h2 {
    font-family: var(--hp2-font-display);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--hp2-ink);
    margin-top: 56px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hp2-rule);
}

.hp2-article-content h3 {
    font-family: var(--hp2-font-display);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--hp2-ink);
    margin-top: 40px;
    margin-bottom: 12px;
}

.hp2-article-content h4 {
    font-family: var(--hp2-font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hp2-ink);
    margin-top: 32px;
    margin-bottom: 12px;
}

/* Paragraphs */
.hp2-article-content p {
    margin-bottom: 24px;
}

/* Links */
.hp2-article-content a {
    color: var(--hp2-mint-ink);
    text-decoration: underline;
    text-decoration-color: var(--hp2-mint);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.hp2-article-content a:hover {
    color: var(--hp2-ink);
    text-decoration-color: var(--hp2-ink);
}

/* Lists */
.hp2-article-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 24px;
}

.hp2-article-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
}

.hp2-article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hp2-mint);
}

.hp2-article-content ol {
    list-style: none;
    padding-left: 0;
    margin-bottom: 24px;
    counter-reset: article-ol;
}

.hp2-article-content ol li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 10px;
    counter-increment: article-ol;
}

.hp2-article-content ol li::before {
    content: counter(article-ol, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--hp2-font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
    letter-spacing: -0.02em;
}

/* Blockquote */
.hp2-article-content blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    border-left: 3px solid var(--hp2-mint);
    background: var(--hp2-paper);
    border-radius: 0 var(--hp2-radius-sm) var(--hp2-radius-sm) 0;
    font-style: italic;
    color: var(--hp2-ink-soft);
}

.hp2-article-content blockquote p:last-child {
    margin-bottom: 0;
}

.hp2-article-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
}

/* Images */
.hp2-article-content img {
    border-radius: var(--hp2-radius-sm);
    margin: 32px auto;
}

.hp2-article-content figure {
    margin: 32px 0;
}

.hp2-article-content figure img {
    margin: 0 auto;
}

.hp2-article-content figcaption {
    text-align: center;
    font-family: var(--hp2-font-body);
    font-size: 13px;
    color: var(--hp2-ink-faint);
    margin-top: 12px;
    line-height: 1.5;
}

/* Code (inline) */
.hp2-article-content code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 0.88em;
    background: var(--hp2-paper);
    border: 1px solid var(--hp2-rule);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--hp2-ink);
}

/* Code block (pre) */
.hp2-article-content pre {
    background: var(--hp2-ink);
    color: rgba(255, 255, 255, 0.88);
    padding: 24px 28px;
    border-radius: var(--hp2-radius-sm);
    overflow-x: auto;
    margin: 32px 0;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.hp2-article-content pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

/* Horizontal rule */
.hp2-article-content hr {
    border: none;
    border-top: 1px solid var(--hp2-rule);
    margin: 48px 0;
}

/* Table */
.hp2-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 15px;
}

.hp2-article-content thead th {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--hp2-ink);
}

.hp2-article-content tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--hp2-rule);
    color: var(--hp2-ink-soft);
}

.hp2-article-content tbody tr:nth-child(even) {
    background: var(--hp2-paper);
}

/* WordPress alignment classes */
.hp2-article-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hp2-article-content .alignleft {
    float: left;
    margin: 8px 24px 16px 0;
}

.hp2-article-content .alignright {
    float: right;
    margin: 8px 0 16px 24px;
}

.hp2-article-content .wp-caption {
    max-width: 100%;
}

.hp2-article-content .wp-caption-text {
    text-align: center;
    font-size: 13px;
    color: var(--hp2-ink-faint);
    margin-top: 8px;
}

/* WordPress block styles */
.hp2-article-content .wp-block-image {
    margin: 32px 0;
}

.hp2-article-content .wp-block-image img {
    margin: 0 auto;
}

.hp2-article-content .wp-block-image figcaption {
    margin-top: 12px;
}

/* Embed responsive */
.hp2-article-content .wp-block-embed {
    margin: 32px 0;
}

.hp2-article-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.hp2-article-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--hp2-radius-sm);
}


/* ==========================================================================
   8. SINGLE POST — Author Box
   ========================================================================== */
.hp2-author-box {
    padding: 0 0 64px;
}

.hp2-author-box__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 32px;
    border: 1px solid var(--hp2-rule);
    border-radius: var(--hp2-radius-md);
    background: var(--hp2-paper);
}

.hp2-author-box__avatar {
    flex-shrink: 0;
}

.hp2-author-box__avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.hp2-author-box__label {
    font-family: var(--hp2-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
    margin-bottom: 4px;
}

.hp2-author-box__name {
    font-family: var(--hp2-font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--hp2-ink);
    margin-bottom: 8px;
}

.hp2-author-box__bio {
    font-family: var(--hp2-font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--hp2-ink-soft);
}


/* ==========================================================================
   9. SINGLE POST — Related Posts ("Czytaj dalej")
   ========================================================================== */
.hp2-related {
    padding: 80px 0;
    background: var(--hp2-paper);
}

.hp2-related__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--hp2-ink);
}

.hp2-related__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--hp2-ink);
}

.hp2-related__all {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
    transition: color 0.25s;
}

.hp2-related__all:hover {
    color: var(--hp2-ink);
}


/* ==========================================================================
   10. ARCHIVE — Header
   ========================================================================== */
.hp2-archive-header {
    padding: 64px 0 48px;
    background: var(--hp2-paper);
    border-bottom: 1px solid var(--hp2-rule);
}

.hp2-archive-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hp2-mint);
    margin-bottom: 16px;
}

.hp2-archive-header__eyebrow::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--hp2-mint);
    flex-shrink: 0;
}

.hp2-archive-header__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--hp2-ink);
    margin-bottom: 16px;
}

.hp2-archive-header__desc {
    font-family: var(--hp2-font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--hp2-ink-soft);
    max-width: 640px;
    margin-bottom: 16px;
}

.hp2-archive-header__desc p {
    margin-bottom: 0;
}

.hp2-archive-header__count {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
}


/* ==========================================================================
   10b. ARTICLE LIST WITH THUMBNAILS (pulapki archive)
   ========================================================================== */
.hp2-article-list {
    padding: 0 0 80px;
}

.hp2-article-list__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hp2-article-list__item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid var(--hp2-rule);
}

.hp2-article-list__item:first-child {
    border-top: 1px solid var(--hp2-rule);
}

.hp2-article-list__thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--hp2-radius-sm);
    overflow: hidden;
}

.hp2-article-list__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp2-article-list__meta {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
    margin-bottom: 8px;
}

.hp2-article-list__title {
    font-family: var(--hp2-font-display);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--hp2-ink);
    margin-bottom: 8px;
}

.hp2-article-list__title a {
    color: inherit;
    transition: color 0.2s;
}

.hp2-article-list__title a:hover {
    color: var(--hp2-mint-ink);
}

.hp2-article-list__excerpt {
    font-family: var(--hp2-font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--hp2-ink-soft);
}

@media (max-width: 768px) {
    .hp2-article-list__item {
        grid-template-columns: 120px 1fr;
        gap: 20px;
    }
    .hp2-article-list__title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hp2-article-list__item {
        grid-template-columns: 1fr;
    }
    .hp2-article-list__thumb {
        aspect-ratio: 16 / 9;
    }
}


/* ==========================================================================
   11. PAGINATION
   ========================================================================== */
.hp2-pagination {
    padding: 48px 0 0;
}

.hp2-pagination__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hp2-pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--hp2-pill);
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.hp2-pagination__btn:hover {
    background: #0d2240;
    transform: translateY(-1px);
}

.hp2-pagination__btn.is-disabled {
    background: var(--hp2-rule);
    color: var(--hp2-ink-faint);
    pointer-events: none;
}

.hp2-pagination__info {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    color: var(--hp2-ink-faint);
}


/* ==========================================================================
   12. EMPTY STATE
   ========================================================================== */
.hp2-empty {
    padding: 80px 0;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.hp2-empty__title {
    font-family: var(--hp2-font-display);
    font-size: 28px;
    font-weight: 400;
    color: var(--hp2-ink);
    margin-bottom: 16px;
}

.hp2-empty__text {
    font-family: var(--hp2-font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--hp2-ink-soft);
    margin-bottom: 32px;
}

.hp2-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--hp2-pill);
    transition: background 0.2s, transform 0.15s;
}

.hp2-empty__btn:hover {
    background: #0d2240;
    transform: translateY(-1px);
}

/* Popular categories in empty state */
.hp2-empty__cats {
    margin-bottom: 32px;
}

.hp2-empty__cats-title {
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hp2-ink-faint);
    margin-bottom: 16px;
}

.hp2-empty__cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.hp2-empty__cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--hp2-rule);
    border-radius: var(--hp2-pill);
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--hp2-ink-soft);
    transition: all 0.2s;
}

.hp2-empty__cat-pill:hover {
    border-color: var(--hp2-ink);
    color: var(--hp2-ink);
}

.hp2-empty__cat-count {
    font-size: 11px;
    color: var(--hp2-ink-faint);
}


/* ==========================================================================
   13. 404 PAGE
   ========================================================================== */
.hp2-404 {
    padding: 96px 0 80px;
    text-align: center;
}

.hp2-404__inner {
    max-width: 600px;
    margin: 0 auto;
}

.hp2-404__code {
    font-family: var(--hp2-font-display);
    font-size: clamp(100px, 20vw, 200px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--hp2-rule);
    margin-bottom: 16px;
    user-select: none;
}

.hp2-404__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--hp2-ink);
    margin-bottom: 16px;
}

.hp2-404__text {
    font-family: var(--hp2-font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--hp2-ink-soft);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* 404 search form */
.hp2-404__search {
    display: flex;
    border: 1px solid var(--hp2-ink);
    border-radius: var(--hp2-pill);
    overflow: hidden;
    transition: box-shadow 0.2s;
    max-width: 480px;
    margin: 0 auto 24px;
}

.hp2-404__search:focus-within {
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.08);
}

.hp2-404__search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-family: var(--hp2-font-body);
    font-size: 14px;
    color: var(--hp2-ink);
    outline: none;
    min-width: 0;
}

.hp2-404__search-input::placeholder {
    color: var(--hp2-ink-faint);
}

.hp2-404__search-btn {
    padding: 16px 28px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border-radius: 0 var(--hp2-pill) var(--hp2-pill) 0;
    margin: -1px -1px -1px 0;
}

.hp2-404__search-btn:hover {
    background: #0d2240;
}

.hp2-404__home-link {
    font-family: var(--hp2-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--hp2-ink-faint);
    transition: color 0.25s;
}

.hp2-404__home-link:hover {
    color: var(--hp2-ink);
}


/* ==========================================================================
   14. SEARCH PAGE — Header
   ========================================================================== */
.hp2-search-header {
    padding: 64px 0 48px;
    background: var(--hp2-paper);
    border-bottom: 1px solid var(--hp2-rule);
}

.hp2-search-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--hp2-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hp2-mint);
    margin-bottom: 16px;
}

.hp2-search-header__eyebrow::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--hp2-mint);
    flex-shrink: 0;
}

.hp2-search-header__title {
    font-family: var(--hp2-font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--hp2-ink);
    margin-bottom: 12px;
}

.hp2-search-header__count {
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--hp2-ink-faint);
    margin-bottom: 28px;
}

/* Search refine form */
.hp2-search-header__form {
    display: flex;
    border: 1px solid var(--hp2-rule-strong);
    border-radius: var(--hp2-pill);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    max-width: 560px;
}

.hp2-search-header__form:focus-within {
    border-color: var(--hp2-ink);
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.08);
}

.hp2-search-header__input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    font-family: var(--hp2-font-body);
    font-size: 14px;
    color: var(--hp2-ink);
    outline: none;
    min-width: 0;
}

.hp2-search-header__input::placeholder {
    color: var(--hp2-ink-faint);
}

.hp2-search-header__btn {
    padding: 14px 24px;
    background: var(--hp2-ink);
    color: var(--hp2-white);
    font-family: var(--hp2-font-body);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border-radius: 0 var(--hp2-pill) var(--hp2-pill) 0;
    margin: -1px -1px -1px 0;
}

.hp2-search-header__btn:hover {
    background: #0d2240;
}


/* ==========================================================================
   15. UTILITY: Hide GP defaults on inner pages
   ========================================================================== */
.hp2-page .site-header,
.hp2-page .site-footer,
.hp2-page #page > .site-content > .inside-article {
    display: none !important;
}


/* ==========================================================================
   RESPONSIVE — Tablet (max 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --hp2-pad-x: 32px;
        --hp2-section-gap: 80px;
    }

    /* Header: collapse to flex */
    .hp2-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .hp2-header__nav {
        gap: 24px;
    }

    .hp2-header__actions {
        gap: 16px;
    }

    /* Reading list: remove aside */
    .hp2-reading__item {
        grid-template-columns: 48px 1fr;
        gap: 24px;
    }

    .hp2-reading__aside {
        display: none;
    }

    /* Newsletter compact: stack */
    .hp2-newsletter--compact__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Footer: stack */
    .hp2-footer__top {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hp2-footer__links {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}


/* ==========================================================================
   RESPONSIVE — Mobile (max 768px)
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --hp2-pad-x: 20px;
        --hp2-section-gap: 64px;
    }

    /* Header mobile: overlay nav */
    .hp2-header__nav {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--hp2-paper);
        flex-direction: column;
        align-items: stretch;
        padding: 32px var(--hp2-pad-x);
        gap: 0;
        z-index: 999;
        overflow-y: auto;
    }

    .hp2-header__nav.is-open {
        display: flex;
    }

    .hp2-header__link {
        padding: 18px 0;
        border-bottom: 1px solid var(--hp2-rule);
        font-size: 15px;
        opacity: 1;
    }

    .hp2-header__actions {
        display: none;
    }

    .hp2-header__nav.is-open .hp2-header__actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 24px;
    }

    .hp2-header__burger {
        display: block;
    }

    .hp2-header__burger.is-open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hp2-header__burger.is-open span:nth-child(2) {
        opacity: 0;
    }

    .hp2-header__burger.is-open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Article header */
    .hp2-article-header {
        padding: 40px 0 32px;
    }

    .hp2-article-header__title {
        font-size: clamp(28px, 7vw, 40px);
    }

    .hp2-article-header__meta {
        gap: 6px;
        font-size: 12px;
    }

    .hp2-article-header__hero-img {
        aspect-ratio: 16 / 9;
    }

    /* Article content */
    .hp2-article-content {
        font-size: 16px;
    }

    .hp2-article-content h2 {
        font-size: 24px;
        margin-top: 40px;
    }

    .hp2-article-content h3 {
        font-size: 20px;
        margin-top: 32px;
    }

    /* Author box */
    .hp2-author-box__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }

    /* Reading list: no number */
    .hp2-reading__item {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 24px 0;
    }

    .hp2-reading__num {
        display: none;
    }

    /* Archive header */
    .hp2-archive-header {
        padding: 40px 0 32px;
    }

    /* Pagination: stack */
    .hp2-pagination__inner {
        flex-direction: column;
        gap: 12px;
    }

    .hp2-pagination__btn {
        width: 100%;
        justify-content: center;
    }

    /* 404 */
    .hp2-404 {
        padding: 56px 0 48px;
    }

    .hp2-404__search {
        flex-direction: column;
        border-radius: var(--hp2-radius-md);
    }

    .hp2-404__search-input {
        padding: 16px 20px;
        border-bottom: 1px solid var(--hp2-rule);
    }

    .hp2-404__search-btn {
        border-radius: 0 0 var(--hp2-radius-md) var(--hp2-radius-md);
        margin: 0;
        padding: 16px 24px;
    }

    /* Search header form */
    .hp2-search-header__form {
        flex-direction: column;
        border-radius: var(--hp2-radius-md);
    }

    .hp2-search-header__input {
        border-bottom: 1px solid var(--hp2-rule);
    }

    .hp2-search-header__btn {
        border-radius: 0 0 var(--hp2-radius-md) var(--hp2-radius-md);
        margin: 0;
        padding: 14px 24px;
    }

    /* Newsletter compact form: stack */
    .hp2-newsletter__form {
        flex-direction: column;
        border-radius: var(--hp2-radius-md);
    }

    .hp2-newsletter__input {
        padding: 16px 20px;
        border-bottom: 1px solid var(--hp2-rule);
    }

    .hp2-newsletter__submit {
        border-radius: 0 0 var(--hp2-radius-md) var(--hp2-radius-md);
        margin: 0;
        padding: 16px 24px;
    }

    /* Footer */
    .hp2-footer__links {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .hp2-footer__legal {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}


/* ==========================================================================
   RESPONSIVE — Small mobile (max 480px)
   ========================================================================== */
@media (max-width: 480px) {
    :root {
        --hp2-pad-x: 16px;
        --hp2-section-gap: 48px;
    }

    .hp2-article-header__title {
        font-size: clamp(24px, 7vw, 32px);
    }

    .hp2-article-header__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .hp2-article-header__meta-sep {
        display: none;
    }

    .hp2-404__code {
        font-size: 100px;
    }

    .hp2-empty__cats-list {
        flex-direction: column;
        align-items: stretch;
    }

    .hp2-footer__links {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .hp2-header,
    .hp2-footer,
    .hp2-newsletter,
    .hp2-newsletter--compact,
    .hp2-related,
    .hp2-pagination,
    .hp2-404__search,
    .hp2-search-header__form {
        display: none !important;
    }

    body.hp2-body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .hp2-article-header__title {
        font-size: 24pt;
    }

    .hp2-article-content {
        max-width: none;
        font-size: 11pt;
    }

    .hp2-article-content a {
        text-decoration: underline;
        color: #000;
    }

    .hp2-article-content a::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    .hp2-article-content pre {
        background: #f5f5f5;
        color: #000;
        border: 1px solid #ccc;
    }

    .hp2-article-content img {
        max-width: 100%;
    }

    .hp2-wrap {
        max-width: none;
        padding: 0;
    }
}
