/* === SEARCH RESULTS PAGE === */
.search-results-page {
    padding: 20px 0;
    min-height: 60vh;
}

.search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.search-results-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.back-to-home {
    color: #2563eb;
    font-weight: 500;
    transition: color 0.3s;
    margin-bottom: 20px;
}

.back-to-home:hover {
    color: #1d4ed8;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.search-result-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    position: relative !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-result-card:hover {

    box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.3);
}

.result-type-badge {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.tool-badge {
    background: #2563eb;
}

.promt-badge {
    background: #bb51dd;
}

.course-badge {
    background: #20c363;
}

.news-badge {
    background: #f76a1f;
}

.promt-category {
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    text-align: center;
}

.course-price {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    margin: 10px 0;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    color: #151515;
    margin: 0 0 10px 0;
}

.no-results p {
    color: #666;
    margin: 0 0 20px 0;
}

/* Search Highlight */
.search-highlight {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* Pagination */
.search-pagination {
    margin-top: 40px;
}

.search-pagination .pagination,
.search-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #2563eb;
    font-weight: 500;
    transition: all 0.3s;
}

.search-pagination .page-numbers:hover,
.search-pagination .page-numbers.current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Filter Dropdown Menu */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.filter-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #090909;
}

.filter-dropdown-item:hover {
    background: #f5f5f5;
}

.filter-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.filter-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.category-item.active .cat-text {
    color: #2563eb;
    font-weight: 600;
}

.category-item.active .cat-circle-bg {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-results-info {
        flex-direction: column;
        gap: 0px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .filter-dropdown-menu {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 200px;
    }
    
    .filter-dropdown-menu.active {
        transform: translateX(-50%) translateY(0);
    }
}
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }


  /* === КНОПКА НАВЕРХ === */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #2563eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  }
  
  .scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .scroll-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
  }
  
  .scroll-to-top:active {
    transform: translateY(-1px);
  }
  
  .scroll-to-top svg {
    width: 24px;
    height: 24px;
  }
  
  /* Адаптивность для мобильных */
  @media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 18px;
        width: 50px;
        height: 50px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
  }

  

/* === КНОПКА AI АССИСТЕНТ === */
.ai-assistant-btn {
    position: fixed;
    bottom: 95px; 
    width: 50px;
    height: 50px;
    background-color: #2563eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  }
  
  .ai-assistant-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
  }
  
  .ai-assistant-btn:active {
    transform: translateY(-1px);
  }
  
  .ai-assistant-btn img {
    width: 24px;
    height: 24px;

  }

  /* === PAGINATION STYLES === */
.navigation.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.navigation.pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 40px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #2563eb;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1;
}

.navigation.pagination .page-numbers:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
   
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.navigation.pagination .page-numbers.current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    cursor: default;
}

.navigation.pagination .page-numbers.current:hover {
    transform: none;
    box-shadow: none;
}

.navigation.pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #666;
    cursor: default;
    padding: 0 8px;
    min-width: auto;
}

.navigation.pagination .page-numbers.dots:hover {
    background: transparent;
    color: #666;
    transform: none;
    box-shadow: none;
}

.navigation.pagination .prev,
.navigation.pagination .next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    font-weight: 500;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .navigation.pagination {
        margin-top: 30px;
    }
    
    .navigation.pagination .nav-links {
        gap: 6px;
    }
    
    .navigation.pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    
    .navigation.pagination .prev,
    .navigation.pagination .next {
        padding: 0 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .navigation.pagination .nav-links {
        gap: 15px;
    }
    
    .navigation.pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    /* Показываем только текущую, первую, последнюю и навигацию */
    .navigation.pagination .page-numbers:not(.current):not(.prev):not(.next):not(:first-child):not(:last-child) {
        display: none;
    }
}

h3 {
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    line-height: 1.4; 
}
p {
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.6em;
}

img {
    height: 180px;
}

.news-image img {
height: 180px !important;
    }

    .news-meta {
        
        justify-content: center;
       
        }


        .tool-image-wrapper img {
            height: 180px;
        }

   


        .vrot {
            display: flex;
             gap: 10px;
        }



        @media (max-width: 414px) { 
        .vrot {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            flex-direction: column;
        }

        .vrot input {
            text-align: center;
        }
    }

.btn-primary-stat {
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 6px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.sokr {
    min-height: 2.6em !important;
    -webkit-line-clamp: 2 !important;
    font-size: 12px !important;
    
        color: #7f8c8d !important;
    margin: 0 0 15px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}



.tool-content p, sokr {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.4 !important; 
    min-height: 4.2em !important; 
    margin-bottom: 25px !important; 
}


.search-result-card.news-card p,
.search-result-card p:not(.breadcrumb-current) { 
  
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 4.2em;
}