/* Custom styles for search block */

/* Hide search block label */
.wp-block-search__label {
	display: none !important;
}

/* Search block button - using theme styles */
.wp-block-search__button,
.wp-block-search__button.wp-element-button,
.wp-block-search button[type="submit"],
.wp-block-search .wp-element-button,
.wp-block-search button,
.widget-header .wp-block-search__inside-wrapper button,
.widget-header .wp-block-search button[type="submit"] {
	color: #fff !important;
	height: 37px !important;
	padding: 0 15px !important;
	cursor: pointer !important;
	transition: all 0.25s linear !important;
	font-family: 'Roboto', 'helvetica neue', helvetica, arial, sans-serif !important;
	border: 0 !important;
	font-size: 14px !important;
	background-color: #336cb1 !important;
	text-align: center !important;
	display: inline-block !important;
}

.wp-block-search__button:hover,
.wp-block-search__button.wp-element-button:hover,
.wp-block-search button[type="submit"]:hover,
.wp-block-search .wp-element-button:hover,
.wp-block-search button:hover,
.widget-header .wp-block-search__inside-wrapper button:hover {
	background-color: #1b1b1b !important;
	transition: all 0.25s linear !important;
}

.widget-header .wp-block-search__button-outside {
	margin-top: 4px;
}

/* Стили для секции последних постов на главной странице */
.recent-posts-section {
	margin-top: 50px;
	padding-top: 40px;
	border-top: 2px solid #e0e0e0;
}

.recent-posts-title {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 30px;
	color: #1b1b1b;
	text-align: center;
}

/* Стили для виджета Title Widgets */
.title-widget-heading {
	display: block;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: #1b1b1b;
	padding: 0;
}

.widget .title-widget-heading {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: #1b1b1b;
}

#sidebars .title-widget-heading,
.sidebar .title-widget-heading {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: #1b1b1b;
}
.content,
#page {
	overflow: hidden;
}
footer {
    margin-top: 0 !important;
}

/* Стили для логотипа - размер 175px на 45px */
#logo.image-logo img,
.site-branding .custom-logo-link img,
.site-branding img {
	width: 175px !important;
	height: 45px !important;
	object-fit: contain;
}

/* Скрываем блок навигации, если внутри нет элементов меню или категорий */
.primary-navigation nav#navigation:empty,
.primary-navigation #navigation:empty,
.primary-navigation nav .menu:empty,
.primary-navigation #navigation .menu:empty,
.primary-navigation #navigation ul.menu:empty {
	display: none !important;
}

/* Скрываем весь блок навигации, если внутри нет контента */
.primary-navigation:not(:has(ul.menu li)),
.primary-navigation:not(:has(.menu li)) {
	display: none !important;
}

/* Альтернативный способ - скрываем, если навигация пустая (для старых браузеров) */
.primary-navigation #navigation .menu.clearfix:empty {
	display: none !important;
}