/* ========================================================
   ABK Mühendislik - Ana Sayfa Üst Arama & Otomatik Tamamlama
   Tasarım: Modern Glassmorphic, UI-UX Pro Max Standartları
   ======================================================== */

.hero-top-search-wrapper {
    position: absolute;
    top: 130px; /* Header ile üstten ferah boşluk */
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 780px; /* Estetik, dengeli ve tam ortalı genişlik */
    z-index: 50;
    transition: var(--transition);
}

.hero-search-form {
    position: relative;
    width: 100%;
}

/* Arama Giriş Çubuğu - Modern Capsule / Spotlight Tasarım */
.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(14, 18, 24, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px; /* Estetik kapsül tasarım */
    padding: 0.35rem 0.5rem 0.35rem 1.6rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.search-input-box:hover {
    border-color: rgba(255, 133, 0, 0.5);
    background: rgba(18, 23, 31, 0.92);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 133, 0, 0.18);
}

.search-input-box.focused,
.search-input-box:focus-within {
    border-color: var(--primary);
    background: rgba(18, 23, 31, 0.98);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 133, 0, 0.28);
}

.search-main-icon {
    font-size: 1.25rem;
    color: var(--primary);
    margin-right: 1rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.search-input-box:focus-within .search-main-icon {
    transform: scale(1.1);
}

.search-input-box input {
    flex: 1;
    min-width: 0;
    height: 48px;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 500;
    font-family: inherit;
}

.search-input-box input::placeholder {
    color: #718096;
    font-size: 0.95rem;
}

/* Temizleme ve Yükleniyor Butonları */
.search-clear-btn {
    background: transparent;
    border: none;
    color: #718096;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 0.4rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.search-loading-spinner {
    color: var(--primary);
    margin-right: 0.8rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Arama Butonu */
.hero-search-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ff9920 0%, #ff8500 100%);
    color: #0a0b0d;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0 1.5rem;
    height: 48px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(255, 133, 0, 0.3);
}

.hero-search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 133, 0, 0.45);
    background: linear-gradient(135deg, #ffaa35 0%, #ff9008 100%);
}

.hero-search-submit-btn:active {
    transform: translateY(0);
}

/* Popüler Hızlı Etiketler */
.hero-quick-tags {
    display: flex;
    align-items: center;
    justify-content: center; /* Merkeze hizala */
    gap: 0.5rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
    padding-left: 0;
}

.quick-tags-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.quick-tags-label i {
    color: var(--primary);
}

.quick-tag-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-tag-chip:hover {
    background: rgba(255, 133, 0, 0.15);
    border-color: rgba(255, 133, 0, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==================== Açılır Otomatik Tamamlama Menüsü ==================== */
.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(14, 18, 23, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 133, 0, 0.3);
    border-radius: 16px;
    padding: 0.75rem 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 133, 0, 0.15);
    max-height: 480px;
    overflow-y: auto;
    z-index: 100;
    animation: dropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.search-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.search-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 133, 0, 0.35);
    border-radius: 10px;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Bölüm Başlıkları */
.search-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.4rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.4rem;
}

.search-group-header:first-child {
    border-top: none;
    margin-top: 0;
}

.search-group-header span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.search-group-header .group-count {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Arama Sonuç Öğeleri */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    color: #e2e8f0;
    transition: background 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    gap: 0.9rem;
    border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
    background: rgba(255, 133, 0, 0.08);
    border-left-color: var(--primary);
    color: #ffffff;
}

.result-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.result-item-icon.software-icon {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.2);
}

.result-item-icon.category-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
}

.result-item-icon.blog-icon {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.2);
}

.result-item-info {
    flex: 1;
    min-width: 0;
}

.result-item-title {
    font-size: 0.94rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-title mark {
    background: transparent;
    color: var(--primary);
    font-weight: 700;
}

.result-item-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    text-transform: uppercase;
    flex-shrink: 0;
}

.result-item-badge.software-badge {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

/* Dropdown Altı (Tüm Sonuçları Gör) */
.search-dropdown-footer {
    padding: 0.8rem 1.4rem 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.4rem;
}

.view-all-results-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 133, 0, 0.12);
    border: 1px solid rgba(255, 133, 0, 0.3);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-all-results-btn:hover {
    background: var(--primary);
    color: #0a0b0d;
    box-shadow: 0 4px 15px rgba(255, 133, 0, 0.35);
}

/* Boş Durum (Sonuç Bulunamadı) */
.search-empty-state {
    padding: 2.2rem 1.4rem;
    text-align: center;
}

.search-empty-state i {
    font-size: 2.2rem;
    color: #64748b;
    margin-bottom: 0.8rem;
    display: block;
}

.search-empty-state p {
    color: #94a3b8;
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
}

.search-empty-suggestions {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

/* ==================== Responsive & Mobile ==================== */
@media (max-width: 1200px) {
    .hero-top-search-wrapper {
        width: 88%;
        max-width: 740px;
        top: 125px;
    }
}

@media (max-width: 992px) {
    .hero-top-search-wrapper {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 650px;
        margin: 1.5rem auto 2.5rem;
        z-index: 15;
    }

    .hero-content {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .search-input-box {
        padding: 0.3rem 0.4rem 0.3rem 1rem;
        border-radius: 14px;
    }

    .search-main-icon {
        font-size: 1.1rem;
        margin-right: 0.6rem;
    }

    .search-input-box input {
        height: 44px;
        font-size: 0.92rem;
    }

    .hero-search-submit-btn {
        height: 44px;
        padding: 0 1.1rem;
        font-size: 0.88rem;
    }

    .hero-quick-tags {
        display: none; /* Mobilde dikey alanı korumak için hızlı etiketleri gizle */
    }

    .search-dropdown-menu {
        max-height: 380px;
    }

    .search-result-item {
        padding: 0.65rem 1rem;
        gap: 0.65rem;
    }

    .result-item-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-search-submit-btn span {
        display: none; /* Çok dar ekranlarda sadece ok ikonu göster */
    }

    .hero-search-submit-btn {
        padding: 0 1rem;
    }
}

/* ========================================================
   Light Theme Overrides (UI-UX Pro Max WCAG AAA/AA)
   ======================================================== */
[data-theme="light"] .search-input-box {
    background: rgba(255, 255, 255, 0.95);
    border-color: #cbd5e1;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .search-input-box:hover {
    background: #ffffff;
    border-color: rgba(255, 133, 0, 0.6);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12), 0 0 25px rgba(255, 133, 0, 0.15);
}

[data-theme="light"] .search-input-box.focused,
[data-theme="light"] .search-input-box:focus-within {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.14), 0 0 0 3px rgba(255, 133, 0, 0.18);
}

[data-theme="light"] .search-input-box input {
    color: #0f172a;
}

[data-theme="light"] .search-input-box input::placeholder {
    color: #64748b;
}

[data-theme="light"] .search-clear-btn {
    color: #64748b;
}

[data-theme="light"] .search-clear-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Popüler Hızlı Etiketler - Light Mod */
[data-theme="light"] .quick-tags-label {
    color: #334155;
    font-weight: 700;
}

[data-theme="light"] .quick-tag-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .quick-tag-chip:hover {
    background: #fff7ed;
    border-color: var(--primary);
    color: #c25e00;
    box-shadow: 0 4px 12px rgba(255, 133, 0, 0.2);
    transform: translateY(-1px);
}

/* Otomatik Tamamlama Dropdown Menüsü - Light Mod */
[data-theme="light"] .search-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15), 0 0 25px rgba(255, 133, 0, 0.1);
}

[data-theme="light"] .search-group-header {
    color: #c25e00;
    border-top: 1px solid #f1f5f9;
}

[data-theme="light"] .search-group-header .group-count {
    color: #64748b;
}

[data-theme="light"] .search-result-item {
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
}

[data-theme="light"] .search-result-item:hover,
[data-theme="light"] .search-result-item.selected {
    background: #fff7ed;
    color: #0f172a;
    border-left-color: var(--primary);
}

[data-theme="light"] .result-item-icon {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .result-item-title {
    color: #0f172a;
}

[data-theme="light"] .result-item-sub {
    color: #64748b;
}

[data-theme="light"] .result-item-badge {
    background: #f1f5f9;
    color: #475569;
}

[data-theme="light"] .search-dropdown-footer {
    border-top: 1px solid #f1f5f9;
}

[data-theme="light"] .view-all-results-btn {
    background: #fff7ed;
    border-color: rgba(255, 133, 0, 0.35);
    color: #c25e00;
}

[data-theme="light"] .view-all-results-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

[data-theme="light"] .search-empty-state h4 {
    color: #0f172a;
}

[data-theme="light"] .search-empty-state p {
    color: #64748b;
}

[data-theme="light"] .search-dropdown-menu::-webkit-scrollbar-track {
    background: #f8fafc;
}

[data-theme="light"] .search-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

