@media (max-width: 640px) {
    .header-simple {
        display: none !important;
    }
}

.company-info__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.company-info__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}

.company-info__logo {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--rfj-radius-md, 6px);
    flex-shrink: 0;
}

.company-info__text {
    min-width: 0;
}

.company-info__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
}

.company-info__subtitle {
    margin: 0.375rem 0 0;
    font-size: 0.875rem;
    color: var(--rfj-text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.company-info__action {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .company-info__header {
        flex-direction: column;
        align-items: stretch;
    }

    .company-info__identity {
        gap: 0.75rem;
    }

    .company-info__logo {
        max-width: 80px;
        max-height: 40px;
    }

    .company-info__title {
        font-size: 1rem;
    }

    .company-info__action {
        display: flex;
        justify-content: flex-end;
        padding-top: 0.75rem;
        border-top: 1px solid var(--rfj-color-border, #e6eaf0);
        margin-top: 0.25rem;
    }

    .company-info__action .btn-lg {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Reseller directory: one search field with a floating suggestions list. */
.rfj-resellers-directory .rfj-resellers-search-panel { overflow: visible; }
.rfj-resellers-directory .custom-select-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    height: auto;
    padding: 0 14px;
    border: 1px solid #d7dce3;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    cursor: text;
}
.rfj-resellers-directory .custom-select-selection:focus-within {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,.08);
}
.rfj-resellers-directory .custom-select-search-icon {
    display: flex;
    flex: 0 0 auto;
    color: #8b95a2;
}
.rfj-resellers-directory .custom-select-search-input,
.rfj-resellers-directory .custom-select-search-input:focus {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #17212f;
    font: inherit;
    font-size: 16px;
    appearance: none;
}
.rfj-resellers-directory .custom-select-search-input::placeholder { color: #788491; opacity: 1; }
.rfj-resellers-directory .custom-select-search-input::-webkit-search-cancel-button { display: none; }
.rfj-resellers-directory .custom-select-clear {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7c8795;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.rfj-resellers-directory .custom-select-clear[hidden] { display: none; }
.rfj-resellers-directory .custom-select-clear:hover { background: #f2f4f7; color: #26313d; }
.rfj-resellers-directory .custom-select-clear:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}
.rfj-resellers-directory .custom-select-dropdown {
    top: calc(100% + 6px);
    z-index: 35;
    border: 1px solid #e0e5ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(28,38,56,.12);
}
.rfj-resellers-directory .custom-select-results { max-height: min(48vh, 340px); }
.rfj-resellers-directory .custom-select-option { min-height: 48px; }
.rfj-resellers-directory .custom-select-option.is-highlighted,
.rfj-resellers-directory .custom-select-option:hover { background: #f2f6fd; }
.rfj-resellers-directory .custom-select-message { padding: 14px 16px; color: #737e8c; }
@media (max-width: 767px) {
    .rfj-resellers-directory .custom-select-results { max-height: min(43dvh, 270px); }
}

/* Keep the directory heading compact and place the guide beside the search. */
.rfj-reseller-hero { padding: 32px 0 20px; }
.rfj-reseller-hero .hero-subtitle { margin-bottom: 0; }
.rfj-resellers-directory .resellers-page { padding-top: 8px; }
.rfj-resellers-directory #search_form { margin-bottom: 0; }
.rfj-resellers-directory .rfj-resellers-guide {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    width: fit-content;
    max-width: 100%;
    min-height: 32px;
    margin: 6px 0 0 auto;
    color: #727982;
    font-size: 13px;
    text-decoration: none;
}
.rfj-resellers-directory .rfj-resellers-guide:hover { color: #0071e3; }
.rfj-resellers-directory .rfj-resellers-guide:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
    border-radius: 4px;
}
.rfj-resellers-directory .rfj-resellers-guide svg { width: 15px; height: 15px; }

@media (max-width: 767px) {
    .rfj-reseller-hero {
        overflow: visible;
        padding: 18px 0 10px;
        text-align: left;
    }
    .rfj-reseller-hero::before { display: none; }
    .rfj-reseller-hero .container { padding-right: 16px; padding-left: 16px; }
    .rfj-reseller-hero .post-hero-title {
        margin: 0;
        font-size: clamp(22px, 5.5vw, 27px);
        font-weight: 750;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .rfj-reseller-hero .hero-subtitle {
        margin: 6px 0 0;
        max-width: none;
        font-size: 13px;
        line-height: 1.5;
        color: #727982;
    }
    .rfj-resellers-directory { padding-right: 12px; padding-left: 12px; }
    .rfj-resellers-directory .resellers-page {
        min-height: 0;
        padding: 0 0 24px;
    }
    .rfj-resellers-directory .rfj-resellers-search-panel {
        position: relative;
        z-index: 2;
        margin: 0 0 16px;
        padding: 14px !important;
        border: 1px solid #e8ebef;
        border-radius: 18px;
        background: #fff;
        background-image: none;
        box-shadow: 0 2px 10px rgba(28, 38, 56, .035);
    }
    .rfj-resellers-directory .pretty-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        margin: 0 0 12px;
        padding: 4px;
        border-radius: 14px;
        background: #f1f3f5;
        list-style: none;
    }
    .rfj-resellers-directory .pretty-tabs > li { min-width: 0; }
    .rfj-resellers-directory .pretty-tabs > li > a {
        min-width: 0;
        min-height: 44px;
        height: auto;
        padding: 10px 4px;
        border: 0;
        border-radius: 11px;
        background: transparent;
        box-shadow: none;
        color: #6f7680;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        transform: none;
    }
    .rfj-resellers-directory .pretty-tabs > li > a svg { display: none; }
    .rfj-resellers-directory .pretty-tabs > li.active > a,
    .rfj-resellers-directory .pretty-tabs > li.active > a:hover {
        background: #fff;
        color: var(--rfj-text-primary);
        box-shadow: 0 1px 5px rgba(28, 38, 56, .1);
        font-weight: 700;
    }
    .rfj-resellers-directory .pretty-tabs > li.active > a::after { display: none; }
    .rfj-resellers-directory #search_form {
        position: relative;
        margin: 0;
        padding: 0 !important;
    }
    .rfj-resellers-directory .custom-select-selection { min-height: 52px; }
    .rfj-resellers-directory .custom-select-search-input,
    .rfj-resellers-directory .custom-select-search-input:focus { min-height: 50px; height: 50px; }
    .rfj-resellers-directory .custom-select-dropdown { max-height: min(56dvh, 340px); }
    .rfj-resellers-directory .rfj-resellers-guide {
        min-height: 40px;
        margin-top: 4px;
    }
    .rfj-resellers-directory .rfj-resellers-search-panel > .section-title {
        margin: 12px 0 8px;
        padding: 0;
        border: 0;
        color: #737b86;
        font-size: 13px;
        line-height: 1.5;
    }
    .rfj-resellers-directory .company-info {
        padding: 14px;
        border-radius: 14px;
    }
    .rfj-resellers-directory .company-info__action .btn-lg {
        min-height: 44px;
        min-width: 96px;
    }
    .rfj-resellers-directory .rfj-resellers-featured-banners { display: none; }
    .rfj-resellers-directory .page-content .section-title {
        margin-bottom: 12px;
        font-size: 18px;
        line-height: 1.45;
    }
    .rfj-resellers-directory .page-content .content-section > .text-muted.mb-4 { display: none; }
    .rfj-resellers-directory .location-filter {
        margin-bottom: 16px;
        padding: 12px;
        border-radius: 14px;
    }
    .rfj-resellers-directory .location-filter-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        padding-bottom: 0;
        border-bottom: 0;
    }
    .rfj-resellers-directory .location-filter-reset {
        display: flex;
        align-items: center;
        gap: 5px;
        min-height: 44px;
        padding: 0 8px;
    }
    .rfj-resellers-directory .filter-level { margin-bottom: 8px; }
    .rfj-resellers-directory .filter-tags {
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .rfj-resellers-directory .filter-tags::-webkit-scrollbar { display: none; }
    .rfj-resellers-directory .filter-tag {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 13px;
    }
}
