/* =========================================================
   HOMEPAGE BUILDER 2.0 — PUBLIC LAYOUT
   ========================================================= */

.hp-layout-row {
    width: 100%;
}

.hp-layout-columns {
    width: 100%;
}


/*
 * Pełna szerokość zachowuje stary wygląd 1:1.
 */
.hp-layout-row--full
.hp-layout-columns {
    display: block;
}

.hp-layout-row--full
.hp-layout-column:nth-child(n + 2) {
    display: none;
}


/*
 * Wiersze wielokolumnowe dostają wspólny shell.
 */
.hp-layout-row--two_equal,
.hp-layout-row--two_33_67,
.hp-layout-row--two_67_33,
.hp-layout-row--three_equal {
    padding:
        28px
        24px;
}

.hp-layout-row--two_equal
.hp-layout-columns,

.hp-layout-row--two_33_67
.hp-layout-columns,

.hp-layout-row--two_67_33
.hp-layout-columns,

.hp-layout-row--three_equal
.hp-layout-columns {
    display: grid;

    gap: 24px;

    max-width: 1320px;

    margin:
        0
        auto;
}

.hp-layout-row--two_equal
.hp-layout-columns {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
}

.hp-layout-row--two_33_67
.hp-layout-columns {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 2fr);
}

.hp-layout-row--two_67_33
.hp-layout-columns {
    grid-template-columns:
        minmax(0, 2fr)
        minmax(0, 1fr);
}

.hp-layout-row--three_equal
.hp-layout-columns {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}

.hp-layout-row--two_equal
.hp-layout-column:nth-child(n + 3),

.hp-layout-row--two_33_67
.hp-layout-column:nth-child(n + 3),

.hp-layout-row--two_67_33
.hp-layout-column:nth-child(n + 3) {
    display: none;
}

.hp-layout-column {
    min-width: 0;
}


/*
 * Sekcja umieszczona w kolumnie zachowuje się
 * jak moduł/karta, a nie pełnoekranowy blok.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-layout-column
> section,

.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-layout-column
> .news-section {
    overflow: hidden;

    height: 100%;

    margin: 0;

    border-radius: 24px;
}


/*
 * Wewnątrz kolumny stary hp-shell
 * nie powinien ponownie ograniczać szerokości.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-layout-column
.hp-shell {
    width: 100%;

    max-width: none;

    box-sizing: border-box;

    padding-left: 26px;
    padding-right: 26px;
}


/*
 * Kompaktowe odstępy modułów w kolumnach.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-layout-column
.hp-section,

.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-layout-column
.parish-day-section {
    padding-top: 44px;
    padding-bottom: 44px;
}


/*
 * Węższy moduł "O parafii".
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-about-grid {
    grid-template-columns: 1fr;
}


/*
 * Liturgia w połowie strony przechodzi
 * na układ pionowy.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.parish-day-panel {
    grid-template-columns: 1fr;
}

.hp-layout-row:not(
    .hp-layout-row--full
)
.parish-day-quote {
    grid-column: 1;
}


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

.hp-events-all {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: inherit;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.hp-events-grid {
    display: grid;

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

    gap: 18px;

    margin-top: 30px;
}

.hp-event-card {
    overflow: hidden;

    border:
        1px solid
        rgba(
            19,
            46,
            35,
            .11
        );

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 10px 30px
        rgba(
            16,
            24,
            40,
            .045
        );
}

.hp-event-image {
    overflow: hidden;

    aspect-ratio: 16 / 8;
}

.hp-event-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.hp-event-content {
    display: grid;

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

    gap: 17px;

    padding: 20px;
}

.hp-event-content time {
    display: flex;

    align-items: center;
    flex-direction: column;

    padding-right: 14px;

    border-right:
        1px solid
        #e7ece9;
}

.hp-event-content time strong {
    color: #193d31;

    font-size: 24px;

    line-height: 1;
}

.hp-event-content time span {
    margin-top: 5px;

    color: #87958e;

    font-size: 9px;
    font-weight: 700;
}

.hp-event-card h3 {
    margin:
        3px
        0
        7px;

    color: #173328;

    font-size: 17px;

    line-height: 1.3;
}

.hp-event-card p {
    margin: 0;

    color: #687871;

    font-size: 11px;

    line-height: 1.6;
}

.hp-event-location {
    margin-bottom:
        8px !important;

    color:
        #3f735d !important;

    font-weight: 700;
}

.hp-event-featured {
    display: inline-block;

    padding:
        3px
        7px;

    border-radius: 999px;

    background: #fff2cb;

    color: #8b6517;

    font-size: 8px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .06em;
}


/*
 * W wielokolumnowym builderze wydarzenia
 * ustawiają się pionowo.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-events-grid {
    grid-template-columns: 1fr;
}


@media (max-width: 900px) {

    .hp-layout-row--two_equal,
    .hp-layout-row--two_33_67,
    .hp-layout-row--two_67_33,
    .hp-layout-row--three_equal {
        padding:
            20px
            18px;
    }

    .hp-layout-row--two_equal
    .hp-layout-columns,

    .hp-layout-row--two_33_67
    .hp-layout-columns,

    .hp-layout-row--two_67_33
    .hp-layout-columns,

    .hp-layout-row--three_equal
    .hp-layout-columns {
        grid-template-columns: 1fr;
    }

    .hp-layout-row
    .hp-layout-column {
        display: block !important;
    }

    .hp-layout-row
    .hp-layout-column:empty {
        display: none !important;
    }

    .hp-events-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   BUILDER LAYOUT — HARD WIDTH SAFETY
   ========================================================= */

.hp-layout-row {
    width: 100%;
    max-width: 100%;

    box-sizing: border-box;

    overflow-x: clip;
}

.hp-layout-columns,
.hp-layout-column {
    min-width: 0;
    max-width: 100%;

    box-sizing: border-box;
}

.hp-layout-row--two_equal,
.hp-layout-row--two_33_67,
.hp-layout-row--two_67_33,
.hp-layout-row--three_equal {
    width: 100%;

    box-sizing: border-box;
}

.hp-layout-column {
    overflow: hidden;
}


/* =========================================================
   EVENTS — WIDTH FIX
   ========================================================= */

.hp-events-section,
.hp-events-section .hp-shell,
.hp-events-grid,
.hp-event-card,
.hp-event-content,
.hp-event-content > div {
    min-width: 0;
    max-width: 100%;

    box-sizing: border-box;
}

.hp-events-section {
    width: 100%;

    overflow: hidden;
}

.hp-events-grid {
    width: 100%;
}

.hp-event-card {
    width: 100%;
}

.hp-event-card h3,
.hp-event-card p,
.hp-event-location {
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: normal;
}


/*
 * Jeżeli Wydarzenia znajdują się w kolumnie,
 * zawsze renderujemy je jako pionową listę.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-events-grid {
    grid-template-columns:
        minmax(0, 1fr) !important;
}


/*
 * Shell nie może dodawać szerokości
 * ponad kolumnę.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-events-section
.hp-shell {
    width: 100%;

    max-width: 100%;

    margin-left: 0;
    margin-right: 0;

    box-sizing: border-box;
}


/* =========================================================
   GLOBAL SECTION KICKER
   ========================================================= */

.hp-section-kicker {
    display: flex !important;

    align-items: center;

    gap: 18px;

    width: max-content;

    max-width: 100%;

    margin-bottom: 16px;

    color: #557366 !important;

    font-size: 10px !important;
    font-weight: 800 !important;

    line-height: 1 !important;

    letter-spacing: .22em !important;

    text-transform: uppercase;
}

.hp-section-kicker::after {
    content: "";

    display: block;

    flex: 0 0 auto;

    width: 58px;
    height: 1px;

    background: #b59a60;
}


/* =========================================================
   HOMEPAGE EVENTS — REFINED
   ========================================================= */

.hp-events-section {
    overflow: hidden;

    width: 100%;

    padding:
        78px
        0
        84px;

    background: #f8faf8;
}

.hp-events-heading {
    align-items: end;
}

.hp-events-all {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding-bottom: 5px;

    color: #315d4a;

    font-size: 11px;
    font-weight: 750;

    text-decoration: none;
}

.hp-events-grid {
    display: grid !important;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                260px,
                360px
            )
        ) !important;

    justify-content: start;

    gap: 22px;

    width: 100%;

    margin-top: 30px;
}

.hp-event-card {
    overflow: hidden;

    width: 100%;
    max-width: 360px;

    min-width: 0;

    border:
        1px solid
        #e1e8e3;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 10px 30px
        rgba(25, 49, 39, .045);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.hp-event-card:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 16px 38px
        rgba(25, 49, 39, .075);
}

.hp-event-image {
    display: block;

    overflow: hidden;

    width: 100%;

    height: 190px;

    background:
        #edf2ee;
}

.hp-event-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .35s ease;
}

.hp-event-card:hover
.hp-event-image img {
    transform:
        scale(1.025);
}

.hp-event-placeholder {
    display: grid;

    place-items: center;

    width: 100%;
    height: 100%;

    color:
        rgba(52, 100, 79, .22);

    font-family:
        Georgia,
        serif;

    font-size: 36px;
}

.hp-event-body {
    display: grid;

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

    gap: 16px;

    padding: 20px;
}

.hp-event-date {
    display: flex;

    align-items: center;
    flex-direction: column;

    padding-right: 13px;

    border-right:
        1px solid
        #e3e9e5;
}

.hp-event-date strong {
    color: #274f3f;

    font-size: 23px;

    line-height: 1;
}

.hp-event-date span {
    margin-top: 6px;

    color: #87958e;

    font-size: 8px;
    font-weight: 750;
}

.hp-event-copy {
    min-width: 0;
}

.hp-event-featured {
    display: inline-flex;

    margin-bottom: 5px;

    padding:
        3px
        7px;

    border-radius: 999px;

    background: #fff2ca;

    color: #89651c;

    font-size: 7px;
    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.hp-event-card h3 {
    margin:
        2px
        0
        7px;

    font-size: 17px;

    line-height: 1.3;
}

.hp-event-card h3 a {
    color: #19372b;

    text-decoration: none;
}

.hp-event-location {
    margin:
        0
        0
        7px !important;

    color:
        #49715f !important;

    font-size:
        10px !important;

    font-weight: 700;
}

.hp-event-summary {
    display:
        -webkit-box;

    overflow: hidden;

    margin:
        0
        0
        12px !important;

    color:
        #6e7e76 !important;

    font-size:
        10px !important;

    line-height: 1.55 !important;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.hp-event-more {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: #315f4b;

    font-size: 9px;
    font-weight: 800;

    text-decoration: none;
}


/*
 * Gdy moduł znajduje się w kolumnie,
 * karta dopasowuje się do szerokości kolumny.
 */
.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-events-grid {
    grid-template-columns:
        minmax(0, 1fr) !important;
}

.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-event-card {
    max-width: none;
}

.hp-layout-row:not(
    .hp-layout-row--full
)
.hp-event-image {
    height: 170px;
}


@media (max-width: 760px) {

    .hp-events-section {
        padding:
            54px
            0
            62px;
    }

    .hp-events-grid {
        grid-template-columns:
            1fr !important;
    }

    .hp-event-card {
        max-width: none;
    }

    .hp-events-heading {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   PUBLIC HOMEPAGE — HTML MODULE
   ========================================================= */

.hp-html-section {
    width: 100%;

    box-sizing:
        border-box;
}

.hp-html-content {
    width: 100%;
    max-width: 100%;

    box-sizing:
        border-box;

    overflow-wrap:
        anywhere;
}

.hp-html-content > :first-child {
    margin-top: 0;
}

.hp-html-content > :last-child {
    margin-bottom: 0;
}

.hp-html-content img {
    max-width: 100%;
    height: auto;
}

.hp-html-content table {
    max-width: 100%;

    border-collapse:
        collapse;
}

.hp-html-content pre {
    max-width: 100%;

    overflow-x: auto;
}

.hp-html-content iframe,
.hp-html-content script {
    display: none !important;
}


/*
 * Moduł w kolumnie Buildera nie może
 * wyjść poza jej szerokość.
 */
.hp-layout-column
.hp-html-section,
.hp-layout-column
.hp-html-content {
    min-width: 0;

    max-width: 100%;
}
