/* Стилі блогу */
.search-form {
    margin-bottom: 20px;
}

.search-form-inner {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover {
    background-color: #0056b3;
}

/* Віджет архіву */
.archive-widget {
    padding: 15px;
}

.archive-widget.collapsed {
    max-height: 400px;
    overflow-y: auto;
}

.archive-item {
    margin-bottom: 8px;
}

.archive-link {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.archive-link:hover {
    color: #FFB947;
    background-color: #fffaf5;
    border-left-color: #7EBD3E;
    text-decoration: none;
}

/* Елементи постів блогу */
.item.post {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.item.post:last-child {
    border-bottom: none;
}

.thumb-img {
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
    width: 300px;
    height: 200px;
    overflow: hidden;
}

.thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.thumb-content {
    flex: 1;
    padding-right: 20px;
}

.thumb-content .title {
    margin-bottom: 10px;
}

.thumb-content .title a {
    color: #333;
    text-decoration: none;
}

.thumb-content .title a:hover {
    color: #007bff;
}

.text-sm {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.btn-read-more {
    margin-top: 15px;
    display: inline-block;
}

/* Blog Sidebar Styles */
.sidebar-item {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-title {
    background: #FFB947;
    color: white;
    padding: 12px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Убираем дебильные иконки из заголовков */

.blog-search-form {
    padding: 15px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 12px;
    border: 1px solid #7EBD3E;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #FFB947;
    box-shadow: 0 0 0 2px rgba(255, 185, 71, 0.2);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #7EBD3E;
    transition: fill 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.search-input:focus + .search-icon {
    fill: #FFB947;
}

/* Recent Posts Widget */
.recent-posts-widget {
    padding: 15px;
}

.recent-post-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-item .post-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.recent-post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.recent-post-item .post-content {
    flex: 1;
}

.recent-post-item .post-content h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.3;
}

.recent-post-item .post-content h5 a {
    color: #333;
    text-decoration: none;
}

.recent-post-item .post-content h5 a:hover {
    color: #007bff;
}

.recent-post-item .post-date {
    color: #666;
    font-size: 12px;
}

/* Recent Posts Widget */
.recent-posts-widget {
    margin-top: 15px;
    padding: 15px;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-item .post-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #7EBD3E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-top: 2px;
}

.recent-post-item .post-content {
    flex: 1;
}

.recent-post-item .post-title {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.recent-post-item .post-title:hover {
    color: #7EBD3E;
}

.recent-post-item .post-meta {
    font-size: 12px;
    color: #666;
}

.recent-post-item .post-date {
    color: #666;
}

/* View All Button Styles */
.view-all-wrapper {
    text-align: center;
}

.btn-view-all {
    background: white;
    color: #7EBD3E;
    border: 2px solid #7EBD3E;
    padding: 5px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-all:hover {
    background: #7EBD3E;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Адаптивные стили для карточек блога */
@media (max-width: 768px) {
    .item.post {
        flex-direction: column;
        padding: 15px;
    }

    .thumb-img {
        width: calc(100% - 30px);
        margin: 0 auto;
    }

    .thumb-content {
        padding-right: 0;
    }
}

/* Pagination Styles */
.news_pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.news_pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    align-items: center;
}

.news_pagination li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.news_pagination li a,
.news_pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e9e9e9;
    background-color: #fff;
    color: #666;
}

.news_pagination li a:hover {
    background-color: #2ab0cd;
    color: #fff;
    border-color: #2ab0cd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 176, 205, 0.3);
}

.news_pagination li.active span,
.news_pagination li.my-active span {
    background-color: #2ab0cd;
    color: #fff;
    border-color: #2ab0cd;
    font-weight: 600;
}

.news_pagination li.disabled a,
.news_pagination li.disabled span {
    background-color: #f8f9fa;
    color: #ccc;
    border-color: #e9e9e9;
    cursor: not-allowed;
    opacity: 0.6;
}

.news_pagination .left_side-navigation__button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #e9e9e9;
    transition: all 0.3s ease;
}

.news_pagination .arrow-left,
.news_pagination .arrow-right {
    font-size: 18px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news_pagination .left_side-navigation__button:hover .arrow-left,
.news_pagination .left_side-navigation__button:hover .arrow-right {
    color: #2ab0cd;
    transform: scale(1.2);
}

.news_pagination li.disabled .arrow-left,
.news_pagination li.disabled .arrow-right {
    color: #ccc;
    cursor: not-allowed;
}

/* Mobile pagination */
@media (max-width: 768px) {
    .news_pagination {
        margin-top: 30px;
        padding: 0 15px;
    }

    .news_pagination ul {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .news_pagination li a,
    .news_pagination li span {
        min-width: 36px;
        height: 36px;
        padding: 6px 8px;
        font-size: 13px;
    }

    .news_pagination .left_side-navigation__button {
        width: 36px;
        height: 36px;
    }

    .news_pagination .arrow-left,
    .news_pagination .arrow-right {
        font-size: 16px;
    }

    /* Показываем больше страниц на планшетах */
    .news_pagination li {
        display: flex;
    }

    /* Скрываем только очень далекие страницы, но не кнопки навигации */
    .news_pagination li:nth-child(n+8):not(:first-child):not(:last-child) {
        display: none;
    }
}

@media (max-width: 600px) {
    .thumb-img {
        width: calc(100% - 30px);
        margin: 0 auto;
    }

    .news_pagination {
        margin-top: 25px;
        padding: 0 12px;
    }

    .news_pagination ul {
        gap: 5px;
    }

    .news_pagination li a,
    .news_pagination li span {
        min-width: 34px;
        height: 34px;
        padding: 5px 7px;
        font-size: 12px;
    }

    .news_pagination .left_side-navigation__button {
        width: 34px;
        height: 34px;
    }

    .news_pagination .arrow-left,
    .news_pagination .arrow-right {
        font-size: 15px;
    }

    /* Показываем до 6 страниц на средних мобильных, но не кнопки навигации */
    .news_pagination li:nth-child(n+7):not(:first-child):not(:last-child) {
        display: none;
    }
}

@media (max-width: 480px) {
    .thumb-img {
        width: calc(100% - 30px);
        margin: 0 auto;
    }

    .news_pagination {
        margin-top: 25px;
        padding: 0 10px;
    }

    .news_pagination ul {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .news_pagination li a,
    .news_pagination li span {
        min-width: 32px;
        height: 32px;
        padding: 4px 6px;
        font-size: 12px;
    }

    .news_pagination .left_side-navigation__button {
        width: 32px;
        height: 32px;
    }

    .news_pagination .arrow-left,
    .news_pagination .arrow-right {
        font-size: 14px;
    }

    /* На очень маленьких экранах показываем до 5 страниц, но не кнопки навигации */
    .news_pagination li:nth-child(n+6):not(:first-child):not(:last-child) {
        display: none !important;
    }

    /* Показываем все элементы до 5-го плюс кнопки навигации */
    .news_pagination li:nth-child(-n+5),
    .news_pagination li:first-child,
    .news_pagination li:last-child {
        display: flex !important;
    }
}
