/* TechReview Hero Search — Frontend Styles */

/* ── Full-width breakout: tema container'ını kırar ── */
.trhs-hero {
    position: relative;
    /* Tema container genişliğinden tam ekrana taşma */
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    min-height: 520px;
    display: flex;
    align-items: center;
    /* overflow:hidden KALDIRILDI — dropdown kesilmesin */
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.trhs-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 1;
}

.trhs-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 70px 40px 90px; /* bottom padding fazla — dropdown için yer açar */
}

/* ── Texts ── */
.trhs-hero__texts {
    margin-bottom: 32px;
}

.trhs-hero__title {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -0.5px;
}

.trhs-hero__subtitle {
    margin: 0;
    line-height: 1.6;
    opacity: 0.92;
}

/* ── Search box ── */
.trhs-search-wrap {
    position: relative;
    max-width: 760px;
}

.trhs-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    overflow: visible;
    padding: 6px 6px 6px 18px;
    gap: 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.trhs-search-icon {
    display: flex;
    align-items: center;
    color: #888;
    flex-shrink: 0;
    margin-right: 10px;
}

.trhs-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px !important;
    color: #333 !important;
    padding: 8px 0 !important;
    min-width: 0;
    box-shadow: none !important;
    font-family: inherit !important;
}

.trhs-search-input::placeholder { color: #aaa; }

.trhs-divider {
    width: 1px;
    height: 28px;
    background: #e0e0e0;
    flex-shrink: 0;
    margin: 0 2px;
}

.trhs-cat-wrap {
    flex-shrink: 0;
    padding: 0 4px 0 8px;
    position: relative;
}

/* ── Custom Dropdown Trigger ── */
.trhs-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
    min-width: 155px;
    white-space: nowrap;
}

.trhs-dropdown:hover {
    background: rgba(0,0,0,0.04);
}

.trhs-dropdown__selected {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    flex: 1;
}

.trhs-dropdown__arrow {
    display: flex;
    align-items: center;
    color: #888;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
    flex-shrink: 0;
}

.trhs-dropdown.is-open .trhs-dropdown__arrow {
    transform: rotate(180deg);
}

/* ── Dropdown Menu ── */
.trhs-dropdown__menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 230px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.07),
        0 10px 30px -5px rgba(0,0,0,0.15),
        0 0 0 1px rgba(0,0,0,0.05);
    z-index: 99999;
    display: none;
    overflow: hidden;
    animation: trhs-dropdown-in 0.18s cubic-bezier(.4,0,.2,1);
    transform-origin: top right;
}

@keyframes trhs-dropdown-in {
    from { opacity: 0; transform: scale(0.95) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.trhs-dropdown__menu.is-open {
    display: block;
}

/* Header */
.trhs-dropdown__header {
    padding: 12px 16px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999;
}

/* Separator after "Tüm Kategoriler" */
.trhs-dropdown__separator {
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e8e8 20%, #e8e8e8 80%, transparent);
    margin: 4px 0 4px;
}

/* Thin line between category items */
.trhs-dropdown__line {
    height: 1px;
    background: #f2f2f2;
    margin: 0 16px;
}

/* Item */
.trhs-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: #333;
    transition: background 0.12s, color 0.12s;
    gap: 8px;
}

.trhs-dropdown__item:first-of-type {
    margin-top: 2px;
}

.trhs-dropdown__item:last-child {
    margin-bottom: 6px;
}

.trhs-dropdown__item:hover {
    background: #fff5f5;
    color: #b50f0f;
}

.trhs-dropdown__item--active {
    color: #b50f0f;
    font-weight: 600;
}

.trhs-dropdown__item--active:hover {
    background: #fff5f5;
}

/* Checkmark — visible only on active */
.trhs-dropdown__check {
    font-size: 13px;
    color: #b50f0f;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.12s;
}

.trhs-dropdown__item--active .trhs-dropdown__check {
    opacity: 1;
}

.trhs-search-btn {
    border: none;
    border-radius: 50px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 32px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    line-height: 1;
}

.trhs-search-btn:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

/* ── Autocomplete results ── */
.trhs-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    z-index: 99999; /* tema header'ının üstünde */
    display: none;
    overflow: visible; /* kesilmesin */
    /* max-height ile kaydırma — hero dışına taşmasın */
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.trhs-results.is-open { display: block; }

.trhs-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none !important;
}

.trhs-result-item:last-child { border-bottom: none; }

.trhs-result-item:hover {
    background: #fdf2f2;
}

.trhs-result-item:hover .trhs-result-title {
    color: #b50f0f !important;
}

.trhs-result-item:hover .trhs-result-img-wrap {
    border-color: #b50f0f;
}

.trhs-result-img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    border: 2px solid transparent;
    transition: border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trhs-result-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trhs-result-img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #e8e8e8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 22px;
}

.trhs-result-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
    line-height: 1.4;
    transition: color 0.15s;
    margin: 0 !important;
}

.trhs-results-empty {
    padding: 18px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

.trhs-results-loading {
    padding: 18px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* ── Popular searches ── */
.trhs-popular {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.trhs-popular__label {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-right: 4px;
    white-space: nowrap;
}

.trhs-popular__tag {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(4px);
}

.trhs-popular__tag:hover {
    background: #b50f0f !important;
    border-color: #b50f0f !important;
    color: #fff !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .trhs-hero__inner {
        padding: 50px 20px 80px;
    }

    .trhs-search-box {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 12px;
        gap: 8px;
    }

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

    .trhs-search-input {
        width: 100%;
        flex: none;
    }

    .trhs-divider { display: none; }

    .trhs-cat-wrap {
        width: 100%;
        padding: 0;
    }

    .trhs-dropdown {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: #fafafa;
        padding: 10px 14px;
    }

    .trhs-dropdown__menu {
        right: auto;
        left: 0;
        min-width: 100%;
    }

    .trhs-search-btn {
        width: 100%;
        text-align: center;
        border-radius: 10px;
    }
}

/* ── Scroll Indicator ── */
.trhs-scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.4s;
}

.trhs-scroll-indicator.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Mouse body */
.trhs-scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
    box-sizing: border-box;
    animation: trhs-mouse-float 2.2s ease-in-out infinite;
}

@keyframes trhs-mouse-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

/* Scroll wheel inside mouse */
.trhs-scroll-wheel {
    width: 3px;
    height: 7px;
    background: rgba(255,255,255,0.9);
    border-radius: 3px;
    animation: trhs-wheel-scroll 2.2s ease-in-out infinite;
}

@keyframes trhs-wheel-scroll {
    0%   { opacity: 1; transform: translateY(0); }
    60%  { opacity: 0; transform: translateY(6px); }
    61%  { opacity: 0; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Double chevron arrows below mouse */
.trhs-scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.trhs-scroll-arrows span {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255,255,255,0.9);
    border-bottom: 2px solid rgba(255,255,255,0.9);
    transform: rotate(45deg);
    animation: trhs-arrow-fade 2.2s ease-in-out infinite;
}

.trhs-scroll-arrows span:nth-child(2) {
    animation-delay: 0.18s;
    opacity: 0.55;
}

@keyframes trhs-arrow-fade {
    0%, 100% { opacity: 0.3; transform: rotate(45deg) translateY(0); }
    50%       { opacity: 1;   transform: rotate(45deg) translateY(3px); }
}

@media (max-width: 768px) {
    .trhs-scroll-indicator { bottom: 16px; }
}
