/* ==========================================================================
   ОФОРМЛЕНИЕ SIDEBAR (Боковая панель)
   ========================================================================== */

.sidebar {
    position: relative;
    display: block;
}

/* Общий стиль виджета (карточки) */
.sidebar .widget {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #e1e8ed;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.sidebar .widget:hover {
    box-shadow: 0 10px 25px rgba(29, 105, 154, 0.08);
}

/* Заголовки виджетов */
.sidebar__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--topas63-black);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

/* Желтая линия под заголовком */
.sidebar__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--topas63-yel);
    border-radius: 2px;
}

/* --- ПОИСК --- */
.sidebar__search-text {
    font-size: 14px;
    color: var(--topas63-gray);
    margin-bottom: 15px;
    line-height: 1.4;
}

.wp-block-search__inside-wrapper {
    display: flex;
    background: #f8fafd;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 5px;
    transition: all 0.3s ease;
}

.wp-block-search__inside-wrapper:focus-within {
    border-color: var(--topas63-base);
    background: #fff;
}

.wp-block-search__input {
    border: none !important;
    background: transparent !important;
    padding: 10px 15px !important;
    font-size: 15px;
    outline: none !important;
    flex-grow: 1;
}

.wp-block-search__button {
    background: var(--topas63-base) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    transition: 0.3s;
}

.wp-block-search__button:hover {
    background: var(--topas63-black) !important;
}

.search-icon {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* --- КАТЕГОРИИ --- */
.sidebar__category-list {
    list-style: none;
    padding: 0;
}

.sidebar__category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e1e8ed;
}

.sidebar__category-list li:last-child {
    border-bottom: none;
}

.sidebar__category-list li a {
    color: var(--topas63-black);
    font-weight: 500;
    transition: 0.3s;
    font-size: 16px;
}

.sidebar__category-list li a:hover {
    color: var(--topas63-base);
    padding-left: 5px;
}

 .sidebar__category-list li.current-cat a{
    color: var(--topas63-base);
    padding-left: 5px;
}

.cat-count {
    background: #f1f7ff;
    color: var(--topas63-base);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
}

.current-cat {
    
}

/* --- ПОСЛЕДНИЕ ЗАПИСИ --- */
.sidebar_post-list {
    list-style: none;
    padding: 0;
}

.sidebar_post-list li {
    margin-bottom: 20px;
}

.sidebar_post-list li:last-child {
    margin-bottom: 0;
}

.wp-block-latest-posts__post-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--topas63-black);
    line-height: 1.3;
    margin-bottom: 5px;
    transition: 0.3s;
}

.wp-block-latest-posts__post-title:hover {
    color: var(--topas63-base);
}

.wp-block-latest-posts__post-author, 
.wp-block-latest-posts__post-date {
    font-size: 12px;
    color: var(--topas63-gray);
    display: inline-block;
    margin-right: 10px;
}

.sidebar .rpwwt-widget li {    
    border-bottom: 1px solid var(--topas63-bdr-color);
    /* padding-bottom: 19px; */
}

.rpwwt-widget ul li img {
    width: 100%;
    border: 1px solid var(--topas63-base);
    border-radius: 50%;
}

.rpwwt-post-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 25px;
    margin-top: 2px;
}

.sidebar .rpwwt-widget a {
    color: var(--topas63-black);
}

.sidebar .rpwwt-widget a:hover {
    color: var(--topas63-base);
}

.rpwwt-post-categories {    
    font-size: 12px;
    font-weight: 500;
    font-family: var(--topas63-font-two);
    font-style: italic;
}

.sidebar .rpwwt-widget .fas {
    color: #FFC224;
}


/* Общий контейнер списка (обычно это ul) */
.sidebar ul, .widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Стилизация элемента списка li */
.sidebar .rpwwt-widget ul li {
    display: grid;
    /* 75px - ширина вашей картинки, 15px - отступ */
    grid-template-columns: 75px 1fr; 
    grid-template-rows: auto auto;
    align-items: center; /* Центрирование по вертикали */
    gap: 0 15px; 
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f5;
}

.sidebar li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* "Магия": заставляем ссылку не ломать сетку */
.sidebar li > a {
    display: contents; 
}

/* Стили картинки */
.sidebar li img {
    grid-column: 1;
    grid-row: 1 / 3; /* Занимает обе строки слева */
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar li:hover img {
    transform: scale(1.05);
}

/* Стили заголовка */
.rpwwt-post-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end; /* Прижимаем к низу верхней ячейки */
    font-size: 15px;
    font-weight: 700;
    color: var(--topas63-black, #052143);
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
}

.sidebar li a:hover .rpwwt-post-title {
    color: var(--topas63-base, #1d699a);
}

/* Стили блока категорий */
.rpwwt-post-categories {
    grid-column: 2;
    grid-row: 2;
    align-self: start; /* Прижимаем к верху нижней ячейки */
    font-size: 12px;
    color: var(--topas63-gray, #6b778b);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Стили иконки тега */
.icon-tags {
    color: var(--topas63-yel, #ffc224);
    margin-right: 5px;
    font-size: 11px;
}






/* --- КЛЮЧЕВЫЕ СЛОВА (Теги) --- */
.sidebar_tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.sidebar_tag-list li a {
    display: inline-block;
    background: #f1f3f5;
    color: var(--topas63-gray);
    padding: 6px 15px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s;
}

.sidebar_tag-list li a:hover {
    background: var(--topas63-base);
    color: #ffffff;
    transform: scale(1.05);
}


/* Основной контейнер */
.navigation.pagination {
    text-align: center;
    margin-top: 2em;
    margin-bottom: 2em;
    font-family: sans-serif;
}

/* Стилизация всех ссылок и текущей страницы */
.navigation.pagination .page-numbers {
    height: 40px;
    width: 40px;
    text-align: center;
    line-height: 40px;
    margin: 0 0.25em; 
    display: inline-block;
    color: var(--topas63-gray);
    font-weight: 400;
    font-size: 16px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--topas63-bdr-color);
    -webkit-transition: all 500ms ease;
    transition: all 500ms ease;
}

/* Стилизация текущей страницы */
.navigation.pagination .page-numbers.current {
    border: 1px solid var(--topas63-base);
    background-color: var(--topas63-base);
    color: var(--topas63-white);
    font-weight: bold;
}

/* Стилизация стрелок (предыдущая/следующая) */
.navigation.pagination .page-numbers.prev,
.navigation.pagination .page-numbers.next {
    border: 1px solid var(--topas63-bdr-color);
    color: var(--topas63-gray);
}

/* Эффект при наведении */
.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.prev:hover,
.navigation.pagination .page-numbers.next:hover {
    border: 1px solid var(--topas63-base);
    background-color: var(--topas63-base);
    color: var(--topas63-white);
}
