:root {
    --primary: #9333ea;
    --primary-dark: #7e22ce;
    --secondary: #0f172a;
    --accent: #c084fc;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.site-header .navbar {
    padding: 1rem 0;
}

.site-header .navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-header .navbar-brand:hover {
    opacity: 0.9;
}

.site-header .btn-light {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.site-header .btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

.site-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Content */
.site-main {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: white;
    margin-top: auto;
    padding: 2rem 0;
}

.site-footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--card-bg);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* City Cards */
.city-card {
    cursor: pointer;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.city-card .card-img-top {
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.city-card:hover .card-img-top {
    transform: scale(1.1);
}

.city-card .card-body {
    position: relative;
    z-index: 2;
    background: white;
}

.city-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.city-card:hover .city-card-overlay {
    opacity: 1;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(147, 51, 234, 0.5);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Tag Buttons */
.tag-btn {
    border-radius: 24px;
    padding: 0.625rem 1.25rem;
    margin: 0.375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tag-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.tag-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.tag-btn.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.4);
}

.tag-btn.selected::before {
    width: 300px;
    height: 300px;
}

.tag-btn span {
    position: relative;
    z-index: 1;
}

/* Search */
.search-container {
    position: relative;
    z-index: 9999;
}

.search-input-wrapper {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-input-wrapper .form-control {
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    padding-right: 4rem;
}

.search-input-wrapper .form-control:focus {
    box-shadow: none;
    outline: none;
}

.search-input-wrapper .btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.search-results {
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: white !important;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    margin-top: 0;
    width: 100%;
}

/* Hide horizontal scrollbar for search results */
.search-results::-webkit-scrollbar:horizontal {
    display: none;
}

.search-results {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--background);
}

/* Hide horizontal scrollbar for webkit browsers */
.search-results::-webkit-scrollbar {
    width: 8px;
    height: 0;
}

.search-results::-webkit-scrollbar-track {
    background: var(--background);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.search-results .list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-primary);
}

.search-results .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.search-results .list-group-item:first-child {
    border-radius: 16px 16px 0 0;
}

.search-results .list-group-item:hover {
    background: var(--background);
    transform: translateX(4px);
}

.search-results .list-group-item:active {
    background: rgba(147, 51, 234, 0.1);
}

/* Provider Item Cards */
.provider-item-card {
    cursor: pointer;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.provider-item-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.provider-item-card:hover .card-img-top {
    transform: scale(1.05);
}

.provider-item-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-checkbox-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: all 0.3s ease;
}

.provider-item-card:hover .item-checkbox-overlay {
    background: transparent;
    transform: none;
}

.item-checkbox-overlay input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary);
}

.provider-item-card.selected {
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

.provider-item-card .item-name-link {
    color: var(--text-primary) !important;
    transition: color 0.2s ease;
    cursor: pointer;
}

.provider-item-card .item-name-link:hover {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

/* Sticky Continue Button */
.sticky-continue {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(192, 132, 252, 0.1) 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* Carousel */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control-prev {
    left: 1rem;
}

.carousel-control-next {
    right: 1rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .site-main {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .sticky-continue {
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
    }

    .site-main {
        padding-bottom: 100px;
    }

    .card {
        border-radius: 12px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Pagination Styles */
.pagination-wrapper {
    width: 100%;
    padding: 0.75rem 0;
}

.pagination-info {
    flex-shrink: 0;
}

.pagination-controls {
    flex-shrink: 0;
}

.pagination-custom {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-custom .page-item {
    margin: 0;
    display: flex;
    align-items: center;
}

.pagination-custom .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0.5rem 0.75rem;
    margin: 0;
    line-height: 1;
    color: var(--primary);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-custom .page-link:hover:not(.disabled):not(.active) {
    color: var(--primary-dark);
    background-color: #f8f9fa;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(147, 51, 234, 0.1);
}

.pagination-custom .page-link-nav {
    border-radius: 0.375rem;
    min-width: 38px;
}

.pagination-custom .page-link-number {
    border-radius: 0.375rem;
    min-width: 38px;
}

.pagination-custom .page-link-dots {
    border: none;
    background: transparent;
    cursor: default;
    color: var(--text-secondary);
    min-width: auto;
    padding: 0.5rem 0.25rem;
}

.pagination-custom .page-link-dots:hover {
    background: transparent;
    border: none;
    transform: none;
    box-shadow: none;
}

.pagination-custom .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

.pagination-custom .page-item.active .page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.pagination-custom .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #f8f9fa;
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-custom .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    background-color: #f8f9fa;
    border-color: var(--border-color);
}

.pagination-custom .page-link i {
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Pagination */
.pagination-mobile {
    width: 100%;
    justify-content: space-between;
}

.pagination-mobile .page-link {
    padding: 0.5rem 1rem;
    min-width: auto;
}

/* Responsive Pagination */
@media (max-width: 575.98px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-info {
        text-align: center;
        width: 100%;
    }

    .pagination-controls {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .pagination-custom {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Filter Panel */
.filter-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--background);
}

.filter-scroll::-webkit-scrollbar {
    width: 6px;
}

.filter-scroll::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.filter-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

#filterPanel .card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

#filterPanel .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

#filterPanel .form-check-label {
    cursor: pointer;
    user-select: none;
}

#filterPanel .form-check:hover {
    background-color: rgba(147, 51, 234, 0.05);
    border-radius: 8px;
    padding: 0.25rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

#filterPanel .form-select:focus,
#filterPanel .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(147, 51, 234, 0.25);
}

/* City Banner Styles */
.city-banner-wrapper {
    width: 100%;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.city-banner {
    width: 100%;
    position: relative;
}

.city-banner img {
    transition: transform 0.3s ease;
}

.city-banner:hover img {
    transform: scale(1.05);
}

/* Semi-transparent background for text container */
.banner-text-container {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Enhanced text visibility for banner overlay */
.city-banner .text-white {
    color: #ffffff !important;
    font-weight: 600;
}

.city-banner h1 {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.city-banner p {
    color: #ffffff !important;
    opacity: 0.95;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .city-banner {
        height: 300px !important;
    }
    
    .city-banner .display-5 {
        font-size: 2rem !important;
    }
    
    .city-banner .fs-5 {
        font-size: 0.9rem !important;
    }
    
    .city-banner .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .banner-text-container {
        padding: 1rem 1.5rem;
        border-radius: 8px;
    }
}

