html {
    scroll-behavior: smooth;
}

body {
    font-family: "Onest", sans-serif;
    padding: 0;
    margin: 0;
}

p {
    padding: 0;
    margin: 0;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-justify-between {
    justify-content: space-between;
}

.flex-align-center {
    align-items: center;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #ffffff;
    border-bottom: 1px solid lightgray;
    padding-bottom: 8px;
}

.header__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.header__nav__item {
    position: relative;
    text-decoration: none;
    color: black;
    padding: 8px;
    margin: 0 10px;
    font-weight: 500;
    font-size: 18px;
    transition: color 0.2s ease-in;
}

.header__nav__item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2c79f6;
    transition: width 0.3s ease-in-out;
}

.header__nav__item:hover {
    color: #2c79f6;
}

.header__nav__item:hover::after {
    width: 100%;
}

.main {
    background: url("./assets/main_bg.jpg") no-repeat top;
    background-size: cover;
    width: 100%;
    margin-top: 90px;
    height: calc(100vh - 90px);
}

.main__container {
    width: 100%;
    height: 100%;
    position: relative;
}

.main__info {
    position: relative;
    top: 25%;
    left: 15%;
    width: 60%;
}

.main__title {
    font-size: 54px;
    color: black;
    font-weight: 700;
}

.main__title__text {
    background-color: rgba(211, 211, 211, 0.6);
}

.main__subtitle__text {
    font-size: 32px;
    font-weight: 500;
    background-color: rgba(211, 211, 211, 0.6);
}

.products {
    scroll-margin-top: 90px;
    background: url("./assets/products_bg.jpg") no-repeat center;
    background-size: cover;
    padding: 80px 0;
}

.products__title {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 48px 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.products__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 48px;
}

.products__heading {
    flex: 0 0 30%;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
}

.products__card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background-color: rgba(255, 255, 255, 0.93);
    border-radius: 10px;
    padding: 36px;
}

.products__card-content {
    display: flex;
    gap: 32px;
}

.products__card-footer {
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.products__card-button {
    background-color: #2c79f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-family: "Onest", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in;
}

.products__card-button:hover {
    background-color: #1a5fd4;
    transition: background-color 0.2s ease-in;
}

.products__card-meta {
    flex: 0 0 200px;
}

.products__card-title {
    font-size: 36px;
    font-weight: 800;
    color: #2c79f6;
    margin: 0 0 16px 0;
}

.products__card-description {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #333333;
    margin: 0;
}

.products__card-functions {
    flex: 1;
}

.products__card-functions-heading {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 12px 0;
}

.products__card-functions-list {
    margin: 0;
    padding-left: 20px;
}

.products__card-functions-item {
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 10px;
}

.products__card-functions-item:last-child {
    margin-bottom: 0;
}

/* Services */

.services {
    scroll-margin-top: 90px;
    background: url("./assets/services_bg.jpg") no-repeat center;
    background-size: cover;
    padding: 80px 0;
}

.services__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.services__title {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 32px 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.services__description {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
    margin: 0 0 40px 0;
}

.services__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.services__item {
    background-color: rgba(255, 255, 255, 0.93);
    border-radius: 10px;
    padding: 20px 28px;
}

.services__item-title {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.services__item-title::-webkit-details-marker {
    display: none;
}

.services__item-title::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    flex-shrink: 0;
    color: #2c79f6;
    transition: transform 0.3s ease;
}

.services__item[open] .services__item-title::after {
    transform: rotate(45deg);
}

.services__item-list {
    margin: 16px 0 0 0;
    padding-left: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

.services__item-list-item {
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 8px;
}

.services__item-list-item:last-child {
    margin-bottom: 0;
}

/* About */

.about {
    scroll-margin-top: 90px;
    position: relative;
    padding: 90px 0;
    background: url("./assets/about_bg.JPG") no-repeat center;
    background-size: cover;
    overflow: hidden;
}

.about__bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(44, 121, 246, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 121, 246, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
}

.about__container {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
}

.about__title {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 56px 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.about__content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.about__description-block {
    background: rgba(6, 14, 28, 0.72);
    border: 1px solid rgba(44, 121, 246, 0.35);
    border-radius: 14px;
    padding: 32px 36px;
    backdrop-filter: blur(10px);
}

.about__description {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

.about__license-block {
    background: rgba(8, 24, 50, 0.78);
    border: 1px solid rgba(44, 121, 246, 0.45);
    border-radius: 14px;
    padding: 28px 36px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    backdrop-filter: blur(10px);
}

.about__license-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.about__license-text {
    flex: 1;
}

.about__license-label {
    font-size: 14px;
    font-weight: 700;
    color: #2c79f6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px 0;
}

.about__license-desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 12px 0;
}

.about__license-number {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin: 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 20px;
}

.about__card {
    background: rgba(6, 14, 28, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 28px 30px;
    backdrop-filter: blur(10px);
}

.about__card-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.about__card-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.about__codes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.about__code {
    background: rgba(44, 121, 246, 0.18);
    border: 1px solid rgba(44, 121, 246, 0.4);
    color: #7eb5ff;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}

.about__requisites {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about__requisite-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about__requisite-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about__requisite-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.about__requisite-value {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.about__contacts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about__contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.about__contact-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.about__contact-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.about__contact-link:hover {
    color: #2c79f6;
}

/* About responsive */

@media (max-width: 1240px) {
    .about__container {
        padding: 0 24px;
        box-sizing: border-box;
    }
}

@media (max-width: 900px) {
    .about__grid {
        grid-template-columns: 1fr 1fr;
    }

    .about__card--contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .about__title {
        font-size: 34px;
    }

    .about__license-block {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }

    .about__description-block {
        padding: 24px;
    }

    .about__grid {
        grid-template-columns: 1fr;
    }

    .about__card--contact {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .about__title {
        font-size: 26px;
    }

    .about {
        padding: 60px 0;
    }

    .about__card {
        padding: 20px;
    }
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal__window {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    width: 480px;
    max-width: 90vw;
    z-index: 1;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888888;
    cursor: pointer;
}

.modal__close:hover {
    color: #111111;
}

.modal__title {
    font-size: 28px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 16px 0;
}

.modal__text {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
    margin: 0 0 28px 0;
}

.modal__link {
    display: inline-block;
    background-color: #2c79f6;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease-in;
}

.modal__link:hover {
    background-color: #1a5fd4;
    transition: background-color 0.2s ease-in;
}

/* Search modal */

.search-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.search-modal[hidden] {
    display: none;
}

.search-modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.search-modal__window {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    width: 480px;
    max-width: 90vw;
    z-index: 1;
}

.search-modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888888;
    cursor: pointer;
}

.search-modal__close:hover {
    color: #111111;
}

.search-modal__title {
    font-size: 28px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 24px 0;
}

.search-modal__form {
    display: flex;
    gap: 12px;
}

.search-modal__input {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-modal__input:focus {
    border-color: #2c79f6;
}

.search-modal__button {
    background-color: #2c79f6;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease-in;
}

.search-modal__button:hover {
    background-color: #1a5fd4;
}

.search-modal__result {
    font-size: 14px;
    color: #666666;
    margin: 16px 0 0 0;
}

mark.search-highlight {
    background-color: #ffe066;
    color: #111111;
    border-radius: 3px;
    padding: 0 1px;
}

/* ==================== RESPONSIVE ==================== */

.header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    align-self: center;
    flex-shrink: 0;
}

.header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #111111;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.header__hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Tablet */
@media (max-width: 1240px) {
    .header__container,
    .products__container,
    .services__container {
        padding: 0 24px;
        box-sizing: border-box;
    }
}

@media (max-width: 1024px) {
    .main__title {
        font-size: 42px;
    }

    .main__subtitle__text {
        font-size: 26px;
    }

    .products__container {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }

    .products__heading {
        flex: none;
        font-size: 22px;
    }

    .products__card-title {
        font-size: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header__hamburger {
        display: flex;
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        background-color: #ffffff;
        border-bottom: 1px solid lightgray;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 8px 0 16px;
    }

    .header__nav.is-open {
        display: flex;
    }

    .header__nav__item {
        margin: 4px 24px;
        font-size: 16px;
    }

    .main__info {
        left: 0;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .main__title {
        font-size: 34px;
    }

    .main__subtitle__text {
        font-size: 20px;
    }

    .products__card-content {
        flex-direction: column;
        gap: 24px;
    }

    .products__card-meta {
        flex: none;
    }

    .products__card {
        padding: 24px;
    }

    .products__title,
    .services__title {
        font-size: 34px;
    }

    .services__description {
        font-size: 16px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .main__info {
        top: 12%;
    }

    .main__title {
        font-size: 26px;
    }

    .main__subtitle__text {
        font-size: 17px;
    }

    .products__title,
    .services__title {
        font-size: 26px;
    }

    .products__card {
        padding: 16px;
    }

    .services__item {
        padding: 16px 20px;
    }

    .products__card-button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}