:root {
    --primary-color: #8b5cf6;
    /* Purple/Violet */
    --primary-dark: #7c3aed;
    --secondary-color: #06b6d4;
    /* Cyan */
    --bg-color: #0a0e27;
    /* Deep Dark Blue */
    --bg-card: #1a1f3a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --font-main: 'Space Grotesk', sans-serif;
    --transition: all 0.3s ease;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

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

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

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

.btn--outline:hover {
    background: var(--white);
    color: var(--bg-color);
}

.btn--sm {
    padding: 8px 16px;
    font-size: 14px;
}

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

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

.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: 18px;
}

/* Nav & Burger */
.nav__list {
    display: flex;
    gap: 30px;
}

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

.nav__close,
.burger {
    display: none;
}

@media (max-width: 1024px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s;
        z-index: 200;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        font-size: 24px;
        gap: 40px;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: var(--white);
        font-size: 30px;
        cursor: pointer;
    }

    .burger {
        display: block;
        cursor: pointer;
    }

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

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: url('images/hero-background.jpg') center/cover no-repeat;
    margin-top: var(--header-height);
}

.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%);
}

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

.badge {
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid var(--secondary-color);
}

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

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

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

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

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

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

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

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

.feature-card__icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

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

.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-card);
}

.service-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: var(--transition);
}

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

.service-card__content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
}

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

    .service-card.large {
        height: 300px;
    }

    .service-card {
        height: 200px;
    }
}

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

.review-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.5) 100%);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
}

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

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: bold;
    color: var(--secondary-color);
    flex: 1;
}

.review-author .stars {
    font-size: 0.9rem;
}

.review-card p {
    margin-top: auto;
    font-style: italic;
}

/* Contact */
.contact__wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
}

.contact__info,
.contact__form {
    flex: 1;
    min-width: 300px;
}

.contact__list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
}

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

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

.captcha-question {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.captcha-num1,
.captcha-num2 {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
}

.captcha-operator {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
}

#captchaAnswer {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.form-loader,
.form-success {
    display: none;
    text-align: center;
    margin-top: 15px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    background-color: #020617;
    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(--white);
}

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

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

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

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 20px;
    border-top: 2px solid var(--primary-color);
    z-index: 999;
    transition: bottom 0.5s ease;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.cookie-popup.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    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(--bg-card);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 40px;
    border-radius: 12px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.modal h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.modal h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.modal p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal ul,
.modal ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.modal li {
    margin-bottom: 8px;
    line-height: 1.6;
}

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

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

.modal-content {
    color: var(--text-main);
}