:root {
    /* Random Palette: Deep Indigo & Electric Cyan */
    --primary-color: #4338ca;
    /* Indigo 700 */
    --secondary-color: #06b6d4;
    /* Cyan 500 */
    --dark-bg: #1e1b4b;
    /* Indigo 950 */
    --light-bg: #f8fafc;
    /* Slate 50 */
    --text-color: #334155;
    /* Slate 700 */
    --white: #ffffff;
    --accent-color: #f59e0b;
    /* Amber 500 */
    --error-color: #ef4444;

    --font-main: 'Space Grotesk', sans-serif;
    --transition: all 0.3s ease;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

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

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

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

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

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

.nav__list {
    display: flex;
    gap: 30px;
    list-style: none;
}

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

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

/* Бургер-меню иконка */
.burger {
    display: none;
    /* Скрыто на десктопе */
    flex-direction: column;
    justify-content: space-between;
    /* Распределяем полоски по высоте */
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
    /* Чтобы быть поверх открытого меню */
    position: relative;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
    position: absolute;
    left: 0;
}

/* Позиционирование полосок в нормальном состоянии */
.burger span:nth-child(1) {
    top: 0;
}

.burger span:nth-child(2) {
    top: 9px;
    /* Середина */
}

.burger span:nth-child(3) {
    top: 18px;
    /* Низ */
}

/* Превращение в крестик при добавлении класса .open */
.burger.open span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
    /* Скрываем среднюю полоску */
}

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

.burger--close {
    display: none !important;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
}

.burger--close.show {
    display: flex !important;
}

.burger--close span {
    width: auto;
    height: auto;
    background: none;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 300;
}

/* Hero */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Pexels handshake photo */
    background: url('images/optimized/hero-background.jpeg') center center/cover no-repeat;
    color: var(--white);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(67, 56, 202, 0.7) 100%);
}

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

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.section__title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    color: var(--dark-bg);
}

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

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

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

.service-item {
    background: var(--dark-bg);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
}

/* Reviews */
.reviews {
    background-color: #f1f5f9;
}

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

.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: 3px solid var(--secondary-color);
}

.review-author {
    display: flex;
    flex-direction: column;
}

.review-author strong {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.review-author span {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.review-text {
    margin-top: 0;
}

/* Contact */
.contact__container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

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

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

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

.form__group {
    margin-bottom: 20px;
}

.form__group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form__group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form__message {
    margin-top: 15px;
    font-weight: 600;
}

.form__message.success {
    color: green;
}

.form__message.error {
    color: var(--error-color);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: #94a3b8;
    padding: 60px 0 20px;
}

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

.logo--footer {
    color: var(--white);
}

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

.footer__col ul {
    list-style: none;
}

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

.footer__col ul li button,
.footer__col ul li a {
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 0;
}

.footer__col ul li button:hover,
.footer__col ul li a:hover {
    color: var(--secondary-color);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    display: none;
    animation: slideUp 0.3s ease;
}

.modal.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: var(--error-color);
    transform: scale(1.1);
}

.modal-content {
    padding-right: 30px;
}

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

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

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

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

.modal-content ul li,
.modal-content ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-content ul ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

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

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

.modal-content strong {
    font-weight: 600;
    color: var(--dark-bg);
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        transition: 0.3s;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        font-size: 1.5rem;
    }
}

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

    .header {
        padding: 10px 0;
    }
}