/* ===== Global search overlay (navbar magnifier) ===== */

.search-box {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(7, 41, 77, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-box.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.search-box__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.search-box__panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 680px;
    background: #fff;
    border: 2px solid #07294d;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(7, 41, 77, 0.25);
    overflow: hidden;
}

.search-box__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f4f6f8;
    color: #07294d;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 3;
}

.search-box__close:hover {
    background: #ffc600;
    color: #07294d;
}

.search-box__inner {
    padding: 36px 32px 32px;
}

.search-box__inner h3 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #07294d;
}

.search-box__desc {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
}

.search-box__field {
    display: flex;
    align-items: stretch;
    border: 2px solid #07294d;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.search-box__field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    color: #07294d;
    background: #f8fafc;
    flex-shrink: 0;
}

.search-box__input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 14px 12px;
    font-size: 16px;
    color: #07294d;
    background: transparent;
    outline: none;
}

.search-box__input::placeholder {
    color: #9aa3af;
}

.search-box__submit {
    border: 0;
    padding: 0 22px;
    background: #ffc600;
    color: #07294d;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-box__submit:hover {
    background: #e6b200;
}

body.search-open {
    overflow: hidden;
}

/* ===== Global search results page ===== */

.global-search-page {
    padding-top: 40px;
    padding-bottom: 60px;
}

.global-search-head {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(7, 41, 77, 0.06);
}

.global-search-head h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #07294d;
}

.global-search-head p {
    margin: 0;
    color: #6b7280;
}

.global-search-head .keyword {
    color: #07294d;
    font-weight: 700;
}

.global-search-inline {
    margin-top: 20px;
    display: flex;
    gap: 0;
    max-width: 560px;
    border: 2px solid #07294d;
    border-radius: 12px;
    overflow: hidden;
}

.global-search-inline input {
    flex: 1;
    border: 0;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
}

.global-search-inline button {
    border: 0;
    padding: 0 20px;
    background: #ffc600;
    color: #07294d;
    font-weight: 700;
    cursor: pointer;
}

.global-search-summary {
    margin-bottom: 24px;
}

.global-search-summary .alert {
    border-radius: 10px;
    margin-bottom: 0;
}

.global-search-section {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 14px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(7, 41, 77, 0.05);
}

.global-search-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    background: #07294d;
    color: #fff;
}

.global-search-section__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.global-search-section__head h3 i {
    color: #ffc600;
    margin-right: 8px;
}

.global-search-section__count {
    font-size: 13px;
    background: rgba(255, 198, 0, 0.2);
    color: #ffc600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.global-search-section__body {
    padding: 8px 0;
}

.global-search-item {
    display: block;
    padding: 14px 22px;
    border-bottom: 1px solid #f0f2f5;
    text-decoration: none !important;
    transition: background 0.15s;
}

.global-search-item:last-child {
    border-bottom: 0;
}

.global-search-item:hover {
    background: #f8fafc;
}

.global-search-item__title {
    display: block;
    color: #07294d;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 4px;
}

.global-search-item__meta {
    display: block;
    color: #9aa3af;
    font-size: 12px;
}

.global-search-section__foot {
    padding: 12px 22px 16px;
    text-align: right;
    border-top: 1px solid #f0f2f5;
}

.global-search-section__foot a {
    color: #07294d;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
}

.global-search-section__foot a:hover {
    color: #ffc600;
}

.global-search-section__foot a i {
    margin-left: 4px;
}

@media (max-width: 767px) {
    .search-box {
        padding: 16px;
    }

    .search-box__inner {
        padding: 28px 20px 24px;
    }

    .search-box__field {
        flex-direction: column;
    }

    .search-box__field-icon {
        display: none;
    }

    .search-box__submit {
        padding: 14px;
    }

    .global-search-head {
        padding: 20px;
    }

    .global-search-section__head {
        flex-direction: column;
        align-items: flex-start;
    }
}
