sub,
sup {
    position: relative;
    font-size: 75%;
    line-height: 0;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

.closing-status-ribbon {
    position: absolute;
    top: 50px;
    right: -48px;
    width: 300px;
    padding: 6px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(211, 47, 47, 0.75);
    transform: rotate(35deg);
    z-index: 6;
    pointer-events: none;
}

.three-columns-grid .closing-status-ribbon {
    top: 42px;
    right: -58px;
    width: 260px;
}

.listing-carousel .closing-status-ribbon {
    top: 44px;
    right: -56px;
    width: 260px;
}

@media only screen and (max-width: 1064px) {
    .closing-status-ribbon {
        top: 42px;
        right: -54px;
        width: 260px;
    }
}

@media only screen and (max-width: 768px) {
    .closing-status-ribbon {
        top: 34px;
        right: -62px;
        width: 240px;
        font-size: 11px;
    }
}

/* agent details (one-column listing) ribbon fix */
.agent-listing-ribbon-fix .geodir-category-img {
    overflow: hidden;
}

.agent-listing-ribbon-fix .closing-status-ribbon {
    top: 28px;
    right: -48px;
    width: 190px;
    padding: 5px 0;
    font-size: 11px;
    transform: rotate(34deg);
}

@media only screen and (max-width: 768px) {
    .agent-listing-ribbon-fix .closing-status-ribbon {
        top: 24px;
        right: -42px;
        width: 165px;
        font-size: 9px;
    }
}

.title-type-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 10px;
    background: #17a2b8;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.price-type-label {
    display: inline-block;
    margin-left: 6px;
    font-size: 18px;
    font-weight: 400;
    color: #D32F2F;
}

.price-closed {
    text-decoration: line-through;
}

.price-line {
    display: block;
    line-height: 1.5;
}

.price-line .price-label {
    display: inline-block;
    min-width: 40px;
    font-size: 13px;
    font-weight: 500;
    color: #566985;
}

.price-line .price-type-label {
    font-size: 14px;
}

/* Cegah konten yang melebar membuat halaman bisa digeser ke kanan di mobile */
#main {
    overflow-x: clip;
}

/* ------ Floating search (beranda): bar di bawah header ------ */
.floating-search {
    position: fixed;
    top: 80px;
    left: 50%;
    z-index: 49;
    width: calc(100% - 40px);
    max-width: 760px;
    transform: translate(-50%, -20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 250ms ease, opacity 250ms ease, visibility 250ms;
}
.floating-search-active .floating-search {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}
.floating-search__form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.floating-search__field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.floating-search__field i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #999;
}
.floating-search__field input,
.floating-search__select {
    width: 100%;
    height: 44px;
    border: 1px solid #eee;
    border-radius: 50px;
    background: #f7f7f7;
    font-size: 13px;
    color: #333;
    outline: none;
}
.floating-search__field input {
    padding: 0 16px 0 40px;
}
.floating-search__select {
    flex: 0 0 150px;
    width: 150px;
    padding: 0 16px;
    cursor: pointer;
}
.floating-search__field input:focus,
.floating-search__select:focus {
    border-color: #D32F2F;
    background: #fff;
}
.floating-search__btn {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile: bar dibuat lebih ringkas, tombol hanya ikon */
@media only screen and (max-width: 767px) {
    /* Pakai vw (lebar layar), bukan %/left:50%: bila ada konten yang melebar,
       browser mobile ikut melebarkan acuan elemen fixed sehingga bar bergeser ke kanan */
    .floating-search {
        top: 76px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: none;
        transform: translateY(-20px);
    }
    .floating-search-active .floating-search {
        transform: translateY(0);
    }
    .floating-search__form {
        gap: 6px;
        padding: 6px;
    }
    .floating-search__field i {
        left: 12px;
    }
    .floating-search__field input,
    .floating-search__select {
        height: 40px;
        font-size: 13px;
    }
    .floating-search__field input {
        padding: 0 10px 0 32px;
    }
    .floating-search__select {
        flex: 0 0 105px;
        width: 105px;
        padding: 0 8px;
    }
    .floating-search__btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }
    .floating-search__btn-text {
        display: none;
    }
}

/* Search box hero di mobile: beri jarak antar field & dropdown status */
@media only screen and (max-width: 800px) {
    #heroSearchForm .main-search-input-item {
        margin-bottom: 16px;
    }
    #heroSearchForm .nice-select .list {
        margin-top: 6px;
        border-radius: 4px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Card hasil pencarian: listing-item harus penuh selebar kolom gallery-item.
   Tanpa ini, di tablet (<=1070px) rule .three-columns-grid .listing-item (50%/33%)
   ikut mengecilkan card di dalam kolom sehingga terlihat terpisah. */
.three-columns-grid .gallery-item .listing-item {
    width: 100%;
}

/* SEO: judul utama halaman memakai <h1>; samakan tampilannya dengan heading bawaan tema (h2/h4) */
.hero-title h1 {
    color: #fff;
    font-size: 40px;
    line-height: 50px;
    text-align: left;
    font-weight: 600;
}

.section-title h1 {
    color: #144273;
    font-size: 26px;
    text-align: left;
    font-weight: 600;
    padding-top: 5px;
}

.single-par .section-title h1,
.single-par2 .section-title h1 {
    color: #fff;
    font-size: 36px;
    padding-top: 0;
}

.section-title.st-center h1 {
    text-align: center;
}

.list-main-wrap-title h1 {
    text-align: left;
    font-weight: 500;
    font-size: 16px;
    float: left;
    color: #566985;
    position: relative;
    top: 12px;
}

.list-main-wrap-title h1 span {
    color: #D32F2F;
}

.list-main-wrap-title h1 strong {
    position: absolute;
    left: 100%;
    top: 0px;
    margin-left: 14px;
    background: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05);
}

.agent_card-title h1 {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.card-info-content .agent_card-title h1 {
    font-size: 24px;
    color: #fff;
}

@media only screen and (max-width: 564px) {
    .hero-title h1 {
        font-size: 34px;
        line-height: 40px;
    }
}

/* ------ listing page heading (Property for Sale / Rent / Location) ------ */
.listing-page-heading {
    text-align: left;
    margin-bottom: 25px;
}

.listing-page-heading h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
    line-height: 1.3;
}

.listing-page-heading p {
    margin-top: 6px;
    padding-bottom: 0;
    font-size: 14px;
    color: #566985;
    text-align: left;
}

/* ------ popular locations section ------ */
.popular-locations-section {
    position: relative;
    overflow: hidden;
    padding: 50px 0;
    margin-bottom: 50px;
    background: #D32F2F;
}

/* Di homepage section diapit section lain yang sudah punya padding */
.popular-locations-section.popular-locations-inline {
    margin-bottom: 0;
}

/* Halaman listing: perpendek jarak paginasi ke section Popular Locations */
.listing-results-section {
    padding-bottom: 10px;
}

/* Section angka (homepage) tepat di atas Popular Locations: perpendek jaraknya */
.home-facts-section {
    margin-bottom: 20px;
}

.popular-locations-section .pwh_bg {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    opacity: 0.2;
    background-position: center bottom;
    background-repeat: repeat-x;
}

.popular-locations-section .container {
    position: relative;
    z-index: 2;
}

.popular-locations-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    text-align: left;
}

.popular-locations-tab {
    display: inline-block;
    float: left;
    padding-bottom: 14px;
    margin-bottom: -1px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-align: left;
    border-bottom: 3px solid #fff;
}

.popular-locations-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 30px;
    text-align: left;
}

.popular-locations-list li {
    float: none;
    width: auto;
}

.popular-locations-list a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    transition: color 200ms linear;
}

.popular-locations-list a:hover {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: #fff;
    text-underline-offset: 4px;
}

.popular-locations-section:not(.is-expanded) .popular-location-extra {
    display: none;
}

.popular-locations-toggle {
    float: left;
    margin-top: 24px;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    cursor: pointer;
}

.popular-locations-toggle:hover {
    color: #fff;
}

.popular-locations-toggle i {
    margin-left: 6px;
    color: #fff;
    transition: transform 200ms linear;
}

.popular-locations-section.is-expanded .popular-locations-toggle i {
    transform: rotate(180deg);
}

@media only screen and (max-width: 1064px) {
    .popular-locations-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 768px) {
    .popular-locations-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listing-page-heading h1 {
        font-size: 18px;
    }
}

@media only screen and (max-width: 480px) {
    .popular-locations-list {
        grid-template-columns: 1fr;
    }
}

/* ------ header: logo & menu diperbesar (tinggi header tetap 70px) ------ */
.main-header .logo-holder {
    top: 13px;
}

.main-header .logo-holder img {
    height: 44px;
}

@media only screen and (min-width: 1071px) {
    .main-header .nav-holder nav li a {
        font-size: 15px;
    }

    .main-header .nav-holder nav li ul a {
        font-size: 14px;
    }

    .main-header .show-reg-form {
        font-size: 15px;
    }

    .main-header .add-list {
        font-size: 14px;
    }
}

/* ------ status switch For Sale / For Rent (halaman listing) ------ */
.status-switch {
    position: relative;
    display: flex;
    width: 100%;
    height: 50px;
    padding: 4px;
    border-radius: 50px;
    background: #F5F7FB;
    border: 1px solid #e5e7f2;
}

.status-switch-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 50px;
    background: #D32F2F;
    transition: transform 250ms ease;
}

.status-switch.is-rent .status-switch-thumb {
    transform: translateX(100%);
}

.status-switch-option {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #566985;
    transition: color 250ms ease;
}

.status-switch-option:hover {
    color: #D32F2F;
}

.status-switch-option.active,
.status-switch-option.active:hover {
    color: #fff;
}

@media only screen and (max-width: 768px) {
    .status-switch {
        margin-bottom: 20px;
    }
}

/* Hasil listing saat dimuat ulang lewat AJAX (pindah Sale / Rent atau kategori) */
#listingResults {
    transition: opacity 200ms ease;
}

#listingResults.is-loading {
    opacity: 0.4;
    pointer-events: none;
}
