/* ═══════════ Search Page Styles ═══════════ */

/* ── Hero Section ── */
.search-hero {
    background: linear-gradient(135deg, #00309E 0%, #0045D9 50%, #0058FF 100%);
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.search-hero::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, #f8fafc, transparent);
    pointer-events: none;
}

/* ── Search Input ── */
.search-input-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 16px 60px 16px 54px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.search-input-wrapper input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-wrapper input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.15);
}

.search-input-wrapper input[type="text"]:focus~.search-icon {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.search-submit-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.search-submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.02);
}

.search-submit-btn:active {
    transform: translateY(-50%) scale(0.98);
}

/* ── Stats Bar ── */
.search-stats {
    font-size: 14px;
    color: #64748b;
    padding: 12px 0 4px;
}

.search-stats strong {
    color: #00309E;
    font-weight: 700;
}

/* ── Result Cards ── */
.search-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-result-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #00309E, #0045D9);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 24px rgba(0, 48, 158, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.search-result-card:hover::before {
    opacity: 1;
}

.search-result-card .result-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    transition: color 0.2s ease;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}

.search-result-card:hover .result-title {
    color: #00309E;
}

.search-result-card .result-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-card .result-url {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-result-card .result-url svg {
    flex-shrink: 0;
}

/* ── Search Snippet (Google-style) ── */
.search-result-card .result-snippet {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-card .result-snippet mark {
    background: none;
    color: #0f172a;
    font-weight: 700;
}

/* ── Pagination ── */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.search-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-pagination .page-btn:hover {
    border-color: #00309E;
    color: #00309E;
    background: #f0f4ff;
}

.search-pagination .page-btn.active {
    background: linear-gradient(135deg, #00309E, #0045D9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 48, 158, 0.3);
}

.search-pagination .page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.search-pagination .page-ellipsis {
    color: #94a3b8;
    font-size: 14px;
    padding: 0 4px;
}

/* ── Empty State ── */
.search-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.search-empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f0f4ff, #e8ecff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: empty-pulse 3s ease-in-out infinite;
}

@keyframes empty-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 48, 158, 0.1);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 20px rgba(0, 48, 158, 0);
    }
}

.search-empty-icon svg {
    width: 48px;
    height: 48px;
    color: #00309E;
    opacity: 0.6;
}

.search-empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.search-empty-state p {
    font-size: 15px;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Search Tips ── */
.search-tips {
    margin-top: 40px;
    padding: 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.search-tips h4 {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.search-tips li {
    font-size: 14px;
    color: #64748b;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.search-tips li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #00309E, #0045D9);
    border-radius: 50%;
}

/* ── Floating Decorations ── */
.search-hero .floating-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: float-drift 8s ease-in-out infinite;
}

.search-hero .floating-dot:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.search-hero .floating-dot:nth-child(2) {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.search-hero .floating-dot:nth-child(3) {
    width: 30px;
    height: 30px;
    bottom: 30%;
    left: 65%;
    animation-delay: -5s;
}

@keyframes float-drift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(15px, -20px);
    }

    50% {
        transform: translate(-10px, 10px);
    }

    75% {
        transform: translate(10px, 15px);
    }
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    .search-result-card {
        padding: 18px;
    }

    .search-result-card .result-title {
        font-size: 16px;
    }

    .search-input-wrapper input[type="text"] {
        padding: 14px 55px 14px 48px;
        font-size: 15px;
    }
}

@media (max-width: 640px) {
    .search-hero {
        padding-top: 90px !important;
        padding-bottom: 32px !important;
    }

    .search-submit-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .search-pagination .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
