/* =========================================================
   PAGE
   ========================================================= */

.page-wrapper {
    min-height: 100vh;
}

.vacancies-section {
    padding: 35px 0 30px;
    background-color: var(--white);
}

.vacancies-section h1 {
    margin: 0 0 24px;
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
    font-weight: 550;
    color: var(--primary-light);
}

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


/* =========================================================
   ПОИСК И ФИЛЬТРЫ
   ========================================================= */

.search-filter-row {
    max-width: 1100px;
    margin: 0 auto 28px;
}

.search-toolbar {
    position: relative;
}

.main-search-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;

    display: flex;
    gap: 10px;

    background: #ffffff;
    padding: 8px;
    border-radius: 17px;
    border: 1px solid var(--border, #e5e7eb);
    box-sizing: border-box;

    box-shadow:
            inset 0 0 8px 2px rgba(37, 99, 235, 0),
            inset 0 2px 10px rgba(37, 99, 235, 0),
            0 8px 24px rgba(0, 0, 0, 0.05);

    transition:
            border-color 0.4s ease,
            box-shadow 0.4s ease;
}

.main-search-wrapper:focus-within {
    border-color: rgba(37, 99, 235, 0.4);

    box-shadow:
            inset 0 0 8px 2px rgba(37, 99, 235, 0.25),
            inset 0 2px 10px rgba(37, 99, 235, 0.1),
            0 10px 30px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   КНОПКА ФИЛЬТРОВ — DESKTOP
   ========================================================= */

.search-toolbar .btn-filter-trigger {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 37px;
}

.search-toolbar .btn-filter-trigger:hover {
    background: var(--bg-content, #f8fafc);
    transform: translateY(-50%);
}


/* =========================================================
   ПОИСКОВОЕ ПОЛЕ
   ========================================================= */

.search-input-group {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.search-input-group::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: #94a3b8;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    pointer-events: none;
    z-index: 1;
    transition: background-color 0.2s ease;
}

.search-input-group:focus-within::before {
    background-color: var(--primary);
}

.search-input-group input {
    width: 100%;
    min-width: 0;
    border: none;
    padding: 10px 13px 10px 42px;
    font-size: 1rem;
    outline: none;
    color: #1e293b;
    background: transparent;
    box-sizing: border-box;
}

.search-input-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 400;
    font-size: 0.95rem;

    transition:
            color 0.2s ease,
            opacity 0.2s ease;
}

.search-input-group input:focus::placeholder {
    color: #cbd5e1;
    opacity: 0.6;
}


/* =========================================================
   КНОПКА "НАЙТИ"
   ========================================================= */

.btn-hero-find {
    background: var(--white);
    color: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    padding: 8px 16px;
    height: 37px;
    font-weight: 600;
    font-size: 0.90rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
    box-shadow: 0 0 3px 1px var(--primary, #2563eb);
}

.btn-hero-find:hover {
    background: var(--bg-content, #f8fafc);
    transform: translateY(-1px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .search-filter-row {
        max-width: none;
    }

    .main-search-wrapper {
        max-width: 720px;
    }

    .search-toolbar .btn-filter-trigger {
        right: 0;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .vacancies-section {
        padding: 28px 0 80px;
    }

    .container {
        padding: 0 16px;
    }

    .vacancies-section h1 {
        margin-bottom: 20px;
        font-size: 1.8rem;
        line-height: 1.2;
    }


    /* -------------------------
       Поиск
       ------------------------- */

    .search-filter-row {
        margin-bottom: 24px;
    }

    .main-search-wrapper {
        width: 100%;
        max-width: none;
        gap: 8px;
        padding: 6px;
        border-radius: 15px;
    }

    .search-input-group input {
        padding: 9px 8px 9px 38px;
        font-size: 16px;
    }

    .search-input-group::before {
        left: 11px;
        width: 17px;
        height: 17px;
    }


    /* -------------------------
       Кнопка "Найти"
       ------------------------- */

    .btn-hero-find {
        height: 36px;
        padding: 8px 13px;
        border-radius: 11px;
        font-size: 0.85rem;
    }


    /* -------------------------
       Плавающая кнопка фильтров
       ------------------------- */

    .search-toolbar .btn-filter-trigger {
        position: fixed;
        right: 16px;
        bottom: 24px;
        top: auto;
        transform: none;
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 12px;
        background: var(--white);
        color: var(--primary-light);
        border: 1px solid rgba(37, 99, 235, 0.08);
        box-shadow: 0 0 3px 1px var(--primary, #2563eb);
        z-index: 900;
    }

    .search-toolbar .btn-filter-trigger span {
        display: none;
    }

    .search-toolbar .btn-filter-trigger .btn-filter-icon {
        width: 22px;
        height: 22px;
        filter: none;
    }

    .search-toolbar .btn-filter-trigger:hover {
        transform: none;
        background: var(--primary-light);
    }


    /* -------------------------
       Вакансии
       ------------------------- */

    .vacancies-small {
        width: 100%;
    }


    /* -------------------------
       Показать еще
       ------------------------- */

    .load-more-container {
        padding-bottom: 20px;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .container {
        padding: 0 12px;
    }

    .vacancies-section {
        padding-top: 24px;
    }

    .vacancies-section h1 {
        font-size: 1.65rem;
    }

    .main-search-wrapper {
        gap: 6px;
        padding: 5px;
    }

    .search-input-group input {
        padding-left: 36px;
        font-size: 0.85rem;
    }

    .search-input-group::before {
        left: 10px;
        width: 16px;
        height: 16px;
    }

    .btn-hero-find {
        padding-left: 11px;
        padding-right: 11px;
        font-size: 0.82rem;
    }

    .search-toolbar .btn-filter-trigger {
        right: 14px;
        bottom: 18px;
    }
}