/* =====================================================
   CGE Search page  ->  save as assets/css/search.css
   ===================================================== */

:root {
    --navy: #0f2d63;
    --navy-deep: #0b2250;
    --gold: #c9a13b;
    --ink: #1c2a44;
    --muted: #6b7385;
    --line: #dfe3ec;
    --surface: #ffffff;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Poppins", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body.search-page {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--surface);
}

/* ---------------- HERO ---------------- */
.search-hero {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    /* Put your world-map + clock-tower photo here (see notes).
       The gradient is the fallback if the image is missing. */
    background:
        url("../images/hero/search.jpg") center / cover no-repeat,
        linear-gradient(120deg, #fdf8e8 0%, #e6f0fb 45%, #bcd8f2 100%);
}

.search-hero--compact { min-height: 520px; }

.hero-brand {
    position: absolute;
    top: 36px;
    left: 5%;
    z-index: 3;
}

.hero-brand img {
    display: block;
    height: 190px;
    width: auto;
    max-width: 100%;
}

/* Graduation cap + books (left, bottom) */
.hero-cap {
    position: absolute;
    left: 0;
    bottom: 60px;
    width: 300px;
    max-width: 24vw;
    z-index: 2;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 3;
    padding: 270px 5% 0 14%;
    max-width: 1100px;
}

.search-hero--compact .hero-inner { padding-top: 250px; }

/* "Q | Search" heading */
.hero-title {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 0;
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(48px, 7vw, 92px);
    line-height: 1;
    color: var(--navy);
}

.hero-title i {
    font-size: 0.85em;
    color: var(--navy-deep);
}

.hero-title-divider {
    width: 3px;
    height: 0.85em;
    background: var(--gold);
}

.hero-tagline {
    margin: 22px 0 28px 18%;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(18px, 2vw, 26px);
    color: var(--navy);
}

/* ---------------- SEARCH BAR (pill) ---------------- */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 980px;
    padding: 8px 8px 8px 28px;
    background: #fff;
    border: 1.5px solid var(--navy);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 45, 99, 0.18);
}

.search-form-icon {
    font-size: 22px;
    color: #5c6b85;
    margin-right: 16px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--sans);
    font-size: 20px;
    color: var(--ink);
    padding: 14px 0;
}

.search-form input::placeholder { color: #8b93a5; }

.search-form button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: none;
    cursor: pointer;
    background: var(--navy);
    color: #fff;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 20px;
    padding: 16px 40px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.search-form button:hover { background: var(--navy-deep); }

.search-form:focus-within {
    box-shadow: 0 0 0 4px rgba(201, 161, 59, 0.35), 0 10px 30px rgba(15, 45, 99, 0.18);
}

.search-form button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ---------------- WAVE ---------------- */
.hero-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 130px;
    z-index: 2;
}

.wave-gold  { fill: var(--gold); }
.wave-navy  { fill: var(--navy); }
.wave-white { fill: #fff; }

/* ---------------- MAIN ---------------- */
.search-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px 70px;
}

/* ---------------- QUICK LINK CARDS ---------------- */
.quick-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 150px;
    padding: 20px 14px;
    text-align: center;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.3;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(15, 45, 99, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-card i {
    font-size: 40px;
    color: var(--navy);
}

.quick-card:hover,
.quick-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 12px 26px rgba(15, 45, 99, 0.16);
    outline: none;
}

/* ---------------- RESULTS ---------------- */
.search-results {
    max-width: 980px;
    margin: 20px auto 0;
}

.results-heading {
    margin: 0 0 6px;
    font-family: var(--sans);
    font-size: 26px;
    color: var(--navy);
}

.results-heading span { font-weight: 700; }

.results-count {
    margin: 0 0 26px;
    color: var(--muted);
}

.search-result {
    padding: 22px 26px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 45, 99, 0.06);
}

.result-category {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
}

.search-result h3 {
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: 22px;
}

.search-result h3 a {
    color: var(--navy);
    text-decoration: none;
}

.search-result h3 a:hover { text-decoration: underline; }

.result-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    text-decoration: none;
}

.result-link:hover { color: var(--gold); }

.no-results {
    padding: 26px;
    background: #f6f8fc;
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.no-results h3 { margin: 0 0 6px; color: var(--navy); }
.no-results p  { margin: 0; color: var(--muted); }

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover { text-decoration: underline; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1100px) {
    .quick-links { grid-template-columns: repeat(3, 1fr); }
    .hero-inner  { padding-left: 8%; }
    .hero-brand img { height: 150px; }
}

@media (max-width: 700px) {
    .search-hero,
    .search-hero--compact { min-height: 620px; }

    .hero-brand { left: 5%; top: 22px; }
    .hero-brand img { height: 110px; }

    .hero-cap { display: none; }

    .hero-inner,
    .search-hero--compact .hero-inner { padding: 190px 5% 0; }

    .hero-title { gap: 14px; }
    .hero-tagline { margin-left: 0; }

    .search-form { padding: 6px 6px 6px 18px; }
    .search-form-icon { display: none; }
    .search-form input { font-size: 16px; }
    .search-form button { padding: 12px 20px; font-size: 16px; }

    .hero-wave { height: 80px; }

    .quick-links { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .quick-card  { min-height: 130px; font-size: 16px; }
    .quick-card i { font-size: 32px; }
}

@media (max-width: 420px) {
    .search-form button span { display: none; }
}