/*
Theme Name: Iskaner
Description: Тема для поискового сайта
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Общие стили для шапки */
.search-header {
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.logo-link {
    text-decoration: none;
    display: block;
    margin-bottom: 25px;
}

.selg22 {
    color: #4285f4;
    font-size: 32px;
    font-weight: 500;
    margin: 0;
}

/* Общие стили для формы поиска */
.search-form-main {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid #4285f4;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
}

.search-input-wrapper .field {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-submit {
    background: #4285f4;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    color: white;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    background: #3367d6;
}

/* Баннер */
.banner-container {
    max-width: 1160px;
    margin: 30px auto;
    text-align: center;
}

.banner-placeholder {
    background: #f8f9fa;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 90px 20px;
    color: #70757a;
    font-size: 14px;
}

.banner-placeholder span {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Стили для главной страницы */
.home-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.posts-section {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 18px;
    color: #70757a;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    padding: 15px 20px;
    background: white;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.post-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-item a {
    text-decoration: none;
    color: #1a0dab;
    font-size: 16px;
    line-height: 1.4;
    display: block;
}

.post-item a:hover {
    text-decoration: underline;
}

/* Стили для страницы поиска */
.search-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-info {
    margin-bottom: 25px;
}

.results-count {
    color: #70757a;
    font-size: 14px;
    margin: 0;
}

.search-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.search-result-item {
    padding: 0;
    max-width: 700px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.search-result-favicon {
    border-radius: 2px;
    flex-shrink: 0;
}

.result-url {
    color: #006621;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.3;
}

.result-url:hover {
    text-decoration: underline;
}

.result-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}

.result-title a {
    color: #1a0dab;
    text-decoration: none;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-snippet {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    margin-bottom: 8px;
}

.result-snippet mark {
    background: #feffcd;
    padding: 0 2px;
    border-radius: 2px;
}

.result-thumbnail {
    margin: 8px 0;
}

.thumbnail-image {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ebebeb;
}

.result-meta {
    color: #70757a;
    font-size: 12px;
}

/* Состояние нет результатов */
.no-results {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #333;
    margin-bottom: 12px;
    font-weight: 400;
}

.no-results p {
    color: #70757a;
    margin-bottom: 20px;
}

.suggestions {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.suggestions p {
    font-weight: 500;
    margin-bottom: 10px;
}

.suggestions ul {
    color: #70757a;
    padding-left: 20px;
    margin: 0;
}

.suggestions li {
    margin-bottom: 6px;
}

/* Пагинация */
.search-pagination {
    margin-top: 40px;
    border-top: 1px solid #ebebeb;
    padding-top: 30px;
}

.pagination-nav {
    display: flex;
    justify-content: center;
}

/* Боковая панель и реклама */
.search-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-ad {
    background: #f8f9fa;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ad-placeholder, .mobile-ad-placeholder {
    color: #70757a;
    font-size: 14px;
}

.ad-placeholder span, .mobile-ad-placeholder span {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.mobile-ad {
    display: none;
    margin-top: 30px;
    background: #f8f9fa;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .search-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-sidebar {
        display: none;
    }
    
    .mobile-ad {
        display: block;
    }
}

@media (max-width: 768px) {
    .container, .search-results-page {
        padding: 15px;
    }
    
    .selg22 {
        font-size: 24px;
    }
    
    .search-input-wrapper .field {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .result-title {
        font-size: 18px;
    }
    
    .search-results-list {
        gap: 20px;
    }
    
    .banner-placeholder {
        padding: 60px 15px;
    }
    
    .post-item {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .selg22 {
        font-size: 20px;
    }
    
    .search-input-wrapper {
        border-radius: 20px;
    }
    
    .banner-container {
        margin: 20px auto;
    }
    
    .banner-placeholder {
        padding: 40px 10px;
    }
}

.iskanerfooter {
    text-align: center;
    margin: 0 auto;
    max-width: 600px; /* ограничение ширины */
}