/**
 * Long-text pages: store policies, "Σχετικά με εμάς" and the jobs listing.
 * The text sits in a white card about 70 characters wide. Loaded only on
 * those pages; see inc/functions/text_pages.php.
 */

.nvm-text-page {
    --text-page-ink: #1F2E2C;
    --text-page-muted: #59635F;
    --text-page-green: var(--polo-color-green, #37514F);
}

.nvm-text-page .content-main .nvm-text,
.nvm-text-page.category-jobs .post-box-horizontal {
    max-width: 760px;
    margin: 0 auto;
    /* !important: the blocks plugin's text-style.css forces .nvm-text padding to 0. */
    padding: 48px 56px !important;
    box-sizing: border-box;
    border-radius: 16px;
    background: #FFFFFF;
    color: #2B3836;
    font-size: 17px;
    line-height: 1.7;
    font-feature-settings: "kern", "liga";
    text-wrap: pretty;
}

.nvm-text-page .content-main .nvm-text > :first-child {
    margin-top: 0;
}

.nvm-text-page .content-main .nvm-text > :last-child {
    margin-bottom: 0;
}

.nvm-text-page .content-main p {
    margin: 0 0 1.15em;
}

.nvm-text-page .content-main .nvm-text strong,
.nvm-text-page .content-main .nvm-text b {
    font-weight: 600;
    color: var(--text-page-ink);
}

/* Type scale: h2 opens a section with a thin rule above it, h3 is a green sub-heading. */
.nvm-text-page .content-main .nvm-text h2,
.nvm-text-page .content-main .nvm-text h3 {
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-page-ink);
    text-wrap: balance;
}

.nvm-text-page .content-main .nvm-text h2 {
    margin: 2.2em 0 .7em;
    padding-top: 1.4em;
    border-top: 1px solid #E4E2DC;
    font-size: 24px;
}

.nvm-text-page .content-main .nvm-text > h2:first-child,
.nvm-text-page .content-main .nvm-text .nvm-callout + h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.nvm-text-page .content-main .nvm-text h3 {
    margin: 1.8em 0 .5em;
    font-size: 19px;
    color: var(--text-page-green);
}

.nvm-text-page .content-main .nvm-text h2 + h3 {
    margin-top: .2em;
}

.nvm-text-page .content-main .nvm-text .nvm-text-page__label {
    margin: 1.4em 0 .3em;
}

.nvm-text-page .content-main .nvm-text h3 + .nvm-text-page__label {
    margin-top: 0;
}

.nvm-text-page .content-main ul,
.nvm-text-page .content-main ol {
    margin: 0 0 1.3em;
    padding-left: 1.4em;
}

.nvm-text-page .content-main li {
    margin-bottom: .6em;
    padding-left: .3em;
}

.nvm-text-page .content-main li::marker {
    color: var(--text-page-green);
}

/* Numbered lists read as steps: the number in a green circle. */
.nvm-text-page .content-main .nvm-text ol {
    padding-left: 0;
    list-style: none;
    counter-reset: steps;
}

.nvm-text-page .content-main .nvm-text ol > li {
    position: relative;
    min-height: 28px;
    padding-left: 44px;
    counter-increment: steps;
}

.nvm-text-page .content-main .nvm-text ol > li::before {
    content: counter(steps);
    position: absolute;
    top: 1px;
    left: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E6E9E3;
    color: var(--text-page-green);
    font-size: 14px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
}

/* Green, underlined links instead of the low-contrast orange. */
.nvm-text-page .content-main .nvm-text a:not(.nvm-button),
.nvm-text-page .content-main .nvm-text a:not(.nvm-button):visited {
    color: var(--text-page-green);
    text-decoration: underline;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    border-bottom: 0;
}

.nvm-text-page .content-main .nvm-text a:not(.nvm-button):hover {
    text-decoration-thickness: 2px;
}

/* Jobs listing: one card per opening. */

.nvm-text-page.category-jobs .post-box-horizontal {
    margin-bottom: 32px;
}

.nvm-text-page.category-jobs .post-box-horizontal .post-box-title {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.2;
}

.nvm-text-page.category-jobs .post-box-horizontal .post-box-date {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-page-muted);
}

.nvm-text-page.category-jobs .post-box-horizontal .nvm-text {
    max-width: none;
    padding: 0 !important;
    border-radius: 0;
}

/* The grid rows' negative margins sit inside an overflow-hidden section and clipped the text. */
.nvm-text-page.category-jobs .post-box-horizontal .row {
    margin-left: 0;
    margin-right: 0;
}

.nvm-text-page.category-jobs .post-box-horizontal .panel,
.nvm-text-page.category-jobs .post-box-horizontal .column,
.nvm-text-page.category-jobs .post-box-horizontal .post-box-text {
    padding-left: 0;
    padding-right: 0;
}

.nvm-text-page.category-jobs .post-box-taxonomies {
    display: none;
}

.nvm-text-page.category-jobs .nvm-text a.nvm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 52px;
    margin: 8px 0;
    padding: 0 32px;
    border: 0 !important;
    border-radius: 999px;
    background: var(--text-page-green) !important;
    color: #FFFFFF !important;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.nvm-text-page.category-jobs .nvm-text a.nvm-button br {
    display: none;
}

.nvm-text-page.category-jobs .nvm-text a.nvm-button:hover {
    background: #283D3B !important;
}

@media (max-width: 600px) {

    .nvm-text-page .content-main .nvm-text,
    .nvm-text-page.category-jobs .post-box-horizontal {
        padding: 28px 20px !important;
        font-size: 16px;
    }

    .nvm-text-page .content-main .nvm-text h2 {
        font-size: 21px;
    }

    .nvm-text-page .content-main .nvm-text h3 {
        font-size: 17px;
    }

    .nvm-text-page.category-jobs .post-box-horizontal .post-box-title {
        font-size: 23px;
    }
}

/* Table of contents beside long pages (Όροι χρήσης): a sticky column on desktop,
   a collapsible box above the text on mobile. Built in nvm_text_pages_add_toc(). */

.nvm-text-page .nvm-toc-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 760px);
    justify-content: center;
    align-items: start;
    gap: 40px;
    max-width: 1120px;
    margin: 0 auto;
}

.nvm-text-page .nvm-toc-layout .nvm-text {
    max-width: none;
}

.nvm-text-page .nvm-toc-layout .panel,
.nvm-text-page .nvm-toc-layout .column {
    padding-left: 0;
    padding-right: 0;
}

.nvm-text-page .nvm-toc-layout .row {
    margin-left: 0;
    margin-right: 0;
}

/* Clear the fixed header when jumping to a section; js/theme.text-pages.js measures it. */
.nvm-text-page .nvm-toc-main h2[id] {
    scroll-margin-top: calc(var(--nvm-header-offset, 145px) + 24px);
}

.nvm-text-page .nvm-toc {
    position: sticky;
    top: calc(var(--nvm-header-offset, 145px) + 20px);
    max-height: calc(100vh - var(--nvm-header-offset, 145px) - 40px);
    overflow-y: auto;
}

.nvm-text-page .nvm-toc__box {
    padding: 20px 16px 16px;
    border-radius: 16px;
    background: #FFFFFF;
}

.nvm-text-page .nvm-toc__title {
    padding: 0 8px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-page-muted);
    list-style: none;
    cursor: default;
}

.nvm-text-page .nvm-toc__title::-webkit-details-marker {
    display: none;
}

.nvm-text-page .nvm-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.nvm-text-page .nvm-toc__list li {
    margin: 0;
    padding: 0;
    counter-increment: toc;
}

.nvm-text-page .nvm-toc__list a {
    display: flex;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--text-page-ink);
    text-decoration: none;
}

.nvm-text-page .nvm-toc__list a::before {
    content: counter(toc) ".";
    flex: none;
    min-width: 1.5em;
    color: var(--text-page-muted);
}

.nvm-text-page .nvm-toc__list a:hover {
    background: #F1F2EE;
}

.nvm-text-page .nvm-toc__list a[aria-current="true"] {
    background: #E6E9E3;
    color: var(--text-page-green);
    font-weight: 600;
}

@media (max-width: 900px) {

    .nvm-text-page .nvm-toc-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .nvm-text-page .nvm-toc {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .nvm-text-page .nvm-toc__box {
        padding: 0;
    }

    .nvm-text-page .nvm-toc__title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 52px;
        padding: 0 20px;
        cursor: pointer;
    }

    .nvm-text-page .nvm-toc__title::after {
        content: "+";
        font-size: 22px;
        font-weight: 300;
        letter-spacing: 0;
    }

    .nvm-text-page .nvm-toc__box[open] .nvm-toc__title::after {
        content: "−";
    }

    .nvm-text-page .nvm-toc__list {
        padding: 0 12px 12px;
    }
}

/* Structured content blocks: a highlighted note, a comparison table, an opening-hours table. */

.nvm-text-page .content-main .nvm-text .nvm-callout {
    margin-bottom: 1.6em;
    padding: 14px 18px;
    border-radius: 12px;
    background: #E6E9E3;
    color: #283D3B;
}

.nvm-text-page .content-main .nvm-text .nvm-table-scroll {
    margin: 0 0 1.2em;
    overflow-x: auto;
}

.nvm-text-page .content-main .nvm-text table {
    width: 100%;
    margin: 0 0 1.2em;
    border: 0;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}

.nvm-text-page .content-main .nvm-text .nvm-table-scroll table {
    min-width: 520px;
    margin: 0;
}

.nvm-text-page .content-main .nvm-text th,
.nvm-text-page .content-main .nvm-text td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #ECEAE4;
    background: transparent;
    text-align: left;
    vertical-align: top;
}

.nvm-text-page .content-main .nvm-text tbody th {
    width: 34%;
    font-weight: 500;
    color: var(--text-page-muted);
}

.nvm-text-page .content-main .nvm-text thead th {
    border-bottom: 2px solid var(--text-page-green);
    font-weight: 600;
    color: var(--text-page-ink);
}

/* 5-column shipping summary: amounts stay on one line, the service column sizes to fit. */
.nvm-text-page .content-main .nvm-text .nvm-table-scroll table:has(th:nth-child(5)) tbody th {
    width: auto;
}

.nvm-text-page .content-main .nvm-text .nvm-table-scroll table:has(th:nth-child(5)) td:not(:last-child) {
    white-space: nowrap;
}

.nvm-text-page .content-main .nvm-text .nvm-hours-table {
    max-width: 440px;
}

.nvm-text-page .content-main .nvm-text .nvm-hours-table th {
    width: auto;
}

@media (max-width: 600px) {

    /* Up to three columns fit a phone once the text shrinks; no sideways scroll needed. */
    .nvm-text-page .content-main .nvm-text .nvm-table-scroll table {
        min-width: 0;
    }

    /* Wider tables (the 5-column shipping summary) would squeeze words mid-letter,
       so they keep a readable width and scroll sideways inside .nvm-table-scroll. */
    .nvm-text-page .content-main .nvm-text .nvm-table-scroll table:has(th:nth-child(5)) {
        min-width: 560px;
    }

    .nvm-text-page .content-main .nvm-text table {
        font-size: 13px;
    }

    .nvm-text-page .content-main .nvm-text th,
    .nvm-text-page .content-main .nvm-text td {
        padding: 10px 8px;
    }

    .nvm-text-page .content-main .nvm-text tbody th {
        width: 30%;
    }
}
