/* Catalog Page Header Fixes - v1.0.8 */

/* Ensure Arsenal font is loaded */
@import url('https://fonts.googleapis.com/css2?family=Arsenal:wght@400;700&display=swap');

/* Style the main page header (H1) */
.page .item-header h1 {
    font-family: 'Arsenal', sans-serif !important;
    font-weight: 700 !important;
    font-size: 40px !important;
    line-height: 1.2 !important;
    color: #0C1708 !important;
    margin-bottom: 16px !important;
    text-align: left !important;
}

/* Hide any H2 headers in the content that contain model count */
.page .item-content h2:first-child,
.page .item-content > h2:first-of-type {
    display: none !important;
}

/* Style for the description paragraph that will be added via JS */
.catalog-description {
    font-family: Arial, sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #0C1708 !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
    text-align: left !important;
}

/* Filter Form Styling */
/* Align search input and filters on the same line as header */
.catalog-filters-wrapper {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
}

/* Make filter selects wider to fit text */
.catalog-filters-wrapper select {
    min-width: 200px !important;
    width: auto !important;
    padding: 8px 12px !important;
    height: 40px !important;
    font-size: 14px !important;
}

/* Make reset button same height as inputs */
.catalog-filters-wrapper button[type="reset"],
.catalog-filters-wrapper input[type="reset"],
.catalog-filters-wrapper button[type="submit"],
.catalog-filters-wrapper input[type="submit"],
.catalog-filters-wrapper .reset-button {
    height: 40px !important;
    padding: 8px 16px !important;
    line-height: 1.5 !important;
}

/* Search input styling */
.catalog-filters-wrapper input[type="search"],
.catalog-filters-wrapper input[type="text"] {
    height: 40px !important;
    padding: 8px 12px !important;
    min-width: 250px !important;
}

/* Hide "Проект" filter - ULTRA AGGRESSIVE */
#filter-project,
select#filter-project,
label[for="filter-project"],
div:has(> #filter-project),
div:has(> select#filter-project),
div:has(> label[for="filter-project"]),
.catalog-filters-wrapper select[name="project"],
.catalog-filters-wrapper select[name*="project"],
.catalog-filters-wrapper input[name="project"],
.catalog-filters-wrapper input[name*="project"],
.catalog-filters-wrapper .filter-project,
label[for*="project"],
*[class*="project-filter"],
div:has(> select[name*="project"]),
div:has(> input[name*="project"]),
/* Скрываем третий div в контейнере фильтров (после поиска и деятельности) */
.ebs-filters > div:last-child > div:nth-child(1),
.ebs-filters > div > div:nth-child(1):has(select),
/* Скрываем любой select, который содержит опцию "Все проекты" */
select:has(option[value=""]:first-child):has(option:contains("проект")),
/* Дополнительные правила для скрытия родительских контейнеров */
div[style*="flex"]:has(> #filter-project),
div[style*="flex"]:has(> select#filter-project),
div[style*="flex"]:has(> label[for="filter-project"]),
.ebs-filters div:has(#filter-project),
.ebs-filters > div:has(#filter-project),
.ebs-filters > div > div:has(#filter-project) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}