:root {
    --primary: #00f0b5;
    /* Neon Teal */
    --primary-hover: #00bc8e;
    --secondary: #7000ff;
    /* Electric Violet */
    --bg: #0a0e17;
    /* Deep Navy */
    --bg-card: #141b2d;
    --text: #e0e6ed;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --border-radius: 12px;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

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

/* UI Elements */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

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

.btn--primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

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

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

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

.btn--block {
    width: 100%;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--white), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.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;
    color: var(--white);
}

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

.nav__link {
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Кнопка бургер */
.burger {
    display: none;
    /* За замовчуванням прихована на десктопі */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
    /* ВАЖЛИВО: щоб кнопка була поверх відкритого меню */
    position: relative;
}

.burger span {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 0;
}

/* Початковий стан ліній (3 лінії) */
.burger span:nth-child(1) {
    top: 0;
}

.burger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.burger span:nth-child(3) {
    bottom: 0;
}

/* Стан "Хрестик" (коли меню відкрите) */
.burger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
    /* Середня лінія зникає */
}

.burger.active span:nth-child(3) {
    bottom: 50%;
    /* Або top: 50% */
    transform: translateY(50%) rotate(-45deg);
}

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

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.7) 0%, var(--bg) 100%);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero__title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--white);
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    background: rgba(112, 0, 255, 0.2);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero__actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features */
.features {
    padding: 80px 0;
}

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

.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 240, 181, 0.1);
}

.card__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Services */
.services {
    padding: 80px 0;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: 20px;
}

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

.service-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
    transition: var(--transition);
}

.service-item:hover::before {
    background: rgba(0, 240, 181, 0.2);
}

.service-item__content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.service-item__icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
}

.service-item__content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--white);
}

.service-item__content p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.service-item__features {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.service-item__features li {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.service-item--large {
    grid-column: span 2;
}

/* Reviews */
.reviews {
    padding: 80px 0;
    background: var(--bg-card);
}

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

.review-card {
    background: var(--bg);
    padding: 30px;
    border-radius: var(--border-radius);
    font-style: italic;
}

.review-card__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--primary);
}

.review-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-author {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    font-style: normal;
    color: var(--primary);
}

/* Contact */
.contact {
    padding: 80px 0;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact__info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact__list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.form__group {
    margin-bottom: 20px;
}

.form input {
    width: 100%;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-main);
}

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

.form__captcha {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.form__captcha span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    white-space: nowrap;
}

.form__captcha input {
    flex: 1;
    max-width: 150px;
    margin-bottom: 0;
}

.btn__loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.form.loading .btn__text {
    opacity: 0;
}

.form.loading .btn__loader {
    display: block;
}

.form__message {
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 50px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer ul li {
    margin-bottom: 10px;
}

.footer__link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
}

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

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--primary);
    z-index: 900;
    display: none;
    /* Controlled by JS */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

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

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

.modal {
    background: var(--bg);
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.modal-content {
    line-height: 1.8;
}

.modal-content p {
    margin-bottom: 15px;
    color: var(--text);
}

.modal-content ul,
.modal-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
    color: var(--text);
}

.modal-content li {
    margin-bottom: 8px;
}

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

.modal-content a:hover {
    color: var(--primary-hover);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Mobile Responsive */
@media (max-width: 1024px) {
    .burger {
        display: block;
        /* Замість flex, бо span позиціоновані абсолютно */
    }

    .nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
    }

    .nav.active {
        right: 0;
    }

    .hero__title {
        font-size: 2rem;
    }

    .services__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .service-item--large {
        grid-column: span 1;
    }

    .service-item__icon {
        font-size: 2rem;
    }

    .service-item__content h3 {
        font-size: 1.3rem;
    }

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