/* ==========================================================================
   ACF Block: Tekstiplokk
   ========================================================================== */

.pv-text-block {
    width: 100%;
}

.pv-text-block__inner {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: calc(52px * var(--pv-ui-scale));
    word-break: break-word;
}

/* Content width variants (tokens bump above 1920px — see global.css) */
.pv-text-block--narrow .pv-text-block__inner {
    max-width: calc(var(--pv-text-measure-narrow, 720px) * var(--pv-ui-scale));
}

.pv-text-block--default .pv-text-block__inner {
    max-width: calc(var(--pv-text-measure-default, 1060px) * var(--pv-ui-scale));
}

.pv-text-block--wide .pv-text-block__inner {
    max-width: calc(var(--pv-text-measure-wide, 1200px) * var(--pv-ui-scale));
}

/* ── Section base ── */

.pv-text-block__section {
    display: flex;
    flex-direction: column;
    gap: calc(22px * var(--pv-ui-scale));
    width: 100%;
}

/* ── Intro ── */

.pv-text-block__intro {
    gap: calc(32px * var(--pv-ui-scale));
}

.pv-text-block__intro-title {
    font-family: var(--wp--preset--font-family--plus-jakarta-sans, 'Plus Jakarta Sans', sans-serif);
    font-weight: 700;
    font-size: calc(48px * var(--pv-ui-scale));
    line-height: 1.1;
    letter-spacing: calc(-1.44px * var(--pv-ui-scale));
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
    margin: 0;
}

.pv-text-block__intro-text,
.pv-text-block__intro-text p {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 500;
    font-size: calc(24px * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
    margin: 0;
}

.pv-text-block__intro-text p + p {
    margin-top: calc(16px * var(--pv-ui-scale));
}

/* ── Section heading ── */

.pv-text-block__section-title {
    font-family: var(--wp--preset--font-family--plus-jakarta-sans, 'Plus Jakarta Sans', sans-serif);
    font-weight: 700;
    font-size: calc(32px * var(--pv-ui-scale));
    line-height: 1.1;
    letter-spacing: calc(-0.96px * var(--pv-ui-scale));
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
    margin: 0;
}

/* ── Body text ── */

.pv-text-block__body,
.pv-text-block__body p {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 400;
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--gray-03, #666666);
    margin: 0;
}

.pv-text-block__body p + p {
    margin-top: calc(16px * var(--pv-ui-scale));
}

.pv-text-block__body a {
    color: var(--wp--preset--color--primary-blue, #0068ff);
    text-decoration: underline;
}

.pv-text-block__body ul,
.pv-text-block__body ol {
    margin: 0;
    padding-left: 1.4em;
}

/* ── Lists ── */

.pv-text-block__list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.pv-text-block__list--numbered {
    gap: calc(10px * var(--pv-ui-scale));
}

.pv-text-block__list--bullet {
    gap: calc(12px * var(--pv-ui-scale));
    list-style: none;
    margin: 0;
    padding: 0;
}

.pv-text-block__list--bullet > .pv-text-block__list-item {
    box-sizing: border-box;
    display: block;
    position: relative;
    padding-left: calc(18px * var(--pv-ui-scale));
    width: 100%;
}

.pv-text-block__list--bullet > .pv-text-block__list-item::before {
    background-color: var(--wp--preset--color--primary-blue, #0068ff);
    border-radius: 50%;
    content: '';
    height: calc(6px * var(--pv-ui-scale));
    left: 0;
    position: absolute;
    top: 0.65em;
    width: calc(6px * var(--pv-ui-scale));
}

.pv-text-block__list-item {
    box-sizing: border-box;
    display: flex;
    gap: calc(12px * var(--pv-ui-scale));
    align-items: center;
    width: 100%;
    min-width: 0;
}

.pv-text-block__list--numbered .pv-text-block__list-item {
    display: flex;
    /* Top-align marker with first content line (multi-paragraph / nested lines) */
    align-items: flex-start;
}

.pv-text-block__sublist {
    list-style: disc;
    margin: calc(10px * var(--pv-ui-scale)) 0 0;
    padding-left: 1.25em;
}

.pv-text-block__sublist-item {
    color: var(--wp--preset--color--gray-03, #666666);
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    font-weight: 400;
    line-height: 1.5;
    margin-top: calc(8px * var(--pv-ui-scale));
}

.pv-text-block__sublist-item:first-child {
    margin-top: 0;
}

.pv-text-block__sublist-text {
    display: block;
}

.pv-text-block__sublist-text p {
    margin: 0;
}

.pv-text-block__sublist-text p + p {
    margin-top: calc(8px * var(--pv-ui-scale));
}

.pv-text-block__list-number {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 600;
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--primary-blue, #0068ff);
    flex-shrink: 0;
}

.pv-text-block__bullet {
    width: calc(6px * var(--pv-ui-scale));
    height: calc(6px * var(--pv-ui-scale));
    border-radius: 50%;
    background-color: var(--wp--preset--color--primary-blue, #0068ff);
    flex-shrink: 0;
}

.pv-text-block__list-text {
    display: block;
    min-width: 0;
    flex: 1;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 400;
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--gray-03, #666666);
}

.pv-text-block__list-text p {
    margin: 0;
}

.pv-text-block__list-text p + p {
    margin-top: calc(8px * var(--pv-ui-scale));
}

.pv-text-block__list-text a,
.pv-text-block__sublist-text a {
    color: var(--wp--preset--color--primary-blue, #0068ff);
    text-decoration: underline;
}

.pv-text-block__list-text strong,
.pv-text-block__sublist-text strong {
    font-weight: 600;
}

/* ── Checklist ── */

.pv-content-list {
    display: flex;
    flex-direction: column;
    gap: calc(12px * var(--pv-ui-scale));
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.pv-content-list--checklist > li {
    align-items: flex-start;
    display: flex;
    gap: calc(12px * var(--pv-ui-scale));
    width: 100%;
}

.pv-content-list__icon {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    height: 1.5em;
    justify-content: center;
    width: calc(18px * var(--pv-ui-scale));
}

.pv-content-list__icon::after {
    border: solid var(--wp--preset--color--primary-blue, #0068ff);
    border-width: 0 2.5px 2.5px 0;
    content: '';
    display: block;
    height: calc(12px * var(--pv-ui-scale));
    transform: rotate(45deg) translateY(calc(-1px * var(--pv-ui-scale)));
    width: calc(7px * var(--pv-ui-scale));
}

.pv-content-list__content {
    color: var(--wp--preset--color--gray-03, #666666);
    flex: 1;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    font-weight: 400;
    line-height: 1.5;
    min-width: 0;
}

.pv-content-list__content p {
    margin: 0;
}

.pv-content-list__content p + p {
    margin-top: calc(8px * var(--pv-ui-scale));
}

.pv-content-list__content a {
    color: var(--wp--preset--color--primary-blue, #0068ff);
    text-decoration: underline;
}

.pv-content-list__content strong {
    font-weight: 600;
}

/* ── Table ── */

.pv-text-block__table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pv-text-block__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: calc(1px * var(--pv-ui-scale));
    background: #cccccc;
    border: 1px solid #cccccc;
    table-layout: fixed;
}

.pv-text-block__table-cell {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 400;
    font-size: calc(var(--pv-content-body-size, 16px) * var(--pv-ui-scale));
    line-height: 1.5;
    text-align: center;
    padding: calc(10px * var(--pv-ui-scale)) calc(20px * var(--pv-ui-scale));
    vertical-align: middle;
}

.pv-text-block__table-cell--head {
    background: var(--wp--preset--color--primary-blue, #0068ff);
    color: #ffffff;
}

.pv-text-block__table-cell--row-head {
    background: var(--wp--preset--color--brand-01-dark, #102f5d);
    color: #ffffff;
    font-weight: 400;
}

.pv-text-block__table-cell--body {
    background: #f0f4f8;
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
}

@media (max-width: 600px) {
    .pv-text-block__table-cell {
        padding: calc(8px * var(--pv-ui-scale)) calc(10px * var(--pv-ui-scale));
        font-size: calc(13px * var(--pv-ui-scale));
    }
}

/* ── Links ── */

.pv-text-block__links {
    display: flex;
    flex-direction: column;
    gap: calc(5px * var(--pv-ui-scale));
    width: 100%;
}

a.pv-text-block__link {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 600;
    font-size: calc(18px * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--primary-blue, #0068ff);
    text-decoration: underline;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    display: block;
    width: fit-content;
}

a.pv-text-block__link:hover {
    opacity: 0.8;
    color: var(--wp--preset--color--primary-blue, #0068ff);
}

.pv-text-block__link-label {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-weight: 600;
    font-size: calc(18px * var(--pv-ui-scale));
    line-height: 1.5;
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
    display: block;
    width: fit-content;
}

/* ── Image section ── */

.pv-text-block__image-section {
    align-items: stretch;
}

.pv-content-images {
    width: 100%;
}

.pv-content-image {
    display: flex;
    flex-direction: column;
    gap: calc(10px * var(--pv-ui-scale));
    margin: 0;
    min-width: 0;
}

.pv-content-image__visual {
    align-items: center;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pv-content-image__link {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    line-height: 0;
    width: 100%;
}

.pv-content-image__link:focus-visible {
    border-radius: calc(4px * var(--pv-ui-scale));
    outline: 2px solid var(--wp--preset--color--brand-01-dark, #102f5d);
    outline-offset: 2px;
}

.pv-content-image__caption {
    color: var(--wp--preset--color--gray-03, #666666);
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(14px * var(--pv-ui-scale));
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

/* Logo grid */

.pv-content-images--logos {
    align-items: stretch;
    display: grid;
    gap: calc(24px * var(--pv-ui-scale));
    grid-template-columns: repeat(auto-fit, minmax(calc(180px * var(--pv-ui-scale)), calc(240px * var(--pv-ui-scale))));
    justify-content: start;
}

.pv-content-images--logos.pv-content-images--small {
    grid-template-columns: repeat(auto-fit, minmax(calc(140px * var(--pv-ui-scale)), calc(180px * var(--pv-ui-scale))));
}

.pv-content-images--logos.pv-content-images--large {
    grid-template-columns: repeat(auto-fit, minmax(calc(220px * var(--pv-ui-scale)), calc(280px * var(--pv-ui-scale))));
}

.pv-content-images--logos .pv-content-image__visual {
    height: calc(120px * var(--pv-ui-scale));
    padding: calc(16px * var(--pv-ui-scale));
}

.pv-content-images--logos.pv-content-images--small .pv-content-image__visual {
    height: calc(90px * var(--pv-ui-scale));
}

.pv-content-images--logos.pv-content-images--large .pv-content-image__visual {
    height: calc(140px * var(--pv-ui-scale));
}

.pv-content-images--logos .pv-content-image__asset {
    display: block;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

/* Photo stack */

.pv-content-images--photos {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: calc(32px * var(--pv-ui-scale));
}

.pv-content-images--photos.pv-content-images--small .pv-content-image {
    max-width: min(calc(320px * var(--pv-ui-scale)), 100%);
}

.pv-content-images--photos.pv-content-images--medium .pv-content-image {
    max-width: min(calc(560px * var(--pv-ui-scale)), 100%);
}

.pv-content-images--photos.pv-content-images--large .pv-content-image {
    max-width: min(calc(800px * var(--pv-ui-scale)), 100%);
}

.pv-content-images--photos .pv-content-image__asset {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

@media (max-width: 640px) {
    .pv-content-images--logos {
        grid-template-columns: 1fr;
        max-width: calc(240px * var(--pv-ui-scale));
    }
}

/* Näidu teatamine (/naidu-teatamine/) — three meter photos in one square row */
.page-id-362 .pv-content-images--photos.pv-content-images--count-3 {
    align-items: stretch;
    display: grid;
    gap: calc(24px * var(--pv-ui-scale));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.page-id-362 .pv-content-images--photos.pv-content-images--count-3 .pv-content-image {
    max-width: none;
    width: 100%;
}

.page-id-362 .pv-content-images--photos.pv-content-images--count-3 .pv-content-image__visual {
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.page-id-362 .pv-content-images--photos.pv-content-images--count-3 .pv-content-image__link {
    display: block;
    height: 100%;
    position: absolute;
    inset: 0;
    width: 100%;
}

.page-id-362 .pv-content-images--photos.pv-content-images--count-3 .pv-content-image__asset {
    display: block;
    height: 100%;
    left: 0;
    max-width: none;
    object-fit: contain;
    object-position: center;
    position: absolute;
    top: 0;
    width: 100%;
}

@media (max-width: 639px) {
    .page-id-362 .pv-content-images--photos.pv-content-images--count-3 {
        grid-template-columns: 1fr;
        max-width: min(calc(320px * var(--pv-ui-scale)), 100%);
    }
}

/* ── Document files grid ── */

.pv-document-grid {
    display: grid;
    gap: calc(20px * var(--pv-ui-scale));
    grid-template-columns: 1fr;
    width: 100%;
}

.pv-document-card {
    background: var(--wp--preset--color--white, #ffffff);
    border-radius: calc(24px * var(--pv-ui-scale));
    display: flex;
    flex-direction: column;
    gap: calc(22px * var(--pv-ui-scale));
    min-width: 0;
    padding: calc(32px * var(--pv-ui-scale));
}

.pv-document-card__title {
    color: var(--wp--preset--color--brand-01-dark, #102f5d);
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(16px * var(--pv-ui-scale));
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.pv-document-card__link {
    align-self: center;
}

.pv-text-block__files-section .pv-text-image__btn {
    align-items: center;
    align-self: center;
    background: var(--wp--preset--color--primary-blue, #0068ff);
    border-radius: calc(100px * var(--pv-ui-scale));
    color: var(--wp--preset--color--white, #ffffff);
    display: inline-flex;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(16px * var(--pv-ui-scale));
    font-weight: 600;
    gap: calc(8px * var(--pv-ui-scale));
    line-height: 1.5;
    padding: calc(16px * var(--pv-ui-scale)) calc(28px * var(--pv-ui-scale));
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.pv-text-block__files-section .pv-text-image__btn:hover {
    background: #0056cc;
    color: var(--wp--preset--color--white, #ffffff);
    transform: translateY(calc(-1px * var(--pv-ui-scale)));
}

.pv-text-block__files-section .pv-text-image__btn:focus-visible {
    outline: 2px solid var(--wp--preset--color--brand-01-dark, #102f5d);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .pv-document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pv-document-grid--count-1 {
        grid-template-columns: 1fr;
    }
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .pv-text-block__inner {
        gap: calc(40px * var(--pv-ui-scale));
    }

    .pv-text-block__intro-title {
        font-size: calc(36px * var(--pv-ui-scale));
    }

    .pv-text-block__intro-text,
    .pv-text-block__intro-text p {
        font-size: calc(20px * var(--pv-ui-scale));
    }

    .pv-text-block__section-title {
        font-size: calc(26px * var(--pv-ui-scale));
    }
}

@media (max-width: 600px) {
    .pv-text-block__intro-title {
        font-size: calc(28px * var(--pv-ui-scale));
        letter-spacing: calc(-0.84px * var(--pv-ui-scale));
    }

    .pv-text-block__intro-text,
    .pv-text-block__intro-text p {
        font-size: calc(18px * var(--pv-ui-scale));
    }

    .pv-text-block__section-title {
        font-size: calc(22px * var(--pv-ui-scale));
    }
}
