/* Базовые стили */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

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

h2 {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Шапка */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    z-index: 2;
    /* Чтобы лого было выше кнопки */
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    color: white;
    border-radius: 6px;
    border: none;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.15);
}

.btn:hover::after {
    left: 100%;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--dark-color);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Медиа-запрос для мобильной версии */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
        z-index: 9;
        flex-direction: column;
        min-height: 220px;
        padding: 14px 0 14px 0;
    }

    .nav ul li {
        margin: 8px 0;
        text-align: center;
    }

    .logo {
        margin-right: auto;
    }
}

/* Герой */
.hero {
    padding: 5rem 0;
    background: #f9fafb;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    /* display: flex; */
    /* align-items: center; */
    /* gap: 4rem; */
    position: relative;
    z-index: 2;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.8rem;
}

.hero-brand {
    display: inline-block;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    padding-bottom: 0.5rem;
}

.hero-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 2px;
    transition: width 0.3s ease;
    /* Чтобы линия была под текстом */
    z-index: 1;
}

.hero-brand:hover::after {
    width: 100%;
}

.hero-subtitle {
    display: block;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 500;
    color: #4b5563;
    margin-top: 0.8rem;
}

.hero-description {
    font-family: 'Inter', sans-serif;
    margin: 2rem 0;
    line-height: 1.8;
}

.desc-line {
    display: block;
    font-size: 1.2rem;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

.desc-line:first-child {
    animation-delay: 0.3s;
}

.desc-line:last-child {
    animation-delay: 0.5s;
}

.desc-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    background: #7c3aed;
    border-radius: 50%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.hero-image:hover img {
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        gap: 2.5rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-brand::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .desc-line {
        padding-left: 0;
        text-align: center;
    }

    .desc-line::before {
        display: none;
    }

    .btn {
        margin: 0 auto;
    }
}

/* Услуги */
.services {
    padding: 100px 0;
    background-color: white;
}

.services h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
}

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

.service-card {
    background-color: var(--light-color);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

#bitrix-card {
    padding-top: 25px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.bitrixLogo {
    margin-bottom: 15px;
    color: var(--primary-color);
    width: auto;
    height: auto;
}

.bitrixLogo h1 {
    color: var(--primary-color) !important;
    font-size: 65px;    /* Увеличиваем размер шрифта */
    font-weight: 700;    /* Делаем шрифт жирным */
    line-height: 1;    /* Убираем лишний отступ */
    margin: 0;    /* Убираем отступы */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);    /* Добавляем тень для эффекта */
    letter-spacing: -5px;    /* Уменьшаем расстояние между цифрами */
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    pointer-events: none; /* курсор не сможет выделить */
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

/* Портфолио */
.portfolio {
    padding: 100px 0;
}

.portfolio h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
}

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

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    color: white;
    margin-bottom: 20px;
}

/* Компании */

.companies {
    padding: 100px 0;
}

.companies h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
}

.companies-grid {
    display: flex;
    /* Меняем grid на flex для лучшего контроля */
    justify-content: center;
    /* Центрируем по горизонтали */
    align-items: center;
    /* Центрируем по вертикали */
    flex-wrap: wrap;
    /* Позволяет переносить элементы на маленьких экранах */
    max-width: 900px;
    /* Ограничиваем максимальную ширину */
    margin: 0 auto;
    /* Центрируем контейнер */
}

.companies-item {
    display: flex;
    background-color: transparent;
    /* Убираем фон */
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 120px;
    min-width: 120px;
    flex: 0 0 calc(33.333% - 30px);
    /* Три элемента в строке с учетом gap */
}

.companies-item img {
    width: 100%;
    max-width: 200px;
    border-radius: 16px;
    padding: 8px;
    transition:
        transform 0.3s cubic-bezier(.4, 2, .6, 1),
        border-color 0.2s;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .companies-item {
        flex: 0 0 100%;
        /* На мобильных - один элемент в строке */
    }
}

.companies-item#praktika-prava img {
    transform: scale(1.15);
    /* Увеличиваем масштаб до 1.3 (на 30%) */
}

.companies-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.companies-item:hover .companies-overlay {
    opacity: 1;
}

.companies-item:hover img {
    transform: scale(1.1);
}

.companies-item#praktika-prava:hover img {
    transform: scale(1.25);
}

.companies-overlay h3 {
    color: white;
    margin-bottom: 20px;
}

/* Блог */
.blog {
    padding: 100px 0;
    background-color: white;
}

.blog h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
}

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

.blog-post {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.blog-post:hover {
    transform: translateY(-10px);
}

.blog-post img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-content {
    padding: 30px;
}

.blog-content h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.meta {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 14px;
}

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

.read-more:hover {
    text-decoration: underline;
}

/* Контакты */
.contact {
    padding: 100px 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
}

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

.contact-info {
    margin-bottom: 30px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: none;
    /* Убираем рамку */
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    /* Убираем стандартный outline */
    background: #f3f4f6;
    transition: box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border: none;
    /* Убираем рамку при фокусе */
    outline: none;
    /* Убираем стандартный outline */
    box-shadow: 0 0 0 2px var(--primary-color, #2563eb);
    /* Мягкое выделение */
}

/* Подвал */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.social-links a {
    color: white;
    font-size: 20px;
    margin-left: 20px;
    transition: color 0.3s;
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav ul {
        display: none;
    }

    .hero .container {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .services-grid,
    .portfolio-grid,
    .companies-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}