:root {
    /* New Palette: Electric Midnight */
    --bg-color: #0F172A;
    /* Dark Slate */
    --surface-color: #1E293B;
    /* Lighter Slate */
    --primary-color: #6366F1;
    /* Indigo */
    --accent-color: #10B981;
    /* Emerald Green */
    --text-color: #F8FAFC;
    /* White/Grey */
    --text-muted: #94A3B8;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-main: 'Space Grotesk', sans-serif;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

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

.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(--text-color);
}

.nav {
    display: none;
    /* Mobile First */
}

/* Burger Menu */
.burger {
    display: block;
    cursor: pointer;
}

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

/* --- Анімація кнопки Бургер -> Хрестик --- */

/* Верхня лінія: опускається і повертається на 45 градусів */
.burger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

/* Середня лінія: стає прозорою (зникає) */
.burger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
    /* Можна додати ефект вильоту вбік */
}

/* Нижня лінія: піднімається і повертається на -45 градусів */
.burger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Open State */
.nav.active {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    padding: 20px;
    border-bottom: 1px solid var(--primary-color);
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

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

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

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 1) 100%);
    z-index: 1;
}

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

.badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero__title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

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

.btn--primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn--primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

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

.btn--outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

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

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

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

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.text-center {
    text-align: center;
}

.bg-dark {
    background-color: #0b1120;
}

/* Features */
.features__grid,
.services__grid,
.reviews__grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

.feature-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    /* Явно задаем ширину */
    height: 60px;
    /* Явно задаем высоту */
    stroke: var(--accent-color);
    /* Красим обводку в акцентный цвет */
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
}

/* Эффект при наведении на карточку: иконка чуть подпрыгивает и меняет цвет */
.feature-card:hover .feature-icon {
    transform: translateY(-5px);
    stroke: var(--primary-color);
}

/* Services */
.service-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.service-content {
    padding: 20px;
}

.text-link {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

/* Reviews */
.review-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.review-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.stars {
    color: #FBBF24;
    margin-bottom: 10px;
}

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

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

.contact__form {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

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

.form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    color: var(--accent-color);
}

.form-message.error {
    color: #F43F5E;
}

/* Footer */
.footer {
    background: #020617;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
    margin-bottom: 40px;
}

.footer__col h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.footer__col ul li a {
    color: var(--text-muted);
}

.footer__col ul li a:hover {
    color: white;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--border-radius);
    z-index: 2001;
    display: none;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--primary-color);
}

.modal-content {
    color: var(--text-color);
    line-height: 1.6;
}

.modal-content h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-content h4 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

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

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

.modal-content ul li,
.modal-content ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-content ul ul,
.modal-content ol ol {
    margin-top: 10px;
    margin-bottom: 10px;
}

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

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

.modal-content strong {
    color: var(--text-color);
    font-weight: 600;
}

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

.modal.active,
.modal-overlay.active {
    display: block;
    opacity: 1;
}

/* Cookie Popup - Non-aggressive */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    max-width: calc(100% - 40px);
    background: var(--surface-color);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1500;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-popup.show {
    display: block;
}

.cookie-popup p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

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

.cookie-popup .btn {
    font-size: 0.75rem;
    padding: 6px 12px;
    flex: 1;
    min-width: 80px;
}

/* Responsive */
@media (min-width: 768px) {

    .features__grid,
    .services__grid,
    .reviews__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__wrapper,
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }

    .cookie-popup {
        width: 320px;
    }
}

@media (min-width: 1024px) {
    .nav {
        display: block;
    }

    .nav__list {
        flex-direction: row;
        background: transparent;
    }

    .burger {
        display: none;
    }

    .features__grid,
    .reviews__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .header__container {
        padding: 0 20px;
    }
}