/* search.css — SEAS site search page (search.php).
   SEAS palette: #C8102E red, #1e2a6f navy. */

/* Hero banner */
.search-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.search-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Search section */
.search-section {
    padding: 3.5rem 0 2rem;
    background-color: #ffffff;
}
.search-container {
    max-width: 900px;
    margin: 0 auto 2rem;
}
.search-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1e2a6f;
    margin: 0 0 0.75rem;
    text-align: center;
}
.search-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 auto 1.75rem;
    text-align: center;
    max-width: 720px;
}

/* Search box */
.search-box-container {
    max-width: 720px;
    margin: 0 auto 1.5rem;
}
.search-box {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box:focus-within {
    border-color: #C8102E;
    box-shadow: 0 6px 18px rgba(196, 31, 50, 0.12);
}
.search-input {
    flex: 1;
    padding: 0.95rem 1.25rem;
    font-size: 1.05rem;
    border: none;
    outline: none;
    color: #333;
    background-color: transparent;
    font-family: inherit;
}
.search-input::placeholder { color: #9ca3af; }

.search-button {
    background-color: #C8102E;
    color: white;
    border: none;
    padding: 0 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.search-button:hover { background-color: #a61729; }

/* Filter pills */
.search-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.filter-label {
    font-weight: 500;
    color: #4b5563;
    margin-right: 0.5rem;
}
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.filter-option {
    padding: 0.45rem 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background-color: #ffffff;
    color: #4b5563;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-option:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}
.filter-option.active {
    background-color: #C8102E;
    color: white;
    border-color: #C8102E;
}

/* Loading */
.search-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: #4b5563;
}
.loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #C8102E;
    border-radius: 50%;
    animation: seas-spin 0.9s linear infinite;
    margin-bottom: 0.75rem;
}
@keyframes seas-spin { to { transform: rotate(360deg); } }

/* Results */
.search-results {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.75rem;
}
.result-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    background-color: white;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}
.result-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    background-color: #1e2a6f;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}
.result-category.programs { background-color: #16a34a; }
.result-category.faculty  { background-color: #2563eb; }
.result-category.news     { background-color: #ea580c; }
.result-category.pages    { background-color: #1e2a6f; }

.result-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e2a6f;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}
.result-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.result-title a:hover { color: #C8102E; }

.result-description {
    font-size: 0.97rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.result-description mark {
    background-color: #fef3c7;
    color: #b45309;
    padding: 0 2px;
    border-radius: 2px;
}
.result-link {
    font-size: 0.85rem;
    color: #6b7280;
    word-break: break-word;
}

/* No results state */
.no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
}
.no-results svg { color: #9ca3af; margin-bottom: 1rem; }
.no-results h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e2a6f;
    margin: 0 0 0.6rem;
}
.no-results p {
    font-size: 1rem;
    color: #4b5563;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}
.search-suggestions {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    max-width: 560px;
    width: 100%;
    text-align: left;
}
.search-suggestions h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e2a6f;
    margin: 0 0 0.6rem;
}
.search-suggestions ul {
    margin: 0;
    padding-left: 1.25rem;
}
.search-suggestions li {
    margin-bottom: 0.4rem;
    color: #4b5563;
}
.search-suggestions a {
    color: #C8102E;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.search-suggestions a:hover { color: #a61729; text-decoration: underline; }

/* Pagination buttons (rendered by JS into .search-results) */
.pagination-button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background-color: white;
    color: #4b5563;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pagination-button:hover { background-color: #f9fafb; border-color: #d1d5db; }
.pagination-button.active {
    background-color: #C8102E;
    color: white;
    border-color: #C8102E;
}

/* Popular searches */
.popular-searches-section {
    padding: 3rem 0 4rem;
    background-color: #f9fafb;
}
.popular-searches-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e2a6f;
}
.popular-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}
.popular-search {
    padding: 0.55rem 1.2rem;
    background-color: white;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.popular-search:hover {
    background-color: #C8102E;
    color: white;
    border-color: #C8102E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(196, 31, 50, 0.18);
}

/* Responsive */
@media (max-width: 768px) {
    .search-section { padding: 2.5rem 0; }
    .search-title { font-size: 1.65rem; }
    .search-description { font-size: 1rem; padding: 0 1rem; }
    .search-input { padding: 0.85rem 1rem; font-size: 1rem; }
    .result-item { padding: 1.1rem; }
}
@media (max-width: 480px) {
    .search-title { font-size: 1.4rem; }
    .search-box { flex-direction: column; }
    .search-button { width: 100%; padding: 0.7rem; }
    .filter-label { width: 100%; text-align: center; margin-bottom: 0.4rem; }
    .filter-option { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
}
