@import url("./abstracts/_variables.css");
@import url("./base/_reset.css") layer(reset);
@import url("./base/_animations.css") layer(animations);
@import url("./base/_typography.css") layer(typography);
@import url("./components/_index.css") layer(components);

@layer reset, typography, components, animations;

.main {
    padding-block: 60px;

    @media only screen and (max-width: 767px) {
        padding-block: 40px;
    }
}

.container {
    max-width: var(--container-size-limiter, 1310px);
    margin-inline: auto;
    padding-inline: 15px;

    &.size-middle {
        --container-size-limiter: 970px;
    }

    &.reduced {
        --container-size-limiter: 786px;

        ul {
            li {
                margin: 0 0 20px;
            }
        }   
    }
}

.top-banner-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.price {
        display: flex;
        padding: 0;
        margin-bottom: -20px;

        p {
            padding-right: 50px;

            @media only screen and (max-width: 767px) {
                padding-right: 30px;
            }
        }
    }

.block {
    max-width: 55ch;
    margin-bottom: 60px;
    color: var(--alt-text-color);
    text-align: justify;

    @media only screen and (max-width: 767px) {
        margin-bottom: 40px;
    }

    &:last-child {
        margin-bottom: 0;
    }

}

.section {
    padding-block: 77px 70px;

    @media only screen and (max-width: 1023px) {
        padding-bottom: 30px 40px;
    }

    + .section {
        color: var(--inverted-text-color);
        background: var(--dark-background-color);
    }
}

.hero-section {
    padding: 0 0 49px;
    font-size: 20px;
    line-height: 35px;
    color: var(--white);
    background: var(--dark-background-color);

    @media only screen and (max-width: 1023px) {
        font-size: 18px;
        line-height: 28px;
    }

    .container {
        @media only screen and (min-width: 768px) {
            display: flex;
            gap: min(92px, 8%);
            align-items: center;
        }
    }

    img {
        display: block;
        aspect-ratio: 3 / 4;
        object-fit: cover;
        object-position: center top;
        margin: 0 auto 20px;
        border-radius: 20px;

        @media only screen and (min-width: 768px) {
            flex-shrink: 0;
            aspect-ratio: 434 / 670;
            max-width: 40%;
            margin: 0;
            border-radius: 50px;
        }
    }

    .text-holder {
        flex-grow: 1;
    }

    h1 {
        color: var(--primary-color-alt);
    }

    .sub-title {
        display: block;
        padding: 0 0 114px;
        font-size: 22px;
        font-style: italic;
        font-weight: normal;

        @media only screen and (max-width: 1023px) {
            padding-bottom: 50px;
        }
    }

    p {
        margin: 0 0 45px;
        text-wrap: balance;
    }
}

.about-section {
    overflow: hidden;
    color: var(--rough-text-color);
    background: var(--inverted-background-color);

    &.alt {
        background: var(--alt-background-color);

        .container {
            @media only screen and (min-width: 768px) {
                gap: 0;
            }
        }

        .img-holder {
            @media only screen and (min-width: 768px) {
                max-width: 46%;
            }
        }

        .text-holder {
            background: var(--inverted-background-color);

            @media only screen and (min-width: 768px) {
                width: min(692px, 54.1%);
                padding: 80px 66px 76px 55px;
                border-radius: 15px 0 0 15px;
            }

            @media only screen and (max-width: 767px) {
                margin-block: 20px;
                padding: 30px;
                border-radius: 15px;
            }
        }
    }

    .container {
        @media only screen and (min-width: 768px) {
            display: flex;
            flex-direction: row-reverse;
            gap: min(86px, 7%);
            align-items: center;
        }
    }

    .img-holder {
        position: relative;
        margin-inline: -15px;

        @media only screen and (min-width: 768px) {
            flex-grow: 1;
            max-width: 50%;
            margin: 0;
        }
    }

    img {
        @media only screen and (min-width: 768px) {
            max-width: none;
        }
    }

    video {
        vertical-align: top;
        width: 100%;
        object-fit: cover;
        pointer-events: none;
    }

    .text-holder {
        padding-block: 30px 50px;

        @media only screen and (min-width: 768px) {
            flex-shrink: 0;
            width: min(571px, 40%);
            padding-block: 77px 50px;
        }
    }
}

.inner {
    color: var(--rough-text-color);

    .container {
        @media only screen and (min-width: 768px) {
            display: flex;
            flex-direction: row-reverse;
            gap: min(86px, 7%);
            align-items: flex-start;
        }
    }

    .text-holder {
        padding-block: 50px;
    }
}

.services-section {
    padding-block: 77px 118px;
    font-size: 16px;
    line-height: 2;
    color: var(--inverted-text-color);
    background: var(--dark-background-color-alt);

    @media only screen and (max-width: 1023px) {
        padding-block: 60px;
    }

    h2 {
        margin-bottom: 84px;

        @media only screen and (max-width: 1023px) {
            margin-bottom: 50px;
        }
    }

    .services-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 64px;
        margin: 0 0 62px;
        padding: 0;
        list-style: none;
        font-size: 22px;
        line-height: 35px;
        font-weight: bold;
        color: var(--alt-text-color);
        text-wrap: balance;

        @media only screen and (max-width: 1023px) {
            gap: 40px;
            margin-bottom: 40px;
        }

        a {
            display: block;
            min-height: 100%;
            padding: 42px 44px;
            color: inherit;
            text-decoration: none;
            border-radius: 40px;
            background: var(--btn-background);

            &:hover {
                background: var(--btn-hover-background);
            }

            &:focus-visible {
                outline: 2px solid var(--btn-background);
                outline-offset: 2px;
            }
        }

        img {
            display: block;
            margin-bottom: 24px;
        }
    }
}

.education-section {
    --section-vertical-rhythm: 52px;
    padding-block: 77px 109px;
    color: var(--inverted-text-color);
    background: var(--alt-background-color);

    @media only screen and (max-width: 1023px) {
        --section-vertical-rhythm: 40px;
        padding-block: 50px 60px;
    }

    @media only screen and (max-width: 767px) {
        --section-vertical-rhythm: 30px;
        padding-block: 30px 40px;
    }

    .container {
        overflow: hidden;
    }

    h2 {
        margin-bottom: var(--section-vertical-rhythm);
    }
}

.banner-section {
    --max-button-width: 588px;
    --container-size-limiter: 650px;

    position: relative;
    isolation: isolate;
    padding-block: 77px;
    color: var(--white);

    &:after {
        position: absolute;
        content: "";
        z-index: -1;
        inset: 0;
        background: rgba(0,0,0,0.4);
    }

    video {
        position: absolute;
        z-index: -1;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }

    .btn {
        display: block;
        margin: 50px auto 30px;
    }
}

.offers-holder {
    --vertical-rhythm: 24px;
    display: grid;
    gap: 60px;
    font-size: 20px;
    line-height: 38px;
    margin-bottom: 30px;

    @media only screen and (min-width: 768px) {
        grid-template-columns: 1fr 1fr;
    }

    @media only screen and (max-width: 1023px) {
        gap: 30px;
    }

    .offer-block {
        container-type: inline-size;

        @media only screen and (min-width: 768px) {
            display: flex;
            flex-direction: column;
        }
    }

    .img-holder {
        position: relative;

        @media only screen and (min-width: 768px) {
            flex-shrink: 0;
        }

        + .text-holder {
            padding-top: 0;
            border-radius: 0 0 40px 40px;

            h3 {
                margin-top: -43px;
            }
        }
    }

    .image {
        display: block;
        aspect-ratio: 610 / 465;
        background-color: var(--black);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }

    .location {
        position: absolute;
        left: 22px;
        top: 24px;
        padding: 17px 20px;
        font-size: 16px;
        line-height: 24px;
        font-weight: bold;
        font-style: normal;
        color: var(--white);
        border-radius: 8px;
        background: var(--dark-background-color);
    }

    .text-holder {
        padding: 24px 24px 39px;
        color: var(--alt-text-color);
        border-radius: 40px;
        background: var(--btn-background);

        @media only screen and (min-width: 768px) {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
    }

    h3 {
        position: relative;
        width: fit-content;
        margin-bottom: var(--vertical-rhythm);
        padding: 26px 26px 26px 71px;
        font-size: 22px;
        line-height: 34px;
        border-radius: 8px;
        background: var(--inverted-text-color-alt);

        svg {
            position: absolute;
            left: 18px;
            top: 22px;
        }
    }

    .dates-list {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 18px 36px;
        margin: 0;
        padding: 0 0 var(--vertical-rhythm);
        list-style: none;
        font-size: 20px;
        line-height: 32px;

        li {
            position: relative;
            padding-left: 39px;

            &:before {
                position: absolute;
                content: "";
                left: 0;
                top: -2px;
                width: 36px;
                height: 36px;
                background: url(../assets/images/icon-target.svg) no-repeat center;
                background-size: contain;
            }
        }
    }


    .bottom-panel {
        @media only screen and (min-width: 768px) {
            margin-top: auto;
        }

    }

    .alert {
        line-height: 32px;
        font-weight: bold;
        color: var(--alert-color);
    }

     .caption{
        color: var(--alert-color);
        
    }

    .buttons-holder {
        display: flex;
        flex-wrap: wrap;
        gap: 21px;
        padding-top: var(--vertical-rhythm);

        .btn {
            @container (max-width: 499px) {
                width: 100%;
            }
        }
    }
}
 
.container {
    .retreats {
        margin-bottom: 50px; !important
    }
    .margin {
        margin-bottom: 0; !important
    }

}

.peace {
    display: flex;
    justify-content: center;
    
    @media only screen and (max-width: 767px) {
        .alert {
            min-width: 100px;
        }
    }

}

.faq-item {
    --faq-block-indent: 40px;
    --arrow-width: 26px;
    --arrow-height: 22px;
    overflow: hidden;
    font-size: 18px;
    line-height: 36px;
    border-bottom: 1px solid #d6cebd;

    @media only screen and (max-width: 767px) {
        --faq-block-indent: 20px;
        --arrow-width: 18px;
        --arrow-height: 16px;
    }

    &[open],
    &:has(:focus-visible):not(:has(summary:focus-visible)) {
        > *:last-child {
            height: auto;
            padding-bottom: var(--faq-block-indent);
        }

        @supports selector(details::details-content) {
            &::details-content {
                height: auto;
                padding-bottom: var(--faq-block-indent);
            }

            > *:last-child {
                height: auto;
                padding: 0;
                transition: none;
            }
        }
    }

    &[open] {
        summary {
            &:after {
                scale: 1 -1;
            }
        }
    }

    > *:last-child {
        box-sizing: border-box;
        display: block;
        height: 0;
        padding: 0 0 0 54px;
        transition:
            height var(--animation-speed) var(--animation-effect),
            padding var(--animation-speed) var(--animation-effect);
        content-visibility: visible;
    }

    @supports selector(details::details-content) {
        &::details-content {
            box-sizing: border-box;
            display: block;
            height: 0;
            padding: 0 0 0 54px;
            transition:
                height var(--animation-speed) var(--animation-effect),
                padding var(--animation-speed) var(--animation-effect);
            content-visibility: visible;
            will-change: height, padding;
        }

        > *:last-child {
            height: auto;
            padding: 0;
            transition: none;
        }
    }

    summary {
        display: block;
        box-sizing: border-box;
        position: relative;
        padding: var(--faq-block-indent) 40px var(--faq-block-indent) 54px;
        font-size: 20px;
        line-height: 32px;
        font-weight: bold;
        color: var(--alt-text-color);
        border-radius: 6px;
        cursor: pointer;
        transition: background-color var(--animation-speed) var(--animation-effect);

        &:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        &:focus-visible {
            outline: 2px solid var(--accent-color);
            outline-offset: -3px;
        }

        &:before,
        &:after {
            position: absolute;
            content: "";
            top: 50%;
            translate: 0 -50%;
        }

        &:before {
            left: 12px;
            width: 36px;
            height: 36px;
            background: url(../assets/images/icon-target.svg) no-repeat center;
            background-size: contain;
        }

        &:after {
            right: 8px;
            width: var(--arrow-width);
            height: var(--arrow-height);
            border: solid transparent;
            border-width: var(--arrow-height) calc(var(--arrow-width) / 2) 0;
            border-top-color: var(--black);
            transition: scale var(--animation-speed) var(--animation-effect);
        }
    }

    p {
        max-width: 57ch;

        &:last-child {
            margin-bottom: 0;
        }
    }
}