#page-search {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#stacks_out_33_page10, #stacks_in_33_page10 {
    width: 100%;
    display: flex;
    flex: 1;
}

#stacks_in_35_page10 {
    flex: 1;
    width: 100%;
}

.search-banner {
    height: 460px;
    margin-bottom: 0;
    text-shadow: 0 0 50px rgba(0, 0, 0, 1.00), 0 20px 50px rgba(0, 0, 0, 1.00);
    background-image: url('../../images/backgrounds/Search_yellow-blue_eye.jpg');
    background-size: cover;
    background-position: center;
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 7%;
}

.search-banner >div{
    width: 100%;
    max-width: 600px;
}
.search-banner h2 {
    font-weight: bold;
    color: #FCAF18;
    font-size: 40px;
    max-width: 800px;
    text-align: left;
    width: 100%;
}
.search-banner p{
    color: #fff;
    font-weight: 500;
    font-size: 18px;
    margin-top: 30px;
}
.search-banner form{
    width: 100%;
    max-width: 360px;
}

@media screen and (max-width: 770px) {
    .search-banner {
        height: 400px;
        padding: 30px;
    }
}

/* Reset layout structure */
.depth_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.content_out {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.content_flex {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 30px !important;
    box-sizing: border-box; 
}

/* Completely remove the problematic sidebar */
.depth_aside {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Center search results container */
#search-result {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    color: #fff;
    box-sizing: border-box; 
}

#search-result h4 {
    margin-top: 36px;
    margin-bottom: 36px;
    text-align: left;
}

/* Create two-column layout for search results */
.search-result-item {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    overflow: visible; 
}

.search-result-item li {
    break-inside: avoid;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box; 
    width: 100%; 
}


@media screen and (max-width: 992px) {
    .search-result-item {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .search-result-item li {
        padding: 15px;
    }
    
    .search-result-item a, .search-result-item p {
        font-size: 14px;
    }
}

@media screen and (max-width: 820px) {
    .search-result-item {
        grid-template-columns: 1fr;
    }
    
    .content_flex {
        padding: 0 20px !important;
    }
}

@media screen and (max-width: 768px) {
    .search-result-item {
        grid-template-columns: 1fr;
    }
}

.search-result-item mark {
    background-color: unset;
    color: #ffc107;
    font-weight: bold;
}

.search-result-item a:hover {
    text-decoration: underline;
}

.search-result-item p {
    margin-top: 6px;
    max-width: 100%; 
}

.search-result-item a {
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

.content_tint {
    pointer-events: none;
}

/* Override any existing styles that might be causing the shift */
.depth_in {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.depth_section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure consistent alignment for heading */
.heading_out, .heading_in {
    text-align: center;
}

/* Force container to be centered */
.depth_out {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

@media screen and (max-width: 768px) {
    /* Search Banner */
    .search-banner {
        height: auto;
        min-height: 300px;
        padding: 2rem 1rem;
    }

    .search-banner h2 {
        font-size: 28px;
        line-height: 1.3;
    }

    .search-banner p {
        font-size: 16px;
        margin-top: 1rem;
    }

    .search-banner form {
        width: 100%;
        max-width: 100%;
    }

    /* Search Results */
    #search-result {
        padding: 1rem;
    }

    #search-result h4 {
        font-size: 20px;
        margin-bottom: 1.5rem;
    }

    .search-result-item {
        padding: 0;
    }

    .search-result-item li {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .search-result-item a {
        font-size: 14px;
        word-break: break-word;
    }

    .search-result-item p {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Layout Structure */
    .content_flex {
        padding: 0 15px !important;
    }

    .depth_wrapper {
        padding: 1rem 0;
    }

    .depth_aside {
        display: none;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 480px) {
    .search-banner h2 {
        font-size: 24px;
    }

    .search-banner p {
        font-size: 14px;
    }

    #searchBoxstacks_in_2_page17 {
        display: flex;
    }

    #searchBoxstacks_in_2_page17 input {
        flex: 1;
        font-size: 14px;
    }

    #searchBoxstacks_in_2_page17 button {
        padding: 0 10px;
    }
}
