/* Same font files already hosted on the site (from the popup templates' own CSS) —
   reused by URL rather than re-uploaded, so headings/body match the rest of the site. */
@font-face {
    font-family: 'Fjalla One';
    font-display: swap;
    src: url('https://honoriojczyzna.pl/wp-content/uploads/2025/10/FjallaOne-Regular.ttf') format('truetype');
}
@font-face {
    /* The site's own @font-face registers this file under the family name
       "Libre" (not "Libre Baskerville") — confirmed from the button's computed
       font-family, so we match that exact name rather than the filename. */
    font-family: 'Libre';
    font-display: swap;
    src: url('https://honoriojczyzna.pl/wp-content/uploads/2025/10/LibreBaskerville-Regular.ttf') format('truetype');
}

:root {
    /* Values below are copied verbatim from the live site's own computed
       styles (DevTools dumps of the actual card, heading, button and
       checkmark icon), not eyeballed from a screenshot. #F00031 is the site's
       real --e-global-color-primary, used for both the button and the
       checkmark icon; #B02C46 (kept below, for the poll bars only) is a
       separate accent the AYS poll widget used and is unrelated to it. */
    --hoi-heading-color: #0d003d;
    --hoi-accent: #f00031;
    --hoi-poll-accent: #b02c46;
    --hoi-heading-font: 'Bai Jamjuree', sans-serif;
    --hoi-question-font: 'Fjalla One', sans-serif;
    --hoi-body-font: 'Libre', serif;
}

.hoi-topics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .hoi-topics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hoi-topics {
        grid-template-columns: 1fr;
    }
}

.hoi-card {
    display: flex;
    flex-direction: column;
    /* justify-content: space-between across all 4 direct children (icon,
       heading, list, button) is technically what the live site's computed
       style showed, but that only reads as "one gap before the button" when
       a card is already close to the row's tallest neighbor. For a short
       card next to taller ones, it visibly spreads all 3 internal gaps
       apart instead. flex-start + flex-grow on the list (below) reproduces
       the actual desired look: icon/heading/list hug the top as one tight
       group, and only the list's own bottom margin absorbs the slack before
       the button — confirmed against real before/after screenshots, not the
       raw computed value alone. */
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    padding: 30px;
    min-width: 300px;
    text-align: center;
    transition: transform 0.2s ease;
}

.hoi-card:hover {
    transform: scale(1.02);
}

.hoi-card .hoi-icon {
    width: 100px;
    height: 100px;
    color: var(--hoi-heading-color);
}

@media (max-width: 1100px) {
    .hoi-card .hoi-icon {
        width: 72px;
        height: 72px;
    }
}

.hoi-card .hoi-icon svg {
    width: 100%;
    height: 100%;
}

.hoi-card h3 {
    align-self: stretch;
    /* Reserves room for the longest heading we have (3 lines, e.g. "Prezydent
       Szefem Władzy Wykonawczej") so a 1- or 2-line heading doesn't leave the
       bullet list starting higher than its neighbors in the same row —
       centering a short heading in that space instead of collapsing to it. */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 144px;
    margin: 0;
    color: var(--hoi-heading-color);
    font-family: var(--hoi-heading-font);
    font-weight: 900;
    font-size: 40px;
    line-height: 48px;
}

@media (max-width: 1100px) {
    .hoi-card h3 {
        min-height: 102px;
        font-size: 28px;
        line-height: 34px;
    }
}

.hoi-points {
    align-self: stretch;
    flex-grow: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.hoi-point {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 3px 0;
    cursor: pointer;
    user-select: none;
    color: var(--hoi-heading-color);
    font-family: var(--hoi-heading-font);
    font-size: 22px;
    font-weight: 500;
    line-height: 33px;
}

@media (max-width: 1100px) {
    .hoi-point {
        font-size: 18px;
        line-height: 26px;
    }
}

.hoi-point:hover {
    opacity: 0.75;
    /* !important: same site-wide hover rule that turned other elements'
       text/background red/transparent also recolors this on hover. */
    color: var(--hoi-heading-color) !important;
}

.hoi-point:hover .hoi-check {
    color: var(--hoi-accent) !important;
}

.hoi-point .hoi-check {
    flex: none;
    width: 26px;
    height: 26px;
    margin-top: 3px;
    color: var(--hoi-accent);
}

.hoi-more-link {
    display: inline-block;
    background: var(--hoi-accent);
    /* !important: the site has a global link-color rule (same one that made
       the modal's old "×" glyph white-on-white) that otherwise overrides this
       to match the button's own background, making the label invisible. */
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    font-family: var(--hoi-body-font);
    font-weight: 600;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    padding: 18px 30px;
    border-radius: 3px;
    transition: opacity 0.2s ease;
}

.hoi-more-link:hover,
.hoi-more-link:focus {
    opacity: 0.85;
    /* !important on background too: on hover the site's global rule was
       clearing it to transparent (revealing the white card behind), not just
       recoloring the text. */
    background: var(--hoi-accent) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.hoi-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    /* The real Elementor Pro popup uses a light semi-transparent white
       overlay, not a dark scrim — confirmed from a computed-style dump of
       the actual dialog-widget, not a design guess. */
    background: rgba(255, 255, 255, 0.8);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hoi-modal-overlay.is-open {
    display: flex;
}

.hoi-modal {
    background: #fff;
    max-width: 1000px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.15);
    padding: 64px 48px 48px;
    position: relative;
}

@media (max-width: 600px) {
    .hoi-modal {
        padding: 56px 24px 32px;
    }
}

#hoi-modal-overlay .hoi-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    display: flex;
    /* Scoped under the #hoi-modal-overlay ID (beats any class selector on
       specificity regardless of !important or source order) plus !important
       on every reset property: the site's global button styling turned out
       to have its own !important border rule that a plain class selector,
       even with !important, was losing to on the specificity tie-break. */
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding: 0 !important;
    color: var(--hoi-accent) !important;
    cursor: pointer;
    line-height: 1;
}

.hoi-modal-close svg {
    width: 26px;
    height: 26px;
}

.hoi-modal-title {
    margin: 0 0 35px;
    color: var(--hoi-heading-color);
    font-family: var(--hoi-heading-font);
    font-weight: 600;
    font-size: 49px;
    line-height: 58.8px;
    text-align: center;
}

@media (max-width: 600px) {
    .hoi-modal-title {
        font-size: 32px;
        line-height: 1.2;
    }
}

.hoi-modal-question {
    margin: 0 0 20px;
    color: var(--hoi-heading-color);
    font-family: var(--hoi-question-font);
    font-size: 30px;
    font-weight: 300;
    line-height: 45px;
    text-align: left;
}

.hoi-modal-explanation {
    margin: 0 0 35px;
    color: var(--hoi-heading-color);
    font-family: var(--hoi-body-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    text-align: left;
}

.hoi-modal-explanation strong {
    font-weight: 700;
}

.hoi-poll {
    border-top: 1px solid #e5e5e5;
    padding-top: 32px;
}

.hoi-poll-question {
    font-weight: bold;
    margin: 0 0 0.75rem;
    text-align: center;
}

.hoi-poll-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#hoi-poll .hoi-poll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Scoped under #hoi-poll (ID beats any class selector on specificity,
       regardless of !important or source order) — a plain class selector
       with !important was still losing to the site's own !important
       button-border rule, showing as a second, outer default border around
       our red one. #hoi-poll is deliberately repeated across every poll
       instance (modal + every [hoi_poll]) so this one rule reaches all of
       them, not just the modal's. */
    border: 0px solid var(--hoi-poll-accent) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 4px;
    padding: 0.75rem 1.75rem;
    color: var(--hoi-poll-accent) !important;
    cursor: pointer;
}

#hoi-poll .hoi-poll-btn svg {
    width: 28px;
    height: 28px;
}

#hoi-poll .hoi-poll-btn:hover {
    background: var(--hoi-poll-accent) !important;
    color: #fff !important;
}

.hoi-poll-results {
    display: none;
}

.hoi-poll-results.is-visible {
    display: block;
}

.hoi-poll-buttons.is-hidden {
    display: none;
}

.hoi-poll-bar-row {
    margin-bottom: 0.6rem;
}

.hoi-poll-bar-track {
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    height: 22px;
}

.hoi-poll-bar-fill {
    background: var(--hoi-poll-accent);
    height: 100%;
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    padding-left: 0.4rem;
    white-space: nowrap;
}

/* [hoi_poll] standalone instance — used directly on the propozycje-zmian
   page, next to a point's own title/icon/explanation (which stays as
   hand-built Elementor content; we only render the voting field itself). */
.hoi-inline-poll {
    display: inline-block;
    text-align: center;
}

.hoi-inline-poll .hoi-poll {
    border-top: none;
    padding-top: 0;
}

.hoi-inline-poll .hoi-poll-question {
    font-family: var(--hoi-body-font);
    font-weight: 400;
    color: var(--hoi-heading-color);
    font-size: 1.1rem;
}

.hoi-poll-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--hoi-heading-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.hoi-poll-count svg {
    width: 18px;
    height: 18px;
}
