* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
}

header,
footer {
    background: #222;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

nav a {
    color: white;
    text-decoration: none;
}

.wrapper {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.hero {
    aspect-ratio: 1.2 / 1;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
    padding: 0;
    text-shadow: 10px 0px 30px rgba(0, 0, 0, 1);
    background: none;
    height: 200vw;
    /* Квадратная форма: высота = ширина */
    max-width: 100vw;
    max-height: 200vw;
    min-height: 450px;
    /* Минимальная высота для маленьких экранов */
    display: flex;
    align-items: center;
    /* Центрирование по вертикали */
    justify-content: center;
    /* Центрирование по горизонтали */
}

.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* height: 100%; */
    min-height: 0;
    padding: 0;
}


.hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    transition: transform 0.7s cubic-bezier(.77, 0, .18, 1);
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

.section {
    padding: 40px 0;
}

.portfolio-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
}

.portfolio-scroll::-webkit-scrollbar {
    height: 8px;
}

.portfolio-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.portfolio-scroll .card {
    flex: 0 0 auto;
    width: 300px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
}

.portfolio-scroll .card:hover {
    cursor: pointer;
}

.portfolio-scroll .card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.portfolio-scroll .card p {
    padding: 10px;
    margin: 0;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: 0.2s;

}

.card:hover {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
}

.contact-form button {
    padding: 10px 20px;
    margin-bottom: 10px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

footer p {
    font-size: 14px;
    margin-top: 10px;
}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.contact-form input,
.contact-form textarea,
.contact-form button {
    border-radius: 8px;
    transition: 0.2s;
}

.contact-form button:hover {
    background: #2e93ff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    pointer-events: none;
    opacity: 0;
}

.modal {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    animation: popup 0.35s ease forwards;
    position: relative;
    text-align: center;
}

@keyframes popup {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.modal-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #0078D4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: #005a9e;
}

.nav {
    display: flex;
    gap: 20px;
    background: #222;
    padding: 15px 30px;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    font-weight: 600;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: #0078D4;
    border-radius: 2px;
}

.card {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
}

.card-header h3 {
    margin: 0 0 5px;
}

.short-desc {
    color: #555;
    font-size: 14px;
    margin: 0;
}

.arrow {
    transition: transform 0.3s ease;
    font-size: 20px;
    color: #666;
}

.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 16px;
}

.card-content.open {
    padding: 14px 16px;
}

.card-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.card-images img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.card.active .card-content {
    max-height: 1000px;
}

.card.active .arrow {
    transform: rotate(180deg);
}

.btn-contact {
    padding: 10px 20px;
    font-size: 15px;
    background-color: #0078D4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-contact:hover {
    background-color: #005fa3;
}

a {
    color: #0078D4;
    text-decoration: underline;
    transition: 0.3s;
}

a:hover {
    color: #0562a8;
    cursor: pointer;
}

.btn-details {
    margin-top: 10px;
    padding: 10px 20px;
    background: #d4d4d4;
    color: rgb(0, 0, 0);
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    width: 100%;
}

.btn-details:hover {
    background: #c4c4c4;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.form-actions button {
    margin: 0;
}

.contact-form p {
    margin-bottom: 10px;
    display: none;
}

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #222;
    color: #fff;
    padding: 20px 24px;
    text-align: center;
    position: relative;
}

nav {
    flex: 1;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 15px;
    gap: 4px;
    margin-left: 30px;
}

.header-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(70deg);
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

header {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    background: #222;
    color: #fff;
    padding: 20px 24px;
    text-align: center;
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    margin: 0 auto;
    min-width: 0;
}

.header-info {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 15px;
    gap: 4px;
    min-width: 180px;
    margin-left: 0;
}

.header-inn-mobile {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 15px;
    background: #222;
    color: #fff;
    padding: 6px 0 0 0;
}

.header-inn-desktop {
    display: flex;
}

.header-inn-mobile {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 15px;
    background: #222;
    color: #fff;
    padding: 6px 0 0 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-inn-mobile .whatsapp-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(70deg);
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 8px;
    }

    .header-main {
        align-items: center;
        gap: 4px;
    }

    .header-info {
        position: static;
        align-items: flex-end;
        margin-left: 0;
        margin-top: 8px;
        min-width: 0;
        right: 0;
        top: 0;
    }

    header h1 {
        font-size: 1.2rem;
    }

    nav ul {
        gap: 12px;
    }

    .header-inn-mobile {
        display: flex;
        flex-wrap: wrap;
    }

    .header-info {
        display: none !important;
    }
}

.site-logo {
    display: block;
    margin: 0 auto 8px auto;
    max-width: 180px;
    height: 48px;
    object-fit: contain;
}

.header-contacts {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-inn-kpp {
    display: flex;
    align-items: center;
    gap: 8px;
}



header {
    display: flex;
    flex-direction: column;
    /* Ставим элементы друг под другом */
    align-items: stretch;
    background: #222;
    color: #fff;
    padding: 20px 24px;
    text-align: center;
    position: relative;
}

.header-contacts {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрируем логотип и меню */
    gap: 8px;
    margin: 0 auto;
    min-width: 0;
}

@media (max-width: 900px) {
    .header-contacts {
        display: none;
    }

    .header-inn-mobile {
        display: flex;
    }
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}