/* ==========================================================================
   Собор Молитви — site styles
   Design tokens taken from the Cathedral theme (theme.json) the site used
   before the migration: Poppins for text, Kumbh Sans for headings.
   ========================================================================== */

:root {
    --white:      #ffffff;
    --base:       #f9f9f9;
    --section-bg: #f1f1f1;
    --heading:    #1f1d1e;
    --secondary:  #1f1d1d;
    --body-text:  #555555;
    --primary:    #cf4a46;

    --font-body:    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-heading: "Kumbh Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --shadow: rgba(99, 99, 99, 0.2) 0 2px 8px 0;
    --container: 1200px;
    --radius: 5px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--base);
    color: var(--body-text);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 .6em;
}

h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.2; }
h2 { font-size: clamp(28px, 4vw, 43px); line-height: 1.3; }
h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.35; }
h4 { font-size: 22px; line-height: 1.4; }

p { margin: 0 0 1rem; }

a {
    color: var(--heading);
    text-decoration: none;
    transition: color .2s ease-in-out, background-color .2s ease-in-out;
}
a:hover { color: var(--primary); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: var(--white);
    padding: 10px 16px;
    z-index: 100;
}
.skip-link:focus { left: 0; color: var(--white); }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    padding: 14px 30px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
}
.btn:hover { background-color: var(--secondary); color: var(--white); }
.btn--lg { padding: 17px 40px; font-size: 15px; }

/* ---------------------------------------------------------------- header */

.site-header { background: var(--white); position: relative; z-index: 20; }

.site-header__top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-block: 18px;
}

.site-title {
    margin: 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 700;
}
.site-title a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--heading);
}
.site-title img { flex: 0 0 auto; }

.site-header__bar { background: #000000cc; }

.site-nav { padding-block: 1rem; }

.menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px 26px;
    margin: 0;
    padding: 0;
}
.menu__item { position: relative; }
.menu__item > a,
.menu__toggle {
    display: inline-block;
    padding: 4px 2px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--white);
    background: none;
    border: 0;
    cursor: pointer;
}
.menu__item > a:hover,
.menu__toggle:hover,
.menu__item.is-current > a { color: var(--primary); }

.menu__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    vertical-align: middle;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: var(--secondary);
    border-radius: var(--radius);
    display: none;
    z-index: 30;
}
.menu__item--has-sub:hover .submenu,
.menu__item--has-sub.is-open .submenu { display: block; }

.submenu a {
    display: block;
    padding: 9px 20px;
    color: var(--white);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.submenu a:hover,
.submenu__item.is-current a { color: var(--primary); }

.menu__item--language {
    display: flex;
    align-items: center;
}
.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .05em;
}
.language-switch a { color: var(--white); }
.language-switch a:hover,
.language-switch__current { color: var(--primary); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    padding: 0 10px;
    background: none;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: var(--radius);
    cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--heading); }

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    display: grid;
    /* An auto column would be sized by the title's max-content width and blow
       past narrow viewports, so pin the track to the available width. */
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    min-height: 440px;
    padding: 60px 20px;
    overflow: hidden;
}
.hero--home { min-height: 620px; padding: 80px 20px; }
.hero picture,
.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}
.hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    text-align: center;
    color: var(--white);
}
.hero__h1 {
    font-size: 42px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 24px;
}
.hero__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.063rem, 1.759rem + 1.518vw, 3.125rem);
    line-height: .8;
    color: var(--white);
    border: 2px solid currentColor;
    padding-block: 1rem;
    margin: 0 0 18px;
}
.hero__lead { font-size: 17px; margin-bottom: 28px; }
.hero__cta { margin-top: 8px; }

/* -------------------------------------------------------------- sections */

.section { padding: 70px 0; }
.section--welcome { background: var(--base); }
.section--counters { background: var(--secondary); padding: 50px 0; }
.section--services { background: var(--section-bg); }

.eyebrow {
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 22px;
    padding: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--primary);
    line-height: 1.3;
    text-align: center;
}
.eyebrow::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: rgba(207, 74, 70, 0.2);
}
.section__title { text-align: center; margin-bottom: 46px; }

/* ----------------------------------------------------------------- cards */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 22px;
    text-align: center;
}
.card__icon {
    width: 56px;
    height: 56px;
    padding: 1rem;
    box-sizing: content-box;
    background: var(--primary);
    border-radius: var(--radius);
}

/* The service icons are dark artwork, so they get an outlined circle. */
.card--service .card__icon {
    width: 60px;
    height: 60px;
    padding: 1.5rem;
    background: none;
    border: 2px solid var(--secondary);
    border-radius: 50%;
}
.card__title { margin: 22px 0 12px; }
.card__text { margin: 0; }
.card__more {
    display: inline-block;
    margin: 20px 0 0;
    padding: .44rem .67rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-weight: 600;
    line-height: 1;
}

/* ----------------------------------------------------------------- steps */

.section--steps { background: var(--white); }

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
    counter-reset: step;
}

.step { text-align: center; }

.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
}

.step__title { font-size: 20px; margin-bottom: 10px; }
.step__text  { margin: 0; }

/* ------------------------------------------------------------------- faq */

.section--faq { background: var(--base); }

.faq {
    max-width: 820px;
    margin-inline: auto;
}

.faq__item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    padding: 0 22px;
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--heading);
}
.faq__q::-webkit-details-marker { display: none; }

/* A plus that turns into a minus when the answer is open. */
.faq__q::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1;
    color: var(--primary);
}
.faq__item[open] .faq__q::after { content: "–"; }

.faq__a { margin: 0; padding: 0 0 20px; }

/* ------------------------------------------------ thematic service pages */

.section--service-intro,
.section--help-steps,
.section--help-faq { background: var(--base); }

.section--help-types,
.section--help-important,
.section--help-related { background: var(--section-bg); }

.section--help-requirements { background: var(--white); }

#yak-tse-pratsyuye { background: var(--section-bg); }
.section--candle-important { background: var(--white); }

.service-intro {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(30px, 5vw, 64px);
}
.service-intro--no-image {
    --service-intro-body-max: 820px;
}
.service-intro--no-image .service-intro {
    display: block;
}
.service-intro--no-image .service-intro__body {
    max-width: var(--service-intro-body-max);
    margin: 0 auto;
    text-align: center;
}
.service-intro__figure { margin: 0; }
.service-intro__image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
}
.service-intro__body .eyebrow { margin-inline: 0; }
.service-intro--no-image .service-intro__body .eyebrow { margin-inline: auto; }
.service-intro__body h2 { margin-bottom: 18px; }

.card--plain h3 { margin-top: 0; }

.help-note {
    max-width: 900px;
    margin-inline: auto;
    padding: 30px 34px;
    background: var(--white);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.help-note ul { margin: 0; padding-left: 22px; }
.help-note li + li { margin-top: 12px; }

.section--help-contact {
    background: var(--secondary);
    color: var(--white);
    text-align: center;
}
.section--help-contact .section__title { color: var(--white); margin-bottom: 18px; }
.help-contact__text { max-width: 720px; margin: 0 auto 26px; }
.help-contact__email { margin: 18px 0 0; color: var(--base); }

/* -------------------------------------------------------------- purposes */

.section--purposes { background: var(--section-bg); }

.purposes {
    display: grid;
    /* fixed four across, so twelve tiles fall into three even rows */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.purpose {
    padding: 0 16px;
    background: var(--base);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--radius);
    text-align: center;
}
.purpose[open] { background: var(--white); box-shadow: var(--shadow); }

.purpose__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--heading);
}
.purpose__title::-webkit-details-marker { display: none; }
.purpose__title::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
    color: var(--primary);
}
.purpose[open] .purpose__title::after { content: "–"; }

.purpose__text { margin: 0 0 16px; }
.purpose__cta { padding-bottom: 20px; }
.purpose__cta .btn { padding: 12px 22px; font-size: 13px; }

.purposes__cta { margin-top: 36px; text-align: center; }

/* -------------------------------------------------------- other services */

.section--other { background: var(--section-bg); }
.section--other .section__title { margin-bottom: 34px; }

.section--all-services { background: var(--section-bg); }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Carousel: a native horizontal scroller with snap points, plus arrows.
   Without JS it still scrolls by touch, wheel and keyboard. */
.carousel { position: relative; }

.carousel__track {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 4px 0 10px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}
.carousel__track::-webkit-scrollbar { height: 6px; }
.carousel__track::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.carousel__item {
    flex: 0 0 calc((100% - 3 * 24px) / 4);
    scroll-snap-align: start;
}

.carousel__arrow {
    position: absolute;
    top: calc(50% - 22px);
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: var(--white);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
}
.carousel__arrow:hover { background: var(--secondary); }
.carousel__arrow--prev { left: -22px; }
.carousel__arrow--next { right: -22px; }
.carousel__arrow[disabled] { opacity: .35; cursor: default; }
.carousel__arrow[hidden] { display: none; }


.service-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
}
.service-card:hover { box-shadow: rgba(99, 99, 99, .35) 0 4px 14px 0; }

.service-card__img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card__title {
    display: block;
    padding: 18px 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--heading);
}
.service-card:hover .service-card__title { color: var(--primary); }
.service-card__text {
    display: block;
    padding: 0 18px 22px;
    color: var(--body-text);
}

/* -------------------------------------------------------------- counters */

.counters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    text-align: center;
}
.counter__value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(38px, 4vw, 4em);
    letter-spacing: .09em;
    color: var(--primary);
    margin: 0 0 .44rem;
}
.counter__label {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 7px 15px;
    border: 2px solid var(--primary);
    border-radius: 30px;
    color: var(--white);
}

/* ----------------------------------------------------------- page entries */

.main { padding: 0; }
.is-page .main { padding: 0; }

.entry__figure {
    margin: 0 0 18px;
    max-width: 100%;
}
.entry__figure img {
    width: 330px;
    height: 330px;
    object-fit: cover;
    border-radius: var(--radius);
}
.entry h3 { margin-top: 1.6em; }
.entry ul { padding-left: 20px; }
.entry li { margin-bottom: 8px; }
.entry__cta { margin: 24px 0; }

/* ---------------------------------------------------------------- footer */

.site-footer {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0 0;
}
.site-footer .footer-cols { padding-bottom: 30px; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--primary); }

.footer-cols {
    display: grid;
    /* 40 / 20 / 20 / 20 — the brand column is twice a regular one.
       minmax(0, …) keeps a long word from stretching its track. */
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 40px 30px;
    padding-bottom: 40px;
}
/* Brand block: the site mark and name stand in for a column heading. */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 22px;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.25;
}
.footer-brand img { flex: 0 0 auto; }
.footer-brand:hover { color: var(--primary); }

.footer-col__title {
    /* min-height lines the headings up with the logo in the brand column */
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0 0 22px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--white);
}
.footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.footer-contact img { flex: 0 0 auto; }

.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 12px; }
.footer-nav li a { text-decoration: underline; }
.footer-nav li.is-current > a { color: var(--primary); }


.footer-bottom-bar {
    background: var(--primary);
    border-top: 1px solid #262525;
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-block: 20px;
}
.footer-bottom p { margin: 0; font-size: 14px; color: var(--base); }
.footer-bottom a { color: var(--base); }

/* ----------------------------------------------------------------- popup */

.popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: start center;
    padding: 5vh 16px;
    overflow-y: auto;
}
.popup[hidden] { display: none; }
/* Fixed, not absolute: an absolute overlay is only as tall as one viewport,
   so it ran out as soon as a long form was scrolled inside .popup. */
.popup__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
}

/* Chrome-free: only the ordering widget is visible, as in the "content only"
   popup theme the WordPress site used. No panel, border, padding or shadow. */
.popup__box {
    position: relative;
    width: min(350px, 100%);
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.popup__close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 18px;
    color: #000;
    cursor: pointer;
}
.popup iframe { display: block; border: 0; width: 100%; }

.statcounter { position: absolute; left: -9999px; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
    .carousel__item { flex-basis: calc((100% - 2 * 24px) / 3); }
}

@media (max-width: 900px) {
    .purposes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
    .site-header .container { justify-content: space-between; }
    .nav-toggle { display: flex; }
    .site-nav { display: none; }
    .site-nav.is-open { display: block; }
    .menu { flex-direction: column; align-items: stretch; gap: 0; }
    .menu__item { border-top: 1px solid rgba(0, 0, 0, .08); }
    .menu__item > a,
    .menu__toggle { display: block; width: 100%; text-align: left; padding: 12px 2px; }
    .menu__item--language { padding: 12px 2px; }
    .language-switch { padding: 0; }
    .submenu {
        position: static;
        transform: none;
        min-width: 0;
        border-radius: 0;
        padding: 4px 0 10px;
    }
    .hero { min-height: 340px; }
    .hero--home { min-height: 460px; }
    .entry__figure { float: none; margin: 0 0 24px; }
    .entry__figure img { width: 100%; height: auto; aspect-ratio: 1; }
    .service-intro { grid-template-columns: 1fr; }
    .service-intro__figure { width: min(480px, 100%); margin-inline: auto; }
    .service-intro__body { text-align: center; }
    .service-intro__body .eyebrow { margin-inline: auto; }
}

@media (max-width: 782px) {
    .carousel__item { flex-basis: calc((100% - 24px) / 2); }
    .carousel__arrow--prev { left: -8px; }
    .carousel__arrow--next { right: -8px; }
}

@media (max-width: 600px) {
    .purposes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section { padding: 50px 0; }
    .help-note { padding: 24px 22px; }
    .footer-cols { grid-template-columns: 1fr; }
    .carousel__item { flex-basis: 78%; }
}
