/* ==========================================================================
   MICROCIL - About page (builds on the home.css tokens and section styles)
   ========================================================================== */

.ab-photo {
    width: 100%;
    height: clamp(300px, 30vw, 460px);
    object-fit: cover;
    border-radius: 18px;
    display: block;
    box-shadow: 0 14px 34px rgba(15, 42, 40, 0.14);
}

/* image-only column beside text: the image is as tall as the text and ends where it ends */
@media (min-width: 992px) {
    .row > [class*="col-"]:has(> .ab-photo:only-child) {
        align-self: stretch;
        position: relative;
        min-height: 300px;
    }

    .row > [class*="col-"] > .ab-photo:only-child {
        position: absolute;
        top: 0;
        left: calc(var(--bs-gutter-x) * 0.5);
        width: calc(100% - var(--bs-gutter-x));
        height: 100%;
    }
}

/* culture photo: the text beside it is short, so a text-height frame would crop the faces;
   keep the original photo height instead and centre the text against it */
@media (min-width: 992px) {
    .ab-culture .row {
        align-items: center !important;
    }

    .ab-culture .row > [class*="col-"]:has(> .ab-photo:only-child) {
        align-self: auto;
        position: static;
        min-height: 0;
    }

    .ab-culture .row > [class*="col-"] > .ab-photo:only-child {
        position: static;
        width: 100%;
        height: clamp(300px, 30vw, 460px);
        object-position: center 20%;
    }
}

/* ---------- vision & mission ---------- */
.ab-vm-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px clamp(22px, 2.4vw, 36px);
    box-shadow: 0 6px 20px rgba(15, 42, 40, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ab-vm-card + .ab-vm-card {
    margin-top: 20px;
}

.ab-vm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 42, 40, 0.12);
}

.ab-vm-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--hm-ink);
    margin: 0;
}

/* ---------- principles ---------- */
.ab-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ab-principle {
    background: #ffffff;
    border: 1px solid var(--hm-line);
    border-radius: 14px;
    padding: 26px 24px;
    box-shadow: 4px 6px 14px rgba(15, 42, 40, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ab-principle:hover {
    transform: translate(-3px, -4px);
    box-shadow: 8px 10px 18px rgba(0, 128, 128, 0.18);
}

.ab-principle h3 {
    font-size: clamp(19px, 1.5vw, 22px);
    font-weight: 700;
    color: var(--hm-primary);
    text-align: center;
    margin: 0 0 12px;
}

.ab-principle p {
    text-align: center;
    font-size: 14px;
    line-height: 1.65;
    color: var(--hm-ink);
    margin: 0;
}

/* ---------- engineering experience ---------- */
.ab-exp-list {
    list-style: none;
    margin: 0;
    padding: 6px 28px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(15, 42, 40, 0.06);
}

.ab-exp-list li {
    display: grid;
    grid-template-columns: 36px minmax(0, 260px) 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--hm-line);
}

.ab-exp-list li:last-child {
    border-bottom: 0;
}

.ab-exp-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--hm-primary);
}

.ab-exp-list h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0;
}

.ab-exp-list p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--hm-text);
    margin: 0;
}

/* ---------- culture (dark) ---------- */
.ab-culture .hm-title span {
    color: #14b8a6;
}
/* ---------- leadership team ---------- */
.ab-team-label {
    justify-content: center;
    margin-bottom: 28px;
}

.ab-team {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.ab-member {
    display: flex;
    flex-direction: column;
    width: min(100%, 320px);
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 4px 6px 16px rgba(15, 42, 40, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ab-member:hover {
    transform: translateY(-6px);
    box-shadow: 8px 14px 26px rgba(15, 42, 40, 0.16);
}

.ab-member-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
}

.ab-member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s ease;
}

.ab-member:hover .ab-member-img img {
    transform: scale(1.04);
}

/* body fills the card so the social icons sit at the same height in every card */
.ab-member-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    text-align: center;
}

.ab-member-body h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0 0 4px;
}

.ab-member-role {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hm-ink);
    margin-bottom: 10px;
}

.ab-member-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hm-text);
    margin: 0 0 14px;
}

.ab-member-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.ab-member-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hm-primary);
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.25s ease;
}

.ab-member-social a:hover {
    background: var(--hm-primary-dark);
}

/* ---------- journey timeline ---------- */
.ab-journey {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

/* horizontal line through the dots */
.ab-journey::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(15, 42, 40, 0.18);
}

.ab-jitem {
    position: relative;
    display: grid;
    grid-template-rows: 1fr 22px 1fr;
}

/* small solid dot, no glow animation */
.ab-jdot {
    grid-row: 2;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff7043;
    box-shadow: 0 0 0 3px #ffffff;
    align-self: center;
    position: relative;
    z-index: 1;
}

.ab-jitem:hover .ab-jdot {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.ab-jitem.is-up .ab-jcontent {
    grid-row: 1;
    align-self: end;
    padding-bottom: 22px;
}

.ab-jitem.is-down .ab-jcontent {
    grid-row: 3;
    align-self: start;
    padding-top: 22px;
}

.ab-jstage {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hm-ink);
    margin-bottom: 6px;
}

.ab-jcontent h4 {
    font-size: clamp(19px, 1.5vw, 22px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--hm-primary);
    margin: 0 0 8px;
}

.ab-jcontent p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--hm-ink);
    margin: 0;
}

/* ---------- CTA (dark) ---------- */
/* top-align two-column rows so every section title starts the same distance below the section edge */
.ab-top-row {
    align-items: flex-start !important;
}

/* floating card on the page background instead of a full-width band (matches .sl-cta) */
.hm-section.ab-cta {
    background: transparent;
}

.ab-cta::after {
    display: none;
}

.ab-cta-inner {
    max-width: none;
    margin: 0;
    padding: clamp(24px, 2.6vw, 36px) clamp(20px, 4vw, 64px);
    border-radius: 20px;
    background: linear-gradient(135deg, #012b27 0%, #014a44 60%, #016a62 100%);
    box-shadow: 0 24px 50px rgba(1, 43, 39, 0.28);
    text-align: center;
}

.ab-cta .hm-text {
    margin-left: auto;
    margin-right: auto;
}

.ab-cta .hm-eyebrow {
    justify-content: center;
}

.ab-cta .hm-title span {
    color: #14b8a6;
}

.ab-cta .hm-text {
    max-width: 1000px;
    margin: 0 auto 20px;
}

.ab-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 10px;
    background: #ffffff;
    color: #111111 !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.35s ease;
}

.ab-cta-btn i {
    color: #ff7043;
    font-size: 18px;
    transition: transform 0.3s ease, color 0.35s ease;
}

/* fill hover, matching the site's other CTAs */
.ab-cta-btn::before {
    content: "";
    position: absolute;
    inset: -1px; /* 1px overscan so no white edge shows at fractional zoom */
    z-index: -1;
    background: #008080;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ab-cta-btn:hover {
    color: #ffffff !important;
}

.ab-cta-btn:hover::before {
    transform: scaleX(1);
}

.ab-cta-btn:hover i {
    color: #ffffff;
    transform: translateX(4px);
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .ab-principles {
        grid-template-columns: repeat(2, 1fr);
    }

    /* journey becomes a vertical timeline */
    .ab-journey {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 30px;
    }

    .ab-journey::before {
        left: 8px;
        right: auto;
        top: 6px;
        bottom: 6px;
        width: 2px;
        height: auto;
    }

    .ab-jitem {
        display: block;
        padding: 0 0 26px;
    }

    .ab-jdot {
        position: absolute;
        left: -27px;
        top: 7px;
    }

    .ab-jitem.is-up .ab-jcontent,
    .ab-jitem.is-down .ab-jcontent {
        padding: 0;
    }
}

/* small laptops: the list sits in a half-width column, so stack the text under the title */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .ab-exp-list li {
        grid-template-columns: 32px 1fr;
        row-gap: 6px;
    }

    .ab-exp-list p {
        grid-column: 2;
    }
}

@media (max-width: 767.98px) {
    .ab-exp-list {
        padding: 4px 18px;
    }

    .ab-exp-list li {
        grid-template-columns: 32px 1fr;
    }

    .ab-exp-list p {
        grid-column: 2;
    }
}

@media (max-width: 575.98px) {
    .ab-principles {
        grid-template-columns: 1fr;
    }
}
