body {
    font-family: "Plus Jakarta Sans", "Sans-Serif";
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    -webkit-text-size-adjust: 100%; /* Prevent iOS from arbitrarily inflating text size */
}

html,
body {
    height: 100%;
    margin: 0;
}

.container {
    flex: 1;
    /* max-height: 160px;
    padding-bottom: 2rem; */
}

/*Navbar */
nav {
    position: sticky !important;
    top: 0 !important;
}

.navbar {
    height: 5rem;
    background-color: white;

}

.navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .fa-compass{
    color: #fe424d;
    font-size: 2rem;
} */
.fa-route {
    color: #5FB1E9;
    font-size: 2rem;
}

.logo-text {
    font-weight: 700 !important;
}

.nav-link {
    color: #222222 !important;
}

.signup {
    margin-right: 4px;
    border-radius: 20px !important;
}

.login {
    margin-right: 4px;
    border-radius: 20px !important;
}

/* .row{
    height: 100vh;
} */

/* Footer */
footer {
    width: 100%;
}

/* Cards */
.listing-link {
    text-decoration: none;
    color: inherit;
}

.listing-card {
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.listing-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 1.25rem;
    overflow: hidden;
}

.listing-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.listing-card:hover .listing-img {
    transform: scale(1.05);
}

.listing-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    border-radius: 1.25rem;
}

.listing-overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(to top, black 0%, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 20%, transparent 100%);
    border-radius: 0 0 1.25rem 1.25rem;
}

.listing-info {
    position: relative;
    z-index: 1;
    color: #fff;
    width: 100%;
}

.listing-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-price {
    font-size: 0.88rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}


/* New Page */
.add-btn {
    background-color: #fe424d !important;
    border: none !important;
}

/* Edit Page */
.edit-btn {
    background-color: #fe424d !important;
    border: none !important;
    /* border-radius: 15px !important; */
}

#filters {
    width: 100%;
    margin-top: 1rem;
}

.filters-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
    margin: 0 auto;
    width: max-content;
    max-width: 100%;
}

.filters-wrapper::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.filter {
    text-align: center;
    opacity: 0.7;
    flex-shrink: 0;
    /* Prevents squishing on mobile */
}

.toggle-filter {
    text-align: right;
    margin-right: 2rem;
}

.filter:hover {
    opacity: 1;
    cursor: pointer;
    text-decoration: underline;
}

.filter p {
    font-size: 0.8rem;
}


.tax-info {
    display: none;
}

.tax-toggle {
    border: 1px solid rgba(0, 0, 0, 0.516);
    border-radius: 1rem;
    height: 3.25rem;
    padding: 1rem;
    margin-left: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}


.filter-tag {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.indi-filter {
    padding: 0.1rem 0 0.1rem 0.6rem;
    background-color: #d3d3d3;
    margin-left: 0.4rem;
    border-radius: 3rem;
    margin-bottom: 0.5rem;
}




/* Show page */
.show-detail-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.show-detail-img {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    object-fit: cover;
    display: block;
}

.show-detail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10rem 2.5rem 2.5rem 2.5rem;
}

.show-detail-overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    mask-image: linear-gradient(to top, black 0%, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 20%, transparent 100%);
    border-radius: 0 0 1.5rem 1.5rem;
    z-index: 0;
}

.show-detail-overlay>* {
    position: relative;
    z-index: 1;
}

.btns {
    display: flex;
}


.signup {
    padding: 5px 15px !important;
    color: #222222 !important;
    background-color: white !important;
}

.signup>a>b {
    color: #222222 !important;
}

.login {
    padding: 3px 10px !important;
}

/* Map */
#map {
    height: 400px;
    width: 60vw;
    /* background-color: orangered; */
}



/* Mobile View Adjustments */
@media (max-width: 990px) {
    #filters {
        justify-content: space-evenly;
        gap: 8px;
    }

    .filter {
        width: 20px;
        padding: 6px;
    }

    .filter i {
        font-size: 18px;
    }

    .filter p {
        font-size: 9px;
    }



}


.filter-scroll-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}


/* Very Small Mobile View */
@media (max-width: 576px) {
    
    .filter {
        width: 51px;
        /* Further reduce width */
        padding: 6px;
    }

    .filter i {
        font-size: 18px;
    }

    .filter p {
        font-size: 10px;
    }

    /* Reduce card text and padding on mobile */
    .listing-overlay {
        padding: 0.8rem;
    }
    .listing-title {
        font-size: 0.9rem;
    }
    .listing-price {
        font-size: 0.8rem;
    }

    /* Show page mobile adjustments */
    .show-detail-overlay {
        padding: 2rem 1.25rem 1.25rem 1.25rem;
    }
    .show-title {
        font-size: 1.5rem;
    }
}




.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    scroll-behavior: smooth;
}


@media (max-width: 768px) {
    .filters-wrapper {
        display: flex;
        /* justify-content: center;
        align-items: center; */
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.2rem;
        padding-bottom: 0.5rem;
    }

    .filter {
        flex: 0 0 auto;
        text-align: center;
        min-width: 25px;
    }

    .filter-link {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

}

/* Theme Colors Overrides */
:root {
    --bs-primary: #FFB600;
    --bs-secondary: #5FB1E9;
}

.text-primary {
    color: #FFB600 !important;
}

.bg-primary {
    background-color: #FFB600 !important;
}

.btn-primary {
    background-color: #FFB600 !important;
    border-color: #FFB600 !important;
    color: #222 !important;
}

.btn-primary:hover {
    background-color: #e6a400 !important;
    border-color: #e6a400 !important;
    color: #222 !important;
}

.btn-outline-primary {
    color: #cc9200 !important;
    border-color: #FFB600 !important;
}

.btn-outline-primary:hover,
.btn-check:checked + .btn-outline-primary {
    background-color: #FFB600 !important;
    color: #222 !important;
}

.text-secondary {
    color: #5FB1E9 !important;
}

.bg-secondary {
    background-color: #5FB1E9 !important;
}

.btn-secondary {
    background-color: #5FB1E9 !important;
    border-color: #5FB1E9 !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: #4d9ed3 !important;
    border-color: #4d9ed3 !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: #2b7fb3 !important;
    border-color: #5FB1E9 !important;
}

.btn-outline-secondary:hover {
    background-color: #5FB1E9 !important;
    color: #fff !important;
}

/* Button overrides for add/edit */
.add-btn {
    background-color: #FFB600 !important;
    border-color: #FFB600 !important;
    color: #222 !important;
}
.logout {
    color: #FFB600 !important;
    background-color: transparent !important;
}

.edit-btn {
    background-color: #FFB600 !important;
    border-color: #FFB600 !important;
    color: #222 !important;
}

/* Perfect centering for navbar search box on desktop */
@media (min-width: 768px) {
    .search-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile Navbar Adjustments */
@media (max-width: 767px) {
    .search-container {
        width: 100%;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .search-box {
        width: 100%;
    }

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

    .search-btn {
        min-width: 100px;
    }

    .signup, .login {
        width: 100% !important;
        margin-top: 0.5rem;
        display: flex;
        justify-content: center;
    }

    .navbar-nav {
        align-items: flex-start !important;
    }

    .navbar-toggler {
        padding: 0.35rem 0.6rem;
        font-size: 1rem;
    }
}

/* Custom Hamburger Icon to X when open */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z'/%3e%3c/svg%3e");
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(10px);          
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white; 
}

.favorite-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

.favorite-btn.favorited i {
    color: #ff385c;
}

/* Global Page Transition Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* When the loader is active */
.global-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Aesthetic Jumping Dots Animation */
.jumping-dots {
    display: flex;
    gap: 8px;
}

.jumping-dots .dot {
    width: 14px;
    height: 14px;
    background-color: #5FB1E9; /* Brand blue */
    border-radius: 50%;
    animation: jump 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.jumping-dots .dot:nth-child(1) {
    animation-delay: 0s;
}
.jumping-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}
.jumping-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes jump {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px);
        opacity: 1;
        background-color: #ff385c; /* Accent color peak */
    }
}

/* Smooth UI fade-in after load */
body > .container {
    animation: smoothFadeIn 0.5s ease-out forwards;
}

@keyframes smoothFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}