:root {
    /* Новая палитра: Deep Cyberpunk */
    --primary: #00D4FF;
    /* Neon Cyan */
    --secondary: #7B2CBF;
    /* Electric Violet */
    --bg-dark: #0B0D17;
    /* Deep Space */
    --bg-card: #15192B;
    --text-light: #E0E6ED;
    --text-muted: #94A1B2;
    --success: #00FF9D;
    --font-main: 'Rajdhani', sans-serif;
    --transition: all 0.3s ease;
}

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

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;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: 80px 0;
}

/* Header */
.header {
    background: rgba(11, 13, 23, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 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;
    color: var(--primary);
}

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

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

.cta-link {
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 5px 15px;
    border-radius: 4px;
}

.cta-link:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Burger */
.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    position: relative;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* --- Анімація хрестика для мобільного меню --- */

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

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

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

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    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(135deg, rgba(11, 13, 23, 0.9) 0%, rgba(123, 44, 191, 0.6) 100%);
}

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

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

.hero__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

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

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

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

.btn--secondary {
    background: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    margin-left: 10px;
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

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

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

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

/* Services (Masonry-like with Grid) */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.service-item {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #000, transparent);
    opacity: 0.7;
}

.service-content {
    position: relative;
    z-index: 1;
}

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

.review-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-left: 3px solid var(--primary);
}

.author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

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

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

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

.captcha-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

#captchaQuestion {
    white-space: nowrap;
    flex-shrink: 0;
}

#captchaAnswer {
    flex: 0 0 auto;
    width: auto;
    min-width: 80px;
}

input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
}

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

.full-width {
    width: 100%;
}

.form-message {
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.success-msg {
    color: var(--success);
}

.error-msg {
    color: #ff4757;
}

/* Footer */
.footer {
    background: #05060a;
    padding: 60px 0 20px;
    border-top: 1px solid #222;
}

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

.footer__logo {
    margin-bottom: 15px;
    display: inline-block;
}

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

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

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

.footer__col ul li a:hover {
    color: var(--primary);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--bg-card);
    padding: 20px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    max-width: 600px;
    margin: 0 auto;
}

.cookie-popup.show {
    opacity: 1;
    visibility: visible;
}

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

.btn--small {
    padding: 8px 15px;
    background: var(--primary);
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn--outline-small {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

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

.modal {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 8px;
    position: relative;
    display: none;
    /* Hidden unless specific modal targeted */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.modal-content {
    padding: 30px;
    overflow-y: auto;
    max-height: 80vh;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.75rem;
}

.modal-content h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.modal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.modal-content a:hover {
    color: #00b8e6;
}

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

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

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

/* Mobile Responsive */

/* Tablets and small laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 60px 0;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 20px;
        transform: translateY(-150%);
        transition: var(--transition);
        border-bottom: 1px solid var(--primary);
    }

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

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

    .burger {
        display: flex;
    }

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

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

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

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .btn--secondary {
        margin-left: 0;
        margin-top: 10px;
        display: block;
        width: 100%;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 50px 0;
    }

    .header__container {
        height: 60px;
    }

    .logo {
        font-size: 1rem;
    }

    .logo svg {
        width: 35px;
        height: 35px;
    }

    .hero {
        height: 100vh;
        min-height: 600px;
    }

    .hero__content {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.85rem;
        padding: 4px 12px;
    }

    .card {
        padding: 20px;
    }

    .service-item {
        padding: 30px;
        min-height: 180px;
    }

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

    .cookie-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 20px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .section {
        padding: 40px 0;
    }

    .header__container {
        height: 55px;
    }

    .logo {
        font-size: 0.9rem;
    }

    .logo svg {
        width: 30px;
        height: 30px;
    }

    .logo span {
        display: none;
    }

    .hero {
        min-height: 500px;
    }

    .hero__content {
        padding: 0 10px;
    }

    h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.95rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 3px 10px;
        margin-bottom: 15px;
    }

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

    .card {
        padding: 15px;
    }

    .card__icon {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .service-item {
        padding: 20px;
        min-height: 150px;
    }

    .review-card {
        padding: 20px;
    }

    .contact__form {
        padding: 20px;
    }

    .contact__info {
        margin-bottom: 30px;
    }

    .contact__info ul li {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .footer {
        padding: 40px 0 15px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer__col {
        margin-bottom: 20px;
    }

    .cookie-popup {
        left: 5px;
        right: 5px;
        bottom: 5px;
        padding: 12px;
        font-size: 0.85rem;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn--small,
    .btn--outline-small {
        width: 100%;
        padding: 10px;
    }

    .modal {
        max-width: 95%;
    }

    .modal-content {
        padding: 15px;
        font-size: 0.9rem;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 1.3rem;
    }

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

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

    .masonry-grid {
        gap: 15px;
    }

    input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .captcha-group {
        flex-wrap: wrap;
    }

    #captchaQuestion {
        font-size: 0.9rem;
    }

    #captchaAnswer {
        min-width: 60px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .card {
        padding: 12px;
    }

    .service-item {
        padding: 15px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}