/* =========================================================
   SEARCH RESULTS PAGE — clean, flat, Google-style list
========================================================= */

.search-page{
    padding:36px 24px 64px;
    max-width:1040px;
    margin:0 auto;
}

/* ---------------------------------------------------------
   Two-column layout: results (left) + related sidebar (right)
--------------------------------------------------------- */

.search-page-layout{
    display:flex;
    align-items:flex-start;
    gap:40px;
}

.search-page-main{
    flex:1 1 auto;
    min-width:0;
    max-width:640px;
}

.search-page-sidebar{
    flex:0 0 300px;
    width:300px;
    position:sticky;
    top:96px;
}

@media (max-width:900px){

    .search-page-layout{
        flex-direction:column;
        gap:28px;
    }

    .search-page-main{
        max-width:100%;
    }

    .search-page-sidebar{
        flex:1 1 auto;
        width:100%;
        position:static;
    }

}

/* ---------------------------------------------------------
   Search bar (reuses the same markup/JS as the homepage bar,
   styled independently here so this page doesn't need to load
   all of home.css just for one component)
--------------------------------------------------------- */

.search-page-form{
    width:100%;
    max-width:600px;
    margin:0 auto 26px;
}

.search-page .sl-search-container{
    position:relative;
    width:100%;
}

.search-page .sl-search-wrapper{
    position:relative;
    width:100%;
    border-radius:999px;
    background:linear-gradient(135deg,#4ade80 0%,var(--home-primary, #16a34a) 100%);
    padding:5px;
    display:flex;
    align-items:center;
    box-shadow:
        0 8px 20px -8px rgba(22,163,74,.45),
        inset 0 1px 0 rgba(255,255,255,.25);
}

.search-page .sl-search-icon{
    color:#ffffff;
    font-size:16px;
    margin-left:14px;
    margin-right:8px;
    flex-shrink:0;
}

.search-page .sl-search-input{
    flex:1;
    min-width:0;
    border:none;
    background:transparent;
    padding:10px 6px;
    font-size:14.5px;
    color:#ffffff;
    font-weight:500;
}

.search-page .sl-search-input::placeholder{
    color:rgba(255,255,255,.8);
}

.search-page .sl-search-input:focus{
    outline:none;
}

.search-page .sl-search-btn{
    width:38px;
    height:38px;
    border-radius:50%;
    background:#ffffff;
    color:var(--home-primary-dark, #128a3e);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
    flex-shrink:0;
    border:none;
    cursor:pointer;
    box-shadow:0 4px 10px rgba(0,0,0,.12);
    transition:.2s;
}

.search-page .sl-search-btn:hover{
    transform:translateX(2px);
    background:#f0fdf4;
}

.search-page .sl-suggestions{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    margin-top:10px;
    background:#fff;
    border:1px solid #e6e9ef;
    border-radius:16px;
    overflow-y:auto;
    overflow-x:hidden;
    max-height:360px;
    box-shadow:0 16px 40px rgba(0,0,0,.12);
    display:none;
    z-index:20;
    text-align:left;
}

.search-page-meta{
    font-size:13.5px;
    color:#70757a;
    margin:0 0 22px;
}

.search-page-meta strong{
    color:#1f2937;
    font-weight:600;
}

/* ---------------------------------------------------------
   Result list
--------------------------------------------------------- */

.search-results-list{
    display:flex;
    flex-direction:column;
}

.search-result{
    padding:14px 0;
    border-bottom:1px solid #f1f3f4;
}

.search-result:first-child{
    padding-top:0;
}

.search-result:last-child{
    border-bottom:none;
}

.search-result-breadcrumb{
    display:block;
    font-size:12.5px;
    color:#4d5156;
    text-decoration:none;
    line-height:1.3;
    margin-bottom:2px;
}

.search-result-breadcrumb:hover{
    text-decoration:underline;
    color:#4d5156;
}

.search-result-path{
    display:block;
    font-size:11.5px;
    color:#94a3b8;
}

.search-result-title{
    display:inline-block;
    font-size:18px;
    line-height:1.35;
    color:#1558d6;
    text-decoration:none;
    font-weight:500;
    margin-bottom:2px;
}

.search-result-title:hover{
    text-decoration:underline;
    color:#1558d6;
}

.search-result-snippet{
    font-size:13.5px;
    line-height:1.55;
    color:#4d5156;
    margin:2px 0 0;
}

@media (max-width:576px){

    .search-result-title{
        font-size:16.5px;
    }

}

/* ---------------------------------------------------------
   Mobile: center everything (search bar, meta line, and
   each result's breadcrumb/title/snippet)
--------------------------------------------------------- */

@media (max-width:768px){

    .search-page{
        padding:28px 16px 56px;
        text-align:center;
    }

    .search-page-meta{
        text-align:center;
    }

    .search-result-breadcrumb,
    .search-result-path,
    .search-result-title,
    .search-result-snippet{
        text-align:center;
    }

}

/* ---------------------------------------------------------
   Empty / no-query states
--------------------------------------------------------- */

.search-state{
    text-align:center;
    padding:64px 20px;
    max-width:420px;
    margin:0 auto;
}

.search-state-icon{
    width:64px;
    height:64px;
    margin:0 auto 18px;
    border-radius:50%;
    background:#f1f5f9;
    color:#94a3b8;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
}

.search-state-title{
    font-size:18px;
    font-weight:700;
    color:#1f2937;
    margin:0 0 8px;
}

.search-state-text{
    font-size:14px;
    color:#64748b;
    line-height:1.55;
    margin:0 0 22px;
}

.search-state-cta{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:var(--home-primary, #16a34a);
    color:#fff;
    font-weight:600;
    font-size:14px;
    padding:.65rem 1.3rem;
    border-radius:10px;
    text-decoration:none;
}

.search-state-cta:hover{
    background:#128a3e;
    color:#fff;
}

/* ---------------------------------------------------------
   Sidebar: "Related Tutorials" card
--------------------------------------------------------- */

.search-related-card{
    background:#fff;
    border:1px solid #e6e9ef;
    border-radius:14px;
    padding:18px;
    box-shadow:0 4px 14px rgba(15,23,42,.04);
}

.search-related-tabs{
    display:flex;
    margin-bottom:14px;
}

.search-related-tab{
    font-size:13px;
    font-weight:700;
    color:var(--home-primary-dark, #128a3e);
    background:#f0fdf4;
    padding:6px 12px;
    border-radius:8px;
    letter-spacing:.2px;
}

.search-related-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
}

.search-related-list li{
    border-bottom:1px solid #f1f3f4;
}

.search-related-list li:last-child{
    border-bottom:none;
}

.search-related-list a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 2px;
    text-decoration:none;
    color:#1f2937;
    font-size:13.5px;
    line-height:1.4;
    transition:.15s;
}

.search-related-list a:hover{
    color:var(--home-primary-dark, #128a3e);
}

.search-related-icon{
    flex-shrink:0;
    font-size:16px;
    width:22px;
    text-align:center;
}

.search-related-name{
    flex:1;
    min-width:0;
}

.search-related-viewall{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #f1f3f4;
    font-size:12.5px;
    font-weight:700;
    color:var(--home-primary, #16a34a);
    text-decoration:none;
}

.search-related-viewall:hover{
    color:var(--home-primary-dark, #128a3e);
}

.search-related-viewall i{
    font-size:11px;
    transition:transform .15s;
}

.search-related-viewall:hover i{
    transform:translateX(3px);
}
