/* =========================================================
   CALENDAR PAGE / MEC
========================================================= */

body:has(.mec-wrap) .nao-page-hero__title {
    color: #ffffff;
}

.nao-page-single__content .mec-wrap {
    width: 100% !important;
    margin: 0 0 58px !important;
    padding: 34px !important;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e1ebe4;
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(24, 63, 36, 0.07);
}

.nao-page-single__content .mec-wrap,
.nao-page-single__content .mec-wrap * {
    box-sizing: border-box;
    font-family: inherit;
}

/* =========================================================
   SEARCH
========================================================= */

.nao-page-single__content .mec-search-form {
    margin: 0 0 26px !important;
    padding: 22px !important;

    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: 14px;

    background: var(--color-background) !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
}

.nao-page-single__content .mec-dropdown-wrap,
.nao-page-single__content .mec-dropdown-search,
.nao-page-single__content .mec-text-input-search,
.nao-page-single__content .mec-searchbar {
    position: relative;

    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

/*
 * MEC uses an icon font for the magnifier. The font is not
 * required here: the search icon is embedded directly into
 * the input as an SVG background.
 */
.nao-page-single__content .mec-search-form i,
.nao-page-single__content .mec-search-form i::before,
.nao-page-single__content .mec-search-form i::after {
    display: none !important;
    content: none !important;
}

.nao-page-single__content .mec-search-form select,
.nao-page-single__content .mec-search-form input[type="search"],
.nao-page-single__content .mec-search-form input[type="text"] {
    box-sizing: border-box !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 50px !important;
    min-height: 50px !important;

    margin: 0 !important;

    color: var(--color-text) !important;
    background-color: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 999px !important;

    font-family: var(--font-main) !important;
    font-size: var(--font-small) !important;
    line-height: normal !important;
    font-weight: var(--weight-bold) !important;

    outline: 0 !important;
    box-shadow: none !important;
}

.nao-page-single__content .mec-search-form select {
    padding: 0 46px 0 18px !important;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232e2e2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    background-size: 16px 16px !important;

    appearance: none !important;
}

.nao-page-single__content .mec-search-form input[type="search"],
.nao-page-single__content .mec-search-form input[type="text"] {
    padding: 0 18px 0 48px !important;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23196730' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 18px center !important;
    background-size: 18px 18px !important;

    appearance: none !important;
}

.nao-page-single__content
.mec-search-form
input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.nao-page-single__content .mec-search-form select:focus,
.nao-page-single__content .mec-search-form input[type="search"]:focus,
.nao-page-single__content .mec-search-form input[type="text"]:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(25, 103, 48, 0.1) !important;
}

/* =========================================================
   CALENDAR BOX
========================================================= */

.nao-page-single__content .mec-calendar {
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.nao-page-single__content .mec-calendar-topsec {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: stretch;
}

.nao-page-single__content .mec-calendar-side,
.nao-page-single__content .mec-calendar-events-side {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

.nao-page-single__content .mec-calendar-side {
    padding: 0 !important;
}


/* =========================================================
   MONTH NAVIGATOR
========================================================= */

.nao-page-single__content .mec-skin-monthly-view-month-navigator-container {
    margin: 0 0 18px !important;
}

/* активний місяць */
.nao-page-single__content .mec-month-navigator:not([style*="display: none"]) {
    position: relative;

    min-height: 68px;
    margin: 0 !important;
    padding: 14px 18px !important;

    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) 150px;
    align-items: center;
    gap: 16px;

    background:
        linear-gradient(
            135deg,
            #196730 0%,
            #105024 100%
        ) !important;

    border-radius: 18px;
}

.nao-page-single__content .mec-calendar-header {
    grid-column: 2;
    grid-row: 1;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    text-align: center !important;
}

.nao-page-single__content .mec-calendar-header h2 {
    margin: 0 !important;

    color: #ffffff !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: -0.035em;
}

.nao-page-single__content .mec-previous-month,
.nao-page-single__content .mec-next-month {
    position: static !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 150px;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 15px !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: #196730 !important;
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 999px !important;

    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    text-transform: uppercase;

    cursor: pointer;

    box-shadow: none !important;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.nao-page-single__content .mec-previous-month {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.nao-page-single__content .mec-next-month {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.nao-page-single__content .mec-previous-month:hover,
.nao-page-single__content .mec-next-month:hover {
    background: #edf6ef !important;
    transform: translateY(-1px);
}

.nao-page-single__content .mec-previous-month i,
.nao-page-single__content .mec-next-month i {
    font-size: 12px !important;
    line-height: 1 !important;
}


/* =========================================================
   CALENDAR TABLE
========================================================= */

.nao-page-single__content .mec-calendar-table {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e1ebe4;
    border-radius: 18px;
}

.nao-page-single__content .mec-month-container {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nao-page-single__content .mec-calendar-table-head,
.nao-page-single__content .mec-calendar-row {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));

    border: 0 !important;
}

.nao-page-single__content .mec-calendar-day-head {
    min-height: 46px;
    padding: 0 !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    color: #196730 !important;
    background: #f7faf8 !important;
    border-right: 1px solid #e1ebe4 !important;
    border-bottom: 1px solid #e1ebe4 !important;

    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

.nao-page-single__content .mec-calendar-day-head:last-child {
    border-right: 0 !important;
}

.nao-page-single__content .mec-calendar-day,
.nao-page-single__content .mec-table-nullday {
    position: relative;

    min-height: 78px;
    margin: 0 !important;
    padding: 13px 12px !important;

    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;

    color: #2e2e2e !important;
    background: #ffffff !important;
    border-right: 1px solid #e1ebe4 !important;
    border-bottom: 1px solid #e1ebe4 !important;

    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: 900 !important;

    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.nao-page-single__content .mec-calendar-row > dt:last-child {
    border-right: 0 !important;
}

.nao-page-single__content .mec-table-nullday {
    color: #b1bbb4 !important;
    background: #fbfcfb !important;
    cursor: default;
}

.nao-page-single__content .mec-calendar-day:hover {
    color: #196730 !important;
    background: #edf6ef !important;
}

.nao-page-single__content .mec-calendar-day.mec-selected-day {
    color: #ffffff !important;
    background: #196730 !important;
    box-shadow: inset 0 0 0 3px #105024;
}

.nao-page-single__content .mec-calendar-day.mec-selected-day::after {
    content: "";

    position: absolute;
    right: 12px;
    bottom: 12px;

    width: 8px;
    height: 8px;

    background: #72c900;
    border-radius: 50%;
}

/* =========================================================
   EVENTS SIDE
========================================================= */

.nao-page-single__content .mec-calendar-events-side {
    padding: 24px !important;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(114, 201, 0, 0.12),
            transparent 34%
        ),
        #f7faf8 !important;

    border: 1px solid #e1ebe4;
    border-radius: 18px;
}

.nao-page-single__content .mec-month-side {
    margin: 0 !important;
}

.nao-page-single__content .mec-calendar-events-sec {
    margin: 0 !important;
    padding: 0 !important;
}

.nao-page-single__content .mec-table-side-title {
    margin: 0 0 10px !important;

    color: #196730 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nao-page-single__content .mec-table-side-day {
    margin: 0 0 18px !important;

    color: #2e2e2e !important;
    font-size: 34px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em;
}

.nao-page-single__content .mec-table-side-day,
.nao-page-single__content .mec-table-side-day *,
.nao-page-single__content .mec-table-side-day a,
.nao-page-single__content .mec-table-side-day span {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.nao-page-single__content .mec-event-article {
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
}

.nao-page-single__content .mec-event-detail {
    padding: 18px 20px !important;

    color: #667069 !important;
    background: #ffffff !important;
    border: 1px solid #e1ebe4;
    border-radius: 14px;

    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 700 !important;
}

/* =========================================================
   TEXT SECTION AFTER CALENDAR
========================================================= */

.nao-calendar-text-section {
    position: relative;

    margin-top: 64px;
    padding: 48px 52px 52px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(25, 103, 48, 0.055),
            transparent 28%
        ),
        #ffffff;

    border: 1px solid #e1ebe4;
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(24, 63, 36, 0.07);
}

.nao-calendar-text-section::before {
    content: "";

    display: block;

    width: 82px;
    height: 4px;
    margin-bottom: 26px;

    background: #196730;
    border-radius: 999px;
}

.nao-calendar-text-section > *:first-child {
    margin-top: 0;
}

.nao-calendar-text-section > *:last-child {
    margin-bottom: 0;
}

.nao-calendar-text-section h2 {
    margin: 0 0 22px;

    color: #2e2e2e;
    font-size: 38px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.nao-calendar-text-section p {
    margin: 0 0 22px;

    color: #5f6862;
    font-size: 17px;
    line-height: 1.9;
    font-weight: 500;
}

.nao-calendar-text-section strong {
    color: #2e2e2e;
    font-weight: 800;
}

.nao-calendar-text-section ul,
.nao-calendar-text-section ol {
    margin: 22px 0 30px;
    padding: 0;

    display: grid;
    gap: 12px;

    list-style: none;
}

.nao-calendar-text-section li {
    position: relative;

    margin: 0;
    padding-left: 32px;

    color: #5f6862;
    font-size: 17px;
    line-height: 1.75;
    font-weight: 500;
}

.nao-calendar-text-section ul > li::before {
    content: "";

    position: absolute;
    top: 0.72em;
    left: 0;

    width: 10px;
    height: 10px;

    background: #196730;
    border-radius: 50%;
    box-shadow: 0 0 0 6px #e5f2e8;
}

/* =========================================================
   MEC SAFETY FIX
========================================================= */

.nao-page-single__content .mec-month-navigator[style*="display: none"],
.nao-page-single__content .mec-month-container[style*="display: none"],
.nao-page-single__content .mec-month-side[style*="display: none"] {
    display: none !important;
}

.nao-page-single__content .mec-month-container:not(.mec-month-container-selected):not([style*="display: block"]) {
    display: none;
}

/* =========================================================
   RESPONSIVE: TABLET
========================================================= */

@media (max-width: 1180px) {

    .nao-page-single__content .mec-calendar-topsec {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================================
   RESPONSIVE: CONTENT FIRST, PARTNER ADS LAST
========================================================= */

@media (max-width: 820px) {

    body:has(.mec-wrap) .nao-page-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "calendar-content"
            "partner-ads";
    }

    body:has(.mec-wrap) .nao-page-content {
        grid-area: calendar-content;
        order: 1;
        min-width: 0;
    }

    body:has(.mec-wrap) .nao-page-sidebar {
        grid-area: partner-ads;
        order: 2;

        position: static;
        top: auto;

        width: 100%;
        margin-top: 40px;
    }

    body:has(.mec-wrap)
    .nao-page-sidebar
    .nao-partner-sidebar {
        position: static;
        top: auto;

        width: 100%;
    }
}

/* =========================================================
   RESPONSIVE: MOBILE CALENDAR
========================================================= */

@media (max-width: 680px) {

    .nao-page-single__content .mec-wrap {
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 40px !important;
        padding: 14px !important;

        overflow: hidden;

        border-radius: var(--radius-medium);
    }

    .nao-page-single__content .mec-search-form {
        margin-bottom: 18px !important;
        padding: 12px !important;

        grid-template-columns: minmax(0, 1fr);
        gap: 10px;

        border-radius: 14px;
    }

    .nao-page-single__content .mec-search-form select,
    .nao-page-single__content .mec-search-form input[type="search"],
    .nao-page-single__content .mec-search-form input[type="text"] {
        height: 46px !important;
        min-height: 46px !important;
    }

    .nao-page-single__content
    .mec-month-navigator:not([style*="display: none"]) {
        min-height: 0;
        padding: 14px !important;

        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto;
        gap: 12px 10px;

        border-radius: 14px;
    }

    .nao-page-single__content .mec-calendar-header {
        grid-column: 1 / -1;
        grid-row: 1;

        order: 0;
    }

    .nao-page-single__content .mec-calendar-header h2 {
        font-size: 22px !important;
        white-space: nowrap;
    }

    .nao-page-single__content .mec-previous-month,
    .nao-page-single__content .mec-next-month {
        grid-row: 2;

        width: 100% !important;
        max-width: none;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 10px !important;

        justify-self: stretch;

        font-size: 10px !important;
    }

    .nao-page-single__content .mec-previous-month {
        grid-column: 1;
    }

    .nao-page-single__content .mec-next-month {
        grid-column: 2;
    }

    .nao-page-single__content .mec-previous-month i,
    .nao-page-single__content .mec-next-month i {
        display: none !important;
    }

    .nao-page-single__content .mec-calendar-table {
        width: 100% !important;
        min-width: 0 !important;

        overflow: hidden;

        border-radius: 14px;
    }

    .nao-page-single__content .mec-month-container {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .nao-page-single__content .mec-calendar-table-head,
    .nao-page-single__content .mec-calendar-row {
        width: 100% !important;
        min-width: 0 !important;

        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    /*
     * MEC assigns percentage widths and floats directly to dt.
     * Inside CSS Grid those values shrink every day to a thin strip,
     * so every grid item must explicitly fill its own column.
     */
    .nao-page-single__content
    .mec-calendar-table-head > dt,
    .nao-page-single__content
    .mec-calendar-row > dt {
        box-sizing: border-box !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;

        margin: 0 !important;
        float: none !important;
    }

    .nao-page-single__content .mec-calendar-day-head {
        min-width: 0;
        min-height: 36px;

        align-items: center;
        justify-content: center;

        text-align: center !important;

        font-size: 9px !important;
    }

    .nao-page-single__content .mec-calendar-day,
    .nao-page-single__content .mec-table-nullday {
        min-width: 0;
        min-height: 58px;
        padding: 8px 5px !important;

        align-items: center;
        justify-content: center;

        text-align: center !important;

        font-size: 12px !important;
    }

    .nao-page-single__content
    .mec-calendar-day.mec-selected-day {
        box-shadow: inset 0 0 0 2px var(--color-primary-dark);
    }

    .nao-page-single__content
    .mec-calendar-day.mec-selected-day::after {
        right: 6px;
        bottom: 7px;

        width: 6px;
        height: 6px;
    }

    .nao-page-single__content .mec-calendar-events-side {
        padding: 18px !important;

        border-radius: 14px;
    }

    .nao-page-single__content .mec-table-side-day {
        font-size: 28px !important;
    }

    .nao-calendar-text-section {
        margin-top: 40px;
        padding: 28px 20px 32px;

        border-radius: var(--radius-medium);
    }

    .nao-calendar-text-section::before {
        width: 54px;
        margin-bottom: 20px;
    }

    .nao-calendar-text-section h2 {
        font-size: var(--font-h2);
    }

    .nao-calendar-text-section p,
    .nao-calendar-text-section li {
        font-size: var(--font-body);
        line-height: var(--line-body);
    }
}

/* =========================================================
   RESPONSIVE: NARROW MOBILE
========================================================= */

@media (max-width: 380px) {

    .nao-page-single__content .mec-wrap {
        padding: 10px !important;
    }

    .nao-page-single__content .mec-search-form {
        padding: 10px !important;
    }

    .nao-page-single__content
    .mec-month-navigator:not([style*="display: none"]) {
        padding: 12px 10px !important;
    }

    .nao-page-single__content .mec-calendar-header h2 {
        font-size: 20px !important;
    }

    .nao-page-single__content .mec-previous-month,
    .nao-page-single__content .mec-next-month {
        padding: 0 7px !important;
        font-size: 9px !important;
    }

    .nao-page-single__content .mec-calendar-day,
    .nao-page-single__content .mec-table-nullday {
        min-height: 54px;
        padding: 7px 4px !important;

        font-size: 11px !important;
    }
}



/* Прибирано биті іконки у перемикачах місяців MEC */

.nao-page-single__content .mec-previous-month i,
.nao-page-single__content .mec-next-month i {
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    display: none !important;
    overflow: hidden !important;
}

.nao-page-single__content .mec-previous-month i::before,
.nao-page-single__content .mec-previous-month i::after,
.nao-page-single__content .mec-next-month i::before,
.nao-page-single__content .mec-next-month i::after,
.nao-page-single__content .mec-previous-month::before,
.nao-page-single__content .mec-previous-month::after,
.nao-page-single__content .mec-next-month::before,
.nao-page-single__content .mec-next-month::after {
    content: none !important;
    display: none !important;
}

.nao-page-single__content .mec-previous-month,
.nao-page-single__content .mec-next-month {
    gap: 0 !important;
}