.fullscreen-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #C0BAB0;
    /* Exact color from screenshot */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    padding: 0;
    overflow-y: auto;
}

.fullscreen-search.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-search-header {
    width: 100%;
    height: 120px;
    padding: 30px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fullscreen-search-logo {
    transition: transform 0.4s ease;
}

.fullscreen-search-logo a {
    display: block;
}

.fullscreen-search-logo img {
    height: auto;
    max-width: 96px;
}

.search-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 58px;
    height: 58px;
    aspect-ratio: 1/1;
}

.search-close:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.search-close svg {
    width: 30px;
    height: 30px;
}

.search-close svg path {
    fill: #fff;
}

.search-center {
    width: 100%;
    max-width: 916px;
    text-align: left;
    margin-top: calc(50vh - 60px - 120px);
    /* Center search bar initially */
    transition: padding-top 0.4s ease, margin-top 0.4s ease;
}

.has-suggestions .search-center {
    margin-top: 0;
    padding-top: 100px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    transition: border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: #fff;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--rethink-font, "Rethink Sans", sans-serif);
    font-size: 32px;
    font-weight: 400;
    outline: none;
    padding: 0 60px 0 0;
    letter-spacing: -0.5px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.40);
    font-size: 32px;
    font-weight: 400;
    line-height: 203.125%;
    letter-spacing: -0.64px;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) translateX(5px);
}

.search-btn svg {
    width: 26px;
    height: 26px;
}

.search-btn svg path {
    stroke: #fff;
    stroke-width: 1.5;
}

/* Animations */
.fullscreen-search .search-center {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.fullscreen-search.active .search-center {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.1s, opacity 0.5s ease 0.1s;
}

@media (max-width: 991px) {
    .fullscreen-search {
        padding: 0 30px;
    }

    .fullscreen-search-logo {
        top: 30px;
        left: 30px;
    }

    .search-close {
        top: 30px;
        right: 30px;
    }

    .search-box input {
        font-size: 28px;
    }
}



/* Search Suggestions */
.search-suggestions {
    margin-top: 45px;
    width: 100%;
}

/* Outer two-column layout: results list | image preview */
.suggestions-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    padding: 0 16px;
    align-items: start;
}

/* Left: result rows — acts as the shared column grid */
.suggestions-grid__results {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 130px;
    align-content: start;
}

/* Each row spans both columns and inherits the parent grid tracks */
.suggestion-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

/* Code search mode: two side-by-side columns, independent stacking */
.suggestions-grid--code {
    display: flex;
    gap: 130px;
}

.suggestions-grid--code .suggestions-grid__left,
.suggestions-grid--code .suggestions-grid__right {
    display: flex;
    flex-direction: column;
}

.suggestion-item {
    display: flex;
    flex-direction: column;
}

.suggestion-item h4,
.suggestion-item h4 a {
    color: #FFF;
    font-family: var(--rethink-font, "Rethink Sans", sans-serif);
    font-size: 22px;
    font-style: normal;
    font-weight: 400;
    line-height: 181.818%;
    letter-spacing: -0.22px;
    display: block;
}

/* Right: single shared image preview panel */
.suggestions-grid__preview {
    position: sticky;
    top: 20px;
}

.suggestion-preview-panel {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    opacity: 0;
    /* transform: scale(0.97); */
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.suggestion-preview-panel.is-visible {
    opacity: 1;
    transform: scale(1);
}

.suggestion-preview-panel img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-preview-panel img.is-loaded {
    opacity: 1;
}

/* Loader spinner inside preview panel */
.suggestion-preview-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.suggestion-preview-loader.is-active {
    opacity: 1;
}

.suggestion-preview-loader::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}

/* Blog Item Variation */
.suggestion-item.blog-item .suggestion-content {
    background: #9d9d9c;
    aspect-ratio: 1/1;
    padding: 40px 30px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
}

.suggestion-item.blog-item .suggestion-content h3,
.suggestion-item.blog-item .suggestion-content h3 a {
    color: #fff;
    font-family: var(--rethink-font, "Rethink Sans", sans-serif);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
}

@media (max-width: 991px) {
    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .suggestions-grid__preview {
        display: none;
    }
}

@media (max-width: 575px) {
    .suggestions-grid__results {
        grid-template-columns: 1fr;
    }

    .search-suggestions {
        margin-top: 36px;
    }
}

/* ==========================================
   Premium Search Loader
   ========================================== */
.search-loader {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-ring {
    position: relative;
    width: 26px;
    height: 26px;
}

.loader-ring-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.loader-ring-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: loaderSpin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes loaderSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hide search button when loader is active */
.search-btn.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Staggered animation delays handled via inline styles in JS */

/* ==========================================
   No Results State
   ========================================== */
.search-no-results {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.4s ease forwards;
}

.no-results-icon {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.no-results-icon svg {
    width: 64px;
    height: 64px;
    stroke: currentColor;
}

.no-results-text {
    color: #fff;
    font-family: var(--rethink-font, "Rethink Sans", sans-serif);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.no-results-hint {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--rethink-font, "Rethink Sans", sans-serif);
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================
   Hover Effects Enhancement
   ========================================== */

.suggestion-info h3 a,
.suggestion-info p a {
    transition: opacity 0.3s ease;
}

.suggestion-item:hover .suggestion-info h3 a {
    opacity: 0.8;
}

.suggestion-item:hover .suggestion-info p a {
    opacity: 0.8;
}


@media (max-width: 640px) {
    .suggestions-grid.suggestions-grid--code {
        flex-direction: column;
    }
}


@media (max-width: 767px) {
    .fullscreen-search {
        padding: 0 20px;
    }

    .search-box input {
        font-size: 24px;
        padding-right: 40px;
    }

    .search-btn svg {
        width: 22px;
        height: 22px;
    }

    .suggestion-item h4,
    .suggestion-item h4 a {
        font-size: 16px;
    }

}