/* --- Variables & Reset --- */
:root {
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --primary: #8B5CF6;
    /* Electric Violet */
    --primary-hover: #7C3AED;
    --accent: #06B6D4;
    /* Cyan */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #334155;

    --font-main: 'Space Grotesk', sans-serif;
    --radius: 12px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    --header-height: 70px;
}

* {
    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-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
    margin-top: 10px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

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

.btn--outline:hover {
    background: var(--accent);
    color: #000;
}

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

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

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    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: 100%;
}

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

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

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

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

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
}

/* Mobile Nav */
@media (max-width: 1024px) {
    .nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s;
        border-top: 1px solid var(--border);
    }

    .nav.active {
        right: 0;
    }

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

    .burger {
        display: flex;
    }

    .burger.toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .burger.toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, var(--bg-dark) 100%);
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
}

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

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

.hero__title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.hero__actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hero__trust {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero__trust i {
    color: var(--accent);
    margin-right: 5px;
}

@media (max-width: 768px) {
    .hero__title {
        font-size: 2.2rem;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__trust {
        flex-direction: column;
        gap: 5px;
    }
}

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

.section--dark {
    background: #0b101e;
}

.section--gradient {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #171638 100%);
}

.section__header {
    text-align: center;
    margin-bottom: 50px;
}

.section__header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

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

/* --- 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);
    border: 1px solid var(--border);
    transition: 0.3s;
}

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

.icon-box {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* --- Services (Masonryish) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: 0.3s;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.large {
    grid-column: span 2;
    background: linear-gradient(45deg, var(--bg-card), #262445);
}

.service-card.wide {
    grid-column: span 3;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card.large,
    .service-card.wide {
        grid-column: auto;
    }
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Відступ між фото та текстом */
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Тонка лінія розділення */
}

.author-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Робить фото круглим */
    object-fit: cover;
    /* Щоб фото не сплющувалось */
    border: 2px solid var(--primary-color);
    /* Кольорова рамка навколо фото */
}

.review-author span {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

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

.stars {
    color: #F59E0B;
    margin-bottom: 15px;
}

.review-card span {
    display: block;
    margin-top: 15px;
    font-weight: 700;
    color: var(--accent);
}

/* --- Contact & Forms --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
    align-items: center;
}

.contact-info {
    flex: 1;
    margin-bottom: 200px;
}

.contact-form {
    flex: 1;
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
}

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

.info-list i {
    color: var(--primary);
    width: 25px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.form-group label {
    position: absolute;
    left: 12px;
    top: 12px;
    color: var(--text-muted);
    transition: 0.3s;
    pointer-events: none;
    background: var(--bg-card);
    padding: 0 5px;
}

.form-group input:focus,
.form-group input:not(:placeholder-shown) {
    border-color: var(--accent);
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--accent);
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
}

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

#captcha-question {
    font-weight: 700;
    font-size: 1.2rem;
    user-select: none;
}

#captcha-answer {
    width: 80px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: #fff;
}

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 20px;
}

.spinner {
    margin-left: 10px;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-form {
        width: 100%;
    }
}

/* --- Footer --- */
.footer {
    background: #000;
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

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

.footer h4 {
    margin-bottom: 20px;
    color: #fff;
}

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

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

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

.footer__bottom {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #222;
}

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

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

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

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.modal__header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__close {
    font-size: 2rem;
    color: var(--text-muted);
    background: none;
}

.modal__close:hover {
    color: #fff;
}

.modal__body {
    padding: 20px;
    overflow-y: auto;
}

.modal__body h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--accent);
}

.modal__body ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}