/************* PAGE LAYOUT *************/

#homepageContainer {
    width: calc(100% - 48px) !important;
    max-width: 1200px !important;
    border-left: 1px solid var(--color-separator);
    border-right: 1px solid var(--color-separator);
    margin: 0 24px;
}

.dashedSeparator {
    position: relative;
    width: 100%;
    border-bottom: 1px dashed var(--color-separator);
}

.dashedSeparatorVertical {
    position: relative;
    border-right: 1px dashed var(--color-separator);
}

.dashedDecorativeCircle {
    width: 120px;
    height: 120px;
    border: 1px dashed var(--color-separator);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}

.fadedOutSeparator {
    border: none;
    height: 1px;
    background-image:
        linear-gradient(
            90deg,
            transparent,
            transparent 50%,
            var(--color-background) 50%,
            var(--color-background) 100%
        ),
        linear-gradient(
            90deg,
            var(--color-separator) 0%,
            transparent 50%,
            var(--color-separator) 100%
        );
    background-size:
        6px 1px,
        100% 1px;
}

.fadedOutSeparatorVertical {
    border: none;
    width: 1px;
    background-image:
        linear-gradient(
            180deg,
            transparent,
            transparent 50%,
            var(--color-background) 50%,
            var(--color-background) 100%
        ),
        linear-gradient(
            180deg,
            var(--color-separator) 0%,
            transparent 50%,
            var(--color-separator) 100%
        );
    background-size:
        1px 6px,
        1px 100%;
}

.trianglesSeparator {
    width: 100%;
    height: 32px;
    background-position: center;
    background-repeat: repeat-x;
    background-image: url("../../static/img/triangles_light.svg");

    html[data-theme="dark"] & {
        background-image: url("../../static/img/triangles_dark.svg");
    }

    /* TABLET */
    @media (min-width: 768px) {
        background-position: unset;
        background-repeat: repeat;
        height: 52px;
    }
}

/* most separators and decorations are not displayed on mobile */
.dashedSeparatorVertical,
.dashedDecorativeCircle,
.fadedOutSeparator,
.fadedOutSeparatorVertical {
    display: none;
}

/* TABLET */
@media (min-width: 768px) {
    .dashedSeparatorVertical,
    .dashedDecorativeCircle,
    .fadedOutSeparator,
    .fadedOutSeparatorVertical {
        display: block;
    }

    #homepageContainer {
        width: calc(100% - 80px) !important;
        margin: 0 40px;
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .dashedSeparatorVertical,
    .dashedDecorativeCircle,
    .fadedOutSeparator,
    .fadedOutSeparatorVertical {
        display: block;
    }

    #homepageContainer {
        width: calc(100% - 128px) !important;
        margin: 0 64px;
    }
}

/************* LANGUAGE GET STARTED SECTION *************/

.languageGetStartedSection {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 0 0 32px 0;

    div[class^="languageGetStartedContainer"] {
        flex: 1;
    }
}

/* TABLET */
@media (min-width: 768px) {
    .languageGetStartedSection {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-around;
        gap: 0;
        margin: 0;
    }
}

/************* CODE EXAMPLE SECTION *************/

.codeExampleTopSeparator {
    display: none;
}
@media (min-width: 768px) {
    .codeExampleTopSeparator {
        display: block;
    }
}

.languageSwitchContainer {
    place-self: center;
    margin: 32px 0 16px 0;
}

.codeBlockContainer {
    :global(.theme-code-block) {
        margin-bottom: 32px;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px dashed var(--color-separator);
        border-top: 1px dashed var(--color-separator);
        code {
            font-size: 14px;
            background: var(--color-background-muted);
            padding: 16px 8px 16px 4px;

            span::before {
                margin-right: 16px !important;
                left: unset !important;
                margin-right: 16px !important;
                color: var(--color-text-subtle) !important;
                opacity: 1 !important;
            }
        }
    }
}

/* TABLET */
@media (min-width: 768px) {
    .codeBlockContainer :global(.theme-code-block) {
        margin-bottom: 0;
        border-bottom: none;
        border-top: none;
    }

    .codeExampleSection {
        position: relative;
    }

    .languageSwitchContainer {
        margin: 0;
        position: absolute;
        top: calc(46px - 18px);
        left: calc(50% - 90px);
    }

    .decorativeRow {
        position: relative;
        height: 46px;
        border-bottom: 1px dashed var(--color-separator);

        &::before {
            content: " ";
            position: absolute;
            left: 40px;
            height: 100%;
            border-right: 1px dashed var(--color-separator);
        }

        &::after {
            content: " ";
            position: absolute;
            right: 40px;
            height: 100%;
            border-left: 1px dashed var(--color-separator);
        }
    }

    .codeBlockContainer {
        margin: 0 40px;
        border-left: 1px dashed var(--color-separator);
        border-right: 1px dashed var(--color-separator);
    }
}

@media (min-width: 1024px) {
    .decorativeRow {
        &::before {
            left: 60px;
        }

        &::after {
            right: 60px;
        }
    }
    .codeBlockContainer {
        margin: 0 60px;
    }
}

#ctaDecorativeCircle {
    width: 120px;
    height: 120px;
}

/************** BENEFITS SECTION ***********/

.benefitsSection {
    margin-bottom: 60px;

    h2 {
        margin: 32px 0;
        text-align: center;
        padding: 0 12px;

        /* TABLET */
        @media (min-width: 768px) {
            margin: 80px 0;
        }
    }
}

/************** OTHER FEATURES SECTION ***********/

.otherFeaturesSection {
    display: flex;
    flex-direction: column;

    h2 {
        padding: 32px 12px;

        text-align: center;
        color: var(--color-text);
        font-weight: 400;

        line-height: 46px !important;
        font-size: 36px !important;

        @media (min-width: 768px) {
            line-height: 56px !important;
            font-size: 48px !important;
            margin: 80px 0 64px;
            padding: 32px 24px;
        }
    }
    margin-bottom: 40px;

    @media (min-width: 768px) {
        margin-bottom: 80px;
    }
}

.cardsWithContentContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-position-x: 5px;
    background-image: url("../../static/img/triangles_light.svg");

    html[data-theme="dark"] & {
        background-image: url("../../static/img/triangles_dark.svg");
    }

    @media (min-width: 768px) {
        gap: 48px;
    }
}

.cardsWithImageContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;

    @media (min-width: 768px) {
        gap: 32px;
        flex-direction: row;
    }
}

.cardWithImage {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-card-background);
    border-block: 1px solid var(--color-separator);
    transition: background 0.1s ease;

    @media (min-width: 768px) {
        border: 1px solid var(--color-separator);
    }

    &:first-child {
        border-left: 0;
    }
    &:last-child {
        border-right: 0;
    }

    &:hover {
        background: var(--color-card-background-hover);
    }
}

.cardWithImage img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.cardWithImage:last-child img {
    object-position: left 90%;
}

.cardWithImageText {
    padding: 40px 24px;
    border-top: 1px solid var(--color-separator);
}

.cardWithImageTitle {
    margin: 0;

    color: var(--color-text);
    font-size: 26px;
    font-style: normal;
    font-weight: 400;
    line-height: 34px;
}

.cardWithImageDescription {
    margin-top: 12px;
    color: var(--color-text-muted);
    font-family: var(--ifm-font-family-base);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

/************** DEPLOY TO CLOUD SECTION ***********/

.deployToCloudSection {
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.deployToCloudLeftSide {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    gap: 24px;
    text-align: center;
    font-style: normal;
    font-weight: 400;

    a {
        width: fit-content;
        margin: auto;
    }

    h2 {
        color: var(--color-text);
        font-family: "Lota Grotesque";
        font-size: 38px;
        line-height: 46px;
    }
}

.deployToCloudDescription {
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 24px;

    a {
        color: inherit;
        text-decoration: underline;
    }
}

.deployToCloudRightSide {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-basis: 50%;
    position: relative;
}

.deployToCloudStep {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.deployToCloudStepNumber {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 72px;
    height: 72px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--color-separator);
    background: var(--color-background);
    color: var(--color-text-muted);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    z-index: 1;
    div {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 40px;
        width: 40px;
        border-radius: 50%;
        border: 1px dashed var(--color-separator);
        flex-shrink: 0;
    }
}

.deployToCloudStepText {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--color-text);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;

    pre {
        margin: 0;
        padding: 0;
        background-color: transparent;
    }
}

#verticalStepLine {
    position: absolute;
    left: 36px;
    height: 100%;
    z-index: 0;
}

/* TABLET */
@media (min-width: 768px) {
    .deployToCloudSection {
        padding: 96px 40px;
        flex-direction: row;
    }
    .deployToCloudLeftSide {
        text-align: left;

        a {
            margin: 0;
        }

        h2 {
            color: var(--color-text);
            font-family: "Lota Grotesque";
            font-size: 48px;
            line-height: 58px;
        }
    }
    .deployToCloudDescription {
        font-size: 18px;
        line-height: 28px;
    }
}

/************** BUILD SCRAPERS FAST SECTION ***********/

.buildFastScrapersSection {
    position: relative;

    padding: 40px 0 32px;

    border-bottom: 1px solid var(--color-separator);

    h2 {
        margin: 0;
        padding: 32px 0;
        text-align: center;
        color: var(--color-text);
        font-weight: 400;
        padding-inline: 12px;

        line-height: 46px !important;
        font-size: 36px !important;

        @media (min-width: 768px) {
            padding-inline: 24px;

            line-height: 56px !important;
            font-size: 48px !important;
            padding: 80px 0 64px;
        }
    }

    div[class*="dashedDecorativeCircle"] {
        display: none;
    }

    @media (min-width: 1024px) {
        padding: 80px 0 60px;
        div[class*="dashedDecorativeCircle"] {
            display: block;
        }
    }
}

.buildFastScrapersContent {
    border-block: 1px solid var(--color-separator);
}
