.border-right {
    border-right: 3px solid #000; /* Right border */
}
.card-img-top {
    width: 100%; /* Make it responsive to the parent container */
    aspect-ratio: 1 / 1; /* Enforce a square shape */
    overflow: hidden; /* Hide overflow */
    display: flex; /* Enable flexbox for alignment */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    border-radius:25px;
    grid-row: 1 / span 4;
    grid-column: 1 / 2;
}

.card-img-top img {
    width: 100%; /* Stretch image to fill container */
    height: 100%; /* Stretch height */
    object-fit: cover; /* Cover the entire container */
    object-position: center; /* Center the image */
    display: block; /* Remove any extra spacing */
}

.filter-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

/* Sidebar filter */
.filter-sidebar.open {
    right: 0;
}

.filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    display: none;
    pointer-events: none; /* Allow clicks to pass through when not shown */
}

.filter-backdrop.show {
    display: block;
    pointer-events: auto; /* Block clicks when shown */
}

.tous-les-filtres{
    font-size: 1.2rem;
}

.filter-toggle-btn {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
    gap: 8px;
    display: flex;
    align-items: center;
    color: #333;
}

.filter-toggle-btn i {
    font-size: 1.2rem;
    margin-right: 8px;
}

.filter-body .form-check-label {
    font-size: 0.95rem;
    padding-left: 4px;
}

.filter-body .form-check {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.filter-body .collapse {
    padding-left: 2px;
}

.filter-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 1rem 0;
}

/*******************************************************************  map selected city */

#map {
    height: 200px;
    width: 100%;
}
#mapPopup {
    position: absolute; /* Make it float */
    top: 50px; /* Adjust this value as needed */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    background: #fff;
    border: 1px solid #ddd;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 2;
    display: none; /* Hide initially */
    width: 95%;
    max-width: 600px;
    color: black;
}

#villeSearchWrapper {
    position: relative;
}

#cityList {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#cityList li {
    padding: 10px;
    cursor: pointer;
}

#cityList li:hover {
    background-color: #f1f1f1;
}


.no-results-container {
    display: flex; /* Use flexbox for centering */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    height: 60vh; /* Set a height for the container */
    max-width: 60vw; /* Set a maximum width for the container */
    width: 100%; /* Ensure the container takes full width */
    text-align: center; /* Center text */
    padding: 20px; /* Add some padding to the container */
    box-sizing: border-box; /* Include padding in the element's total width and height */
    overflow: hidden; /* Prevent overflow */
    margin: 0 auto; /* Center the container horizontally */
}

.no-results-image {
    max-width: 100%; /* Ensure the image does not exceed the container's width */
    height: auto; /* Maintain aspect ratio */
    max-height: 300px; /* Set a maximum height for the image */
    object-fit: contain; /* Ensure the image fits within the container without cropping */
    margin-bottom: 20px; /* Space between image and heading */
}

.no-results-text {
    margin-top: 20px; /* Additional space above the text if needed */
}

/* Ensure header dropdown is above filter backdrop */
header.page-header .dropdown-menu {
    z-index: 1051 !important;
}

/* Fix visibility issue - ensure dropdown menu is visible when shown */
header.page-header .dropdown-menu.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Layout width adjustments for formations catalog */
.catalog-page .container {
    max-width: 1200px;
}

@media (max-width: 991.98px) {
    .catalog-page .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Catalog Search and Filter Buttons - Match input height and responsive */
.catalog-search-btn,
.catalog-filter-btn {
    height: 3.25rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: normal;
    text-align: center;
    box-sizing: border-box !important; /* Include padding in width calculation */
    max-width: 100%; /* Do not exceed container */
}

/* Align catalog inputs to the same height as buttons (scoped to this page) */
#searchForm .form-control-lg {
    height: 3.25rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.2;
}

/* Prevent text overflow inside catalog buttons */
.catalog-search-btn span,
.catalog-filter-btn span {
    white-space: normal;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

/* Ensure buttons match input styling on all screen sizes */
@media (max-width: 767.98px) {
    .catalog-search-btn,
    .catalog-filter-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Icon spacing inside catalog buttons */
.catalog-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* View toggle buttons spacing and alignment */
.catalog-view-toggle .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.catalog-view-toggle .btn + .btn {
    margin-left: 0.5rem;
}

/* Map view specific styles */
#map2 {
    height: 600px;
    width: 100%;
    z-index: 1;
    border: 12px solid rgb(255, 255, 255);
    box-shadow: 0 2px 8px rgba(80,60,120,0.07);
}