/* --- Variables & Reset --- */
:root {
    --primary: #00d664;
    /* Neon Green */
    --primary-dark: #00a34b;
    --secondary: #0f172a;
    /* Dark Navy */
    --bg-dark: #020617;
    /* Almost Black */
    --text-light: #f8fafc;
    --text-gray: #94a3b8;
    --glass: rgba(15, 23, 42, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --font-main: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typography & Components --- */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

.section {
    padding: 80px 0;
}

.section__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn--primary:hover {
    background: var(--primary-dark);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn--full {
    width: 100%;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav__list {
    display: flex;
    gap: 30px;
}

.nav__link:hover {
    color: var(--primary);
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: url('images/hero-bg.jpg') center/cover no-repeat;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.6));
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: rgba(0, 214, 100, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid var(--primary);
    margin-left: auto;
    margin-right: auto;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 40px;
}

/* --- Features --- */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--secondary);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card__icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.card__title {
    margin-bottom: 15px;
}

.card__text {
    color: var(--text-gray);
}

/* --- Services (Masonry-ish) --- */
.services__masonry {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 20px;
}

.service-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.service-item--lg {
    grid-row: span 2;
}

.service-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.service-item:hover .service-item__img {
    transform: scale(1.1);
}

.service-item__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* --- Reviews --- */
.reviews__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--secondary);
    padding: 30px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.review-card__text {
    font-style: italic;
    margin-bottom: 20px;
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    color: var(--primary);
}

.review-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.review-card__author div {
    display: flex;
    flex-direction: column;
}

.review-card__city {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* --- Contact --- */
.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact__list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact__list i {
    color: var(--primary);
}

.form {
    background: var(--secondary);
    padding: 30px;
    border-radius: var(--radius);
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
}

.form__input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn__loader {
    display: none;
    margin-left: 10px;
}

/* --- Footer --- */
.footer {
    background: var(--secondary);
    padding: 50px 0;
    border-top: 1px solid var(--border);
    margin-top: 50px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.logo--footer {
    color: var(--text-light);
}

.footer__col h4 {
    color: var(--text-light);
    margin-bottom: 15px;
}

.footer__col p {
    color: var(--text-gray);
}

.footer__links li {
    margin-bottom: 10px;
}

.footer__links button {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 0;
}

.footer__links a {
    color: var(--text-gray);
}

.footer__links button:hover,
.footer__links a:hover {
    color: var(--primary);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--secondary);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    display: none;
}

.modal.active {
    display: block;
    animation: zoomIn 0.3s;
}

.modal__content {
    overflow-y: auto;
    max-height: 60vh;
    padding-right: 10px;
}

.modal__content h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal__content h4 {
    color: var(--text-light);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.modal__content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal__content ul,
.modal__content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.modal__content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal__content a {
    color: var(--primary);
    text-decoration: underline;
}

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

.modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Mobile Queries --- */
@media (max-width: 1024px) {

    /* 1. Стили для открытого меню (исправление зазора) */
    .nav {
        position: fixed;
        top: 0;
        /* Тянем меню от самого верха экрана */
        right: -100%;
        width: 100%;
        /* Делаем меню на всю ширину для удобства (или оставь 250px) */
        max-width: 300px;
        /* Ограничение ширины */
        height: 100vh;
        background: var(--secondary);
        padding: 90px 30px 30px;
        /* Отступ сверху (90px), чтобы контент не налез на хедер */
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        z-index: 90;
        /* Меню под хедером (у хедера z-index: 100) */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 25px;
        /* Чуть меньше отступы между пунктами */
    }

    .nav__link {
        font-size: 1.2rem;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 10px;
    }

    /* 2. Бургер-кнопка (она всегда видна) */
    .burger {
        display: block;
        position: relative;
        z-index: 101;
        /* Бургер всегда поверх всего */
        width: 30px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .burger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-light);
        position: absolute;
        left: 0;
        transition: 0.3s ease-in-out;
        border-radius: 2px;
    }

    /* Расставляем полоски */
    .burger span:nth-child(1) {
        top: 0;
    }

    .burger span:nth-child(2) {
        top: 9px;
    }

    .burger span:nth-child(3) {
        top: 18px;
    }

    /* 3. Анимация превращения в крестик (Кнопка закрытия) */
    .burger.open span:nth-child(1) {
        top: 9px;
        transform: rotate(45deg);
        background-color: var(--primary);
        /* Крестик станет зеленым */
    }

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

    .burger.open span:nth-child(3) {
        top: 9px;
        transform: rotate(-45deg);
        background-color: var(--primary);
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .services__masonry {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}