/**
 * Modern Homepage Styles for BFHD Pro
 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --color-primary: #00E2C1;
    --color-blue: #5B8FE5;
    --color-blue-dark: #4A6FA5;
    --color-text-dark: #2D3748;
    --color-text-light: #718096;
    --color-text-gray: #8B8B8B;
    --color-bg: #F7FAFC;
    --color-white: #FFFFFF;

    --font-family: 'Roboto', sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

    --radius-sm: 8px;
    --radius-md: 50px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bfhd-modern-homepage * {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: #FFFFFF;
    color: var(--color-text-dark);
}

.bfhd-container {
    max-width: var(--bfhd-container-width, 1360px);
    /* Match global header */
    margin: 0 auto;
    padding: 0 var(--bfhd-container-padding, 20px);
}

/* ================================
   HEADER - Modern, Clean
   ================================ */

.bfhd-modern-header {
    background: transparent;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.bfhd-modern-header .bfhd-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.bfhd-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.bfhd-logo {
    height: 40px;
    width: auto;
}

.bfhd-logo-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-dark);
}

.bfhd-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.bfhd-nav-item {
    position: relative;
}

.bfhd-nav-link {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    transition: var(--transition);
    display: block;
    position: relative;
    padding: 8px 0;
}

.bfhd-nav-link:hover {
    color: var(--color-primary);
}

.bfhd-has-dropdown::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

.bfhd-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 12px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bfhd-nav-link:hover+.bfhd-dropdown-menu,
.bfhd-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bfhd-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
    white-space: nowrap;
}

.bfhd-dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
    padding-left: 24px;
}

.bfhd-auth-buttons {
    display: flex;
    gap: 12px;
}

.bfhd-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.bfhd-btn-signup {
    background: var(--color-blue);
    color: var(--color-white);
}

.bfhd-btn-signup:hover {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bfhd-btn-login {
    background: var(--color-primary);
    color: var(--color-white);
}

.bfhd-btn-login:hover {
    background: #00C4A8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bfhd-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.bfhd-mobile-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--color-text-dark);
    border-radius: 2px;
    transition: var(--transition);
}



/* ================================
   HERO SECTION
   ================================ */

/* Hero padding set to 5px per user preference */
.bfhd-hero {
    padding: 20px 0 5px;
    background: #FFFFFF;
}

.bfhd-hero-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    justify-items: center;
}

.bfhd-hero-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-self: start;
}

.bfhd-hero-title-img {
    gap: 30px;
}

.bfhd-hero-left,
.bfhd-hero-center,
.bfhd-hero-right {
    justify-self: center;
    text-align: center;
}

.bfhd-hero-title-img {
    max-width: 350px;
}

.bfhd-hero-illustration {
    max-width: 260px;
}

.bfhd-promo-badge {
    align-items: center;
}


@media (max-width: 991px) {
    .bfhd-hero {
        padding: 40px 0 50px;
    }

    .bfhd-hero-title-img {
        max-width: 280px;
    }

    .bfhd-hero-illustration {
        max-width: 200px;
    }

    .bfhd-promo-number {
        max-width: 140px;
    }
}

/* ================================
   SEARCH SECTION - White Background
   ================================ */

.bfhd-search-section {
    padding: 30px 0 60px;
    background: #FFFFFF;
}

.bfhd-search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.bfhd-search-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    /* Fill the 1360px container */
    justify-content: center;
}

.bfhd-search-label {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-dark);
    white-space: nowrap;
}

/* Main Search Pill Container */
.bfhd-search-pill {
    display: flex;
    align-items: center;
    background: var(--color-white);
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    flex: 1;
    max-width: 900px;
    height: 64px;
    overflow: visible !important;
    /* Allow dropdowns to show outside */
    position: relative;
}

/* Input Group */
.bfhd-input-group {
    flex: 1.5;
    padding-left: 12px;
}

.bfhd-search-input {
    width: 100%;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text-dark);
    background: transparent;
    outline: none;
}

.bfhd-search-input::placeholder {
    color: #BDBDBD;
}

/* Separator */
.bfhd-search-separator {
    width: 1px;
    height: 32px;
    background-color: #E2E8F0;
    margin: 0 8px;
}

/* Select Group (Category) */
.bfhd-select-group {
    flex: 1;
    position: relative;
    overflow: visible !important;
    /* Allow dropdown to show */
}

.bfhd_s_select_group {
    flex: 1;
    position: relative;
    overflow: visible !important;
    /* Allow dropdown to show */
}

.bfhd-search-select {
    width: 100%;
    padding: 12px 36px 12px 16px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text-gray);
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238B8B8B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom Dropdown (Country) */
.bfhd-custom-dropdown {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.bfhd-dropdown-trigger {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text-gray);
    gap: 8px;
}

.bfhd-dropdown-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bfhd-dropdown-menu-select {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    display: none;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    min-width: 200px;
}

.bfhd-custom-dropdown.active .bfhd-dropdown-menu-select {
    display: block;
    animation: fadeIn 0.2s ease;
}

.bfhd-checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text-dark);
}

.bfhd-checkbox-item:hover {
    background: #F7FAFC;
}

.bfhd-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #CBD5E0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.bfhd-checkbox-item .count {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-text-light);
    background: #EDF2F7;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Search Button */
.bfhd-search-btn {
    width: 52px;
    height: 52px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 2px;
}

.bfhd-search-btn:hover {
    background: #00C4A8;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 226, 193, 0.3);
}

.bfhd-search-btn svg {
    width: 22px;
    height: 22px;
}

/* Advanced Search Link */
.bfhd-advanced-search {
    color: var(--color-text-gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
    white-space: nowrap;
}

.bfhd-advanced-search:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .bfhd-hero-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    /* Hide Illustration and Badge on Mobile as requested */
    .bfhd-hero-center,
    .bfhd-hero-right {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .bfhd-search-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .bfhd-search-pill {
        width: 100%;
        height: auto;
        flex-direction: column;
        padding: 16px;
        border-radius: 24px;
        align-items: stretch;
        gap: 12px;
    }

    .bfhd-search-separator {
        display: none;
    }

    .bfhd-input-group,
    .bfhd-select-group,
    .bfhd-custom-dropdown {
        width: 100%;
        flex: none;
        padding: 0;
        border-bottom: 1px solid #EDF2F7;
    }

    .bfhd-custom-dropdown {
        height: 48px;
    }

    .bfhd-search-input,
    .bfhd-search-select,
    .bfhd-dropdown-trigger {
        padding: 12px 0;
        text-align: left;
    }

    .bfhd-search-btn {
        width: 100%;
        border-radius: 12px;
        margin-top: 8px;
    }
}

.bfhd-categories-section {
    padding: 30px 0;
    background: var(--color-white);
}

.bfhd-section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 40px 0;
}

.bfhd-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.bfhd-category-card {
    background: var(--color-white);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.bfhd-category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.bfhd-category-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.bfhd-category-info {
    flex: 1;
}

.bfhd-category-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin: 0 0 4px 0;
}

.bfhd-category-count {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-text-light);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
}

/* ================================
   FOOTER - Blue Gradient
   ================================ */

.bfhd-footer {
    background: linear-gradient(135deg, #5B8FE5 0%, #4A6FA5 100%);
    padding: 60px 0 40px;
    color: var(--color-white);
    border-radius: 24px 24px 0 0;
    margin-top: 30px;
}

.bfhd-footer .bfhd-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
}

.bfhd-footer-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bfhd-footer-logo-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bfhd-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bfhd-footer-logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.bfhd-footer-tagline {
    font-size: 18px;
    font-weight: 300;
    margin: 0;
    line-height: 1.4;
}

.bfhd-footer-language {
    margin-top: 12px;
}

.bfhd-language-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--color-white);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.bfhd-language-select option {
    background: var(--color-blue);
    color: var(--color-white);
}

.bfhd-footer-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bfhd-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bfhd-footer-links li {
    margin: 0;
}

.bfhd-footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
}

.bfhd-footer-links a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.bfhd-footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
    .bfhd-footer .bfhd-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .bfhd-footer-logo-section {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }
}



@media (max-width: 991px) {

    .bfhd-modern-header .bfhd-nav,
    .bfhd-auth-buttons {
        display: none;
    }

    .bfhd-mobile-toggle {
        display: flex;
    }

    /* Fix Hero on Tablet */
    .bfhd-hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .bfhd-hero-left,
    .bfhd-hero-right {
        justify-self: center;
        align-items: center;
    }

    .bfhd-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .bfhd-search-label {
        text-align: center;
    }

    .bfhd-categories-grid {
        grid-template-columns: 1fr;
    }

    .bfhd-footer {
        padding: 40px 0 30px;
    }

    .bfhd-footer .bfhd-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .bfhd-footer-column {
        text-align: center;
        align-items: center;
    }
}

/* Polish Search UI Overrides */
.bfhd-dropdown-trigger {
    background: transparent !important;
    border-radius: 30px;
    transition: background 0.2s ease, color 0.2s ease;
}

.bfhd-dropdown-trigger:hover {
    background: #F7FAFC !important;
    color: var(--color-text-dark);
}

.bfhd-dropdown-menu-select {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.bfhd-checkbox-item {
    border-radius: 8px;
    padding: 10px 12px;
}

.bfhd-checkbox-item:hover {
    background: #F0F4F8;
    color: var(--color-primary);
}

.bfhd-checkbox-item input[type='checkbox'] {
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E0;
    transition: border-color 0.2s;
}

.bfhd-checkbox-item input[type='checkbox']:checked {
    border-color: var(--color-primary);
}

/* Ultimate Fix for Dark Background v1.1.0 */
.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: var(--color-text-gray) !important;
}

.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger:hover {
    background-color: #F7FAFC !important;
    background: #F7FAFC !important;
    color: var(--color-text-dark) !important;
}

.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger span {
    background: transparent !important;
}

/* ==============================================
   CUSTOM DROPDOWN STYLES - VANILLA JS
   Version 3.0 - Professional WordPress implementation
   ============================================== */

/* Container */
.bfhd-dropdown {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Dropdown Button */
.bfhd-dropdown-btn {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 32px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text-dark);
    position: relative;
    outline: none;
    transition: all 0.2s ease;
}

.bfhd-dropdown-btn:hover {
    color: var(--color-text-dark);
}

/* Button Value (shows selection or placeholder) */
.bfhd-dropdown-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
    font-weight: 400;
    color: var(--color-text-gray);
    /* Same color for all text */
}

.bfhd-dropdown-value.is-placeholder {
    color: var(--color-text-gray);
    /* Same as normal, not lighter */
}

/* Dropdown Arrow */
.bfhd-dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    color: var(--color-text-gray);
}

.bfhd-dropdown.is-open .bfhd-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown Menu */
.bfhd-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px;
    display: none;
    /* Hidden by default */
    z-index: 10000 !important;
    /* Very high to ensure visibility */
}


/* Dropdown open state */
.bfhd-dropdown.is-open .bfhd-dropdown-menu {
    display: block;
}

/* Dropdown Items */
.bfhd-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.bfhd-dropdown-item:hover {
    background: #F7FAFC;
}

.bfhd-dropdown-item.is-selected {
    background: #E6F9F5;
}

/* Custom Checkbox */
.bfhd-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #CBD5E0;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.bfhd-dropdown-item.is-selected .bfhd-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.bfhd-dropdown-item.is-selected .bfhd-checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: block;
}

/* Label - STRICT 14 character truncation */
.bfhd-label {
    flex: 1;
    min-width: 0;
    max-width: 14ch;
    /* Exactly 14 characters */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: var(--color-text-dark);
    font-weight: 400;
}

/* Count Badge - RIGHT ALIGNED */
.bfhd-count {
    margin-left: auto !important;
    /* Force right alignment */
    background: #EDF2F7;
    color: #718096;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}

/* Scrollbar Styling */
.bfhd-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.bfhd-dropdown-menu::-webkit-scrollbar-track {
    background: #F7FAFC;
    border-radius: 10px;
}

.bfhd-dropdown-menu::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}

.bfhd-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

/* Green Counter for Business Listings */
.bfhd-hero-subtitle .bfhd-counter {
    color: var(--color-primary) !important;
    font-weight: 700;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bfhd-label {
        max-width: 12ch !important;
    }

    .bfhd-dropdown-menu {
        max-width: 100%;
        left: -8px;
        right: -8px;
    }
}

/* Integration with Search Pill */
.bfhd_s_select_group .bfhd-dropdown {
    height: 100%;
}

.bfhd_s_pill .bfhd-dropdown-btn {
    padding: 0 32px 0 16px;
}


/* ==============================================
   CLEAN DROPDOWN FIXES - V2.0
   ============================================== */

/* 1. Hide default Choices.js tags (we use custom summary instead) */
.choices__inner .choices__list--multiple .choices__item,
.choices__inner .choices__list--single .choices__item {
    display: none !important;
}

/* 2. Custom Summary Element (shows "All Categories" or selection count) */
.bfhd_s_summary {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    right: 40px;
    font-size: 15px;
    color: var(--color-text-dark);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
    background: transparent;
    font-weight: 400;
}

.bfhd_s_summary.is-placeholder {
    color: #9CA3AF;
}

/* 3. Inner container adjustment */
.choices__inner {
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 16px !important;
    position: relative;
}

/* 4. Dropdown list styling */
.choices__list--dropdown {
    width: auto !important;
    min-width: 100%;
    max-width: 350px;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    margin-top: 8px !important;
    padding: 8px !important;
}

/* 5. Individual choice items in dropdown */
.choices__list--dropdown .choices__item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    position: relative;
}

.choices__list--dropdown .choices__item:hover {
    background: #F7FAFC !important;
}

/* 6. Selected state styling */
.choices__list--dropdown .choices__item.is-selected {
    background: #E6F9F5 !important;
}

.choices__list--dropdown .choices__item.is-selected .bfhd_s_checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.choices__list--dropdown .choices__item.is-selected .bfhd_s_checkbox::after {
    content: '✓';
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 7. Checkbox styling */
.bfhd_s_checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #CBD5E0;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* 8. Label text with STRICT 14-char truncation */
.bfhd_s_label_text {
    flex: 1;
    min-width: 0;
    max-width: 14ch !important;
    /* Exactly 14 characters */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: var(--color-text-dark);
    font-weight: 400;
}

/* 9. Country count badge - RIGHT ALIGNED */
.bfhd-country-count {
    margin-left: auto !important;
    /* Force to right */
    background: #EDF2F7;
    color: #718096;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}

/* 10. Dropdown arrow icon */
.choices__list--dropdown .choices__item[data-choice-selectable]::before {
    display: none;
}

/* 11. Search input in dropdown */
.choices__input {
    background: #F7FAFC !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    border: 1px solid #E2E8F0 !important;
}

/* 12. Scrollbar styling for dropdown */
.choices__list--dropdown::-webkit-scrollbar {
    width: 6px;
}

.choices__list--dropdown::-webkit-scrollbar-track {
    background: #F7FAFC;
    border-radius: 10px;
}

.choices__list--dropdown::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}

.choices__list--dropdown::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

/* 13. Green counter for Business listings */
.bfhd-hero-subtitle .bfhd-counter {
    color: var(--color-primary) !important;
    font-weight: 700;
}

/* 14. Responsive adjustments */
@media (max-width: 768px) {
    .bfhd_s_label_text {
        max-width: 12ch !important;
    }

    .choices__list--dropdown {
        max-width: 100%;
    }
}


/* ==============================================
   FIXES FOR DROPDOWNS & CATEGORIES
   ============================================== */

/* 1. Hide default choices tags in input to favor our custom Summary string */
.choices__inner .choices__list--multiple .choices__item,
.choices__inner .choices__list--single .choices__item {
    display: none !important;
}

/* 2. Style the Custom Summary (Placeholder/Value) */
.bfhd_s_summary {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    right: 36px;
    font-size: 15px;
    color: var(--color-text-dark);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
    background: transparent;
}

.bfhd_s_summary.is-placeholder {
    color: #9CA3AF;
    /* Placeholder gray */
}

/* 3. Adjust inner to hold space */
.choices__inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    padding: 0 16px !important;
}

/* 4. Fix Choices Dropdown List Items */
.choices__list--dropdown .choices__item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px !important;
}

/* 5. Custom Label Styling - Truncation */
.bfhd_s_label_text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
    color: var(--color-text-dark);
}

/* 6. Enforce truncation width for countries per user request */
/* Target country specific dropdown if possible, or apply globally to this class */
.choices[data-type*="select-multiple"] .bfhd_s_label_text {
    /* "when the name of the country more than 15 characters, please make it shorter" */
    max-width: 15ch;
}

/* 7. Count Styling - Right Aligned */
.bfhd-country-count {
    margin-left: auto !important;
    background: #EDF2F7;
    color: #718096;

    .bfhd-footer-bottom {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        text-align: center;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }

    @media (max-width: 1024px) {
        .bfhd-footer .bfhd-container {
            grid-template-columns: 1fr 1fr;
            gap: 40px;
        }

        .bfhd-footer-logo-section {
            grid-column: 1 / -1;
            text-align: center;
            align-items: center;
        }
    }

    @media (max-width: 768px) {

        .bfhd-modern-header .bfhd-nav,
        .bfhd-auth-buttons {
            display: none;
        }

        .bfhd-mobile-toggle {
            display: flex;
        }

        .bfhd-search-wrapper {
            flex-direction: column;
            align-items: stretch;
        }

        .bfhd-search-label {
            text-align: center;
        }

        .bfhd-categories-grid {
            grid-template-columns: 1fr;
        }

        .bfhd-footer {
            padding: 40px 0 30px;
        }

        .bfhd-footer .bfhd-container {
            grid-template-columns: 1fr;
            gap: 30px;
        }

        .bfhd-footer-column {
            text-align: center;
            align-items: center;
        }
    }

    /* Polish Search UI Overrides */
    .bfhd-dropdown-trigger {
        background: transparent !important;
        border-radius: 30px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .bfhd-dropdown-trigger:hover {
        background: #F7FAFC !important;
        color: var(--color-text-dark);
    }

    .bfhd-dropdown-menu-select {
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        padding: 8px;
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .bfhd-checkbox-item {
        border-radius: 8px;
        padding: 10px 12px;
    }

    .bfhd-checkbox-item:hover {
        background: #F0F4F8;
        color: var(--color-primary);
    }

    .bfhd-checkbox-item input[type='checkbox'] {
        width: 18px;
        height: 18px;
        border: 2px solid #CBD5E0;
        transition: border-color 0.2s;
    }

    .bfhd-checkbox-item input[type='checkbox']:checked {
        border-color: var(--color-primary);
    }

    /* Ultimate Fix for Dark Background v1.1.0 */
    .bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger {
        background-color: transparent !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        color: var(--color-text-gray) !important;
    }

    .bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger:hover {
        background-color: #F7FAFC !important;
        background: #F7FAFC !important;
        color: var(--color-text-dark) !important;
    }

    .bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger span {
        background: transparent !important;
    }

    /* ==============================================
   FIXES FOR DROPDOWNS & CATEGORIES
   ============================================== */

    /* 1. Hide default choices tags in input to favor our custom Summary string */
    .choices__inner .choices__list--multiple .choices__item,
    .choices__inner .choices__list--single .choices__item {
        display: none !important;
    }

    /* 2. Style the Custom Summary (Placeholder/Value) */
    .bfhd_s_summary {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 16px;
        right: 36px;
        font-size: 15px;
        color: var(--color-text-dark);
        pointer-events: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 5;
        background: transparent;
    }

    .bfhd_s_summary.is-placeholder {
        color: #9CA3AF;
        /* Placeholder gray */
    }

    /* 3. Adjust inner to hold space */
    .choices__inner {
        min-height: 48px;
        display: flex;
        align-items: center;
        background: transparent !important;
        border: none !important;
        padding: 0 16px !important;
    }

    /* 4. Fix Choices Dropdown List Items */
    .choices__list--dropdown .choices__item {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 16px !important;
    }

    /* 5. Custom Label Styling - Truncation */
    .bfhd_s_label_text {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 12px;
        color: var(--color-text-dark);
    }

    /* 6. Enforce truncation width for countries per user request */
    /* Target country specific dropdown if possible, or apply globally to this class */
    .choices[data-type*="select-multiple"] .bfhd_s_label_text {
        /* "when the name of the country more than 15 characters, please make it shorter" */
        max-width: 25ch;
    }

    /* 7. Count Styling - Right Aligned */
    .bfhd-country-count {
        margin-left: auto !important;
        background: #EDF2F7;
        color: #718096;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        flex-shrink: 0;
        display: inline-block;
        line-height: normal;
    }


    /* 8. Fix dropdown Z-indexes and overflows */
    .choices__list--dropdown {
        width: auto !important;
        min-width: 100%;
        max-width: 300px;
        word-break: break-word;
    }
}
}

@media (max-width: 768px) {

    .bfhd-modern-header .bfhd-nav,
    .bfhd-auth-buttons {
        display: none;
    }

    .bfhd-mobile-toggle {
        display: flex;
    }

    .bfhd-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .bfhd-search-label {
        text-align: center;
    }

    .bfhd-categories-grid {
        grid-template-columns: 1fr;
    }

    .bfhd-footer {
        padding: 40px 0 30px;
    }

    .bfhd-footer .bfhd-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .bfhd-footer-column {
        text-align: center;
        align-items: center;
    }
}

/* Polish Search UI Overrides */
.bfhd-dropdown-trigger {
    background: transparent !important;
    border-radius: 30px;
    transition: background 0.2s ease, color 0.2s ease;
}

.bfhd-dropdown-trigger:hover {
    background: #F7FAFC !important;
    color: var(--color-text-dark);
}

.bfhd-dropdown-menu-select {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.bfhd-checkbox-item {
    border-radius: 8px;
    padding: 10px 12px;
}

.bfhd-checkbox-item:hover {
    background: #F0F4F8;
    color: var(--color-primary);
}

.bfhd-checkbox-item input[type='checkbox'] {
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E0;
    transition: border-color 0.2s;
}

.bfhd-checkbox-item input[type='checkbox']:checked {
    border-color: var(--color-primary);
}

/* Ultimate Fix for Dark Background v1.1.0 */
.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: var(--color-text-gray) !important;
}

.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger:hover {
    background-color: #F7FAFC !important;
    background: #F7FAFC !important;
    color: var(--color-text-dark) !important;
}

.bfhd-search-pill .bfhd-custom-dropdown .bfhd-dropdown-trigger span {
    background: transparent !important;
}

/* ==============================================
   FIXES FOR DROPDOWNS & CATEGORIES
   ============================================== */

/* 1. Hide default choices tags in input to favor our custom Summary string */
.choices__inner .choices__list--multiple .choices__item,
.choices__inner .choices__list--single .choices__item {
    display: none !important;
}

/* 2. Style the Custom Summary (Placeholder/Value) */
.bfhd_s_summary {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    right: 36px;
    font-size: 15px;
    color: var(--color-text-dark);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
    background: transparent;
}

.bfhd_s_summary.is-placeholder {
    color: #9CA3AF;
    /* Placeholder gray */
}

/* 3. Adjust inner to hold space */
.choices__inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    padding: 0 16px !important;
}

/* 4. Fix Choices Dropdown List Items */
.choices__list--dropdown .choices__item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px !important;
}

/* 5. Custom Label Styling - Truncation */
.bfhd_s_label_text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
    color: var(--color-text-dark);
}

/* 6. Enforce truncation width for countries per user request */
/* Target country specific dropdown if possible, or apply globally to this class */
.choices[data-type*="select-multiple"] .bfhd_s_label_text {
    /* "when the name of the country more than 15 characters, please make it shorter" */
    max-width: 15ch;
}

/* 7. Count Styling - Right Aligned */
.bfhd-country-count {
    margin-left: auto !important;
    background: #EDF2F7;
    color: #718096;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    display: inline-block;
    line-height: normal;
}


/* 8. Fix dropdown Z-indexes and overflows */
.choices__list--dropdown {
    width: auto !important;
    min-width: 100%;
    max-width: 300px;
    word-break: break-word;
}

/* 9. Search Counter Green Color */
.bfhd-hero-subtitle .bfhd-counter {
    color: var(--color-primary);
    font-weight: 700;
}

/* =========================================
   MERGED ADJUSTMENTS (Migrated from bfhd-theme.css replacement)
   ========================================= */


.bfhd-hero-left {
    position: relative !important;
}

.bfhd-hero-subtitle-version-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 480px;
}

.bfhd-hero-subtitle,
.bfhd-hero-version {
    margin: 0 !important;
}

.bfhd-modern-header {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.95) 40%,
            rgba(255, 255, 255, 0.8) 60%,
            rgba(255, 255, 255, 0.5) 75%,
            rgba(255, 255, 255, 0.2) 88%,
            rgba(255, 255, 255, 0) 100%) !important;
}

/* Note: .bfhd-hero-subtitle and .bfhd-counter overrides merged with existing if needed */
.bfhd-hero-subtitle {
    font-size: 18px !important;
}

.bfhd-counter {
    font-size: 21px !important;
    font-weight: 700 !important;
}

.entry-title,
h1.entry-title {
    display: none !important;
}

/* From search-dropdown-fix.css */
.bfhd-custom-dropdown {
    position: relative !important;
}

.bfhd-dropdown-menu-select {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #FFFFFF !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 8px 0 !important;
    display: none !important;
    z-index: 9999 !important;
    max-height: 350px !important;
    overflow-y: auto !important;
    min-width: 220px !important;
}

.bfhd-custom-dropdown.active .bfhd-dropdown-menu-select {
    display: block !important;
}

.bfhd-search-pill,
.bfhd-search-section {
    overflow: visible !important;
}