/* =================================
   ОСНОВНЫЕ СТИЛИ САЙТА v7.21
   ================================= */

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #2d3748;
    background: #ffffff !important;
}

body {
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ХЕДЕР - КРАСНЫЙ ЛОГО И БУРГЕР В ОДНУ СТРОКУ ===== */
.header {
    background: #ffffff !important;
    padding: 0.5rem 0 0.5rem 0; /* Уменьшил сверху с 0.75rem до 0.5rem */
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
}

.header .container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
}

.header-title {
    flex: 0 0 auto !important;
    margin-right: auto !important;
}

.brand-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #5e17eb !important; /* Новый фиолетовый цвет */
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-logo {
    height: 120px;
    width: 120px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    overflow: hidden;
}

.main-nav {
    display: flex !important;
    gap: 2rem;
    align-items: center;
    margin-left: auto !important;
    margin-right: 2rem !important;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #2b6cb0;
    border-bottom-color: #2b6cb0;
}

/* Бургер меню - красный и в строку с лого */
.burger-menu {
    display: none !important;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    flex: 0 0 auto !important;
    margin-left: 0 !important;
}

.burger-line {
    width: 24px;
    height: 2px;
    background: #5e17eb !important; /* Новый фиолетовый цвет */
    transition: all 0.3s ease;
}

/* ===== МОБИЛЬНАЯ НАВИГАЦИЯ - СКРЫВАЮ ПОД ХЕДЕРОМ ===== */
.mobile-nav {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
}

.mobile-nav.show {
    display: block !important;
}

.mobile-nav-content {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 300px !important;
    height: 100% !important;
    background: #ffffff !important;
    padding: 2rem !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
}

.mobile-nav.show .mobile-nav-content {
    transform: translateX(0) !important;
}

.mobile-nav-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.mobile-nav-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
}

.mobile-nav-close {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #4a5568 !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
}

.mobile-nav-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.mobile-nav-link {
    color: #4a5568 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid transparent !important;
    transition: all 0.2s ease !important;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #2b6cb0 !important;
    border-bottom-color: #2b6cb0 !important;
}

/* ===== ОСНОВНОЕ СОДЕРЖИМОЕ ===== */
.main {
    flex: 1;
    background: #ffffff !important;
    padding: 2rem 0;
}

/* Поиск */
.search-container {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #5e17eb;
    box-shadow: 0 0 0 3px rgba(94, 23, 235, 0.1);
}

/* ===== ФИЛЬТРЫ - ПОКАЗЫВАЮ ВСЕ НАЗВАНИЯ ===== */
.filters-top {
    margin-bottom: 2rem;
}

.filters-row {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.filter-item {
    position: relative;
    flex: 0 0 auto !important;
}

.filter-dropdown-btn {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 200px !important;
    white-space: nowrap !important;
}

.filter-dropdown-btn:hover {
    border-color: #5e17eb !important;
    background: #f7fafc !important;
}

.filter-dropdown-btn.compact {
    min-width: auto !important;
    padding: 0.75rem 1rem !important;
}

.filter-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    z-index: 1000;
    display: none;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.filter-dropdown-content.show {
    display: block !important;
}

.filter-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group {
    padding: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-item:hover {
    background: #f7fafc;
}

/* Кнопка сброса */
.reset-all-btn {
    background: #5e17eb !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.reset-all-btn:hover {
    background: #4a0fd8 !important;
}

/* ===== КАРТОЧКИ КОМПАНИЙ - АВАТАРКИ СПРАВА, КНОПКА НА ВСЮ ШИРИНУ ===== */
.companies-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
    width: 100% !important;
}

.company-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    min-width: auto !important;
}

.company-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: #5e17eb !important;
}

/* Заголовок карточки - АВАТАРКА СПРАВА ОТ НАЗВАНИЯ */
.company-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-direction: row !important;
}

.company-info {
    flex: 1 !important;
    min-width: 0 !important;
    order: 1 !important; /* Сначала название */
}

.company-name {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin: 0 0 0.5rem 0 !important;
    line-height: 1.3 !important;
}

.company-direction {
    font-size: 0.8rem !important;
    color: #4a5568 !important;
    background: #edf2f7 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    display: inline-block !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* АВАТАРКА - КРУГЛЯШ 80x80 СПРАВА - ПРИНУДИТЕЛЬНО НА ВСЕХ УСТРОЙСТВАХ */
.company-logo {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #f7fafc !important;
    flex-shrink: 0 !important;
    position: relative !important;
    order: 2 !important; /* Второй элемент - справа */
}

.company-logo img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.company-logo .logo-fallback {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Описание */
.company-description {
    color: #4a5568 !important;
    line-height: 1.5 !important;
    margin: 0.5rem 0 !important;
    font-size: 0.875rem !important;
}

/* Возможности коллабораций */
.company-advertising,
.company-barter {
    margin: 0.75rem 0 !important;
}

.company-advertising h4,
.company-barter h4 {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin: 0 0 0.5rem 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.advertising-pills,
.barter-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.advertising-pills span,
.barter-pills span {
    background: #edf2f7 !important;
    color: #4a5568 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

/* Бартер статус */
.barter-status {
    margin-bottom: 0.5rem !important;
}

.barter-yes {
    background: #d4edda !important;
    color: #155724 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.barter-no {
    background: #f8d7da !important;
    color: #721c24 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.barter-details {
    margin-top: 0.5rem !important;
}

/* Метрики компании */
.company-metrics {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin: 0.5rem 0 !important;
}

.metric-pill {
    background: #fef3c7 !important;
    color: #d97706 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

/* КНОПКА КОНТАКТА - НА ВСЮ ШИРИНУ КАРТОЧКИ */
.contact-btn {
    width: 100% !important;
    padding: 0.875rem !important;
    background: #9eff1f !important;
    color: #1a202c !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.875rem !important;
    margin-top: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
}

.contact-btn:hover {
    background: #8ce61a !important;
    transform: translateY(-1px) !important;
}

/* ===== УБИРАЮ РАМКИ СЕКЦИЙ ===== */
.catalog-main {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.catalog-header {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
}

/* ===== ФУТЕР - БЕЗ ЛИШНИХ ПРОБЕЛОВ ===== */
.footer {
    background: #faf7f2 !important; /* Светло-светло бежевый */
    padding: 3rem 0 2rem 0;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    text-align: center;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.footer-contacts {
    margin-bottom: 1.5rem;
}

.footer-phone,
.footer-email {
    font-size: 1rem;
    color: #4a5568;
    margin: 0.5rem 0;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #5e17eb !important; /* Новый фиолетовый цвет */
    color: white !important;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background: #4a0fd8 !important; /* Темно-фиолетовый при наведении */
    transform: translateY(-2px);
}

/* ===== СТИЛИ СТРАНИЦЫ "О ПРОЕКТЕ" ===== */
.about-page {
    padding: 2rem 0;
}

.about-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.about-subtitle {
    font-size: 1.125rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.6;
}

.about-content {
    margin-bottom: 3rem;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.about-section p {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.about-section p:last-child {
    margin-bottom: 0;
}

/* Сетка преимуществ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #5e17eb;
}

.benefit-item i {
    font-size: 2rem; /* Уменьшил с 2.5rem до 2rem */
    color: #5e17eb;
    margin-bottom: 1rem;
}

.benefit-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.benefit-item p {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Целевая аудитория */
.target-audience {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.audience-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.audience-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #5e17eb;
}

.audience-item i {
    font-size: 2rem; /* Уменьшил с 2.5rem до 2rem */
    color: #5e17eb;
    margin-bottom: 1rem;
}

.audience-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.audience-item p {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Как это работает */
.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: center; /* Изменил с flex-start на center */
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #5e17eb;
}

.step-number {
    background: #9eff1f;
    color: #1a202c;
    width: 35px; /* Уменьшил с 40px до 35px */
    height: 35px; /* Уменьшил с 40px до 35px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem; /* Уменьшил с 1.25rem до 1.125rem */
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0; /* Убрал margin-bottom */
    line-height: 1.3;
}

.step-content p {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0.5rem 0 0 0; /* Добавил отступ сверху для описания */
}

/* Цель и девиз */
.goal-section {
    text-align: center;
    margin-top: 2rem;
}

.goal-section p {
    font-size: 1.125rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 0 0 2rem 0;
}

.motto {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.motto i.fa-quote-left {
    position: absolute;
    top: -15px;
    left: 2rem;
    background: #ffffff;
    color: #5e17eb;
    font-size: 1.25rem; /* Уменьшил с 1.5rem до 1.25rem */
    padding: 0.5rem;
}

.motto i.fa-quote-right {
    position: absolute;
    bottom: -15px;
    right: 2rem;
    background: #ffffff;
    color: #5e17eb;
    font-size: 1.25rem; /* Уменьшил с 1.5rem до 1.25rem */
    padding: 0.5rem;
}

.motto h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1.3;
}

/* Мобильные стили для страницы "О проекте" */
@media (max-width: 768px) {
    .about-title {
        font-size: 2rem;
    }
    
    .about-subtitle {
        font-size: 1rem;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .benefits-grid,
    .target-audience,
    .how-it-works {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .benefit-item,
    .audience-item,
    .step {
        padding: 1.5rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .motto {
        margin: 0 1rem;
    }
}

/* ===== СТИЛИ КОМАНДЫ ===== */
.team-page {
    padding: 2rem 0;
}

.team-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.team-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.team-subtitle {
    font-size: 1.125rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.6;
}

.team-content {
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-member {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.team-member:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #5e17eb;
}

.member-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    overflow: hidden;
    background: #f7fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.member-image {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    transition: transform 0.3s ease !important;
}

.member-image:hover {
    transform: scale(1.05) !important;
}

.member-info {
    text-align: center;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.member-description {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.member-description strong {
    color: #5e17eb !important; /* Новый фиолетовый цвет */
    font-weight: 600;
}

/* Мобильные стили для команды */
@media (max-width: 768px) {
    .team-title {
        font-size: 2rem;
    }
    
    .team-subtitle {
        font-size: 1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .team-member {
        padding: 1.5rem;
    }
    
    .member-photo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .member-image {
        width: 80px !important;
        height: 80px !important;
    }
    
    .member-name {
        font-size: 1.25rem;
    }
    
    .member-description {
        font-size: 0.8rem;
    }
}

/* ===== АДАПТИВНОСТЬ - МОБИЛЬНАЯ ВЕРСИЯ ДО 430px ===== */
@media (max-width: 430px) {
    .header .container {
        flex-direction: row !important; /* Всегда в строку */
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 1rem !important;
        gap: 0 !important;
    }
    
    .header-title {
        flex: 0 0 auto !important;
        margin-right: 0 !important;
    }
    
    .main-nav {
        display: none !important; /* Скрываем навигацию на мобильных */
    }
    
    .burger-menu {
        display: flex !important; /* Показываем бургер */
        margin-left: 0 !important;
    }
    
    .brand-logo {
        height: 90px !important; /* Уменьшаем размер лого на мобильных */
        width: 90px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
    }
    
    .companies-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .company-card {
        padding: 1.25rem !important;
        gap: 1rem !important;
        min-width: auto !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Аватарки уже имеют правильные стили из основных правил */
    
    .contact-btn {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Фильтры остаются такими же как на десктопе - НЕ РАСТЯГИВАЕМ */
    .filters-row {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        justify-content: flex-start !important;
    }
    
    .filter-item {
        flex: 0 0 auto !important; /* Не растягиваем */
    }
    
    .filter-dropdown-btn {
        min-width: 180px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.8rem !important;
        width: auto !important; /* Не растягиваем на всю ширину */
    }
    
    .container {
        padding: 0 1rem !important;
    }
    
    /* Убираем лишние отступы у карточек на мобильных */
    .companies-grid {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Поисковая строка и карточки одинаковой ширины */
    .search-box {
        max-width: 100% !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .search-box input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Карточки компаний точно такой же ширины как поисковая строка */
    .companies-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .company-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding: 1.25rem !important;
    }
}

@media (min-width: 431px) and (max-width: 768px) {
    .header .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    .header-title {
        flex: 0 0 auto !important;
        margin-right: 0 !important;
    }
    
    .main-nav {
        display: none !important;
    }
    
    .burger-menu {
        display: flex !important;
        margin-left: 0 !important;
    }
    
    .companies-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
    }
    
    .company-card {
        padding: 1.25rem !important;
        gap: 1rem !important;
        min-width: auto !important;
        width: 100% !important;
    }
    
    /* Аватарки уже имеют правильные стили из основных правил */
    
    .filters-row {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-dropdown-btn {
        min-width: 200px !important;
        padding: 0.75rem 1rem !important;
    }
    
    .brand-logo {
        height: 105px;
        width: 105px;
        border-radius: 50%;
        overflow: hidden;
    }
}

@media (min-width: 1025px) {
    .companies-grid {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)) !important;
        gap: 1.5rem !important;
    }
    
    .company-logo {
        width: 80px !important;
        height: 80px !important;
        border-radius: 50% !important;
        order: 2 !important;
    }
    
    .contact-btn {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ПРАВИЛА ДЛЯ ПРИНУДИТЕЛЬНОГО ПРИМЕНЕНИЯ ===== */
/* Основные стили уже определены выше */

/* Основные стили уже определены выше */

/* ===== ПРИНУДИТЕЛЬНОЕ ПРИМЕНЕНИЕ СТИЛЕЙ НА ВСЕХ УСТРОЙСТВАХ ===== */
/* Основные стили уже определены выше */

/* Основные стили уже определены выше */

/* Основные стили уже определены выше */

/* Основные стили уже определены выше */

/* ===== ДОПОЛНИТЕЛЬНЫЕ ПРАВИЛА ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ===== */
/* Основные стили уже определены выше */

/* Стили для фильтров на мобильных */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: row !important; /* Оставляем в строку */
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        justify-content: flex-start !important;
    }
    
    .filter-item {
        flex: 0 0 auto !important; /* Не растягиваем */
        width: auto !important;
    }
    
    .filter-dropdown-btn {
        width: auto !important; /* Не растягиваем на всю ширину */
        justify-content: space-between !important;
        min-width: 180px !important;
    }
    
    .filter-dropdown-content {
        position: absolute !important; /* Возвращаем к абсолютному позиционированию */
        top: 100% !important;
        left: 0 !important;
        transform: none !important;
        width: auto !important;
        min-width: 250px !important;
        max-height: 400px !important;
        z-index: 1000 !important;
    }
}

/* ===== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10001;
    background: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close:hover {
    color: #5e17eb;
    background: #f7fafc;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-logo {
    flex-shrink: 0;
}

.modal-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-company-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
}

.modal-direction {
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
}

.modal-body {
    padding: 1.5rem 2rem 2rem 2rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section p {
    margin: 0;
    line-height: 1.6;
    color: #4a5568;
    font-size: 0.875rem;
}

.modal-section .advertising-pills,
.modal-section .barter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.telegram-link {
    color: #5e17eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.telegram-link:hover {
    color: #4a0fd8;
    text-decoration: underline;
}

/* Стили для фильтра бартера теперь стандартные, как у других фильтров */

/* Кнопка "Хочу коллаб" */
.collab-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #9eff1f;
    color: #1a202c;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.collab-btn:hover {
    background: #8ce61a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(158, 255, 31, 0.3);
}

/* Стили для отключенной кнопки */
.collab-btn:disabled {
    background: #e2e8f0 !important;
    color: #a0aec0 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.collab-btn:disabled:hover {
    background: #e2e8f0 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Мобильные стили для модального окна */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .modal-section h3 {
        font-size: 1.125rem;
    }
}
