/* Search Page Styles */

/* Search Hero Section */
.search-hero {
    background-color: var(--light-bg);
    padding: 60px 0 30px;
    position: relative;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(255, 160, 0, 0.05) 100%);
    z-index: 1;
}

.search-hero .container {
    position: relative;
    z-index: 2;
}

.search-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-hero-content h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.search-hero-content p {
    font-size: 1.1rem;
    color: var(--light-text);
}

/* Search Filters */
.search-filters {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.search-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: flex-end;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    background-color: #fff;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 40px;
}

.icon-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.icon-button:hover {
    color: var(--primary-dark);
}

.search-btn {
    width: 100%;
    padding: 12px;
}

.invisible {
    visibility: hidden;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.active-filters span {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-right: 5px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-color);
}

.remove-filter {
    margin-left: 5px;
    font-size: 1.2rem;
    color: #999;
    line-height: 1;
    transition: all 0.2s ease;
}

.remove-filter:hover {
    color: var(--error);
}

.clear-all {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Search Results Section */
.search-results {
    padding: 50px 0 80px;
    background-color: #fff;
}

.results-count {
    margin-bottom: 30px;
    color: var(--light-text);
    font-size: 0.95rem;
}

.results-count strong {
    color: var(--text-color);
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Result Card */
.result-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.result-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.result-card:hover .result-image img {
    transform: scale(1.05);
}

.result-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    z-index: 2;
}

.result-category:hover {
    background-color: var(--primary-dark);
    color: white;
}

.result-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.result-title a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: var(--primary-color);
}

.result-subtitle {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.result-excerpt {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-date {
    color: var(--light-text);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.result-date i {
    margin-right: 5px;
    color: var(--primary-color);
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background-color: var(--light-bg);
    color: var(--light-text);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-link.prev i {
    margin-right: 5px;
}

.page-link.next i {
    margin-left: 5px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    background-color: #f5f5f5;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: #e5e5e5;
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
}

.page-ellipsis {
    color: var(--light-text);
    margin: 0 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.no-results p {
    font-size: 1rem;
    color: var(--light-text);
    margin-bottom: 25px;
}

.no-results-suggestions {
    text-align: left;
    margin-bottom: 30px;
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-suggestions h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.no-results-suggestions ul {
    padding-left: 20px;
    color: var(--light-text);
}

.no-results-suggestions li {
    margin-bottom: 5px;
}

.no-results .btn {
    display: inline-block;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .search-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .search-input-group {
        grid-column: span 2;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .search-hero {
        padding: 40px 0 20px;
    }
    
    .search-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .search-hero-content p {
        font-size: 1rem;
    }
    
    .search-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-input-group {
        grid-column: span 1;
    }
    
    .active-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .clear-all {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-image {
        height: 180px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .search-hero-content h1 {
        font-size: 1.5rem;
    }
    
    .search-filters {
        padding: 20px 15px;
    }
    
    .result-content {
        padding: 20px 15px;
    }
    
    .result-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-numbers {
        display: none;
    }
    
    .pagination {
        justify-content: space-between;
    }
}
