/* ============================================================
   Responsive Styles – about.php (CORE TEAM: 2 CARDS PER ROW)
   MATCH EXACT COLUMN CLASSES FROM DOM + TRIPLE CLASS REPEAT
   DOM classes from about.php:
     CEO/MD cols: .col-sm-10.col-md-6.col-lg-5 (in .row.g-4.justify-content-center.mb-5)
     Smaller team cols: .col-sm-10.col-md-6.col-lg-3 (in .row.g-4.justify-content-center:last-of-type)
   Note: col-sm-10 forces ~83% width at 576-767px — we MUST override that.
   ============================================================ */

/* Who We Are section */
@media (max-width: 1199.98px) { .about-float-img { width: 260px; } }
@media (max-width: 991.98px)  { .about-float-img { width: 220px; } }
@media (max-width: 767.98px) {
    .about-float-img {
        width: 100%;
        max-width: 340px;
        margin: 0 auto 1.25rem auto !important;
        float: none;
        display: block;
    }
    .about-text h2 { text-align: center; font-size: 1.45rem; margin-bottom: 1rem !important; }
    .about-text p { font-size: 0.88rem; margin-bottom: 0.6rem !important; }
    .about-text ul li { font-size: 0.86rem; }
}
@media (max-width: 575.98px) {
    .about-float-img { max-width: 280px; }
    .about-text h2 { font-size: 1.25rem; }
    .about-text p { font-size: 0.82rem; }
    .about-text ul li { font-size: 0.8rem; margin-bottom: 0.3rem !important; }
}

/* =================================================================
   CORE TEAM — 2 CARDS PER ROW AT EVERY WIDTH WHERE NATURAL = 1 COL
   Breakdown:
     col-sm-10 kicks in at ≥576px → 83.33% (almost 1 col) → override!
     <576px → 100% → override!
   So APPLY 50% to BOTH ≤767.98px AND ≤575.98px
   ================================================================= */

/* ---------- TABLET (<768px): SMALL SCREEN WHERE col-md-* STACKS ---------- */
@media (max-width: 767.98px) {
    /* CEO / MD row — exact DOM selector: col-sm-10 AND col-md-6 AND col-lg-5 */
    .row.g-4.justify-content-center.mb-5 > .col-sm-10.col-md-6.col-lg-5,
    .row.g-4.justify-content-center.mb-5 > .col-sm-10.col-md-6.col-lg-5.col-sm-10 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Smaller team row — exact DOM selector: col-sm-10 AND col-md-6 AND col-lg-3 */
    .row.g-4.justify-content-center:last-of-type > .col-sm-10.col-md-6.col-lg-3,
    .row.g-4.justify-content-center:last-of-type > .col-sm-10.col-md-6.col-lg-3.col-sm-10 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Tighten gutters */
    .row.g-4.justify-content-center.mb-5,
    .row.g-4.justify-content-center:last-of-type {
        --bs-gutter-x: 0.7rem;
        --bs-gutter-y: 0.7rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .row.g-4.justify-content-center.mb-5 {
        margin-bottom: 0.75rem !important;
    }
    /* Compact card internals */
    .card.shadow-sm.border-0.p-4.text-center,
    .card.shadow-sm.border-0.p-3.text-center {
        padding: 0.7rem 0.55rem !important;
        border-radius: 14px;
    }
    .card.shadow-sm.border-0.p-4.text-center img {
        width: 82px !important;
        height: 82px !important;
        margin-bottom: 0.45rem !important;
    }
    .card.shadow-sm.border-0.p-3.text-center img {
        width: 72px !important;
        height: 72px !important;
        margin-bottom: 0.4rem !important;
    }
    .card.shadow-sm.border-0.p-4.text-center h5 {
        font-size: 0.86rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2;
    }
    .card.shadow-sm.border-0.p-3.text-center h6 {
        font-size: 0.8rem !important;
        margin-bottom: 0.18rem !important;
        line-height: 1.2;
    }
    .card.shadow-sm.border-0.p-4.text-center p,
    .card.shadow-sm.border-0.p-3.text-center p {
        font-size: 0.7rem !important;
        line-height: 1.3;
        margin-bottom: 0.35rem !important;
    }
    .team-btns {
        gap: 0.2rem !important;
    }
    .team-btns .btn-call,
    .team-btns .btn-whatsapp {
        padding: 3px 6px !important;
        font-size: 0.63rem !important;
        line-height: 1.2;
    }
}

/* ---------- MOBILE (<576px): STILL 2 COLUMNS — NEVER 1 ---------- */
@media (max-width: 575.98px) {
    /* CEO / MD row — extreme specificity */
    .row.g-4.justify-content-center.mb-5 > .col-sm-10.col-md-6.col-lg-5.col-sm-10.col-md-6,
    .row.g-4.justify-content-center.mb-5 > .col-sm-10.col-md-6.col-lg-5.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;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    /* Smaller team row — extreme specificity */
    .row.g-4.justify-content-center:last-of-type > .col-sm-10.col-md-6.col-lg-3.col-sm-10.col-md-6,
    .row.g-4.justify-content-center:last-of-type > .col-sm-10.col-md-6.col-lg-3.col-sm-10.col-md-6.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.justify-content-center.mb-5,
    .row.g-4.justify-content-center:last-of-type {
        --bs-gutter-x: 0.6rem;
        --bs-gutter-y: 0.55rem;
    }
    /* Ultra-compact cards for 2-per-row phones */
    .card.shadow-sm.border-0.p-4.text-center,
    .card.shadow-sm.border-0.p-3.text-center {
        padding: 0.55rem 0.4rem !important;
        border-radius: 12px;
    }
    .card.shadow-sm.border-0.p-4.text-center img {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 0.35rem !important;
    }
    .card.shadow-sm.border-0.p-3.text-center img {
        width: 58px !important;
        height: 58px !important;
        margin-bottom: 0.3rem !important;
    }
    .card.shadow-sm.border-0.p-4.text-center h5 {
        font-size: 0.76rem !important;
        margin-bottom: 0.12rem !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.72rem !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.62rem !important;
        line-height: 1.25;
        margin-bottom: 0.25rem !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 5px !important;
        font-size: 0.58rem !important;
        line-height: 1.15;
    }
    .team-btns i {
        margin-right: 2px !important;
    }
}

/* Stats section */
@media (max-width: 767.98px) {
    .stats-section.rounded-4.mt-5 {
        margin-top: 1.5rem !important;
    }
}

/* Mission & Vision */
@media (max-width: 767.98px) {
    body > section > .container > div:last-of-type .row.g-4 > .col-md-6.col-md-6 {
        width: 100%;
    }
    .card.shadow-sm.border-0.p-4.h-100 h4 { font-size: 1.05rem; }
    .card.shadow-sm.border-0.p-4.h-100 p  { font-size: 0.86rem; }
}
@media (max-width: 575.98px) {
    .mt-5.pt-3 .text-center.mb-5 { margin-bottom: 1.1rem !important; }
    .card.shadow-sm.border-0.p-4.h-100 { padding: 0.9rem !important; }
    .card.shadow-sm.border-0.p-4.h-100 h4 { font-size: 0.95rem; margin-bottom: 0.55rem !important; }
    .card.shadow-sm.border-0.p-4.h-100 p  { font-size: 0.8rem; margin-bottom: 0.45rem !important; }
}
