/*DESKTOP*/

@media (min-width: 922px) {
    .search-filters-container {
        padding-right: 24px;
    }
}

/* MOBILE*/
@media (max-width: 544px) {

    .close-btn-mobile-poi {
        top: -70px !important;
        left: -5px !important;
    }


    .gm-style .gm-style-iw-c {
        max-width: 350px !important;
    }

    .map-mobile-img {
        width: 128px !important;
        height: 128px !important;
    }

    .search-result-card-container {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 24px;
        padding: 10px;
        border-radius: 24px;
        border: 1px solid rgba(221, 221, 221, 0.5);
        box-shadow: 0px 1px 10px 5px rgba(0, 0, 0, 0.04);
    }

    .grid-item img {
        height: 138px !important;
        width: 138px !important;
    }

    .search-result-card-thumbnail-container{
        height: 138px !important;
        width: 138px !important;
    }

    .search-result-title{
        margin: 0 !important;
        width: calc(100% - 162px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .responsive-search-title{
        font-size: 31.25px !important;
    }

    .search-searchbox-container{
        width: 100% !important;
    }

    
    .full-screen-columns {
        padding: 12px !important;
    }

}

/*TABLET*/
@media (min-width: 544px) and (max-width: 921px) {

    .search-result-card-container {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 24px;
        padding: 10px;
        border-radius: 24px;
        border: 1px solid rgba(221, 221, 221, 0.5);
        box-shadow: 0px 1px 10px 5px rgba(0, 0, 0, 0.04);
    }
    
    .search-result-card-thumbnail-container{
        height: 184px !important;
        width: 184px !important;
    }

    .grid-item img{
        height: 184px !important;
        width: 184px !important;
    }

    .search-result-title{
        margin: 0 !important;
        width: 72%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .search-searchbox-container{
        width: 80% !important;
    }

}


/*TABLET AND MOBILE*/
@media (max-width: 921px) {
    .search-results-wrapper {
        grid-template-columns: 1fr !important;
        /* 1 column on small screens */
    }

    .search-main-container{
        display: flex !important;
        flex-direction: column !important;
    }

    .search-tab-container{
        justify-content: flex-start !important;
    }

/*     h4{
        font-size: 1.2em !important;
        margin: 20px auto 20px auto;
    } */

    .filter-results-info {
        display: flex;
        justify-content: center;
        gap: 4px;
    }
    
    .filter-results-info .result-counter-target {
        color: #fff;
    }

    /* Full width button when map button is not visible */
    .mobile-button-left.full-width {
        width: 100% !important;
    }

    /* Ensure the button takes up the full width */
    .mobile-button-left.full-width a {
        display: block;
        width: 100%;
        text-align: center;
    }

    .search-form {
        width: 100% !important;
    }

    .search-filters-rating-row{
        display: flex !important;
    }    
    
    .search-filters-order-row{
        display: flex !important;
        flex-direction: column;
        margin-top: 32px;
        margin-bottom: 160px;
    }


    /*Button for routes*/
    .mobile-footer-button-single {
        justify-content: center !important;
        align-items: center !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 9000;
        padding: 0;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
    }

    
    .mobile-footer-buttons {
        display: flex !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 10;
        padding: 0;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
    }

    .mobile-footer-buttons button {
        all:unset;
        width: 50%;
        margin: 0;
        padding: 24px;
        font-size: 16px;
        border-right: 1px solid #ccc;
        text-align: center;
    }

    .mobile-footer-buttons button a {
        color: #fff;
    }

    .search-filters-container,
    .search-order-map-container {
        display: none !important;
    }

    #container-filtri{
        margin-top: 32px !important;
    }

    /* Filters header */

    .full-screen-columns {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        z-index: 1000;
        padding: 20px;
        margin: 0;
        border: none;
        text-align: center;
        background: #fff;
    }

    .close i {
        font-size: 20px;
        color: #000;
    }

    .search-results-wrapper {
        grid-template-columns: 1fr !important;
        /* 1 column on mobile screens */
    }

    .search-heading-searchbox-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-tab-order-map-container {
        flex-direction: column;
        gap: 20px;
        margin-top: 32px !important;
    }

    .search-results-filters-container {
        flex-direction: column;
        min-width: 100%;
    }

    #search-results {
        width: 100%;
        display: block !important; /* Ensure search results are always visible */
    }
    
    /* Make sure the search results container is visible */
    .search-results-container {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
    }

    .map-modal-dimensions {
        width: 100%;
        height: 100%;
    }

    #map {
        width: 100%;
        height: 80%;
    }



    /* Button Apply Filters */

    .apply-filters-container {
        display: block !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        padding: 24px;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
        text-align: center;
    }

    .apply-filters-container a {
        color: #fff;
    }
    
    /* Style for the filter count in the mobile button */
    .filter-count {
        display: inline-block;
        font-weight: bold;
        color: #fff;
    }

    .refine-search h3 {
        text-align: left;
        margin: -30px auto 20px auto;
    }

    /* Hide the desktop close button by default */
    .close-btn {
        display: none;
    }  
    
    /* Only show the desktop close button on larger screens */
    @media (min-width: 768px) {
        #closeModalBtn.close-btn {
            display: none; /* Initially hidden, will be shown via JS when needed */
        }
    }
    
    /* Ensure it's always hidden on mobile */
    @media (max-width: 767px) {
        #closeModalBtn.close-btn,
        .search-tags-wrapper {
            display: none !important; /* Force hide on mobile regardless of JS */
        }
    }

    /*Map Modal Close button mobile */
         #closeModalBtnMobile {
            position: absolute;
            top: 10px;
            left: 5px;
            text-align: center;
            font-size: 16px;
            color: #000;
            cursor: pointer;
            z-index: 1501;
            background-color: #fff;
            padding: 10px;
            border-radius: 30px;
            border: 1px solid #ccc; 
        } 

        .go-to-filters-mobile {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            z-index: 9000;
            padding: 24px;
            color: #fff;
            margin: 0;
            border-radius: 0 !important;
            font-size: 1em !important;
            border: none;
            background: var(--ast-global-color-8);
            text-align: center;
            align-items: center;
            justify-content: center;
        }

        .search-filters-accessibility-container, .search-filters-rating-container{
            margin-top: 32px !important;
        }


    /* End Mobile/Tablet */

}


.search-main-container{
    position: relative;
}

.search-heading-searchbox-container {
    display: flex;
    width: 100%;
    gap: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 68px;
}

.search-heading-container {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 50%;
}

.search-searchbox-container {
    display: flex;
    justify-content: center;
    width: 60%;
    height: 50%;
}

.search-tab-order-map-container {
    display: flex;
    justify-content: space-between;
    margin: 64px 0 24px 0;
}

.search-results-filters-container {
    display: flex;
    width: 100%;
    margin-top: 64px;
}

@media (max-width: 544px) {
    .search-results-filters-container-events {
        margin-top: 4px !important;
    }
}

.search-results-container {
    width: 75%;
}

.search-tags-wrapper {
    width: 100%;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.search-filters-categories-container{
    margin-top: 64px;
}

.search-filters-categories-inner-container{
    margin-top: 16px;
}

.search-filters-checkboxes-radio, .search-filters-rating-row, .search-filters-accessibility-row{
    margin-bottom: 16px;

}

.search-filters-rating-row, .search-filters-accessibility-row{
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filters-checkboxes-radio{
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filters-inner-container{
    margin-top: 16px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.search-filters-rating-container{
    margin-top: 64px;
}


.search-filters-container {
    width: 25%;
}


.search-filters-accessibility-container {
    display: flex;
    flex-direction: column;
    margin-top: 64px;
}

.search-results-wrapper {
    width: 100%;
}

.search-result-card-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.search-result-card-thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.openMapBtn:hover{
    color: var(--diocesi-global-color-grey);
}

.search-result-card-thumbnail {
    width: 100%;
    border-radius: 8px;
}

.search-result-title{
    margin-top: 16px;
}

.search-result-locality{
    margin-top: 8px;
    width: 100%;
    font-size: 16px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.search-result-card-favorite-container {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;

}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.search-icon {
    position: absolute;
    left: 10px;
    font-size: 18px;
    color: var(--diocesi-global-color-text);
    margin-left: 4px;
}

.search-result-rating{
    margin-top: 8px;
}

.search-icon:hover {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.search-icon:focus {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.clear-icon {
    font-size: 18px;
    color: var(--diocesi-global-color-accent);
}

.clear-icon:hover {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.clear-icon:focus {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

#searchbox {
    /*
    padding-left: 50px;
    font-size: 16px;
    border-radius: 39px;
    height: 50px;
    background-color: #f2f2f2;
    */
    border: none;
}

#search-icon-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#clear-icon-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
    height: 35px;
    width: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--diocesi-global-color-sand);
    border-radius: 50%;
}

.search-tab-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.search-order-map-container {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

.order-icon-map-container{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50% !important;
    font-weight: 500 !important;
}

.order-icon-select-container{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50% !important;
    font-weight: 500 !important;
}

.search-filters-label{
    font-size: 16px;
    font-weight: 300;
}

#ordina {
    all: unset;
}

.ordering-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
}

.tab-element {
    display: flex;
    justify-content: center;
}


.bold-link {
    font-weight: 700;
}

.bold-link a:hover{
    color: var(--diocesi-global-color-black) !important;
    font-weight: 700;
}

.hidden-div {
    display: none;
}


#search-results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 96px;
}

#pagination-controls {
    margin-top: 56px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-btn, .pagination-btn-default-search {
    color: #333333;
    background: #fff;
    font-weight: 500;
    font-size: 18px;
    line-height: 100%;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none !important;
}

.pagination-btn:hover{
    border-radius: 50%;
    background: var(--diocesi-global-color-gray) !important;
    background-color: var(--diocesi-global-color-gray) !important;
}

.pagination-btn.active {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #EC720F;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Remove padding to prevent distortion */
}

.pagination-ellipsis {
    margin: 10px 5px;
    color: #333333;
    font-weight: 500;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/*Modal styles*/
#mapModal,
#filtersModal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    width: 100vw;
    height: 100vh;
    min-height: 150vh;
    padding-top: 160px;
}

.map-modal-dimensions {
    width: 100%;
    height: 100%;
}

#mapModal.active,
#filtersModal.active {
    display: flex;
}

#map {
    width: 100%;
    height: 100%;
    background: #fff;
}



#mapModal.active {
    display: block;
}

.map-modal-content {
    display: flex;
    height: 100%;
    padding-top: 0px; /* Space for the close button */
}

/* Desktop Layout */
@media (min-width: 922px) {

    /* Map Modal Styles */
#mapModal {
    display: none;
    position: fixed;
    top: 0;
    left: 20vw;
    width: 80vw;
    height: 100vh;
    background: #fff;
    z-index: 1000;
}


 /*   .map-sidebar {
        width: 300px;
        background: #fff;
        padding: 20px;
        overflow-y: auto;
        border-right: 1px solid #ddd;
        opacity: 0.1;
    }*/

    .map-filters {
        padding: 15px;
 
    }

    .map-filters h3 {
        margin-bottom: 20px;
        font-size: 1.2em;
    }

    .map-modal-dimensions {
        flex: 1;
        height: 100%;
    } 


    .container-filtri-full {
        width: 20vw;
        height: 100vh;
        overflow-y: auto;
        position: fixed;
        z-index: 99999;
        background: #fff;
        top: 0;
        margin: 0px;
        padding: 16px;
        left: 0 !important;
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
}

.modal-column-1 {
    width: 20%;
    height: 100%;
    background: #fff;
}

.modal-filters {
    margin: 30px;
    padding: 10px;
}

/* End modal */

.current-category {
    padding: 5px 20px;
    background: #F5F5F5;
    color: var(--diocesi-global-color-grey);
    border: 1px solid #6A6A6A;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-all-filters{
    display: flex;
    align-items: center;
}

.remove-all-filters a{
    text-decoration: underline;
}

.deactivate-container{
    display: none !important;
}


/* Filter bar */
.activate-filter-bar {
    display: flex !important;
    margin: 0;
    width: 100%;
    height: 100%;
}

.activate-search-filters-container {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
}


.result-counter-target {
    display: flex;
    align-items: flex-end;
}

.close-btn-single {
    display: flex;
    cursor: pointer;
    font-size: 20px;    
}

.close-btn-single-rating{
    display: flex;
    cursor: pointer;
    font-size: 20px;    
}

.close-btn-single-accessibility{
    display: flex;
    cursor: pointer;
    font-size: 20px;    
}

.close-btn{
    height: 95px;
    align-items: center;
    gap: 16px;
    font-size: 20px;  
    cursor: pointer;  
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.close-btn a{
    display: flex;
    font-size: 20px;    
}
    
.gm-style{
    font-family: inherit !important;
}

.gm-style .gm-style-iw-c {
    border-radius: 24px !important;
    padding-bottom: 12px !important;
}

.gm-style .gm-style-iw-d{
    overflow: hidden !important;
}

.search-filters-order-radio-container{
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.search-filters-order-radio-row{
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-counter-claim{
    color: var(--diocesi-global-color-white);
}

.mobile-fixed-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 16px !important;
}

.refine-search-clear-filter-container{
    display: flex;
    justify-content: space-between;
}

.close-filter-mobile-icon-container{
    display: flex;
    justify-content: flex-end;
    font-size: 20px;
}

.dmc-search-routes-category{
font-weight: 325;
font-size: 16px;
line-height: 24px;
color: #000000;
/* margin: 16px 0 4px; */
margin-bottom: 8px;
min-height: 24px;
}


.label-see-results{
    padding-right: 4px;
}

.card-thumb-itinerario, .card-thumb-tribe-events {
    height: 270px !important;
}