/* ================================================================
   ServiceFinder – consolidated homepage stylesheet
   Includes: service cards, city directory, featured cards, provider
   avatar positioning and category filters. Homepage-only styling.
   ================================================================ */

/* ServiceFinder homepage-only styling. Kept separate from global theme styles. */
#sec1.slw-sec {
    padding: 68px 0 76px;
    background: #fff;
}

#sec1 .section-title {
    margin-bottom: 34px;
}

.sf-home-services-grid {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.sf-home-service-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(25, 45, 80, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.sf-home-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(25, 45, 80, .12);
}

.sf-home-service-image {
    display: block;
    width: 100%;
    height: 176px;
    overflow: hidden;
    background: #f1f4f8;
}

.sf-home-service-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.sf-home-service-card:hover .sf-home-service-image img {
    transform: scale(1.045);
}

.sf-home-service-body {
    padding: 16px 17px 14px;
}

.sf-home-service-category {
    display: inline-block;
    margin-bottom: 8px;
    color: #ff5a1f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sf-home-service-body h3 {
    min-height: 42px;
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.sf-home-service-body h3 a { color: #243b63; }
.sf-home-service-body h3 a:hover { color: #ff5a1f; }

.sf-home-service-location {
    margin-bottom: 9px;
    color: #77849a;
    font-size: 12px;
}

.sf-home-service-location i { margin-right: 5px; color: #ff5a1f; }

.sf-home-service-body p {
    min-height: 38px;
    margin: 0 0 13px;
    color: #788398;
    font-size: 12px;
    line-height: 1.55;
}

.sf-home-service-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px solid #edf0f5;
    color: #243b63;
    font-size: 12px;
    font-weight: 700;
}

.sf-home-service-bottom a { color: #ff5a1f; white-space: nowrap; }
.sf-home-service-bottom a i { margin-left: 4px; }

.sf-home-services-more {
    margin: 34px auto 0;
    text-align: center;
}

.sf-home-view-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 23px;
    border-radius: 6px;
    background: #36549a;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(54, 84, 154, .18);
}

.sf-home-view-more:hover { background: #ff5a1f; }
.sf-home-services-empty { grid-column: 1 / -1; text-align: center; color: #77849a; }

@media (max-width: 1100px) {
    .sf-home-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 767px) {
    #sec1.slw-sec { padding: 48px 0 55px; }
    .sf-home-services-grid { width: min(100% - 28px, 560px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .sf-home-service-image { height: 135px; }
    .sf-home-service-body { padding: 12px; }
    .sf-home-service-body h3 { min-height: 0; font-size: 13px; }
    .sf-home-service-body p { min-height: 0; font-size: 11px; }
    .sf-home-service-bottom { align-items: flex-start; flex-direction: column; font-size: 11px; }
}

@media (max-width: 420px) {
    .sf-home-services-grid { grid-template-columns: 1fr; max-width: 360px; }
    .sf-home-service-image { height: 190px; }
}


/* Compact city directory */
.sf-home-cities-grid{width:min(1120px,calc(100% - 40px));margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.sf-home-city-card{min-width:0;min-height:86px;display:flex;align-items:center;gap:12px;padding:12px 13px;border:1px solid #e8edf5;border-radius:10px;background:#fff;box-shadow:0 4px 15px rgba(34,55,90,.045);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.sf-home-city-card:hover{transform:translateY(-2px);border-color:rgba(255,90,31,.35);box-shadow:0 8px 22px rgba(34,55,90,.09)}
.sf-home-city-thumb{flex:0 0 56px;width:56px;height:56px;overflow:hidden;border-radius:9px;background:#eef2f8}
.sf-home-city-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.sf-home-city-copy{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:4px}
.sf-home-city-copy strong{color:#263f68;font-size:14px;line-height:1.25;font-weight:700}
.sf-home-city-copy small{color:#8993a5;font-size:11px;line-height:1.3}
.sf-home-city-count{flex:0 0 auto;padding:5px 8px;border-radius:20px;background:#f1f4fa;color:#36549a;font-size:10px;font-weight:700;white-space:nowrap}
.sf-home-city-arrow{color:#ff5a1f;font-size:11px}.sf-home-cities-more{margin-top:24px}
/* Keep provider avatar within the image so it does not cover listing text. */
.sf-home-featured-section .geodir-category-img{overflow:visible}
.sf-home-featured-section .listing-avatar{right:16px;bottom:14px;z-index:15}
.sf-home-featured-section .listing-avatar img{width:42px;height:42px;box-shadow:0 0 0 4px #fff}
.sf-home-featured-section .geodir-category-content{position:relative;z-index:2;clear:both}
.sf-home-featured-section .geodir-category-content-title{padding-top:12px}
.sf-home-featured-section .geodir-category-content-title-item h3{padding-right:8px;line-height:1.35}
@media(max-width:991px){.sf-home-cities-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){.sf-home-cities-grid{width:min(100% - 28px,560px);grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sf-home-city-card{min-height:74px;padding:9px;gap:9px}.sf-home-city-thumb{flex-basis:46px;width:46px;height:46px}.sf-home-city-copy strong{font-size:12px}.sf-home-city-copy small{font-size:10px}.sf-home-city-count{padding:4px 6px;font-size:9px}.sf-home-city-arrow{display:none}}
@media(max-width:420px){.sf-home-cities-grid{grid-template-columns:1fr;max-width:360px}}


/* ServiceFinder homepage featured listings: compact, aligned cards and reliable category filters. */
.sf-home-featured-section .listing-filters {
    display:flex; flex-wrap:wrap; justify-content:center; gap:6px;
    margin:0 auto 24px; float:none; width:100%;
}
.sf-home-featured-section .listing-filters a.gallery-filter {
    float:none; display:inline-flex; align-items:center; justify-content:center;
    min-height:38px; padding:0 17px; border:1px solid #e8edf4;
    border-radius:6px; background:#fff; color:#75839a; font-size:12px;
    font-weight:600; line-height:1.3; transition:all .2s ease;
}
.sf-home-featured-section .listing-filters a.gallery-filter:hover,
.sf-home-featured-section .listing-filters a.gallery-filter-active {
    background:#ff5a1f; border-color:#ff5a1f; color:#fff;
}
.sf-home-featured-section .grid-item-holder.gallery-items {
    display:block; width:100%; height:auto !important; min-height:0;
    margin:0 -10px 22px; overflow:visible;
}
.sf-home-featured-section .gallery-item {
    width:25%; padding:10px; box-sizing:border-box;
}
.sf-home-featured-section .gallery-item .listing-item { width:100%; padding:0; margin:0; float:none; }
.sf-home-featured-section .geodir-category-listing {
    position:relative; display:flex; flex-direction:column; height:100%; min-height:0;
    overflow:visible; border:1px solid #e9edf3; border-radius:12px;
    background:#fff; box-shadow:0 5px 18px rgba(28,45,75,.06);
    transition:transform .2s ease, box-shadow .2s ease;
}
.sf-home-featured-section .geodir-category-listing:hover {
    transform:translateY(-3px); box-shadow:0 10px 24px rgba(28,45,75,.11);
}
.sf-home-featured-section .geodir-category-img {
    position:relative; float:none; width:100%; height:168px; flex:0 0 168px;
    overflow:visible; border-radius:11px 11px 0 0; z-index:2;
}
.sf-home-featured-section .geodir-category-img:before { display:none; }
.sf-home-featured-section .geodir-category-img-wrap,
.sf-home-featured-section .geodir-category-img-wrap img {
    display:block; width:100%; height:100%; border-radius:11px 11px 0 0;
}
.sf-home-featured-section .geodir-category-img-wrap { overflow:hidden; }
.sf-home-featured-section .geodir-category-img-wrap img { object-fit:cover; }
.sf-home-featured-section .listing-avatar {
    position:absolute; right:14px; bottom:-18px; top:auto; z-index:5;
    width:42px; height:42px; margin:0; padding:3px; border-radius:50%;
    background:#fff; box-shadow:0 2px 10px rgba(22,35,55,.18);
}
.sf-home-featured-section .listing-avatar img {
    display:block; width:36px; height:36px; border:0; box-shadow:none;
    border-radius:50%; object-fit:cover;
}
.sf-home-featured-section .listing-avatar .avatar-tooltip {
    top:auto; right:-5px; bottom:calc(100% + 8px); margin:0; padding:7px 10px;
    min-width:0; width:max-content; max-width:190px; height:auto; line-height:1.35;
    border-radius:6px; white-space:normal; text-align:center; font-size:10px;
    box-shadow:0 4px 14px rgba(0,0,0,.13); z-index:8;
}
.sf-home-featured-section .listing-avatar:hover .avatar-tooltip { margin:0; }
.sf-home-featured-section .geodir-category-content {
    position:relative; z-index:1; display:flex; flex:1 1 auto; flex-direction:column;
    float:none; width:100%; padding:25px 15px 0; border-radius:0 0 11px 11px;
    background:#fff;
}
.sf-home-featured-section .geodir-category-content-title { padding:0; margin:0 0 8px; }
.sf-home-featured-section .geodir-category-content-title-item { width:100%; padding:0; }
.sf-home-featured-section .geodir-category-content h3,
.sf-home-featured-section .geodir-category-content h3 a {
    margin:0; font-size:14px; line-height:1.4; font-weight:700; color:#405b83;
}
.sf-home-featured-section .geodir-category-location {
    margin-top:7px; font-size:11px; line-height:1.4; color:#65738a;
}
.sf-home-featured-section .geodir-category-text { flex:1 1 auto; padding:10px 0 8px; }
.sf-home-featured-section .geodir-category-text p {
    margin:0; padding:0; font-size:11px; line-height:1.65; color:#8792a2;
}
.sf-home-featured-section .geodir-category-footer {
    display:flex; align-items:center; min-height:48px; margin:0 -15px;
    padding:0 12px; border-top:1px solid #edf0f4; border-radius:0 0 11px 11px;
}
.sf-home-featured-section .geodir-category-footer .listing-item-category-wrap {
    display:flex; align-items:center; gap:8px; min-width:0; font-size:11px;
}
.sf-home-featured-section .geodir-category-footer .listing-item-category {
    display:flex; align-items:center; justify-content:center; width:30px; height:30px;
    min-width:30px; border-radius:50%; font-size:12px;
}
.sf-home-featured-section .geodir-opt-list { margin-left:auto; }
.sf-home-featured-section .price-level { display:none; }
.sf-home-featured-section .btn.dec_btn { display:table; margin:18px auto 0; }
@media (max-width:1199px) {
    .sf-home-featured-section .gallery-item { width:33.3333%; }
}
@media (max-width:767px) {
    .sf-home-featured-section .gallery-item { width:50%; padding:7px; }
    .sf-home-featured-section .geodir-category-img { height:145px; flex-basis:145px; }
    .sf-home-featured-section .geodir-category-content { padding:24px 12px 0; }
    .sf-home-featured-section .geodir-category-footer { margin:0 -12px; padding:0 9px; }
    .sf-home-featured-section .listing-filters { justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; padding-bottom:6px; }
    .sf-home-featured-section .listing-filters a.gallery-filter { white-space:nowrap; }
}
@media (max-width:480px) {
    .sf-home-featured-section .gallery-item { width:100%; max-width:360px; margin:0 auto; float:none; }
}


/* Compact city cards for current dynamic city markup */
.particles-wrapper .listing-item-grid_container { max-width:1120px; margin:0 auto; }
.particles-wrapper .listing-item-grid_container > .row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0; }
.particles-wrapper .listing-item-grid_container > .row > [class*="col-"] { width:auto; max-width:none; padding:0; float:none; }
.particles-wrapper .listing-item-grid { position:relative; display:flex; align-items:center; min-height:82px; height:auto; padding:12px 14px 12px 82px; overflow:hidden; border:1px solid #e8edf5; border-radius:10px; background:#fff; box-shadow:0 4px 15px rgba(34,55,90,.05); }
.particles-wrapper .listing-item-grid .bg { position:absolute; left:12px; top:50%; width:56px; height:56px; transform:translateY(-50%); border-radius:9px; background-position:center; background-size:cover; overflow:hidden; }
.particles-wrapper .listing-item-grid .d-gr-sec { display:none; }
.particles-wrapper .listing-item-grid .listing-counter { position:absolute; left:76px; top:7px; z-index:2; padding:3px 7px; border-radius:12px; font-size:9px; line-height:1.2; }
.particles-wrapper .listing-item-grid_title { position:static; width:100%; padding:0; margin:0; }
.particles-wrapper .listing-item-grid_title h3 { margin:0 0 3px; font-size:14px; line-height:1.3; }
.particles-wrapper .listing-item-grid_title h3 a { color:#263f68; }
.particles-wrapper .listing-item-grid_title p { margin:0; color:#8993a5; font-size:10px; line-height:1.35; }
.particles-wrapper .btn.dec_btn { margin:22px auto 0; }
@media(max-width:991px) { .particles-wrapper .listing-item-grid_container > .row { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:767px) {
 .particles-wrapper .listing-item-grid_container > .row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .particles-wrapper .listing-item-grid { min-height:72px; padding:9px 9px 9px 64px; }
 .particles-wrapper .listing-item-grid .bg { left:8px; width:46px; height:46px; }
 .particles-wrapper .listing-item-grid .listing-counter { left:55px; top:4px; font-size:8px; }
 .particles-wrapper .listing-item-grid_title h3 { font-size:12px; }
 .particles-wrapper .listing-item-grid_title p { font-size:9px; }
}
@media(max-width:420px) { .particles-wrapper .listing-item-grid_container > .row { grid-template-columns:1fr; max-width:360px; margin:0 auto; } }

/* Featured Listing: isolated layout overrides (do not affect other homepage sections). */
.sf-home-featured-section .grid-item-holder.gallery-items {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%; height: auto !important; min-height: 0;
    margin: 0 0 22px; padding: 0; overflow: visible;
}
.sf-home-featured-section .gallery-items > .gallery-item {
    display: block !important; position: relative !important;
    inset: auto !important; left: auto !important; top: auto !important;
    width: auto !important; height: auto !important;
    margin: 0 !important; padding: 0 !important;
    transform: none !important; box-sizing: border-box;
}
.sf-home-featured-section .gallery-items > .gallery-item[hidden] { display: none !important; }
.sf-home-featured-section .geodir-category-listing {
    height: 100%; min-height: 0; overflow: hidden;
    border: 1px solid #e8edf4; border-radius: 11px;
    box-shadow: 0 4px 16px rgba(28,45,75,.07);
}
.sf-home-featured-section .geodir-category-img {
    height: 158px; flex: 0 0 158px; overflow: hidden;
    border-radius: 10px 10px 0 0;
}
.sf-home-featured-section .geodir-category-img-wrap,
.sf-home-featured-section .geodir-category-img-wrap img { height: 100%; }
.sf-home-featured-section .listing-avatar {
    top: 12px !important; right: 12px !important; bottom: auto !important;
    width: 42px; height: 42px; padding: 3px; z-index: 4;
    background: #fff; border-radius: 50%;
    box-shadow: 0 2px 9px rgba(0,0,0,.2);
}
.sf-home-featured-section .listing-avatar img {
    display: block; width: 36px !important; height: 36px !important;
    border-radius: 50%; object-fit: cover; box-shadow: none !important;
}
.sf-home-featured-section .listing-avatar .avatar-tooltip {
    top: 48px; right: 0; bottom: auto; z-index: 6;
    max-width: 190px; height: auto; padding: 6px 9px;
    white-space: normal; line-height: 1.35;
}
.sf-home-featured-section .geodir-category-content {
    display: flex; flex-direction: column; min-height: 220px;
    padding: 14px 14px 0; background: #fff;
}
.sf-home-featured-section .geodir-category-content-title { margin: 0 0 6px; padding: 0; }
.sf-home-featured-section .geodir-category-content h3,
.sf-home-featured-section .geodir-category-content h3 a {
    margin: 0; color: #405b83; font-size: 13px; line-height: 1.4; font-weight: 700;
}
.sf-home-featured-section .geodir-category-location { margin-top: 6px; color: #77849a; font-size: 10px; }
.sf-home-featured-section .geodir-category-text { flex: 1 1 auto; padding: 8px 0 10px; }
.sf-home-featured-section .geodir-category-text p { margin: 0; font-size: 10px; line-height: 1.55; }
.sf-home-featured-section .geodir-category-footer { min-height: 42px; margin: 0 -14px; padding: 0 10px; }
.sf-home-featured-section .geodir-category-footer .listing-item-category { width: 27px; height: 27px; min-width: 27px; }
@media (max-width: 1100px) {
    .sf-home-featured-section .grid-item-holder.gallery-items { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .sf-home-featured-section .grid-item-holder.gallery-items { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .sf-home-featured-section .geodir-category-img { height: 135px; flex-basis: 135px; }
    .sf-home-featured-section .geodir-category-content { min-height: 205px; padding: 13px 11px 0; }
    .sf-home-featured-section .geodir-category-footer { margin: 0 -11px; }
}
@media (max-width: 480px) {
    .sf-home-featured-section .grid-item-holder.gallery-items { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
}
