html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: 100px;
}


.footer {
    position: relative;
    width: 100%;
    white-space: normal;
    line-height: 60px;
}

.grid-group-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
/* Default grid view (ads-grid) */
.ads-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

    .ads-grid .ad-item {
        flex: 1 1 calc(33.333% - 1rem); /* 3 per row with some gap */
        max-width: calc(33.333% - 1rem);
    }

/* List view */
.ads-list {
    display: block;
}

    .ads-list .ad-item {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

        .ads-list .ad-item img.card-img-top,
        .ads-list .ad-item > div.d-flex {
            height: 150px;
            width: 150px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .ads-list .ad-item .card-body {
            display: flex;
            flex-direction: column;
        }


        /* Adjust the card body and image for list view */
        .ads-list .ad-item img.card-img-top {
            border-radius: 0.375rem 0 0 0.375rem; /* rounded-left corners */
        }

        .ads-list .ad-item .card-body {
            padding-left: 1rem;
        }

/* Optional: For smaller screens, stack list items vertically */
@media (max-width: 767px) {
    .ads-list .ad-item {
        flex-direction: column;
    }

        .ads-list .ad-item img.card-img-top,
        .ads-list .ad-item > div.d-flex {
            width: 100%;
            height: auto;
        }

        .ads-list .ad-item .card-body {
            padding-left: 0;
        }
}
.toggle-favorite {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10% 15%;
}

.toggle-favorite:hover {
        background: rgba(255, 255, 255, 1);
}

/* Optional: Add smooth fade-in for appended items */
#adsContainer > .col-md-6, #adsContainer > .col-lg-4 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ads-list .ad-item .card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.scroll-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* Custom styling for filter modal */
#filterModal .modal-content {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.modal-slide-up {
    transform: translateY(100px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-slide-up {
    transform: translateY(0);
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 1rem;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1050;
}

#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
}

#addAdBtn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}
