/* style.css — Единые стили платформы URhelp */

/* Общие системные стили и обнуление */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}

body { 
    background-color: #f8fafc; 
    color: #1e293b; 
    line-height: 1.5; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* ==========================================================================
   Шапка сайта и Навигация
   ========================================================================== */

.top-bar {
    background: #1e293b;
    color: #cbd5e1;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.top-bar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.geo-select {
    display: flex;
    align-items: center;
    gap: 5px;
}

.geo-select select {
    background: transparent;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 5px;
    width: auto;
    outline: none;
}

.geo-select select option {
    background: #1e293b;
    color: #ffffff;
}

.top-contacts .phone-link {
    margin-right: 15px;
}

.top-contacts .online-status {
    color: #38bdf8;
    font-weight: 600;
}

header { 
    background: #ffffff; 
    border-bottom: 1px solid #e2e8f0; 
    padding: 12px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-wrap { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 15px;
}

.logo { 
    display: flex; 
    align-items: center; 
    font-size: 22px; 
    font-weight: 800; 
    color: #1e3a8a; 
    text-decoration: none; 
    flex-shrink: 0;
}

.logo span { 
    margin-right: 8px; 
    font-size: 26px; 
}

/* Навигация */
.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Контейнер выпадающего меню */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 0; /* Увеличиваем зону наведения */
}

.main-nav a { 
    color: #475569; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600; 
    transition: color 0.2s; 
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap; /* Жестко запрещаем перенос текста под иконку */
}

.main-nav a:hover { 
    color: #2563eb; 
}

/* Стили самого выпадающего меню */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: -5px;
}

/* Показываем меню при наведении */
.nav-item-dropdown:hover .dropdown-menu {
    display: block;
}

/* Ссылки внутри выпадающего меню */
.dropdown-menu a {
    color: #475569 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: normal; /* Разрешаем перенос длинных названий подкатегорий */
    display: block;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f1f5f9;
    color: #1e3a8a !important;
}

/* Стрелочка */
.nav-item-dropdown > a::after {
    content: " ▾";
    font-size: 10px;
    color: #94a3b8;
    margin-left: 2px;
}

.main-nav a.sub-link {
    color: #64748b;
    font-weight: 500;
}

.nav-divider {
    height: 20px;
    width: 1px;
    background: #cbd5e1;
    margin: 0 5px;
}

/* Блок авторизации */
.auth-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cabinet {
    background: #e0f2fe;
    color: #0369a1;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #bae6fd;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cabinet:hover {
    background: #bae6fd;
    color: #0369a1;
}

.btn-esia {
    background: #0056b3;
    color: #ffffff;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 86, 179, 0.15);
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-esia:hover {
    background: #004494;
}

.flag-icon {
    background: #ffffff;
    color: #0056b3;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}


/* мобильная верстка */

/* Кнопка мобильного меню (по умолчанию скрыта) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: #1e3a8a;
    cursor: pointer;
    padding: 0 10px;
}

/* ==========================================================================
   Адаптивность для мобильных экранов (Планшеты и Телефоны)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Скрываем телефон в шапке для экономии места */
    .top-contacts .phone-link { display: none; }
    
    /* Перестраиваем шапку */
    .header-wrap { 
        flex-wrap: wrap; 
        position: relative;
    }
    
    .mobile-menu-btn { 
        display: block; /* Показываем бургер */
        order: 1; /* Ставим в центр между лого и авторизацией */
        margin-left: auto;
        margin-right: 15px;
    }

    .auth-block {
        order: 2; /* Убираем авторизацию вправо */
    }

    .btn-cabinet {
        display: none; /* Прячем кнопку ЛК, оставляем только Госуслуги на узких экранах */
    }

    /* Мобильное выпадающее меню (скрыто по умолчанию скриптом) */
    .main-nav { 
        display: none; 
        width: 100%; 
        order: 3; /* Спускаем под шапку */
        flex-direction: column; 
        align-items: flex-start;
        padding: 15px 0;
        border-top: 1px solid #e2e8f0;
        margin-top: 15px;
        gap: 0;
    }

    .nav-divider {
        display: none; /* Скрываем вертикальный разделитель */
    }

    /* Стилизация пунктов в мобильном виде */
    .nav-item-dropdown {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .main-nav a {
        padding: 12px 10px;
        width: 100%;
    }

    /* Стрелочка на мобильных */
    .nav-item-dropdown > a::after {
        position: absolute;
        right: 15px;
        font-size: 16px;
    }

    /* Переопределяем поведение подменю для мобилок */
    .dropdown-menu {
        position: static; /* Убираем абсолютное позиционирование */
        display: none; /* Скрыто до клика (обрабатывается JS) */
        width: 100%;
        box-shadow: none;
        border: none;
        border-left: 3px solid #2563eb;
        border-radius: 0;
        margin: 0;
        background-color: #f8fafc;
        padding: 5px 0;
    }

    /* Отключаем hover эффект меню на телефонах */
    .nav-item-dropdown:hover .dropdown-menu {
        display: none; 
    }
}




/* ==========================================================================
   Сетки и колонки (Grid)
   ========================================================================== */
.hero-section { 
    padding: 40px 0; 
}

.main-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: start; 
}

@media (max-width: 968px) { 
    .main-grid { grid-template-columns: 1fr; } 
}

.left-col { 
    background: white; 
    border-radius: 16px; 
    padding: 35px; 
    box-shadow: 0 4px 20px rgba(148, 163, 184, 0.06); 
    border: 1px solid #e2e8f0; 
}

h1 { 
    font-size: 26px; 
    font-weight: 800; 
    color: #0f172a; 
    line-height: 1.3; 
    margin-bottom: 12px; 
}

.subtitle { 
    color: #64748b; 
    font-size: 14px; 
    margin-bottom: 25px; 
}

/* Табы */
.tabs-nav { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    margin-bottom: 25px; 
}

@media (max-width: 768px) { 
    .tabs-nav { grid-template-columns: 1fr 1fr; } 
}

.tab-btn { 
    background: #f1f5f9; 
    border: 1px solid #cbd5e1; 
    padding: 12px 8px; 
    border-radius: 8px; 
    font-size: 13px; 
    font-weight: 700; 
    color: #475569; 
    cursor: pointer; 
    text-align: center; 
    transition: all 0.2s; 
}

.tab-btn.active { 
    background: #1e3a8a; 
    color: white; 
    border-color: #1e3a8a; 
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15); 
}

.form-panel { 
    display: none; 
}

.form-panel.active { 
    display: block; 
    animation: fadeIn 0.3s ease; 
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* Формы */
.form-group { 
    margin-bottom: 15px; 
    text-align: left; 
}

label { 
    display: block; 
    font-size: 12px; 
    font-weight: 600; 
    color: #475569; 
    margin-bottom: 5px; 
}

input[type="text"], select, textarea { 
    width: 100%; 
    padding: 10px 14px; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    font-size: 14px; 
    background: #f8fafc; 
    outline: none; 
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus { 
    border-color: #2563eb; 
    background: white; 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.drop-zone { 
    border: 2px dashed #cbd5e1; 
    border-radius: 10px; 
    padding: 25px 15px; 
    text-align: center; 
    background: #f8fafc; 
    cursor: pointer; 
    display: block; 
    margin-bottom: 15px; 
    transition: all 0.2s;
}

.drop-zone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.drop-zone-icon { 
    font-size: 32px; 
    display: block; 
    margin-bottom: 8px; 
}

.drop-zone-text { 
    font-size: 14px; 
    font-weight: 600; 
    color: #334155; 
}

.btn-primary { 
    width: 100%; 
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); 
    color: white; 
    border: none; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); 
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.95;
}

/* Правая колонка */
.right-col { 
    background: white; 
    border-radius: 16px; 
    padding: 40px; 
    box-shadow: 0 4px 20px rgba(148, 163, 184, 0.06); 
    border: 1px solid #e2e8f0; 
    min-height: 520px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.placeholder-status { 
    text-align: center; 
    color: #94a3b8; 
}

.placeholder-status-icon { 
    font-size: 56px; 
    margin-bottom: 15px; 
    color: #cbd5e1; 
}

.cheat-sheet { 
    background: #fff7ed; 
    border-left: 4px solid #f97316; 
    padding: 20px; 
    border-radius: 0 8px 8px 0; 
    margin-top: 15px; 
    font-size: 14px; 
}

.cheat-text { 
    font-family: 'Courier New', Courier, monospace; 
    background: white; 
    padding: 10px; 
    border: 1px solid #fed7aa; 
    border-radius: 4px; 
    margin-top: 10px; 
    font-weight: bold; 
    color: #c2410c; 
}

/* Блок преимуществ */
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    margin-top: 35px; 
    border-top: 1px solid #edf2f7; 
    padding-top: 25px; 
}

.feature-card { 
    text-align: center; 
    background: #f8fafc; 
    padding: 15px 10px; 
    border-radius: 10px; 
    border: 1px solid #f1f5f9; 
}

.feature-icon { 
    font-size: 24px; 
    margin-bottom: 8px; 
}

.feature-title { 
    font-size: 12px; 
    font-weight: 700; 
    color: #1e293b; 
    margin-bottom: 4px; 
}

.feature-desc { 
    font-size: 11px; 
    color: #64748b; 
    line-height: 1.2; 
}

/* Подвал */
footer { 
    border-top: 1px solid #e2e8f0; 
    padding: 20px 0; 
    font-size: 13px; 
    color: #94a3b8; 
    margin-top: 40px; 
}

.footer-wrap { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* Интеграция Select2 */
.select2-container--default .select2-selection--single {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding-left: 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.select2-dropdown {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.15) !important;
    overflow: hidden;
}

.select2-search__field {
    outline: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
}