/* ============================================================
   SEARCH RESULTS PAGE — scoped to .search-page
   ============================================================ */

.search-page {
    --sp-primary: #0873ed;
    --sp-primary-dark: #075fd0;
    --sp-primary-light: #e8f3ff;
    --sp-navy: #092b50;
    --sp-body: #3a526c;
    --sp-muted: #52647d;
    --sp-border: #e8edf3;
    --sp-bg: #f8fafc;
    --sp-white: #ffffff;

    --sp-radius-sm: 8px;
    --sp-radius-md: 12px;
    --sp-radius-lg: 16px;
    --sp-radius-xl: 20px;

    --sp-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.03);
    --sp-shadow-md: 0 4px 15px rgba(29, 51, 80, 0.05);
    --sp-shadow-lg: 0 8px 25px rgba(29, 51, 80, 0.08);

    --sp-font-display: "Caveat", cursive;

    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--sp-bg);
    color: var(--sp-body);
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    line-height: 1.75;
    padding: clamp(14px, 2.5vw, 28px) clamp(14px, 3vw, 40px) clamp(40px, 6vw, 80px);
    -webkit-font-smoothing: antialiased;
}

.search-page *,
.search-page *::before,
.search-page *::after {
    box-sizing: border-box;
}

.search-page a { text-decoration: none; }
.search-page img { max-width: 100%; height: auto; display: block; }

/* BREADCRUMB */
.search-breadcrumb {
    max-width: 1280px;
    margin: 0 auto clamp(14px, 2vw, 22px);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.9375rem;
}
.search-breadcrumb a {
    color: var(--sp-primary);
    font-weight: 500;
}
.search-breadcrumb a:hover { color: var(--sp-primary-dark); }
.search-breadcrumb-sep { color: #b5beca; }
.search-breadcrumb-current {
    color: #111827;
    font-weight: 700;
}

/* BANNER */
.search-banner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto clamp(20px, 2.5vw, 32px);
    min-height: clamp(140px, 16vw, 180px);
    overflow: hidden;
    border-radius: var(--sp-radius-xl);
    background: linear-gradient(112deg, #d9edff 0%, #dcefff 48%, #d5ebff 100%);
    display: flex;
    align-items: center;
    padding: clamp(24px, 3.5vw, 40px);
}
.search-banner::before {
    content: "";
    position: absolute;
    width: 700px; height: 470px;
    right: -175px; bottom: -345px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform: rotate(-9deg);
    pointer-events: none;
}
.search-banner::after {
    content: "";
    position: absolute;
    width: 800px; height: 530px;
    right: -80px; bottom: -410px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(-12deg);
    pointer-events: none;
}
.search-banner-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
    flex-wrap: wrap;
}
.search-banner-icon {
    width: clamp(56px, 7vw, 80px);
    height: clamp(56px, 7vw, 80px);
    flex: 0 0 clamp(56px, 7vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: clamp(14px, 1.8vw, 18px);
    background: rgba(174, 214, 255, 0.55);
    color: var(--sp-primary);
}
.search-banner-icon svg {
    width: 55%;
    height: 55%;
}
.search-banner-info { flex: 1; min-width: 240px; }
.search-banner-title {
    color: #07142b;
    font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.2px;
    margin: 0 0 6px;
}
.search-banner-title span {
    color: var(--sp-primary-dark);
}
.search-banner-desc {
    color: var(--sp-muted);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1.55;
    margin: 0;
}
.search-banner-desc strong {
    color: var(--sp-navy);
    font-weight: 800;
}
.search-banner-decoration {
    position: absolute;
    z-index: 4;
    right: clamp(20px, 5vw, 60px);
    top: clamp(20px, 3vw, 40px);
    width: clamp(120px, 14vw, 170px);
    color: #315b91;
    font-family: var(--sp-font-display);
    font-size: clamp(1.125rem, 1.6vw + 0.5rem, 1.625rem);
    line-height: 1.2;
    font-weight: 600;
    transform: rotate(-6deg);
    text-align: right;
    pointer-events: none;
}
.search-banner-decoration span {
    display: block;
    margin-bottom: 2px;
}

/* SEARCH FORM (top of results) */
.search-form-wrapper {
    max-width: 720px;
    margin: 0 auto clamp(24px, 3vw, 36px);
    padding: 0 clamp(0px, 2vw, 20px);
}
.search-page-form {
    display: flex;
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    box-shadow: var(--sp-shadow-md);
    overflow: hidden;
    height: 56px;
}
.search-page-form input {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
    border: 0;
    outline: none;
    background: transparent;
    color: #1e293b;
    font-family: inherit;
    font-size: 1.0625rem;
}
.search-page-form input::placeholder { color: #97a3b6; }
.search-page-form button {
    width: 60px;
    flex: 0 0 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--sp-primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}
.search-page-form button:hover { background: var(--sp-primary-dark); }

/* MAIN GRID */
.search-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: clamp(20px, 3vw, 44px);
    align-items: flex-start;
}
.search-results-column {
    flex: 1;
    min-width: 0;
}

/* RESULTS GRID */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(14px, 1.8vw, 22px);
}
.search-result-card {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    overflow: hidden;
    box-shadow: var(--sp-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sp-shadow-lg);
}
.search-result-image {
    display: block;
    height: clamp(150px, 16vw, 190px);
    overflow: hidden;
}
.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.search-result-card:hover .search-result-image img {
    transform: scale(1.05);
}
.search-result-body {
    padding: clamp(14px, 1.8vw, 20px);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.search-result-category {
    color: var(--sp-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}
.search-result-title {
    color: var(--sp-navy);
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin: 0 0 8px;
}
.search-result-title a {
    color: inherit;
    transition: color 0.2s ease;
}
.search-result-title a:hover { color: var(--sp-primary); }
.search-result-excerpt {
    color: var(--sp-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}
.search-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--sp-muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.search-result-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8ef;
    flex-shrink: 0;
}
.search-result-meta-sep { color: #b5beca; }

/* PAGINATION */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 0.9vw, 10px);
    padding: clamp(28px, 3.5vw, 44px) 0 clamp(8px, 1vw, 16px);
    flex-wrap: wrap;
}
.search-page-number,
.search-page-arrow {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    color: #18233a;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--sp-shadow-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.search-page-number:hover,
.search-page-arrow:hover {
    background: var(--sp-primary-light);
    border-color: #c9dffb;
    color: var(--sp-primary);
}
.search-page-number.active {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(8, 115, 237, 0.25);
}
.search-page-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.search-page-dots {
    color: var(--sp-muted);
    font-weight: 700;
    padding: 0 4px;
    font-size: 1rem;
}

/* NO RESULTS */
.search-no-results {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    box-shadow: var(--sp-shadow-sm);
    padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 48px);
    text-align: center;
}
.search-no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--sp-primary-light);
    color: var(--sp-primary);
}
.search-no-results h2 {
    color: var(--sp-navy);
    font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
}
.search-no-results > p {
    color: var(--sp-muted);
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 0 0 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.search-suggestions {
    padding-top: 24px;
    border-top: 1px solid var(--sp-border);
}
.search-suggestions h3 {
    color: var(--sp-navy);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.search-suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.search-suggestion-tag {
    display: inline-block;
    padding: 8px 18px;
    background: #f1f5fb;
    border: 1px solid #e3ebf5;
    border-radius: 50px;
    color: var(--sp-muted);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.search-suggestion-tag:hover {
    background: var(--sp-primary-light);
    border-color: #c9dffb;
    color: var(--sp-primary-dark);
}

/* SIDEBAR — inherits .review-sidebar styling from global.css */
.search-grid .review-sidebar {
    flex: 0 0 clamp(260px, 26vw, 320px);
    width: auto;
    max-width: none;
    margin: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .search-grid {
        flex-direction: column;
    }
    .search-grid .review-sidebar {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: clamp(14px, 2vw, 20px);
    }
    .search-results-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .search-banner-decoration {
        display: none;
    }
    .search-banner {
        padding: clamp(20px, 4vw, 30px);
        min-height: auto;
        border-radius: clamp(14px, 2.5vw, 18px);
    }
    .search-banner-content { gap: clamp(12px, 2.5vw, 20px); }
    .search-banner-icon {
        width: clamp(48px, 10vw, 64px);
        height: clamp(48px, 10vw, 64px);
        flex-basis: clamp(48px, 10vw, 64px);
        border-radius: clamp(12px, 2vw, 16px);
    }
    .search-banner-title { letter-spacing: -0.8px; }
}

@media (max-width: 600px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    .search-page-form {
        height: 50px;
    }
    .search-page-form button {
        width: 52px;
        flex: 0 0 52px;
    }
}

@media (max-width: 480px) {
    .search-banner-title {
        font-size: clamp(1.375rem, 6vw, 1.625rem);
        letter-spacing: -0.5px;
    }
    .search-banner-desc {
        font-size: 0.9375rem;
    }
    .search-page-number,
    .search-page-arrow {
        min-width: 38px;
        height: 38px;
        font-size: 0.875rem;
    }
}