:root {
    --shadow: 0 2px 0 0 rgba(0, 0, 0, 0.25);
    --shadow-2: inset 0 0 2px 0 rgba(0, 0, 0, 0.25);
}

[id] {
    scroll-margin-top: 88px;

    @media (min-width: 1024px){
        scroll-margin-top: 92px;
    }
}

a:not(.btn) {
    color: var(--primary-dark);

    &:hover {
        color: var(--primary-light);
    }
}

h1 {
    color: var(--primary-light);
}

.primary-light {
    color: var(--primary-light);
}

.primary-dark {
    color: var(--primary-dark);
}

p {
    color: var(--primary-dark);
}

.mini {
    & p {
        font-size: 13px;
        font-weight: 500;
        margin: 4px 0;
    }
}

.icon {
    width: 32px;
    height: 32px;
}

.band-wrap {
    padding: 0;
    background: transparent;
    position: relative;

    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 72px;
        transform: translateY(-100%);
        background-image: url('/assets/images/krivka-before.svg');
        background-repeat: no-repeat;
        background-size: cover;
        z-index: -1;
    }

    &::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 72px;
        transform: translateY(100%);
        background-image: url('/assets/images/krivka-after.svg');
        background-repeat: no-repeat;
        background-size: cover;
        z-index: -1;
    }
}

.band {
    position: relative;
    background: var(--primary-dark);
    color: #eaf3f4;
    padding: 46px 0;
    margin: 100px 0;
    overflow: hidden;

    .container {
        position: relative;
        z-index: 1;
    }

    .h3 {
        color: #ffffff;
    }

    ul {
        margin: 24px 0 0;
        color: #FFF;
    }
}

.band-grid {
    display: grid;
    gap: 80px;
    align-items: start;

    li::before {
        background-image: url('../images/icons/li-white.svg');
    }
}

.pricing {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.price-card {
    width: 285px;
    flex: 0 0 285px;
    padding: 24px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px 0 color-mix(in srgb, var(--primary-light), transparent 50%);

    .price-card-content {
        display: grid;
        gap: 16px;
        margin-bottom: 16px;
    }
}

.faq-item {
    background-color: var(--primary-dark);
    color: #fff;
    border-radius: 40px;
    padding: 24px 40px;
    margin-bottom: 40px;

    summary {
        display: flex;
        justify-content: space-between;
        color: #FFF;
        font-size: 18px;
        font-weight: 600;

        &::marker {
            content: none;
        }

        &::after {
            content: url('/assets/images/icons/arrow.svg');
            width: 32px;
            height: 8px;
        }
    }

    p {
        color: #fff;
        font-size: 14px;
    }

    &[open] summary::after {
        transform: rotate(180deg) translateY(-200%);
    }
}

@media (max-width: 1150px) {
    .price-card:first-child {
        margin-left: calc(50% - 142.5px);
        margin-right: calc(50% - 142.5px);
        margin-bottom: 10px;
    }
}

@media (min-width: 1151px) {
    .pricing {
        justify-content: space-between;
        max-width: 1200px;
    }
}

ul {
    list-style: none;
    padding-left: 0;
}

li {
    margin: 16px 0;
    padding-left: 32px;
    text-indent: -32px;

    &::before {
        content: "";
        display: inline-block;
        background-image: url('../images/icons/li.svg');
        background-size: contain;
        background-repeat: no-repeat;
        width: 9px;
        height: 12px;
        margin-right: 24px;
        vertical-align: middle;
    }
}

.checks {
    margin: 0;
    padding-left: 18px;
    font-size: 16px;
}

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;

    &.active {
        display: flex;
        opacity: 1;
    }

    &:not(.active) {
        display: none;
    }
}

.custom-alert {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    color: var(--primary-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;

    .btn {
        place-self: self-end;
    }

    .custom-alert-title {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;
        display: flex;
        gap: 40px;
        align-items: center;
        justify-content: center;
        place-self: self-start;
        width: 100%;
    }

    .custom-alert-message {
        margin-bottom: 20px;
        font-size: 16px;
        line-height: 1.5;
    }

    .custom-alert-countdown {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        height: 4px;
        width: 0;
        background-color: transparent;
        transition: width 3s linear;

        &.full {
            width: 100%;
            transition: none;
        }

        &.animating {
            width: 0;
            transition: width 3s linear;
        }
    }

    #custom-alert-close {
        display: none;

        &.visible {
            display: inline-block;
        }
    }
}

.custom-alert-success,
.custom-alert-error {
    max-width: 400px;
}

.custom-alert-success {
    border: 1px solid var(--success);

    .custom-alert-title {
        color: var(--success);
        justify-content: flex-start;

        &:before {
            width: 40px;
            height: 40px;
            content: url('/assets/images/icons/success.svg');
            display: inline-block;
            background-size: contain;
            background-repeat: no-repeat;
        }
    }

    .custom-alert-countdown {
        background-color: var(--success);
    }
}

.custom-alert-error {
    border: 1px solid var(--error);

    .custom-alert-title {
        color: var(--error);
        justify-content: flex-start;

        &:before {
            width: 40px;
            height: 40px;
            content: url('/assets/images/icons/error.svg');
            display: inline-block;
            background-size: contain;
            background-repeat: no-repeat;
        }
    }
}

body.modal-open {
    overflow: hidden;
}

.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;

    form {
        max-width: 448px;

        .field-group {
            position: relative;
            margin-bottom: 16px;
        }

        label {
            display: inline-block;
            margin-bottom: 0;
            position: absolute;
            left: 16px;
            top: 10px;
            font-size: 13px;
            font-weight: 500;
            color: var(--primary-dark);
            opacity: 0.6;
            background: #fff;
            padding: 0 4px;
            transition: all 0.2s ease;
            pointer-events: none;
            z-index: 10;
        }

        input,
        textarea {
            width: 100%;
            padding: 12px 16px;
            border-radius: 8px;
            border: .2px solid var(--primary-light);
            background: #fff;
            font-size: 14px;
            display: block;
            outline: none;
            transition: border-color 0.2s;

            &:focus {
                border-color: var(--primary-dark);
            }
        }

        textarea {
            min-height: 120px;
            resize: vertical;
        }

        input:focus + label,
        input:not(:placeholder-shown) + label,
        textarea:focus + label,
        textarea:not(:placeholder-shown) + label {
            top: 0;
            transform: translateY(-50%);
            border-radius: 4px;
            background-color: var(--primary-dark);
            color: #FFF;
            padding: 0px 5px;
            font-size: 12px;
            opacity: 1;
        }

        input:required,
        textarea:required {
            & + label::after {
                content: " *";
                color: var(--error);
            }
        }

        input:not(:placeholder-shown) + label::after,
        textarea:not(:placeholder-shown) + label::after {
            content: "";
        }

        input:focus:invalid:not(:placeholder-shown),
        input:not(:focus):invalid:not(:placeholder-shown) {
            border-color: var(--error);
        }

        input:user-invalid,
        textarea:user-invalid {
            color: var(--error);
        }

        input:user-invalid:not(:placeholder-shown),
        textarea:user-invalid:not(:placeholder-shown) {
            border-color: var(--error);
            border-width: 1px;
        }
    }
}

.captcha-container {
    margin-bottom: 16px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 18px;
    align-items: center;
}

.contact-note {
    margin-bottom: 40px;
    color: var(--neutral-900);
}

.mobile-panel {
    background-color: #FFF;
    position: absolute;
    top: 75px;
    right: 0;
    padding: 24px 40px;
    border-radius: 4px;
    box-shadow: 0 10px 16px -8px color-mix(in srgb, var(--primary-light), transparent 75%);

    .container {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
}

#hamburger {
    width: 28px;
    height: 24px;
    position: relative;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .5s ease-in-out;
    -moz-transition: .5s ease-in-out;
    -o-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
    cursor: pointer;

    span {
        display: block;
        position: absolute;
        height: 4px;
        width: 100%;
        background: var(--primary-dark);
        border-radius: 9px;
        opacity: 1;
        left: 0;
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-transition: .25s ease-in-out;
        -moz-transition: .25s ease-in-out;
        -o-transition: .25s ease-in-out;
        transition: .25s ease-in-out;

        &:nth-child(1) {
            top: 0;
        }

        &:nth-child(2) {
            top: 9px;
        }

        &:nth-child(3) {
            top: 18px;
        }
    }
}

.mobile-nav:open #hamburger {
    span:nth-child(1) {
        top: 9px;
        -webkit-transform: rotate(135deg);
        -moz-transform: rotate(135deg);
        -o-transform: rotate(135deg);
        transform: rotate(135deg);
    }

    span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }

    span:nth-child(3) {
        top: 9px;
        -webkit-transform: rotate(-135deg);
        -moz-transform: rotate(-135deg);
        -o-transform: rotate(-135deg);
        transform: rotate(-135deg);
    }
}

.btn {
    box-shadow: var(--shadow);

    &.primary {
        background: var(--secondary);
        color: var(--neutral-900);

        &:hover {
            box-shadow: var(--shadow-2);
            color: var(--neutral-900);
        }
    }

    &.secondary {
        background: var(--primary-dark);
        color: #fff;

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

    &.ghost {
        color: var(--primary-dark);
        border: none;
        box-shadow: none;
        background-color: unset;

        &:hover {
            color: var(--primary-light);
        }
    }

    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }
}

footer {
    color: #FFF;
    background-color: var(--primary-dark);
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    .footer-link {
        white-space: nowrap;

        a {
            color: var(--secondary);
        }
    }

    .container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (min-width: 768px) {
    .band-grid {
        grid-template-columns: 1fr 1fr;
    }

    footer {
        padding: 16px;

        .container {
            flex-direction: row;
            gap: 18px;
        }
    }
}

@media (min-width: 1024px) {
    .contact {
        grid-template-columns: auto auto;
        justify-items: flex-start;
    }

    footer {
        padding: 8px;
    }
}

#cookie-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFF;
    color: var(--primary-dark);
    z-index: 9999;
    padding: 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,.3);

    &.visible {
        display: block;
    }

    .cookie-bar-inner {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;

        p {
            margin: 0;
            font-size: 14px;
        }
    }

    #cookie-policy-link {
        color: var(--secondary);
        text-decoration: underline;
    }

    .cookie-bar-actions {
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }

    .cookie-settings {
        display: none;
        max-width: 1200px;
        margin: 12px auto 0;
        border-top: 1px solid rgba(255,255,255,.15);
        padding-top: 12px;

        &.visible {
            display: block;
        }

        .cookie-setting-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 8px 0;

            p {
                margin: 2px 0 0;
                font-size: 13px;
                opacity: .75;
            }

            .cookie-toggle {
                position: relative;
                display: inline-block;
                width: 44px;
                height: 24px;
                flex-shrink: 0;

                input {
                    opacity: 0;
                    width: 0;
                    height: 0;

                    &:checked + .cookie-slider {
                        background: var(--success);

                        &::before {
                            transform: translateX(20px);
                        }
                    }
                }

                .cookie-slider {
                    position: absolute;
                    cursor: pointer;
                    inset: 0;
                    background: var(--neutral-400);
                    border-radius: 24px;
                    transition: background .2s;

                    &::before {
                        content: "";
                        position: absolute;
                        height: 18px;
                        width: 18px;
                        left: 3px;
                        bottom: 3px;
                        background: #fff;
                        border-radius: 50%;
                        transition: transform .2s;
                    }
                }

                &.disabled .cookie-slider {
                    opacity: .5;
                    cursor: not-allowed;
                }
            }
        }
    }

    .cookie-settings-actions {
        padding-top: 8px;
        text-align: right;
    }
}

section.cookies {
    padding-top: 54px;

    h2 {
        margin-top: 32px;
    }

    h3 {
        margin-top: 16px;
    }
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;

    table {
        width: 100%;
        border-collapse: collapse;
        min-width: 500px;
        font-size: 14px;
    }

    th,
    td {
        padding: 10px 12px;
        border: 1px solid var(--line);
        text-align: left;
        vertical-align: top;
    }

    th {
        background: var(--primary-dark);
        color: #fff;
        font-weight: 600;
        white-space: nowrap;
    }

    td:first-child {
        white-space: nowrap;
        font-weight: 500;
    }
}

@media (max-width: 600px) {
    .table-wrap {
        table {
            font-size: 13px;
        }

        th,
        td {
            padding: 8px;
        }
    }
}
