/* ============================================
   Header Search Bar - On the Right Side
   ============================================ */
.header-search-wrapper {
    display: none;
}

@media (min-width: 768px) {
    .header-search-wrapper {
        display: block;
        width: auto;
        max-width: 18rem; /* Narrower width */
        margin-left: auto; /* Push to right */
        margin-right: 0;
    }
}

@media (min-width: 1024px) {
    .header-search-wrapper {
        max-width: 20rem; /* Slightly wider on large screens */
    }
}

html[dir="rtl"] .header-search-wrapper {
    margin-left: 0;
    margin-right: auto; /* Push to left in RTL */
}

.header-search-form {
    position: relative;
    width: 100%;
}

.header-search-input {
    width: 100%;
    padding: 0.625rem 2.75rem 0.625rem 1rem;
    font-size: 0.875rem;
    background-color: var(--muted);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--foreground);
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

@media (min-width: 1024px) {
    .header-search-input {
        padding: 0.75rem 3rem 0.75rem 1.125rem;
        font-size: 0.9375rem;
    }
}

html[dir="rtl"] .header-search-input {
    padding-left: 2.75rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    html[dir="rtl"] .header-search-input {
        padding-left: 3rem;
        padding-right: 1.125rem;
    }
}

.header-search-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

.header-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--card);
    box-shadow: 0 0 0 3px hsl(189 65% 44% / 0.1);
}

.header-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
}

html[dir="rtl"] .header-search-btn {
    right: auto;
    left: 0.5rem;
}

.header-search-btn:hover {
    color: var(--primary);
    background-color: var(--turquoise-light);
}

/* ============================================
   Search Results Page
   ============================================ */
.search-header {
    background: var(--gradient-hero);
}

.search-header .page-title span {
    color: var(--primary);
    font-weight: 900;
}

/* Large search form on search page */
.search-form-large {
    position: relative;
    width: 100%;
}

/* Search results section */
.search-results-section {
    background-color: var(--background);
}

/* No Results Page */
.no-results-section {
    background-color: var(--background);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-content {
    text-align: center;
    max-width: 32rem;
    margin: 0 auto;
}

.no-results-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 2rem;
    color: var(--muted-foreground);
    opacity: 0.5;
}

@media (min-width: 640px) {
    .no-results-icon {
        width: 6rem;
        height: 6rem;
    }
}

.no-results-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--foreground);
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}

@media (min-width: 640px) {
    .no-results-title {
        font-size: 2rem;
    }
}

.no-results-text {
    font-size: 1rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .no-results-text {
        font-size: 1.0625rem;
    }
}

.no-results-suggestions {
    background-color: var(--muted);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    text-align: left;
}

@media (min-width: 640px) {
    .no-results-suggestions {
        padding: 2rem;
    }
}

.no-results-suggestions h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}

@media (min-width: 640px) {
    .no-results-suggestions h3 {
        font-size: 1.125rem;
    }
}

.no-results-suggestions ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-results-suggestions li {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    padding-left: 1.5rem;
    position: relative;
}

@media (min-width: 640px) {
    .no-results-suggestions li {
        font-size: 0.9375rem;
    }
}

.no-results-suggestions li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

html[dir="rtl"] .no-results-suggestions li {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[dir="rtl"] .no-results-suggestions li::before {
    left: auto;
    right: 0;
}

/* Pagination Styles */
.navigation.pagination {
    margin-top: 3rem;
    text-align: center;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--card);
    color: var(--muted-foreground);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-numbers:hover {
    background-color: var(--turquoise-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-numbers.current {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
}

.page-numbers.dots:hover {
    transform: none;
    background: none;
}

.page-numbers.prev,
.page-numbers.next {
    padding: 0.5rem 1.25rem;
    gap: 0.375rem;
}