/* ============================================================
   Responsive Styles – agents.php (2 AGENT CARDS PER ROW ALWAYS)
   EXACT DOM column: .col-sm-6.col-md-4.col-lg-3 inside .row.g-4
   Natural widths:
     ≥992 (lg): 25% (ok)
     768–991 (md): 33% (ok)
     576–767 (sm): 50% (ok — 2 col already)
     <576: 100% (1 col — NEED TO OVERRIDE!)
   ============================================================ */

/* =============================================================
   TABLET (<768px): col-md stacks — but col-sm-6 is still 50% here
   So confirm 50% anyway + compact cards slightly.
   ============================================================= */
@media (max-width: 767.98px) {
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3,
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3.col-sm-6 {
        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;
    }
    .agent-card .card-img-top {
        height: 175px !important;
    }
    .agent-card .card-body {
        padding: 0.7rem 0.6rem !important;
    }
    .agent-card h5 {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.22rem !important;
    }
    .agent-card .card-text.text-muted {
        font-size: 0.73rem;
        line-height: 1.3;
        min-height: 2.1em;
        margin-bottom: 0.45rem !important;
    }
    .agent-contact-pills {
        gap: 0.28rem !important;
        margin-top: auto !important;
    }
    .agent-contact-pills .btn-call,
    .agent-contact-pills .btn-whatsapp {
        padding: 5px 9px !important;
        font-size: 0.72rem !important;
    }
}

/* =============================================================
   MOBILE (<576px): col-sm-6 STACKS TO 100%
   FORCE 50% 2 COLUMNS WITH EXTREME SPECIFICITY — NEVER 1
   ============================================================= */
@media (max-width: 575.98px) {
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3.col-sm-6.col-md-4,
    .row.g-4 > .col-sm-6.col-md-4.col-lg-3.col-sm-6.col-md-4.col-lg-3 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .row.g-4 {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.55rem;
    }
    .row.g-4 > * {
        padding-left: calc(var(--bs-gutter-x) * .5);
        padding-right: calc(var(--bs-gutter-x) * .5);
    }
    /* Ultra-compact agent card to fit 2 side-by-side */
    .agent-card {
        border-radius: 14px !important;
    }
    .agent-card .card-img-top {
        height: 135px !important;
        object-fit: cover;
    }
    .agent-card .card-body {
        padding: 0.5rem 0.42rem !important;
    }
    .agent-card h5 {
        font-size: 0.8rem !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.65rem !important;
        line-height: 1.25;
        min-height: 1.9em;
        margin-bottom: 0.35rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .agent-contact-pills {
        gap: 0.18rem !important;
    }
    .agent-contact-pills .btn-call,
    .agent-contact-pills .btn-whatsapp {
        padding: 3px 6px !important;
        font-size: 0.62rem !important;
        line-height: 1.15;
        border-radius: 999px;
    }
    .agent-contact-pills i {
        margin-right: 2px !important;
    }
}

/* ====================================================
   BIG 3-OPTION CONTACT GRID – COMPACT
   ==================================================== */
@media (max-width: 1199.98px) {
    .big-contact-grid .big-card { padding: 22px 16px; }
    .big-contact-grid .big-icon { width: 54px; height: 54px; font-size: 1.9rem; margin-bottom: 8px; }
}
@media (max-width: 991.98px) {
    .big-contact-grid .big-card { padding: 20px 14px; }
    .big-contact-grid .big-icon { width: 50px; height: 50px; font-size: 1.7rem; margin-bottom: 7px; }
    .big-contact-grid .big-card h5 { font-size: 1.02rem; margin-bottom: 0.35rem !important; }
    .big-contact-grid .big-card > div:nth-child(3) { font-size: 0.9rem; }
    .big-contact-grid .big-card small { font-size: 0.76rem; }
    .mt-6.pt-5 { margin-top: 2.25rem !important; padding-top: 1.25rem !important; }
}
@media (max-width: 767.98px) {
    .big-contact-grid .row > .col-md-4 { width: 100%; }
    .big-contact-grid .big-card { padding: 18px 14px; }
    .big-contact-grid .big-icon { width: 46px; height: 46px; font-size: 1.5rem; margin-bottom: 6px; }
    .big-contact-grid .big-card h5 { font-size: 1rem; }
    .big-contact-grid .big-card > div:nth-child(3) { font-size: 0.88rem; }
    .big-contact-grid .big-card small { font-size: 0.74rem; }
    .mt-6.pt-5 { margin-top: 2rem !important; padding-top: 1rem !important; }
}
@media (max-width: 575.98px) {
    .mt-6.pt-5 { margin-top: 1.75rem !important; padding-top: 0.85rem !important; }
    .big-contact-grid .row > .col-md-4 { max-width: 100%; }
    .big-contact-grid .big-card { padding: 16px 12px; border-radius: 14px; }
    .big-contact-grid .big-card h5 { font-size: 0.92rem; }
    .big-contact-grid .big-card > div:nth-child(3) { font-size: 0.82rem; }
    .big-contact-grid .big-card small { font-size: 0.7rem; }
}
