:root {
    /* Unique Palette: Cyber Deep Blue & Neon */
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #10b981;

    --font-main: 'Exo 2', sans-serif;
    --spacing-section: 80px;
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Більш плавна анімація */
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: inline-block;
    /* Щоб трансформації працювали коректно */
}

ul {
    list-style: none;
}

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

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

/* Typography & Utils */
h1,
h2,
h3,
h4 {
    color: #fff;
    font-weight: 700;
}

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

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn--primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn--primary:active {
    transform: translateY(-1px);
}

.btn--outline {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn--outline:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

.btn--block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 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.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

/* NEW: Logo Hover */
.logo:hover {
    opacity: 0.9;
    transform: scale(1.02);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.logo__text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

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

.nav__link {
    color: var(--text-main);
    font-weight: 500;
    position: relative;
}

/* NEW: Nav Link Hover Effect (Underline) */
.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.nav__link:hover::after {
    width: 100%;
}

/* Burger */
.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.burger:hover span {
    background: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    position: absolute;
    transition: var(--transition);
}

.burger span:nth-child(1) {
    top: 0;
}

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

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

.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

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

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

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

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    /* Центрує сам блок по горизонталі */
    text-align: center;
    /* Центрує текст всередині блоку */
}

.badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    cursor: default;
    transition: var(--transition);
}

.badge:hover {
    background: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

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

.hero__buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
    /* Центрує кнопки (flex-елементи) */
}

.hero__note {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Sections General */
.section {
    padding: var(--spacing-section) 0;
}

.section__title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: default;
    transition: var(--transition);
}

.section__title:hover {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

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

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

/* IMPROVED: Feature Card Hover */
.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.15);
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 10px var(--accent-color);
}

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

.feature-card h3 {
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Services */
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-item {
    background: linear-gradient(45deg, var(--bg-card), rgba(99, 102, 241, 0.1));
    padding: 25px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
    cursor: pointer;
}

/* NEW: Service Item Hover */
.service-item:hover {
    transform: translateY(-5px) scale(1.02);
    background: linear-gradient(45deg, var(--bg-card), rgba(99, 102, 241, 0.25));
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left-width: 8px;
}

.service-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

.review-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    position: relative;
    transition: var(--transition);
    border: 1px solid transparent;
}

/* NEW: Review Card Hover */
.review-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.review-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.review-card__avatar {
    width: 60px;
    /* Трохи збільшимо розмір для фото */
    height: 60px;
    border-radius: 50%;
    /* Робить картинку круглою */
    object-fit: cover;
    /* ВАЖЛИВО: обрізає фото, щоб не сплющувало обличчя */
    border: 2px solid var(--primary-color);
    /* Кольорова рамка навколо фото */
    background: var(--bg-dark);
    /* Колір фону, поки вантажиться фото */
    transition: var(--transition);
    flex-shrink: 0;
    /* Щоб аватарка не стискалася, якщо тексту багато */
}

/* Ефект при наведенні на картку залишаємо той самий */
.review-card:hover .review-card__avatar {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
    border-color: var(--accent-color);
}

.review-card p {
    font-style: italic;
    color: var(--text-muted);
}

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

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

.contacts__list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

/* NEW: Contact List Hover */
.contacts__list li:hover {
    color: #fff;
    transform: translateX(5px);
}

.contacts__list li:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

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

.contacts__form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.contacts__form:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

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

input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

/* NEW: Input Hover & Focus */
input:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.8);
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* CAPTCHA FIX */
.captcha-group {
    display: flex;
    align-items: center;
    /* Центруємо вертикально */
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    /* Легкий фон для відокремлення блоку */
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#captcha-question {
    font-size: 1.5rem;
    /* Збільшуємо шрифт рівняння (як на скріні) */
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    /* Забороняємо перенос тексту */
    line-height: 1;
}

#captcha-answer {
    width: 80px;
    /* Фіксуємо ширину, щоб поле не розтягувалось */
    height: 50px;
    /* Робимо поле вищим для зручності */
    font-size: 1.25rem;
    text-align: center;
    /* Цифра по центру */
    padding: 5px;
    margin: 0;
    /* Прибираємо зайві відступи */
}

/* Прибираємо стрілочки (spinners) з input type="number" */
#captcha-answer::-webkit-outer-spin-button,
#captcha-answer::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#captcha-answer {
    -moz-appearance: textfield;
}

.error-msg {
    color: var(--error);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.success-msg {
    color: var(--success);
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    background: #0b1120;
    padding: 60px 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: 40px;
}

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

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

.footer__col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: inline-block;
    transition: var(--transition);
}

/* NEW: Footer Link Hover */
.footer__col ul li a:hover {
    color: #fff;
    padding-left: 8px;
    /* Slide effect */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.footer__bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    border: 1px solid var(--primary-color);
    animation: slideUp 0.5s ease;
}

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

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

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

/* NEW: Close Button Hover */
.modal-close:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--error);
}

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

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

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

.modal-content p,
.modal-content ul {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.modal-content ul {
    list-style: disc;
    padding-left: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .burger {
        display: block;
    }

    .hero__title {
        font-size: 2rem;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}