:root {
    /* Новая палитра: Темно-синий индиго + Электрический бирюзовый */
    --primary-color: #00D2D3;
    /* Яркий акцент */
    --bg-dark: #1A1A2E;
    /* Основной фон */
    --bg-light: #16213E;
    /* Фон карточек */
    --text-main: #EAEAEA;
    --text-muted: #B0B0B0;
    --danger: #FF6B6B;
    --success: #1DD1A1;
    --overlay: rgba(26, 26, 46, 0.85);

    --font-family: 'Outfit', sans-serif;
    --transition: 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* --- Header --- */
.header {
    background-color: rgba(26, 26, 46, 0.95);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo__text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.nav__list {
    display: none;
    /* Mobile first hidden */
    list-style: none;
}

.nav__link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

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

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

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

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

.burger span:nth-child(3) {
    top: 18px;
}

.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);
    top: 9px;
}

/* Mobile Menu */
.nav.active .nav__list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    padding: 20px;
    gap: 20px;
    text-align: center;
    border-bottom: 1px solid var(--primary-color);
}

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

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.7) 0%, var(--bg-dark) 100%);
}

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

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

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

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

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

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

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

.btn--full {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--bg-dark);
    font-size: 1rem;
}

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

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

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

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

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

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

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

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

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

/* Masonry Services */
.masonry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.masonry-item {
    background-color: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
}

.masonry-item.highlight {
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(0, 210, 211, 0.1) 100%);
    border: 1px solid var(--primary-color);
}

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

/* Reviews */
.reviews__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.review-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    position: relative;
}

.review-text {
    font-style: italic;
    margin-bottom: 20px;
}

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

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

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

.contact__list {
    list-style: none;
    margin-top: 30px;
}

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

.contact__list a {
    color: var(--text-main);
    text-decoration: none;
}

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

input {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-light);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text-main);
    font-family: var(--font-family);
    outline: none;
}

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

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

#captcha-question {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Form Messages */
.form-message {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
}

.form-message.error {
    color: var(--danger);
}

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

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    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;
}

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

/* Footer */
.footer {
    background-color: #111;
    padding: 50px 0;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

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

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

.footer ul {
    list-style: none;
}

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

.footer button,
.footer a {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    transition: var(--transition);
}

.footer button:hover,
.footer a:hover {
    color: var(--primary-color);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--primary-color);
    padding: 20px;
    border-radius: 10px;
    z-index: 2000;
    display: none;
    /* JS toggles flex */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    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.8);
    background-color: var(--bg-light);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 10px;
    z-index: 3001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

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

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
    z-index: 2;
}

.modal-content {
    padding: 30px;
    overflow-y: auto;
    color: var(--text-muted);
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    margin-top: 0;
}

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

.modal-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.modal-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

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

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

/* Desktop Media Query */
@media (min-width: 1024px) {
    .nav__list {
        display: flex;
        gap: 30px;
    }

    .burger {
        display: none;
    }

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

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

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

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

    .cookie-popup {
        max-width: 400px;
    }
}