:root {
    --primary-color: #4F46E5;
    /* Indigo */
    --secondary-color: #9333ea;
    /* Purple */
    --accent-color: #00D2FF;
    /* Cyan */
    --bg-color: #F8FAFC;
    --text-color: #334155;
    --heading-color: #0f172a;
    --white: #ffffff;
    --light-gray: #e2e8f0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

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

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

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

.nav__link {
    font-weight: 600;
    color: var(--heading-color);
    transition: var(--transition);
}

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

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

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--heading-color);
    margin: 5px 0;
    transition: var(--transition);
}

.burger:hover span {
    background: var(--primary-color);
}

/* Кнопка закриття (Х) всередині меню */
.nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 3rem;
    /* Розмір хрестика */
    line-height: 1;
    color: var(--heading-color);
    cursor: pointer;
    display: none;
    /* За замовчуванням прихована на десктопі */
    z-index: 10;
}

.nav__close {
    transition: var(--transition);
}

.nav__close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Мобільні стилі */
@media (max-width: 1024px) {
    .burger {
        display: block;
    }

    /* Якщо бургер активний (меню відкрите) - ПРИХОВУЄМО ЙОГО */
    .burger.active {
        opacity: 0;
        pointer-events: none;
        /* Щоб на нього не можна було натиснути */
        transform: rotate(90deg);
        /* Для краси при зникненні */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        z-index: 1500;

        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        font-size: 1.2rem;
        margin-top: 150px;
    }

    /* Показуємо кнопку закриття (Х) тільки на мобільних */
    .nav__close {
        display: block;
    }
}

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

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(79, 70, 229, 0.8));
}

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

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: auto;
    margin-right: auto;
    transition: var(--transition);
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn--primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

.btn--full {
    width: 100%;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
}

.btn--full:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

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

.btn--outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Sections General */
.section {
    padding: 80px 0;
}

.section__title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section__title--left {
    text-align: left;
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

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

.services__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

/* Cards */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.service-card img {
    transition: var(--transition);
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card__content {
    padding: 20px;
}

.review-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-color);
}

.review-card__header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.review-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-card p {
    font-style: italic;
    margin-bottom: 15px;
}

.review-card span {
    font-weight: 700;
    color: var(--heading-color);
}

/* Contacts */
.contacts__wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
}

.contacts__info,
.contacts__form-wrapper {
    flex: 1;
    min-width: 300px;
}

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

/* Form */
.form__group {
    margin-bottom: 20px;
}

.form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.form input:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-group input {
    width: 80px;
}

#captchaQuestion {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: var(--heading-color);
    color: var(--light-gray);
    padding: 60px 0 20px;
}

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

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

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

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
    transform: translateX(3px);
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 12px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    padding: 30px;
    overflow-y: auto;
}

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

.modal-content ul,
.modal-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

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

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

.modal-content a {
    transition: var(--transition);
}

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

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

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    display: none !important;
    /* Приховано для модерації */
    animation: slideUp 0.5s ease;
}

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

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

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

/* Responsive text */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2rem;
    }

    .section {
        padding: 50px 0;
    }
}