/* ==========================================================
   Public Website — Stage 5A prototype
   Independent from admin.css. Light / navy / blue, amber for featured.
   ========================================================== */
:root {
    --pub-navy: #0f1f3d;
    --pub-text: #1e293b;
    --pub-muted: #64748b;
    --pub-blue: #2563eb;
    --pub-blue-dark: #1d4ed8;
    --pub-blue-soft: #eff4ff;
    --pub-amber: #f59e0b;
    --pub-green: #059669;
    --pub-border: #e5e9f0;
    --pub-bg-muted: #f7f9fc;
    --pub-radius: 12px;
    --pub-radius-sm: 8px;
    --pub-shadow: 0 1px 2px rgba(15, 31, 61, .05), 0 4px 14px rgba(15, 31, 61, .06);
    --pub-shadow-hover: 0 8px 26px rgba(15, 31, 61, .12);
}

html, body { max-width: 100%; }
* { min-width: 0; }

.pub-body {
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
    color: var(--pub-text);
    background: #fff;
    line-height: 1.6;
}

.pub-body a:not(.btn) { color: var(--pub-blue); text-decoration: none; }
.pub-body a:not(.btn):hover { color: var(--pub-blue-dark); }
.pub-body a.btn { text-decoration: none; }
.min-w-0 { min-width: 0; }

.btn-primary { --bs-btn-bg: var(--pub-blue); --bs-btn-border-color: var(--pub-blue); --bs-btn-hover-bg: var(--pub-blue-dark); --bs-btn-hover-border-color: var(--pub-blue-dark); }
.btn { border-radius: var(--pub-radius-sm); font-weight: 600; }
.form-control, .form-select { border-radius: var(--pub-radius-sm); border-color: var(--pub-border); }
.form-label { font-size: .8rem; font-weight: 600; color: var(--pub-muted); margin-bottom: .25rem; display: block; }

/* ---------- Header ---------- */
.pub-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--pub-border);
}
.pub-header .navbar { padding: .4rem 0; }
.pub-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; color: var(--pub-navy) !important; }
.pub-brand-mark {
    width: 34px; height: 34px; border-radius: 10px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pub-blue); color: #fff; font-size: 1.05rem; font-weight: 800;
}
.pub-nav .nav-link { color: var(--pub-text); font-weight: 600; padding: .4rem .75rem !important; border-radius: var(--pub-radius-sm); }
.pub-nav .nav-link:hover { color: var(--pub-blue); }
.pub-nav .nav-link.active { color: var(--pub-blue); background: var(--pub-blue-soft); }
.pub-cta-btn { white-space: nowrap; }

.pub-shine-btn { position: relative; overflow: hidden; }
.pub-shine-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.65) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: pub-shine 3.1s ease-in-out infinite;
}
@keyframes pub-shine {
    0% { left: -75%; }
    35%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .pub-shine-btn::after { animation: none; display: none; }
}

@media (max-width: 991.98px) {
    .pub-header .navbar-collapse { padding: .5rem 0 .75rem; }
    .pub-nav .nav-link { padding: .65rem .75rem !important; }
    .pub-cta-btn { width: 100%; margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.pub-hero {
    position: relative;
    padding: 2rem 0 1.75rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 31, 61, .92), rgba(29, 78, 216, .78)),
        radial-gradient(circle at 20% 20%, #3b82f6 0, transparent 45%),
        #0f1f3d;
}
.pub-hero-text { max-width: 640px; margin-bottom: 1rem; }
.pub-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 4.2vw, 2.35rem); margin-bottom: .35rem; }
.pub-hero p { color: rgba(255, 255, 255, .85); font-size: 1rem; margin: 0; }

.pub-search {
    background: #fff; color: var(--pub-text);
    border-radius: var(--pub-radius);
    padding: .85rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.pub-search-btn { min-height: 38px; padding-inline: 1.5rem; }

/* Home hero with image */
.pub-hero.pub-hero-img {
    min-height: 440px; display: flex; align-items: center;
    padding: 3rem 0;
    background:
        linear-gradient(180deg, rgba(15, 31, 61, .35), rgba(15, 31, 61, .55)),
        url('/images/home-hero.jpg') center / cover no-repeat,
        #0f1f3d;
}
.pub-hero-img .container { width: 100%; }
.pub-hero-img .pub-hero-text { max-width: 720px; margin: 0 auto 1.5rem; text-align: center; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.pub-hero-img h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.pub-hero-img p { font-size: clamp(1rem, 2.2vw, 1.2rem); color: #fff; }
.pub-hero-img .pub-search { max-width: 1040px; margin: 0 auto; border-radius: 4px; padding: 1.1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.pub-hero-img .pub-search .form-control, .pub-hero-img .pub-search .form-select { border-radius: 3px; min-height: 42px; }
.pub-hero-img .pub-search-btn { min-height: 42px; border-radius: 3px; }

/* Property types strip */
.pub-types { padding: 1.5rem 0 .5rem; background: #fff; border-bottom: 1px solid var(--pub-border); }
.pub-section-sub { margin: .1rem 0 0; font-size: .88rem; color: var(--pub-muted); }
.pub-types-scroll {
    display: flex; gap: .6rem; overflow-x: auto; padding: .25rem .1rem 1rem;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.pub-types-scroll .pub-category {
    flex: 0 0 auto; flex-direction: row; gap: .5rem; height: auto;
    padding: .55rem 1.1rem; border-radius: 4px; white-space: nowrap; scroll-snap-align: start;
}
.pub-types-scroll .pub-category i { font-size: 1.15rem; }
.pub-types-scroll .pub-category:hover { background: var(--pub-blue-soft); }

@media (min-width: 992px) {
    .pub-hero { padding: 3rem 0 2.5rem; }
    .pub-search { padding: 1rem; }
}

/* ---------- Sections ---------- */
.pub-section { padding: 1.75rem 0; }
.pub-section-muted { background: var(--pub-bg-muted); }
.pub-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.pub-section-head h2 { font-size: 1.25rem; font-weight: 800; color: var(--pub-navy); margin: 0; }
.pub-more { font-weight: 600; font-size: .9rem; white-space: nowrap; }

.pub-page-head { background: var(--pub-bg-muted); border-bottom: 1px solid var(--pub-border); padding: .5rem 0; }
.pub-page-head h1 { font-size: clamp(1.35rem, 3.5vw, 1.9rem); font-weight: 800; color: var(--pub-navy); margin: 0; }
.pub-page-head .breadcrumb { margin-bottom: .35rem; }
.breadcrumb { --bs-breadcrumb-divider: "‹"; }

/* ---------- Image placeholders ---------- */
.pub-ph-0 { background: linear-gradient(135deg, #c7d7f5, #8fb0ea); }
.pub-ph-1 { background: linear-gradient(135deg, #d9e8e3, #9cc7b8); }
.pub-ph-2 { background: linear-gradient(135deg, #efe3d3, #d6b995); }
.pub-ph-3 { background: linear-gradient(135deg, #dcdff0, #a9aed6); }
.pub-ph-4 { background: linear-gradient(135deg, #e4ecf2, #aac0d3); }
.pub-ph-5 { background: linear-gradient(135deg, #f1e4e4, #d9aaaa); }
.pub-ph-icon { font-size: 2.5rem; color: rgba(255, 255, 255, .85); }

/* ---------- Property card ---------- */
.pub-card {
    height: 100%;
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--pub-border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--pub-shadow);
    transition: box-shadow .2s, transform .2s;
}
.pub-card:hover { box-shadow: var(--pub-shadow-hover); transform: translateY(-2px); }
.pub-card-media {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 10; overflow: hidden;
}
.pub-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pub-badge {
    position: absolute; top: .6rem;
    font-size: .75rem; font-weight: 700;
    padding: .25rem .6rem; border-radius: 3px; color: #fff;
}
.pub-badge-sale, .pub-badge-rent { inset-inline-start: .6rem; }
.pub-badge-featured { inset-inline-end: .6rem; }
.pub-badge-sale { background: var(--pub-blue); }
.pub-badge-rent { background: var(--pub-green); }
.pub-badge-featured { background: var(--pub-amber); color: #3b2500; }
.pub-card-count {
    position: absolute; bottom: .6rem; inset-inline-end: .6rem;
    font-size: .75rem; color: #fff; background: rgba(15, 31, 61, .55);
    padding: .15rem .5rem; border-radius: 999px;
}
.pub-card-body { padding: .65rem .85rem .8rem; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pub-card-price { font-size: 1.1rem; font-weight: 800; color: var(--pub-navy); }
.pub-card-title { font-size: .96rem; font-weight: 700; margin: .1rem 0 .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-card-title a { color: var(--pub-text) !important; }
.pub-card-title a:hover { color: var(--pub-blue) !important; }
.pub-card-location { font-size: .82rem; color: var(--pub-muted); margin: 0 0 .45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-card-specs {
    list-style: none; padding: .45rem 0 0; margin: 0 0 .45rem;
    display: flex; flex-wrap: wrap; gap: .3rem .9rem;
    border-top: 1px solid var(--pub-border);
    font-size: .8rem; color: var(--pub-text);
}
.pub-card-specs i { color: var(--pub-muted); margin-inline-end: .2rem; }
.pub-card-link { margin-top: auto; font-weight: 700; font-size: .88rem; }

/* ---------- Categories / features / CTA ---------- */
.pub-category {
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .7rem .5rem; height: 100%; text-align: center;
    background: #fff; border: 1px solid var(--pub-border); border-radius: var(--pub-radius);
    transition: border-color .2s, box-shadow .2s;
}
.pub-category:hover { border-color: var(--pub-blue); box-shadow: var(--pub-shadow); }
.pub-category i { font-size: 1.6rem; color: var(--pub-blue); }
.pub-category-name { font-weight: 700; color: var(--pub-text); }
.pub-category-count { font-size: .75rem; color: var(--pub-muted); }

.pub-feature { height: 100%; padding: .85rem .9rem; background: #fff; border: 1px solid var(--pub-border); border-radius: var(--pub-radius); }
.pub-feature i { font-size: 1.5rem; color: var(--pub-blue); }
.pub-feature h3 { font-size: 1rem; font-weight: 700; margin: .5rem 0 .25rem; color: var(--pub-navy); }
.pub-feature p { font-size: .85rem; color: var(--pub-muted); margin: 0; }

.pub-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.25rem 1.5rem; border-radius: var(--pub-radius);
    background: linear-gradient(135deg, var(--pub-navy), var(--pub-blue-dark)); color: #fff;
}
.pub-cta h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .25rem; }
.pub-cta p { color: rgba(255, 255, 255, .8); }
.pub-cta .btn-light { color: var(--pub-navy); }
@media (max-width: 575.98px) { .pub-cta .btn { width: 100%; } }

/* ---------- Listing ---------- */
.pub-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.pub-result-count { color: var(--pub-muted); font-size: .9rem; }
.pub-sort { margin-inline-start: auto; min-width: 0; max-width: 100%; }
.pub-sort .form-select { min-width: 190px; }
@media (max-width: 575.98px) {
    .pub-sort { width: 100%; margin-inline-start: 0; }
    .pub-sort .form-select { min-width: 0; width: 100%; }
}

.pub-filter-group { margin-bottom: .65rem; }
.pub-segment { display: flex; gap: .35rem; }
.pub-segment .btn { flex: 1; }
@media (min-width: 992px) {
    .pub-filters {
        position: sticky; top: 76px;
        background: #fff; border: 1px solid var(--pub-border);
        border-radius: var(--pub-radius); padding: .85rem;
        box-shadow: var(--pub-shadow);
    }
    .pub-filters .offcanvas-header { display: none; }
    .pub-filters .offcanvas-body { padding: 0; }
}

.pub-pagination { flex-wrap: wrap; gap: .3rem; }
.pub-pagination .page-link { border-radius: var(--pub-radius-sm) !important; min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; border-color: var(--pub-border); color: var(--pub-text); }
.pub-pagination .active .page-link { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; }

/* ---------- Details ---------- */
.pub-details-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .4rem; }
.pub-details-head .d-flex.flex-wrap.gap-2 { margin-bottom: .3rem !important; }
.pub-details-head h1 { font-size: clamp(1.2rem, 3.1vw, 1.65rem); font-weight: 800; color: var(--pub-navy); margin: 0 0 .15rem; line-height: 1.2; }
.pub-details-loc { color: var(--pub-muted); margin: 0; font-size: .88rem; }
.pub-details-price { display: flex; flex-direction: column; text-align: end; }
.pub-details-price strong { font-size: clamp(1.3rem, 3.5vw, 1.7rem); font-weight: 800; color: var(--pub-blue-dark); line-height: 1.1; }
@media (max-width: 575.98px) { .pub-details-price { text-align: start; } }

.pub-badge-inline { font-size: .78rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; color: #fff; }
.pub-badge-soft { background: var(--pub-blue-soft); color: var(--pub-blue-dark); }

.pub-gallery { margin-bottom: .85rem; min-width: 0; }
.pub-gallery-main {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 8.2; border-radius: var(--pub-radius); overflow: hidden;
}
.pub-gallery-main .pub-ph-icon { font-size: 3.4rem; }
.pub-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pub-gallery-counter {
    position: absolute; bottom: .6rem; inset-inline-end: .6rem;
    background: rgba(15, 31, 61, .6); color: #fff; font-size: .8rem;
    padding: .2rem .65rem; border-radius: 999px;
}
.pub-gallery-thumbs {
    display: flex; gap: .4rem; margin-top: .4rem;
    overflow-x: auto; scrollbar-width: thin; padding-bottom: .25rem;
    max-width: 100%;
}
.pub-thumb {
    flex: 0 0 auto; width: 78px; aspect-ratio: 4 / 3;
    border: 2px solid transparent; border-radius: var(--pub-radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, .9); opacity: .75; cursor: pointer;
}
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--pub-radius-sm) - 2px); }
.pub-thumb.active, .pub-thumb:hover { border-color: var(--pub-blue); opacity: 1; }
@media (max-width: 575.98px) {
    .pub-gallery-main { border-radius: 0; margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); aspect-ratio: 4 / 3; }
    .pub-thumb { width: 64px; }
}

.pub-specs {
    list-style: none; padding: 0; margin: 0 0 .75rem;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem;
}
@media (min-width: 768px) { .pub-specs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pub-specs li {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem;
    padding: .42rem .35rem; border: 1px solid var(--pub-border); border-radius: var(--pub-radius-sm);
    background: var(--pub-bg-muted); min-width: 0;
}
.pub-specs i { color: var(--pub-blue); font-size: 1.05rem; }
.pub-specs strong { font-size: .86rem; color: var(--pub-navy); }
.pub-specs span { font-size: .7rem; color: var(--pub-muted); }

.pub-block { padding: .75rem 0; border-top: 1px solid var(--pub-border); }
.pub-block h2 { font-size: 1.1rem; font-weight: 800; color: var(--pub-navy); margin-bottom: .5rem; }

/* Amenities: wrapping badges, RTL-safe, never causes horizontal scroll. */
.pub-amenities {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: .4rem;
}
.pub-amenities li {
    display: inline-flex; align-items: center; gap: .35rem; min-width: 0; max-width: 100%;
    padding: .32rem .6rem; border: 1px solid var(--pub-border); border-radius: 999px;
    background: var(--pub-bg-muted); font-size: .8rem; color: var(--pub-navy);
}
.pub-amenities i { color: var(--pub-blue); font-size: .95rem; flex-shrink: 0; }
.pub-amenities span { overflow-wrap: anywhere; }
.pub-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0; }
@media (min-width: 768px) { .pub-dl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pub-dl > div { min-width: 0; }
.pub-dl-wide { grid-column: 1 / -1; }
.pub-dl dt { font-size: .78rem; color: var(--pub-muted); font-weight: 600; }
.pub-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pub-map-ph {
    margin-top: .75rem; height: 150px; border-radius: var(--pub-radius);
    border: 1px dashed #c9d3e3; background: var(--pub-bg-muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    color: var(--pub-muted);
}
.pub-map-ph i { font-size: 2rem; }

.pub-contact {
    position: sticky; top: 76px;
    padding: 1rem; border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius); box-shadow: var(--pub-shadow); background: #fff;
}
.pub-contact h2 { font-size: 1.1rem; font-weight: 800; color: var(--pub-navy); }
.pub-contact .btn { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: .4rem; }
/* Only the first .pub-contact (call/inquiry box) should stick; any following .pub-contact
   (e.g. the advertiser info box) must stay in normal flow so it never overlaps it while scrolling. */
.pub-contact + .pub-contact { position: static; top: auto; }

.pub-sticky-contact {
    position: fixed; bottom: 0; inset-inline: 0; z-index: 1020;
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem 1rem; background: #fff; border-top: 1px solid var(--pub-border);
    box-shadow: 0 -4px 14px rgba(15, 31, 61, .08);
}
.pub-sticky-contact strong { flex: 1; min-width: 0; color: var(--pub-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-sticky-contact .btn { min-height: 40px; }
@media (max-width: 991.98px) { .pub-body:has(.pub-sticky-contact) .pub-footer { padding-bottom: 5rem; } }

/* ---------- Account Dashboard ---------- */
.acc-sidebar { position: sticky; top: 84px; }
.acc-sidebar-nav li + li { margin-top: .15rem; }
.acc-sidebar-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .65rem .85rem; border-radius: var(--pub-radius-sm);
    color: var(--pub-text); font-weight: 600; font-size: .92rem;
    text-decoration: none; cursor: pointer;
}
.acc-sidebar-link i { font-size: 1.05rem; color: var(--pub-muted); width: 1.25rem; text-align: center; }
.acc-sidebar-link:hover:not(.disabled) { background: var(--pub-blue-soft); color: var(--pub-blue); }
.acc-sidebar-link:hover:not(.disabled) i { color: var(--pub-blue); }
.acc-sidebar-link.disabled { color: var(--pub-muted); opacity: .55; cursor: not-allowed; }
.acc-sidebar-link.active { background: var(--pub-blue-soft); color: var(--pub-blue); }
.acc-sidebar-link.active i { color: var(--pub-blue); }
.acc-sidebar-link-danger { color: #dc3545; }
.acc-sidebar-link-danger i { color: #dc3545; }
.acc-sidebar-link-danger:hover { background: #fdeeee; color: #b02a37; }
.acc-sidebar-link-danger:hover i { color: #b02a37; }

.acc-card { border-radius: var(--pub-radius); transition: box-shadow .15s ease, transform .15s ease; }
.acc-card:hover { box-shadow: var(--pub-shadow-hover); transform: translateY(-2px); }
.acc-card-bg-blue { background: #eef5ff; }
.acc-card-bg-danger { background: #fdedf0; }
.acc-card-bg-green { background: #eaf8f0; }
.acc-card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.acc-card-icon-blue { background: #dcebff; color: var(--pub-blue); }
.acc-card-icon-danger { background: #fbdde3; color: #dc3545; }
.acc-card-icon-amber { background: #fef3e2; color: var(--pub-amber); }
.acc-card-icon-green { background: #d4f0e0; color: var(--pub-green); }
.acc-card-number { font-size: 1.85rem; font-weight: 800; color: var(--pub-navy); line-height: 1; }

.acc-quick-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    padding: 1.25rem 1rem; min-height: 96px;
    border: 1px solid var(--pub-border); border-radius: var(--pub-radius);
    background: #fff; color: var(--pub-navy); font-weight: 700; font-size: .92rem;
    text-decoration: none; box-shadow: var(--pub-shadow);
    transition: box-shadow .15s ease, transform .15s ease, color .15s ease;
}
.acc-quick-action i { font-size: 1.4rem; color: var(--pub-blue); }
.acc-quick-action:hover:not(:disabled) { box-shadow: var(--pub-shadow-hover); transform: translateY(-2px); color: var(--pub-blue); text-decoration: none; }
.acc-quick-action:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.acc-quick-action:disabled i { color: var(--pub-muted); }
.acc-quick-action-soft { background: var(--pub-blue-soft); border-color: transparent; }
.acc-quick-action-solid { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; }
.acc-quick-action-solid i { color: #fff; }
.acc-quick-action-solid:disabled { background: var(--pub-blue); opacity: .7; }
.acc-quick-action-solid:disabled i { color: #fff; }

@media (max-width: 991.98px) {
    .acc-sidebar { position: static; }
}

/* ---------- Footer ---------- */
.pub-footer { background: var(--pub-navy); color: rgba(255, 255, 255, .75); padding: 2.5rem 0 1rem; font-size: .9rem; }
.pub-footer-title { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .75rem; }
.pub-footer-links li { margin-bottom: .4rem; }
.pub-footer-links a { color: rgba(255, 255, 255, .75) !important; }
.pub-footer-links a:hover { color: #fff !important; }
.pub-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 1.5rem; padding-top: 1rem; font-size: .8rem; text-align: center; }

/* Listing type segmented control */
.pub-listing-seg { display: flex; gap: .35rem; }
.pub-seg-btn { flex: 1 1 0; text-align: center; min-height: 42px; line-height: 40px; padding: 0 1.1rem; margin: 0; border: 1px solid var(--pub-border); border-radius: 3px; background: #fff; color: var(--pub-text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.pub-seg-btn:hover { border-color: var(--pub-blue); }
.btn-check:checked + .pub-seg-btn { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; }
.btn-check:focus-visible + .pub-seg-btn { outline: 2px solid var(--pub-blue); outline-offset: 2px; }

.pub-listing-row { display: flex; justify-content: center; margin-bottom: .75rem; }
.pub-listing-row .pub-listing-seg { width: 100%; max-width: 360px; }

/* Listing type tabs above the search panel */
.pub-search-area { max-width: 1040px; margin: 0 auto; }
.pub-listing-tabs { display: flex; justify-content: center; gap: .35rem; margin-bottom: .35rem; }
.pub-listing-tabs .pub-seg-btn { flex: 0 0 auto; min-width: 110px; min-height: 40px; line-height: 38px; padding: 0 1.5rem; border-radius: 3px; background: #fff; border: 1px solid var(--pub-border); }
.pub-listing-tabs .btn-check:checked + .pub-seg-btn { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; }
.pub-search-area .pub-search { max-width: none; margin: 0; }

/* Listing tabs attached to the search panel */
.pub-listing-tabs { justify-content: flex-end; gap: .2rem; margin: 0; line-height: 0; }
.pub-listing-tabs .pub-seg-btn { min-width: 120px; min-height: 50px; line-height: 48px; border-radius: 4px 4px 0 0; margin-bottom: 0; }
.pub-search-area .pub-search { border-top-right-radius: 0; border-top-left-radius: 0; }

/* Tabs inside one frame */
.pub-listing-tabs { width: fit-content; margin-inline-start: auto; padding: .4rem; gap: .4rem; background: #fff; border: 1px solid var(--pub-border); border-bottom: 0; border-radius: 4px 4px 0 0; }
.pub-listing-tabs .pub-seg-btn { min-width: 110px; min-height: 44px; line-height: 42px; border: 1px solid transparent; border-radius: 4px; }
.pub-listing-tabs .btn-check:checked + .pub-seg-btn { border-color: var(--pub-blue); }

/* Property types as tabs */
.pub-types-scroll { gap: 1.5rem; padding: 0; border-bottom: 1px solid var(--pub-border); }
.pub-types-scroll .pub-category { padding: .6rem .15rem; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; box-shadow: none; }
.pub-types-scroll .pub-category i { display: none; }
.pub-types-scroll .pub-category-name { font-weight: 600; }
.pub-types-scroll .pub-category:hover { background: transparent; border-bottom-color: var(--pub-blue); box-shadow: none; }
.pub-types-scroll .pub-category:hover .pub-category-name { color: var(--pub-blue); }

/* Home settings: horizontal card when Columns = 1 (desktop only) */
@media (min-width: 992px) {
    .pub-grid-horizontal .pub-card { flex-direction: row; min-height: 220px; }
    .pub-grid-horizontal .pub-card-media { flex: 0 0 38%; max-width: 38%; height: auto; aspect-ratio: auto; }
    .pub-grid-horizontal .pub-card-body { padding: 1rem 1.25rem; justify-content: center; }
    .pub-grid-horizontal .pub-card-title { white-space: normal; }
}

/* Home card image carousel */
.pub-car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: rgba(15, 31, 61, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; z-index: 2; }
.pub-car-btn:hover { background: rgba(15, 31, 61, .8); }
.pub-car-prev { right: .5rem; }
.pub-car-next { left: .5rem; }
.pub-car-dots { position: absolute; bottom: .5rem; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 2; pointer-events: none; }
.pub-car-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.pub-car-dot.active { background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, .5); }

/* Columns = 1: media box size must not depend on the intrinsic size of the current image */
@media (min-width: 992px) {
    .pub-grid-horizontal .pub-card-media { align-self: stretch; height: auto; min-height: 220px; aspect-ratio: auto; }
    .pub-grid-horizontal .pub-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}
