/* ============================================================
   Shared Responsive Styles – Header, Footer, Common Components
   Overrides only; preserves global style.css
   ============================================================ */

/* ======================= TOP BAR (COMPACT) ======================= */

.top-bar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    font-size: 0.85rem;
}
.top-bar-row {
    row-gap: 1px;
}
.top-bar-phone,
.top-bar-email-md,
.top-bar-email-sm {
    white-space: nowrap;
    line-height: 1.3;
}
.top-bar-socials a {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}
@media (max-width: 991.98px) {
    .top-bar {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
        font-size: 0.8rem;
    }
    .top-bar-row {
        gap: 0 0.5rem;
    }
    .top-bar-socials a {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }
    .top-bar-socials {
        gap: 0.4rem !important;
    }
}
@media (max-width: 575.98px) {
    .top-bar {
        padding-top: 0.15rem !important;
        padding-bottom: 0.15rem !important;
        font-size: 0.72rem;
    }
    .top-bar-phone {
        font-size: 0.72rem;
    }
    .top-bar-phone i {
        margin-right: 0.2rem !important;
    }
    .top-bar-socials a {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    .top-bar-email-sm {
        font-size: 0.7rem;
    }
}

/* ======================= NAVBAR (COMPACT) ======================= */

.navbar {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}
.navbar-brand img {
    height: 70px !important;   /* was 120px */
    transition: height 0.3s ease;
}
.navbar.scrolled .navbar-brand img {
    height: 55px !important;
}
.navbar-nav .nav-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
}

@media (max-width: 1199.98px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 991.98px) {
    .navbar-brand img {
        height: 60px !important;
    }
    .navbar.scrolled .navbar-brand img {
        height: 48px !important;
    }
    .navbar {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }
    .navbar-collapse {
        margin-top: 0.3rem;
        padding-top: 0.25rem;
    }
    .navbar-nav .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.88rem;
    }
}
@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 48px !important;
    }
    .navbar.scrolled .navbar-brand img {
        height: 40px !important;
    }
    .navbar {
        padding-top: 0.15rem !important;
        padding-bottom: 0.15rem !important;
    }
}

/* ======================= FOOTER (COMPACT & 2‑COLUMN ON MOBILE) ======================= */

footer {
    padding-top: 1.5rem !important;
    padding-bottom: 0.75rem !important;
}
footer h4, footer h5 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem !important;
}
footer img[alt*="M. Abbas"] {
    height: 50px !important;
    margin-bottom: 0.5rem !important;
}
footer p {
    font-size: 0.8rem;
    margin-bottom: 0.4rem !important;
    line-height: 1.4;
}
footer .social-links {
    margin-top: 0.15rem !important;
    gap: 0.3rem !important;
}
footer .social-links a {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}
footer ul.list-unstyled li {
    margin-bottom: 0.25rem !important;
    line-height: 1.3;
}
footer ul.list-unstyled li a,
footer ul.list-unstyled li {
    font-size: 0.78rem;
}
footer hr {
    margin: 0.5rem 0 !important;
}
footer .row.align-items-center p {
    font-size: 0.75rem;
    margin-bottom: 0 !important;
}
footer .row.align-items-center a {
    font-size: 0.75rem;
}

/* Tablet & mobile: use 2 columns for footer links */
@media (max-width: 991.98px) {
    footer {
        padding-top: 1.2rem !important;
        padding-bottom: 0.5rem !important;
    }
    footer .row:first-of-type > div {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 0.8rem !important;
    }
    footer .row:first-of-type > div:last-child {
        margin-bottom: 0 !important;
    }
    footer .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    footer .col-lg-4 p {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    footer {
        padding-top: 1rem !important;
    }
    footer .row:first-of-type > div {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0.6rem !important;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }
    footer .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: center;
    }
    footer .col-lg-4 img {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    footer .col-lg-4 .social-links {
        justify-content: center;
    }
    footer h5 {
        font-size: 0.85rem;
        margin-bottom: 0.4rem !important;
    }
    footer ul.list-unstyled li {
        margin-bottom: 0.2rem !important;
    }
    footer ul.list-unstyled li a,
    footer ul.list-unstyled li {
        font-size: 0.75rem;
    }
    footer hr {
        margin: 0.4rem 0 !important;
    }
}

@media (max-width: 575.98px) {
    footer {
        padding-top: 0.8rem !important;
        padding-bottom: 0.3rem !important;
    }
    footer .row:first-of-type > div {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0.4rem !important;
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }
    footer .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    footer img[alt*="M. Abbas"] {
        height: 42px !important;
        margin-bottom: 0.3rem !important;
    }
    footer p {
        font-size: 0.72rem;
        margin-bottom: 0.3rem !important;
    }
    footer h5 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem !important;
    }
    footer ul.list-unstyled li a,
    footer ul.list-unstyled li {
        font-size: 0.7rem;
    }
    footer .social-links a {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
    footer hr {
        margin: 0.3rem 0 !important;
    }
    footer .row.align-items-center p,
    footer .row.align-items-center a {
        font-size: 0.7rem;
    }
    footer .row.align-items-center .me-4 {
        margin-right: 0.4rem !important;
    }
}

/* ======================= AGENT CARDS – CONSISTENT HEIGHTS ======================= */
.agent-card {
    display: flex;
    flex-direction: column;
}
.agent-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.agent-card .card-img-top {
    height: 240px;
    object-fit: cover;
}
.agent-card h5 {
    min-height: 1.5em;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 0.35rem !important;
}
.agent-card .card-body .card-text {
    min-height: 2.6em;
    margin-bottom: 0.75rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.agent-card .card-body > .d-flex:last-child {
    margin-top: auto;
    justify-content: center;
    padding-top: 0.25rem;
}
@media (max-width: 1199.98px) {
    .agent-card .card-img-top {
        height: 220px;
    }
}
@media (max-width: 991.98px) {
    .agent-card .card-img-top {
        height: 200px;
    }
    .agent-card h5 {
        font-size: 1rem;
    }
}
@media (max-width: 767.98px) {
    .agent-card .card-img-top {
        height: 190px;
    }
}
@media (max-width: 575.98px) {
    .agent-card .card-img-top {
        height: 180px;
    }
}

/* ======================= COMMON / SHARED ======================= */

/* Section spacing */
@media (max-width: 991.98px) {
    section.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}
@media (max-width: 767.98px) {
    section.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}
@media (max-width: 575.98px) {
    section.py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Section titles */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 0.98rem;
        margin-bottom: 1.5rem;
    }
}
@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 0.4rem;
    }
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}
@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.3rem;
    }
    .section-subtitle {
        font-size: 0.82rem;
        margin-bottom: 0.8rem;
    }
    .text-center.mb-5 {
        margin-bottom: 1.2rem !important;
    }
}

/* Buttons */
@media (max-width: 767.98px) {
    .btn-primary,
    .btn-outline-primary,
    .btn-light,
    .btn-outline-light {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem;
    }
    .btn-lg {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem;
    }
}
@media (max-width: 575.98px) {
    .btn-primary,
    .btn-outline-primary,
    .btn-light,
    .btn-outline-light {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem;
    }
    .btn-lg {
        padding: 0.5rem 1rem !important;
        font-size: 0.82rem;
    }
}

/* Property cards */
@media (max-width: 991.98px) {
    .property-card .card-img-top {
        height: 200px;
    }
    .property-card h5 {
        font-size: 1rem;
    }
}
@media (max-width: 767.98px) {
    .row.g-4 {
        --bs-gutter-y: 0.7rem;
        --bs-gutter-x: 0.7rem;
    }
    .property-card {
        border-radius: 14px;
    }
    .property-card .card-img-top {
        height: 175px;
    }
    .property-card .card-body {
        padding: 0.7rem;
    }
    .property-card .featured-badge {
        top: 8px;
        left: 8px;
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    .property-card h5 {
        font-size: 0.92rem;
    }
    .property-card .fw-bold {
        font-size: 0.95rem !important;
    }
}

/* Service cards */
@media (max-width: 991.98px) {
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.9rem;
        margin-bottom: 1rem;
    }
}
@media (max-width: 767.98px) {
    .service-card {
        padding: 1rem !important;
    }
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
}

/* Forms */
@media (max-width: 767.98px) {
    .form-control, .form-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    .form-control-lg, .form-select-lg {
        padding: 0.5rem 0.7rem;
        font-size: 0.88rem;
    }
}

/* Cards */
@media (max-width: 767.98px) {
    .card-body.p-4 {
        padding: 0.9rem !important;
    }
    .card-body.p-5 {
        padding: 1rem !important;
    }
    .card-body.p-4.p-md-5 {
        padding: 0.9rem !important;
    }
}

/* Stats section */
@media (max-width: 991.98px) {
    .stats-section {
        margin: 1rem !important;
        padding: 2rem 0 !important;
    }
}
@media (max-width: 767.98px) {
    .stats-section {
        margin: 0.5rem !important;
        padding: 1.25rem 0 !important;
        border-radius: 16px !important;
    }
    .stat-item h3 {
        font-size: 1.8rem;
    }
    .stat-item p {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
}
@media (max-width: 575.98px) {
    .stats-section .row.g-4 {
        --bs-gutter-y: 0.5rem;
    }
    .stat-item h3 {
        font-size: 1.5rem;
    }
    .stat-item p {
        font-size: 0.72rem;
    }
}

/* Back to top */
@media (max-width: 767.98px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 14px;
        right: 14px;
        font-size: 0.8rem;
    }
}

/* Container width */
@media (max-width: 575.98px) {
    .container {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
}

/* ======================= FORCE 2-COLUMN GRIDS ON MOBILE/TABLET ======================= */
@media (max-width: 767.98px) {
    .row.g-4 > .col-md-4,
    .row.g-4 > .col-md-6,
    .row.g-4 > .col-sm-6,
    .row.g-4 > .col-lg-3,
    .row.g-4 > .col-lg-5 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3,
    .row.g-4 > .col-sm-10.col-md-6.col-lg-3,
    .row.g-4 > .col-sm-10.col-md-6.col-lg-5 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
    }
    .row.g-4 {
        --bs-gutter-x: 0.7rem;
        --bs-gutter-y: 0.7rem;
    }
    .property-card .card-img-top { height: 160px !important; }
    .property-card .card-body { padding: 0.65rem !important; }
    .property-card .fw-bold { font-size: 0.9rem !important; }
    .property-card h5 { font-size: 0.88rem !important; margin-bottom: 0.25rem !important; }
    .property-card .card-text { font-size: 0.7rem !important; margin-bottom: 0.4rem !important; }
    .property-card .d-flex.flex-wrap.gap-3 { gap: 0.25rem 0.4rem !important; margin-bottom: 0.4rem !important; font-size: 0.7rem !important; }
    .property-card .btn { padding: 0.3rem 0.5rem !important; font-size: 0.72rem !important; }
    .agent-card .card-img-top { height: 160px !important; }
    .agent-card .card-body { padding: 0.65rem 0.5rem !important; }
    .agent-card h5 { font-size: 0.86rem !important; }
    .agent-card .card-text.text-muted { font-size: 0.7rem !important; min-height: 2.1em; margin-bottom: 0.4rem !important; }
}

@media (max-width: 575.98px) {
    .row.g-4 > .col-md-4,
    .row.g-4 > .col-md-6,
    .row.g-4 > .col-sm-6,
    .row.g-4 > .col-lg-3,
    .row.g-4 > .col-lg-5 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3,
    .row.g-4 > .col-sm-10.col-md-6.col-lg-3,
    .row.g-4 > .col-sm-10.col-md-6.col-lg-5 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }
    .row.g-4 {
        --bs-gutter-x: 0.6rem;
        --bs-gutter-y: 0.6rem;
    }
    .row.g-4 > * {
        padding-left: calc(var(--bs-gutter-x) * .5);
        padding-right: calc(var(--bs-gutter-x) * .5);
    }
    .property-card { border-radius: 12px !important; }
    .property-card .card-img-top { height: 140px !important; }
    .property-card .card-body { padding: 0.5rem !important; }
    .property-card .fw-bold { font-size: 0.78rem !important; line-height: 1.15; }
    .property-card h5 { font-size: 0.78rem !important; line-height: 1.2; margin-bottom: 0.2rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .property-card .card-text { font-size: 0.62rem !important; line-height: 1.25; margin-bottom: 0.3rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .property-card .d-flex.flex-wrap.gap-3 { gap: 0.2rem 0.25rem !important; margin-bottom: 0.3rem !important; font-size: 0.58rem !important; }
    .property-card .d-flex.flex-wrap.gap-3 span { font-size: 0.58rem !important; }
    .property-card .btn { padding: 0.2rem 0.3rem !important; font-size: 0.6rem !important; line-height: 1.25; border-radius: 6px !important; }
    .property-card .featured-badge { font-size: 0.55rem !important; padding: 2px 5px !important; }
    .property-card .badge { padding: 0.15rem 0.3rem !important; font-size: 0.55rem !important; }
    .agent-card { border-radius: 12px !important; }
    .agent-card .card-img-top { height: 135px !important; }
    .agent-card .card-body { padding: 0.5rem 0.4rem !important; }
    .agent-card h5 { font-size: 0.78rem !important; line-height: 1.15; margin-bottom: 0.15rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .agent-card .card-text.text-muted { font-size: 0.62rem !important; line-height: 1.25; min-height: 1.9em; margin-bottom: 0.3rem !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .agent-card .btn-call, .agent-card .btn-whatsapp { padding: 2px 5px !important; font-size: 0.6rem !important; line-height: 1.15; }
    /* Tighten team/testimonial cards */
    .card.shadow-sm.border-0.p-4.text-center,
    .card.shadow-sm.border-0.p-3.text-center {
        padding: 0.5rem 0.4rem !important;
        border-radius: 12px;
    }
    .card.shadow-sm.border-0.p-4.text-center img { width: 60px !important; height: 60px !important; margin-bottom: 0.3rem !important; }
    .card.shadow-sm.border-0.p-3.text-center img { width: 54px !important; height: 54px !important; margin-bottom: 0.25rem !important; }
    .card.shadow-sm.border-0.p-4.text-center h5 { font-size: 0.74rem !important; margin-bottom: 0.1rem !important; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card.shadow-sm.border-0.p-3.text-center h6 { font-size: 0.7rem !important; margin-bottom: 0.1rem !important; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card.shadow-sm.border-0.p-4.text-center p,
    .card.shadow-sm.border-0.p-3.text-center p {
        font-size: 0.6rem !important; line-height: 1.25; margin-bottom: 0.2rem !important;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .team-btns { gap: 0.15rem !important; }
    .team-btns .btn-call, .team-btns .btn-whatsapp { padding: 2px 4px !important; font-size: 0.56rem !important; line-height: 1.15; }
    .card.shadow-sm.border-0.p-4 {
        padding: 0.7rem !important;
    }
    .card.shadow-sm.border-0.p-4 h6 {
        font-size: 0.8rem !important;
    }
    .card.shadow-sm.border-0.p-4 p {
        font-size: 0.75rem !important;
    }
    .card.shadow-sm.border-0.p-4 img.rounded-circle {
        width: 46px !important;
        height: 46px !important;
    }
}