/* ---------- Navigation Cards ---------- */
.custom-card-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    margin: -320px auto;
    max-width: 100%;
    padding-bottom: 0px;

    /* Mobile horizontal scroll */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.custom-card-nav::-webkit-scrollbar {
    display: none;
}

.custom-card-nav .card-nav-item {
    flex: 0 1 120px;
    text-align: center;
}

.card-nav-item {
    width: 150px;
    height: auto;
}

.nav-link {
    padding: 0;
    border: none;
    background: none;
}

.icon-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 110px;
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    z-index: 1;
}

.icon-card span {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    z-index: 1;
}

.icon-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 64px;
    height: 64px;
    background-color: inherit;
    border-radius: 50%;
    opacity: 0.15;
    z-index: 0;
}

.nav-link.active .icon-card {
    border-bottom: 4px solid #00c2cb;
}


/* ---------- Filter/Search Section ---------- */
.filter-bar {
    border-radius: 16px;
    padding-top: 75px;
    margin-top: 20px;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.filter-box {
    flex: 1 1 160px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 140px;
}

.filter-title {
    font-weight: 600;
    font-size: 16px;
    color: #111;
}

.filter-sub {
    font-size: 13px;
    color: #555;
    line-height: 1.2;
}

.filter-search {
    flex-shrink: 0;
}

.btn-search {
    background-color: #facc15;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 18px;
    color: black;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.popular-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 14px;
}

.popular-search span {
    font-weight: 600;
    color: #333;
}

.tag {
    background-color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #444;
}

/* ---------- Responsive Fixes ---------- */
@media (max-width: 1024px) {
    .filter-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .filter-box {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    /* Padding for mobile edges */
    .filter-bar,
    .custom-card-nav,
    .popular-search {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .custom-card-nav {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
    }

    .custom-card-nav .card-nav-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-box {
        flex: 1 1 100%;
    }

    .btn-search {
        width: 100%;
        margin-top: 10px;
    }

    .filter-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .icon-card {
        width: 90px;
        height: 110px;
        padding: 15px 8px;
    }

    .icon-card img {
        width: 48px;
        height: 48px;
    }

    .icon-card span {
        font-size: 12px;
    }
}
