/**
 * MareData Search Funnel - Premium Redesign (Split Screen)
 * Style: Modern, Clean, "Glass-like" depth
 */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors */
    --msf-primary: #124574;
    --msf-primary-light: rgba(18, 69, 116, 0.05);
    /* Very light blue for backgrounds */
    --msf-primary-hover: #0e365c;
    --msf-accent: #2563eb;
    /* A brighter blue for active states/buttons if needed */

    /* Sidebar specific */
    --msf-sidebar-bg: #EBF2FF;
    /* Light blue from screenshot */
    --msf-sidebar-text: #1e293b;

    /* Neutrals */
    --msf-bg-body: #f8fafc;
    --msf-bg-white: #ffffff;
    --msf-border: #e2e8f0;
    --msf-text-main: #0f172a;
    --msf-text-muted: #64748b;

    /* UI Properties */
    --radius-lg: 24px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-stack: "Source Sans 3", Arial, sans-serif;
}

.msf-container,
.msf-hero-container {
    box-sizing: border-box;
    font-family: var(--font-stack);
    color: var(--msf-text-main);
}

.msf-container *,
.msf-container *::before,
.msf-container *::after,
.msf-hero-container *,
.msf-hero-container *::before,
.msf-hero-container *::after {
    box-sizing: border-box;
}

/* =========================================
   2. MAIN CONTAINER (Split Layout - Full Screen)
   ========================================= */
.msf-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--msf-bg-white);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.msf-funnel-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* --- Content Row (Split Layout) --- */
.msf-content-row {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

/* --- Left Column: Main Content --- */
.msf-funnel-main {
    flex: 1;
    /* Takes remaining space */
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
    height: 100%;
    overflow: hidden;
    /* ID scroll inside content-area */
}

/* --- Header Row (inside left column) --- */
.msf-header-row {
    height: 100px;
    min-height: 100px;
    background: var(--msf-bg-white);
    border-bottom: 1px solid var(--msf-border);
    display: flex;
    align-items: center;
    padding: 0 40px;
    flex-shrink: 0;
}

.msf-content-area {
    padding: 40px 80px;
    /* Increased padding for large screens */
    flex-grow: 1;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- Right Column: Trust Sidebar --- */
.msf-funnel-sidebar {
    width: 35%;
    /* Wider for full screen balance */
    min-width: 450px;
    background-color: var(--msf-sidebar-bg);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid var(--msf-border);
}

/* =========================================
   3. PROGRESS BAR
   ========================================= */
.msf-progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.msf-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--msf-primary) 0%, var(--msf-primary-hover) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.msf-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =========================================
   4. TYPOGRAPHY & HEADERS
   ========================================= */
.msf-step-header {
    margin-bottom: 30px;
}

.msf-step-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--msf-text-main);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.msf-step-subtitle {
    font-size: 16px;
    color: var(--msf-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* =========================================
   5. CARD GRID & STYLES
   ========================================= */
/* .msf-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
} */
.msf-cards-grid {
    display: grid;
    /* This is the key change */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.msf-card {
    background: #fff;
    border: 1px solid var(--msf-border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    height: 200px !important;
    aspect-ratio: 1 / 1;
    /* Make square */
    justify-content: space-between;
    /* Space out content vertically */
    will-change: transform;
}

.msf-card:hover {
    border-color: var(--msf-primary);
    box-shadow: 0 8px 16px -4px rgba(18, 69, 116, 0.15), 0 4px 8px -2px rgba(18, 69, 116, 0.1);
    transform: translateY(-4px) scale(1.02);
}

.msf-card:active {
    transform: translateY(-2px) scale(1.01);
    transition-duration: 0.1s;
}

.msf-card.selected {
    border-color: var(--msf-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 0 0 2px var(--msf-primary), 0 8px 16px -4px rgba(18, 69, 116, 0.2);
    transform: translateY(-2px);
}

.msf-card.selected:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Card Icon */
.msf-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-card:hover .msf-card-icon {
    transform: scale(1.1) rotate(2deg);
}

.msf-card.selected .msf-card-icon {
    transform: scale(1.05);
}

.msf-card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.msf-card-icon-default {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--msf-text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-card:hover .msf-card-icon-default {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: rotate(5deg);
}

/* Card Label */
.msf-card-label {
    font-weight: 600;
    font-size: 15px;
    color: var(--msf-text-main);
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Card Radio Button (The circle) */
.msf-card-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--msf-border);
    border-radius: 50%;
    margin-top: auto;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-card:hover .msf-card-radio {
    border-color: var(--msf-primary);
    transform: scale(1.1);
}

.msf-card.selected .msf-card-radio {
    border-color: var(--msf-primary);
    background-color: var(--msf-primary);
    transform: scale(1.15);
}

.msf-card.selected .msf-card-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: radioCheck 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes radioCheck {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.msf-card input {
    display: none;
}

/* =========================================
   6. TRUST SIDEBAR CONTENT
   ========================================= */
.msf-trust-content {
    color: var(--msf-text-main);
}

.msf-trust-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.3;
}

.msf-trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.msf-trust-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #334155;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    border-radius: 8px;
}

.msf-trust-list li:hover {
    background: rgba(18, 69, 116, 0.05);
    transform: translateX(4px);
}

.msf-check-icon {
    width: 20px;
    height: 20px;
    color: var(--msf-primary);
    margin-right: 12px;
    flex-shrink: 0;
    stroke-width: 2.5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-trust-list li:hover .msf-check-icon {
    transform: scale(1.2) rotate(5deg);
}

.msf-trust-image-wrapper {
    margin-top: auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.msf-trust-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.msf-trust-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #dbeafe;
    /* Placeholder color */
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18c0-1.1.9-2 2-2h1V15c0-1.66-1.34-3-3-3s-3 1.34-3 3v1h1c1.1 0 2 .9 2 2v2.5M15 22h10v-5h-10v5z' fill='%2394a3b8' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 12px;
}

.msf-trust-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Legal Links Section */
.msf-legal-links {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(18, 69, 116, 0.15);
}

.msf-legal-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--msf-text-muted);
    margin-bottom: 16px;
}

.msf-legal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.msf-legal-list li {
    margin: 0;
}

.msf-legal-list li:not(:last-child)::after {
    content: '•';
    margin-left: 16px;
    color: var(--msf-text-muted);
}

.msf-legal-list a {
    color: var(--msf-text-main);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    padding: 4px 0;
}

.msf-legal-list a:hover {
    color: var(--msf-primary);
}

/* Back to Home Button in Header */
.msf-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--msf-primary);
    border: none;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(18, 69, 116, 0.2);
}

.msf-back-home:hover {
    color: #fff;
    background: var(--msf-primary-hover);
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.3);
    transform: translateY(-2px);
}

.msf-back-home svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-back-home:hover svg {
    transform: translateX(-2px);
}

/* =========================================
   7. NAVIGATION & BUTTONS
   ========================================= */
.msf-navigation {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.msf-btn {
    height: 48px;
    padding: 0 24px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-stack);
    position: relative;
    overflow: hidden;
}

/* .msf-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.msf-btn:hover::before {
    width: 300px;
    height: 300px;
}

.msf-btn:active {
    transform: scale(0.98);
} */

.msf-btn-primary {
    background: var(--msf-primary);
    /* background: linear-gradient(135deg, var(--msf-primary) 0%, var(--msf-primary-hover) 100%); */
    color: #fff;
    /* box-shadow: 0 2px 8px rgba(18, 69, 116, 0.2); */
}

.msf-btn-primary:hover {
    background: var(--msf-primary-hover);
    /* box-shadow: 0 4px 12px rgba(18, 69, 116, 0.3); */
    /* transform: translateY(-2px); */
}

.msf-btn-secondary {
    background: transparent;
    color: var(--msf-text-muted);
    border: 1px solid var(--msf-border);
}

/* .msf-btn-secondary::before {
    background: rgba(18, 69, 116, 0.05);
} */

.msf-btn-secondary:hover {
    background: #f1f5f9;
    color: var(--msf-text-main);
    border-color: var(--msf-primary);
}

.msf-btn-block {
    width: 100%;
    justify-content: center;
}

/* =========================================
   8. INPUTS & LOCATION STEP
   ========================================= */
.msf-location-wrapper {
    margin-bottom: 20px;
}

.msf-location-input,
.msf-form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 2px solid var(--msf-border);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.msf-location-input:hover,
.msf-form-input:hover {
    border-color: #cbd5e1;
}

.msf-location-input:focus,
.msf-form-input:focus {
    outline: none;
    border-color: var(--msf-primary);
    box-shadow: 0 0 0 3px rgba(18, 69, 116, 0.1);
    transform: translateY(-1px);
}

/* Radius Slider - Polished */
.msf-radius-wrapper {
    background: var(--msf-bg-body);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--msf-border);
}

.msf-radius-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    align-items: center;
}

.msf-radius-header label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--msf-text-muted);
    letter-spacing: 0.05em;
}

.msf-radius-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--msf-primary);
    background: rgba(18, 69, 116, 0.1);
    padding: 6px 12px;
    border-radius: 100px;
    min-width: 60px;
    text-align: center;
}

/* noUiSlider Standard Overrides - Enhanced */
.msf-nouislider-container {
    margin-top: 15px;
    margin-bottom: 15px;
    height: 8px;
    /* Thicker track */
}

.msf-nouislider-container .noUi-base {
    background: #e2e8f0;
    border-radius: 4px;
    height: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    border: none;
}

.msf-nouislider-container .noUi-connect {
    background: var(--msf-primary);
    border-radius: 4px 0 0 4px;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.msf-nouislider-container .noUi-handle {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--msf-primary);
    box-shadow: 0 4px 10px rgba(18, 69, 116, 0.2);
    top: -11px !important;
    right: -14px !important;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-nouislider-container .noUi-handle:hover {
    border-width: 3px;
    box-shadow: 0 6px 14px rgba(18, 69, 116, 0.3);
    transform: scale(1.1);
}

.msf-nouislider-container .noUi-handle::after,
.msf-nouislider-container .noUi-handle::before {
    display: none;
}

.msf-nouislider-container .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.15);
    background: var(--msf-primary);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.4);
}

.msf-nouislider-container .noUi-touch-area {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Map specific overrides */
.msf-step-layout-with-map {
    display: flex;
    gap: 20px;
    flex-direction: column;
    /* Stack on mobile default, side-by-side handled if needed, but in this layout full width vertical stack or small map is better */
}

@media (min-width: 900px) {
    .msf-step-layout-with-map {
        flex-direction: row;
    }

    .msf-step-form-column {
        flex: 1;
    }

    .msf-step-map-column {
        flex: 1;
        min-height: 300px;
    }
}

.msf-germany-map-container {
    height: 40vh;
    min-height: 65dvh;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

#msf-mapbox-map {
    width: 100%;
    height: 100%;
}

/* =========================================
   9. UTILITIES
   ========================================= */
.msf-step {
    display: none;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-step.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    grid-column: 1 / -1;
    color: var(--msf-text-muted);
}

.msf-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--msf-primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   10. HERO SEARCH BOX (Unchanged logic, just ensure variables work)
   ========================================= */
.msf-hero-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px;
}

/* Floating Card Style */
.msf-hero-search-box {
    background: #fff;
    padding: 10px;
    border-radius: 100px;
    /* Pill shape */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.msf-hero-search-box:focus-within {
    box-shadow: 0 8px 30px rgba(18, 69, 116, 0.1) !important;
    border-color: #d1d9e2;
}

.msf-hero-location-wrapper {
    flex: 2;
    position: relative;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide form labels in hero mode */
.msf-hero-container .msf-form-label {
    display: none;
}

/* Make inputs invisible inside the pill */
div.msf-hero-container input.msf-hero-location-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 60px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--msf-text-main) !important;
    text-align: center !important;
}

div.msf-hero-container input.msf-hero-location-input::placeholder {
    text-align: center;
    color: #999 !important;
}

/* Mapbox geocoder input styling for hero */
.msf-hero-location-wrapper .mapboxgl-ctrl-geocoder--input {
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.msf-hero-location-wrapper .mapboxgl-ctrl-geocoder--icon-search {
    display: none !important;
}



/* ... (Hero styles remain mostly same, just scoped) ... */
/* ... (Hero styles remain mostly same, just scoped) ... */
.msf-hero-btn-search {
    height: 60px;
    padding: 0 40px;
    border-radius: 50px;
    background: var(--msf-primary);
    color: white;
    font-weight: 700;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.2);
}

.msf-hero-btn-search:hover {
    background: var(--msf-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(18, 69, 116, 0.3);
}

.msf-hero-location-wrapper {
    flex: 2;
    display: flex;
    align-items: center;
    padding: 0 25px;
    height: 100%;
}

.msf-hero-subcategory-wrapper {
    flex: 1.5;
    padding: 0 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    height: 100%;
}

.msf-hero-radius-wrapper {
    flex: 1.5;
    padding: 0 25px;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    height: 100%;
}

.msf-hero-select {
    width: 100%;
    border: none !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--msf-text-main) !important;
    cursor: pointer;
    padding: 10px 15px !important;
    outline: none !important;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
    transition: background 0.3s ease;
}

.msf-hero-select option {
    background: #fff;
    color: var(--msf-text-main);
    text-align: left;
}

.msf-hero-radius-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.msf-hero-radius-header label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--msf-text-muted);
}

.msf-hero-radius-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--msf-primary);
    background: rgba(18, 69, 116, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Polished Slider for Hero (Matching Standard) */
.msf-hero-radius-wrapper .noUi-target {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 15px;
    /* Match standard */
    padding: 0;
    height: 8px;
    /* Thicker */
}

.msf-hero-radius-wrapper .noUi-base {
    height: 8px;
    /* Thicker */
    background: #e2e8f0;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.msf-hero-radius-wrapper .noUi-connect {
    background: var(--msf-primary);
    border-radius: 4px 0 0 4px;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.msf-hero-radius-wrapper .noUi-handle {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--msf-primary);
    box-shadow: 0 4px 10px rgba(18, 69, 116, 0.2);
    top: -7px !important;
    /* Adjusted for height */
    right: -11px !important;
    cursor: grab;
    transition: transform 0.1s ease, box-shadow 0.2s ease, border-width 0.1s;
}

.msf-hero-radius-wrapper .noUi-handle:hover {
    border-width: 3px;
    box-shadow: 0 6px 14px rgba(18, 69, 116, 0.25);
}

.msf-hero-radius-wrapper .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
    background: var(--msf-primary);
    border-color: #fff;
}

/* Hero Responsive */
@media (max-width: 768px) {
    .msf-hero-search-box {
        flex-direction: column;
        border-radius: 24px;
        padding: 20px;
        gap: 20px;
        height: auto;
    }

    .msf-hero-location-wrapper,
    .msf-hero-radius-wrapper {
        width: 100%;
        padding: 0;
        border: none;
        flex: auto;
    }

    .msf-hero-location-wrapper {
        border-bottom: 1px solid #f0f0f0;
        /* padding-bottom: 15px; */
        /* margin-bottom: 5px; */
    }

    .msf-hero-btn-search {
        width: 100%;
        height: 52px;
        /* margin-top: 10px; */
    }

    .msf-hero-category-wrapper,
    .msf-hero-subcategory-wrapper {
        width: 100%;
        padding: 10px 0;
        border-left: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .msf-hero-select {
        text-align: left;
        text-align-last: left;
        padding-left: 10px !important;
    }

    div.msf-hero-container input.msf-hero-location-input {
        text-align: left !important;
        padding-left: 10px !important;
    }
}

/* =========================================
   11. RESPONSIVE DESIGN
   ========================================= */

/* Tablet and below - Hide sidebar */
@media (max-width: 1024px) {
    .msf-funnel-sidebar {
        display: none;
    }

    .msf-funnel-main {
        width: 100%;
    }

    .msf-content-area {
        padding: 40px 60px;
    }

    .msf-germany-map-container {
        height: 35vh;
        min-height: 35dvh;
        width: 100%;
        border-radius: 8px;
        overflow: hidden;
        background: #eee;
}
}

/* Mobile landscape and below */
@media (max-width: 900px) {
    .msf-funnel-layout {
        flex-direction: column;
    }

    .msf-content-area {
        padding: 30px 24px;
    }

    .msf-container {
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        height: auto;
        min-height: 100vh;
    }

    .msf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .msf-card {
        min-height: 140px;
        height: 180px !important;
        width: 100% !important;
        padding: 20px 12px;
    }

    .msf-step-title {
        font-size: 24px;
    }

    .msf-step-subtitle {
        font-size: 15px;
    }
}

/* Mobile portrait */
@media (max-width: 640px) {
    .msf-content-area {
        padding: 24px 16px;
    }

    .msf-step-title {
        font-size: 22px;
    }

    .msf-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .msf-btn {
        width: 100%;
    }

    .msf-btn-secondary {
        order: 2;
    }

    .msf-btn-primary {
        order: 1;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .msf-cards-grid {
        grid-template-columns: 1fr;
    }

    .msf-card {
        height: 160px !important;
        width: 100% !important;
    }

    .msf-step-title {
        font-size: 20px;
    }

    .msf-content-area {
        padding: 20px 12px;
    }
}

/* =========================================
   LOADING STATES - Optimistic UI
   ========================================= */

/* Loading Skeleton for Cards */
.msf-loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    grid-column: 1 / -1;
}

.msf-skeleton-card {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmerSkeleton 0.8s infinite;
    border-radius: var(--radius-md);
    height: 200px;
    border: 1px solid var(--msf-border);
}

@keyframes shimmerSkeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button Spinner */
.msf-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinButton 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spinButton {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Smooth transitions for step changes */
.msf-step {
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.msf-step.active {
    animation: fadeInStep 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
