/* =========================================================
   SEARCH.CSS
   SEARCH HEADER + SEARCH RESULTS PAGE
========================================================= */


/* =========================================================
   01. HEADER SEARCH
========================================================= */

.header-search {
    position: relative;
    order: 3;
}


/* =========================================================
   02. SEARCH TOGGLE
========================================================= */

.header-search .search-toggle {
    width: 43px;
    height: 43px;

    padding: 0;
    border: 0;
    border-radius: 8px;

    background: #0868e8;
    color: #fff;

    display: grid;
    place-items: center;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.header-search .search-toggle:hover {
    background: #075bc9;
}


/* =========================================================
   03. HEADER SEARCH FORM
========================================================= */

.header-search .search-form {
    position: absolute;

    top: calc(100% + 15px);
    left: 0;

    width: 360px;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px;

    background: #fff;

    border: 1px solid #e8e8e8;
    border-radius: 10px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 10001;

    box-sizing: border-box;
}


/* =========================================================
   04. OPEN HEADER SEARCH
========================================================= */

.header-search.active .search-form {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}


/* =========================================================
   05. HEADER SEARCH INPUT
========================================================= */

.header-search .search-form input[type="search"] {
    flex: 1;

    width: 100%;
    min-width: 0;

    height: 43px;

    padding: 0 14px;

    border: 1px solid #ddd;
    border-radius: 7px;

    background: #fff;
    color: #10213b;

    font-size: 15px;

    outline: none;

    box-sizing: border-box;
}

.header-search .search-form input[type="search"]::placeholder {
    color: #999;
}

.header-search .search-form input[type="search"]:focus {
    border-color: #0868e8;
}


/* =========================================================
   06. HEADER SEARCH SUBMIT
========================================================= */

.header-search .search-form button[type="submit"] {
    flex: 0 0 auto;

    height: 43px;

    padding: 0 18px;

    border: 0;
    border-radius: 7px;

    background: #0868e8;
    color: #fff;

    font-size: 15px;

    cursor: pointer;

    white-space: nowrap;

    transition: background 0.2s ease;

    box-sizing: border-box;
}

.header-search .search-form button[type="submit"]:hover {
    background: #075bc9;
}


/* =========================================================
   07. SEARCH PAGE
========================================================= */

.search-page {
    padding: 40px 0 70px;

    box-sizing: border-box;
}


/* =========================================================
   08. SEARCH PAGE ROW
========================================================= */

.search-page .row {
    align-items: flex-start;
}


/* =========================================================
   09. SEARCH HEADING
========================================================= */

.search-heading {
    margin-bottom: 30px;
}

.search-heading h1 {
    margin: 0;

    color: #10213b;

    font-size: 30px;
    font-weight: 700;

    line-height: 1.5;
}

.search-heading h1 span {
    color: #0868e8;
}


/* =========================================================
   10. SEARCH ITEMS
========================================================= */

.search-items {
    width: 100%;

    box-sizing: border-box;
}


/* =========================================================
   11. SEARCH ITEM
   DESKTOP:
   IMAGE 3 PARTS + CONTENT 9 PARTS
========================================================= */

.search-item {
    display: grid;

    grid-template-columns: 3fr 9fr;

    gap: 25px;

    width: 100%;

    margin-bottom: 25px;
    padding: 20px;

    background: #fff;

    border: 1px solid #e8edf3;
    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.search-item:hover {
    transform: translateY(-2px);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   12. SEARCH ITEM IMAGE
========================================================= */

.search-item-image {
    width: 100%;
    height: 190px;

    overflow: hidden;

    border-radius: 10px;

    background: #f1f4f8;

    box-sizing: border-box;
}

.search-item-image a {
    display: block;

    width: 100%;
    height: 100%;
}

.search-item-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.search-item:hover .search-item-image img {
    transform: scale(1.03);
}


/* =========================================================
   13. NO IMAGE
========================================================= */

.search-no-image {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    background: #f1f4f8;
    color: #9aa5b1;

    font-size: 35px;
}


/* =========================================================
   14. SEARCH ITEM CONTENT
========================================================= */

.search-item-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    box-sizing: border-box;
}


/* =========================================================
   15. POST TYPE
========================================================= */

.search-item-type {
    display: inline-block;

    width: fit-content;

    margin-bottom: 8px;
    padding: 4px 10px;

    background: #eef5ff;
    color: #0868e8;

    border-radius: 5px;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   16. SEARCH ITEM TITLE
========================================================= */

.search-item-title {
    margin: 0 0 10px;

    font-size: 22px;
    line-height: 1.5;

    word-break: break-word;
}

.search-item-title a {
    color: #10213b;

    text-decoration: none;

    transition: color 0.2s ease;
}

.search-item-title a:hover {
    color: #0868e8;
}


/* =========================================================
   17. SEARCH ITEM EXCERPT
========================================================= */

.search-item-excerpt {
    margin: 0 0 15px;

    color: #667085;

    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   18. SEARCH ITEM META
========================================================= */

.search-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding-top: 12px;

    border-top: 1px solid #edf0f3;

    color: #8a94a3;

    font-size: 13px;
}

.search-item-meta span {
    display: flex;
    align-items: center;

    gap: 6px;
}

.search-item-meta i {
    color: #0868e8;
}


/* =========================================================
   19. READ MORE
========================================================= */

.search-read-more {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: #0868e8;

    text-decoration: none;

    font-weight: 600;

    transition: color 0.2s ease;
}

.search-read-more:hover {
    color: #075bc9;
}


/* =========================================================
   20. SEARCH SIDEBAR
========================================================= */

.search-sidebar {
    width: 100%;

    position: sticky;
    top: 30px;

    box-sizing: border-box;
}


/* =========================================================
   21. SIDEBAR WIDGET
========================================================= */

.search-sidebar-widget {
    margin-bottom: 25px;
    padding: 20px;

    background: #fff;

    border: 1px solid #e8edf3;
    border-radius: 12px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;
}


/* =========================================================
   22. SIDEBAR TITLE
========================================================= */

.search-sidebar-widget h3 {
    margin: 0 0 18px;

    padding-bottom: 12px;

    border-bottom: 1px solid #edf0f3;

    color: #10213b;

    font-size: 18px;
    font-weight: 700;
}


/* =========================================================
   23. SIDEBAR SEARCH FORM
========================================================= */

.search-sidebar .search-form {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 8px;
}

.search-sidebar .search-form input[type="search"] {
    flex: 1;

    min-width: 0;

    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 7px;

    background: #fff;
    color: #10213b;

    font-size: 14px;

    outline: none;

    box-sizing: border-box;
}

.search-sidebar .search-form input[type="search"]::placeholder {
    color: #999;
}

.search-sidebar .search-form input[type="search"]:focus {
    border-color: #0868e8;
}


/* =========================================================
   24. SIDEBAR SEARCH BUTTON
========================================================= */

.search-sidebar .search-form button {
    flex: 0 0 43px;

    width: 43px;
    height: 43px;

    padding: 0;

    border: 0;
    border-radius: 7px;

    background: #0868e8;
    color: #fff;

    display: grid;
    place-items: center;

    font-size: 15px;

    cursor: pointer;

    transition: background 0.2s ease;
}

.search-sidebar .search-form button:hover {
    background: #075bc9;
}


/* =========================================================
   25. SEARCH CATEGORIES
========================================================= */

.search-categories {
    margin: 0;
    padding: 0;

    list-style: none;
}

.search-categories li {
    margin: 0;

    border-bottom: 1px solid #edf0f3;
}

.search-categories li:last-child {
    border-bottom: 0;
}

.search-categories li a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 10px 0;

    color: #475467;

    text-decoration: none;

    font-size: 14px;

    transition:
        color 0.2s ease,
        padding-right 0.2s ease;
}

.search-categories li a:hover {
    padding-right: 5px;

    color: #0868e8;
}


/* =========================================================
   26. CATEGORY COUNT
========================================================= */

.search-categories .count {
    color: #98a2b3;

    font-size: 12px;
}


/* =========================================================
   27. PAGINATION
========================================================= */

.search-pagination {
    margin-top: 35px;

    text-align: center;
}

.search-pagination ul {
    margin: 0;
    padding: 0;

    list-style: none;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    flex-wrap: wrap;
}

.search-pagination li {
    margin: 0;
}

.search-pagination a,
.search-pagination span {
    min-width: 40px;
    height: 40px;

    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e1e6ec;
    border-radius: 7px;

    background: #fff;
    color: #475467;

    text-decoration: none;

    font-size: 14px;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.search-pagination a:hover {
    background: #0868e8;
    border-color: #0868e8;

    color: #fff;
}

.search-pagination .current {
    background: #0868e8;
    border-color: #0868e8;

    color: #fff;
}


/* =========================================================
   28. NO RESULTS
========================================================= */

.search-no-results {
    padding: 60px 30px;

    background: #fff;

    border: 1px solid #e8edf3;
    border-radius: 12px;

    text-align: center;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;
}

.search-no-results-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #eef5ff;
    color: #0868e8;

    font-size: 28px;
}

.search-no-results h2 {
    margin: 0 0 10px;

    color: #10213b;

    font-size: 24px;
}

.search-no-results p {
    margin: 0 0 25px;

    color: #667085;

    font-size: 15px;
    line-height: 1.8;
}

.search-no-results p strong {
    color: #0868e8;
}


/* =========================================================
   29. HOME BUTTON
========================================================= */

.search-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 43px;

    padding: 0 22px;

    border-radius: 7px;

    background: #0868e8;
    color: #fff;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    box-sizing: border-box;

    transition: background 0.2s ease;
}

.search-home-button:hover {
    background: #075bc9;
    color: #fff;
}


/* =========================================================
   30. DESKTOP
   992px AND ABOVE

   9 COLUMNS CONTENT
   3 COLUMNS SIDEBAR
========================================================= */

@media (min-width: 992px) {

    .search-page .row {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;

        margin-left: -12px;
        margin-right: -12px;
    }


    /* =====================================
       SEARCH CONTENT
       9 / 12
    ===================================== */

    .search-page .col-lg-9 {
        flex: 0 0 75%;
        max-width: 75%;

        padding-left: 12px;
        padding-right: 12px;

        box-sizing: border-box;
    }


    /* =====================================
       SIDEBAR
       3 / 12
    ===================================== */

    .search-page .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;

        padding-left: 12px;
        padding-right: 12px;

        box-sizing: border-box;
    }


    /* =====================================
       SIDEBAR
    ===================================== */

    .search-sidebar {
        position: sticky;
        top: 30px;

        width: 100%;
    }


    /* =====================================
       IMAGE
    ===================================== */

    .search-item-image {
        height: 190px;
    }

}


/* =========================================================
   31. TABLET
   768px - 991px
========================================================= */

@media (min-width: 768px) and (max-width: 991px) {

    /* =====================================
       HEADER SEARCH
    ===================================== */

    .header-search {
        order: 3;
    }

    .header-search .search-form {
        position: absolute;

        left: auto;
        right: 0;

        width: 360px;
    }


    /* =====================================
       SEARCH PAGE
    ===================================== */

    .search-page {
        padding: 35px 15px 60px;
    }


    /* =====================================
       SEARCH ITEM
    ===================================== */

    .search-item {
        grid-template-columns: 3fr 9fr;

        gap: 18px;

        padding: 15px;
    }


    .search-item-image {
        height: 170px;
    }


    .search-item-title {
        font-size: 19px;
    }


    /* =====================================
       SIDEBAR
    ===================================== */

    .search-sidebar {
        position: static;

        margin-top: 30px;
    }

}


/* =========================================================
   32. MOBILE
   BELOW 768px
========================================================= */

@media (max-width: 767px) {

    /* =====================================
       HEADER SEARCH
    ===================================== */

    .header-search {
        order: 3;
    }

    .header-search .search-form {
        position: fixed;

        top: 75px;

        left: 15px;
        right: 15px;

        width: auto;

        z-index: 10001;
    }


    /* =====================================
       SEARCH PAGE
    ===================================== */

    .search-page {
        width: 100%;

        padding: 30px 15px 50px;

        box-sizing: border-box;
    }


    /* =====================================
       SEARCH CONTAINER
       KEEP MOBILE WIDTH CONTROLLED
    ===================================== */

    .search-page > .container {
        width: 100%;

        padding-left: 0;
        padding-right: 0;

        margin-left: auto;
        margin-right: auto;

        box-sizing: border-box;
    }


    /* =====================================
       SEARCH ROW
    ===================================== */

    .search-page .row {
        width: 100%;

        margin-left: 0;
        margin-right: 0;

        box-sizing: border-box;
    }


    /* =====================================
       COLUMNS
    ===================================== */

    .search-page .col-lg-9,
    .search-page .col-lg-3 {
        width: 100%;
        max-width: 100%;

        padding-left: 0;
        padding-right: 0;

        box-sizing: border-box;
    }


    /* =====================================
       HEADING
    ===================================== */

    .search-heading {
        width: 100%;

        margin-bottom: 20px;
    }

    .search-heading h1 {
        margin: 0;

        font-size: 24px;
        line-height: 1.5;
    }


    /* =====================================
       RESULTS
    ===================================== */

    .search-items {
        width: 100%;
    }


    /* =====================================
       SEARCH ITEM
       MOBILE = ONE COLUMN
    ===================================== */

    .search-item {
        display: grid;

        grid-template-columns: 1fr;

        width: 100%;

        gap: 12px;

        margin-bottom: 15px;
        padding: 12px;

        box-sizing: border-box;
    }


    /* =====================================
       IMAGE
    ===================================== */

    .search-item-image {
        width: 100%;

        height: 165px;

        overflow: hidden;

        border-radius: 9px;

        box-sizing: border-box;
    }

    .search-item-image img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }


    /* =====================================
       CONTENT
    ===================================== */

    .search-item-content {
        width: 100%;

        min-width: 0;

        box-sizing: border-box;
    }


    /* =====================================
       POST TYPE
    ===================================== */

    .search-item-type {
        margin-bottom: 7px;

        padding: 4px 9px;

        font-size: 12px;
    }


    /* =====================================
       TITLE
    ===================================== */

    .search-item-title {
        margin: 0 0 8px;

        font-size: 19px;
        line-height: 1.6;

        word-break: break-word;
    }


    /* =====================================
       EXCERPT
    ===================================== */

    .search-item-excerpt {
        margin-bottom: 12px;

        font-size: 14px;

        line-height: 1.7;
    }


    /* =====================================
       META
    ===================================== */

    .search-item-meta {
        display: flex;

        flex-direction: column;

        align-items: flex-start;
        justify-content: flex-start;

        gap: 5px;

        padding-top: 10px;
    }


    /* =====================================
       SIDEBAR
    ===================================== */

    .search-sidebar {
        position: static;

        width: 100%;

        margin-top: 25px;
    }


    /* =====================================
       SIDEBAR WIDGET
    ===================================== */

    .search-sidebar-widget {
        width: 100%;

        box-sizing: border-box;
    }


    /* =====================================
       NO RESULTS
    ===================================== */

    .search-no-results {
        width: 100%;

        padding: 45px 20px;

        box-sizing: border-box;
    }


    /* =====================================
       PAGINATION
    ===================================== */

    .search-pagination {
        width: 100%;

        margin-top: 25px;
    }

}


/* =========================================================
   33. SMALL MOBILE
   BELOW 480px
========================================================= */

@media (max-width: 480px) {

    /* =====================================
       HEADER SEARCH
    ===================================== */

    .header-search .search-form {
        top: 70px;

        left: 10px;
        right: 10px;

        padding: 8px;

        box-sizing: border-box;
    }


    .header-search .search-form input[type="search"] {
        font-size: 14px;
    }


    .header-search .search-form button[type="submit"] {
        padding: 0 14px;

        font-size: 14px;
    }


    /* =====================================
       SEARCH PAGE
    ===================================== */

    .search-page {
        padding: 25px 12px 45px;
    }


    /* =====================================
       HEADING
    ===================================== */

    .search-heading {
        margin-bottom: 18px;
    }

    .search-heading h1 {
        font-size: 21px;

        line-height: 1.5;
    }


    /* =====================================
       SEARCH ITEM
    ===================================== */

    .search-item {
        gap: 10px;

        margin-bottom: 12px;

        padding: 10px;
    }


    /* =====================================
       IMAGE
    ===================================== */

    .search-item-image {
        height: 145px;

        border-radius: 8px;
    }


    /* =====================================
       TITLE
    ===================================== */

    .search-item-title {
        font-size: 18px;

        line-height: 1.6;
    }


    /* =====================================
       EXCERPT
    ===================================== */

    .search-item-excerpt {
        font-size: 13px;

        line-height: 1.7;
    }


    /* =====================================
       META
    ===================================== */

    .search-item-meta {
        gap: 4px;

        margin-top: 6px;
    }


    /* =====================================
       SIDEBAR
    ===================================== */

    .search-sidebar {
        margin-top: 20px;
    }

    .search-sidebar-widget {
        padding: 15px;
    }


    /* =====================================
       NO RESULTS
    ===================================== */

    .search-no-results {
        padding: 35px 15px;
    }


    /* =====================================
       PAGINATION
    ===================================== */

    .search-pagination {
        margin-top: 20px;
    }

    .search-pagination ul {
        gap: 5px;
    }

    .search-pagination a,
    .search-pagination span {
        min-width: 36px;
        height: 36px;

        padding: 0 9px;

        font-size: 13px;

        box-sizing: border-box;
    }

}