/* ============================================================
   Mimbar Team — Public layout styles (4 team list designs)
   ============================================================ */

.mt-layout * { box-sizing: border-box; }
.mt-layout img { display: block; max-width: 100%; }
.mimbar-team-empty { color: #6b7280; font-style: italic; }

/* Containment: keep each team list as a self-contained block so it can never
   bleed into / be overlapped by the next Elementor container in responsive. */
.mt-layout {
    position: relative;
    width: 100%;
    max-width: 100%;
    clear: both;
    isolation: isolate;
    overflow: hidden;
}
.mt-layout > * { min-width: 0; }
.mt-l1-grid > *, .mt-l3-grid > * { min-width: 0; }

/* ---------- LAYOUT 1: gradient cards + vertical name ---------- */
.mt-layout-1 {
    --mt-cols: 4;
    --mt-cols-tab: 2;
    --mt-cols-mob: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 16px 0;
}
.mt-l1-grid {
    display: grid;
    grid-template-columns: repeat(var(--mt-cols, 4), minmax(0, 1fr));
    gap: 22px;
    align-items: end;
}
.mt-l1-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mt-l1-photo {
    position: relative;
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: var(--mt-bg, linear-gradient(160deg, #9a8cf0 0%, #f5b042 100%));
    box-shadow: 0 18px 40px -18px rgba(80, 60, 160, .55);
}
/* Padding-box aspect ratio (3 / 4) — works on every browser, including older
   mobile WebKit/Android builds where `aspect-ratio` is unsupported. */
.mt-l1-photo::before {
    content: '';
    display: block;
    width: 100%;
    padding-top: 133.3333%;
}
.mt-l1-photo img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
}
.mt-l1-vname {
    position: absolute;
    top: 14px; right: 10px;
    writing-mode: vertical-rl;
    font: 700 26px/1 'Poppins', system-ui, sans-serif;
    color: rgba(255,255,255,.92);
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
    letter-spacing: .5px;
}
.mt-l1-cta {
    display: inline-block;
    padding: 11px 26px;
    border-radius: 999px;
    background: var(--mt-btn, linear-gradient(90deg, #7c6cf0, #f5a623));
    color: var(--mt-btn-text, #fff); font: 600 14px/1 'Poppins', sans-serif;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 10px 24px -12px rgba(124,108,240,.8);
    transition: transform .18s ease, box-shadow .18s ease;
}
.mt-l1-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(124,108,240,.9); }
.mt-l1-cta-static { background: #e9eaf2; color: #4b5563; box-shadow: none; }
.mt-l1-intro { max-width: 720px; }
.mt-l1-title {
    font: 800 54px/1 'Poppins', sans-serif;
    margin: 0 0 12px;
    color: var(--mt-heading, transparent);
    background: var(--mt-heading-gradient, linear-gradient(90deg, #6d5cf0, #f5a623));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: var(--mt-heading-fill, transparent);
}
.mt-l1-text { color: var(--mt-text, #6b7280); font-size: 15px; line-height: 1.7; margin: 0; }

/* ---------- LAYOUT 2: floating photo cloud ---------- */
.mt-layout-2 {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px) 1fr;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    background: var(--mt-bg, radial-gradient(120% 120% at 50% 0%, #fbfbfd 0%, #f3f4f7 100%));
    border-radius: 28px;
}
.mt-l2-cloud { position: relative; min-height: 360px; }
.mt-l2-tile {
    position: absolute;
    width: 92px; height: 92px;
    border-radius: 18px; overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 14px 30px -14px rgba(20,20,40,.35);
    transition: transform .2s ease;
}
.mt-l2-tile img { width: 100%; height: 100%; object-fit: cover; }
.mt-l2-tile:hover { transform: scale(1.06) rotate(-1deg); z-index: 3; }
.mt-l2-pos-0 { top: 4%;  left: 6%;  width: 76px; height: 76px; }
.mt-l2-pos-1 { top: 30%; left: 32%; width: 104px; height: 104px; }
.mt-l2-pos-2 { top: 58%; left: 8%; }
.mt-l2-pos-3 { top: 12%; left: 56%; width: 84px; height: 84px; }
.mt-l2-pos-4 { top: 70%; left: 48%; width: 96px; height: 96px; }
.mt-l2-pos-5 { top: 44%; left: 70%; width: 72px; height: 72px; }
.mt-l2-right .mt-l2-pos-0 { left: auto; right: 6%; }
.mt-l2-right .mt-l2-pos-1 { left: auto; right: 32%; }
.mt-l2-right .mt-l2-pos-2 { left: auto; right: 10%; }
.mt-l2-right .mt-l2-pos-3 { left: auto; right: 54%; }
.mt-l2-right .mt-l2-pos-4 { left: auto; right: 46%; }
.mt-l2-right .mt-l2-pos-5 { left: auto; right: 70%; }
.mt-l2-center { text-align: center; padding: 0 8px; }
.mt-l2-eyebrow {
    display: inline-block; padding: 5px 14px; margin-bottom: 16px;
    border: 1px solid #e2e3e8; border-radius: 999px;
    font: 600 12px/1 'Poppins', sans-serif; color: var(--mt-btn, #6b7280);
    background: #fff;
}
.mt-l2-title { font: 800 40px/1.08 'Poppins', sans-serif; color: var(--mt-heading, #111827); margin: 0 0 14px; }
.mt-l2-title-muted { color: #c2c5cd; }
.mt-l2-sub { color: var(--mt-text, #6b7280); font-size: 15px; margin: 0; }

/* ---------- LAYOUT 3: magazine / agency grid ---------- */
.mt-layout-3 {
    --mt-cols: 3;
    --mt-cols-tab: 2;
    --mt-cols-mob: 1;
    padding: 16px 0;
}
.mt-l3-grid {
    display: grid;
    grid-template-columns: repeat(var(--mt-cols, 3), minmax(0, 1fr));
    gap: 18px;
}
.mt-l3-card {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    background: var(--mt-bg, #1f2430);
    box-shadow: 0 16px 36px -20px rgba(0,0,0,.5);
}
/* Padding-box aspect ratio (4 / 5). Every other child of the card is absolutely
   positioned, so without this spacer the card would collapse to zero height on
   any browser that does not support `aspect-ratio` — which is exactly what made
   the list disappear on mobile. */
.mt-l3-card::before {
    content: '';
    display: block;
    width: 100%;
    padding-top: 125%;
}
.mt-l3-img {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%;
    max-width: none;
    object-fit: cover; object-position: center top;
    transition: transform .4s ease;
}
.mt-l3-card:hover .mt-l3-img { transform: scale(1.05); }
.mt-l3-card::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, transparent 45%, rgba(8,10,16,.82) 100%);
    pointer-events: none;
}
.mt-l3-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 5px 12px; border-radius: 8px;
    background: var(--mt-btn, rgba(20,24,33,.78)); color: var(--mt-btn-text, #fff);
    font: 600 11px/1 'Poppins', sans-serif; text-transform: capitalize;
    backdrop-filter: blur(4px);
}
.mt-l3-overlay {
    position: absolute; left: 16px; bottom: 16px; right: 50px; z-index: 2;
    display: flex; flex-direction: column; gap: 3px;
}
.mt-l3-name { color: var(--mt-heading, #fff); font: 700 17px/1.2 'Poppins', sans-serif; }
.mt-l3-role { color: var(--mt-text, rgba(255,255,255,.72)); font-size: 12.5px; }
.mt-l3-play {
    position: absolute; right: 14px; bottom: 16px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.92); color: #111;
    font-size: 14px; padding-left: 2px;
    transition: transform .2s ease;
}
.mt-l3-card:hover .mt-l3-play { transform: scale(1.12); }

/* ---------- LAYOUT 4: colored vertical bars on dark ---------- */
.mt-layout-4 {
    --mt-cols: 5;
    --mt-cols-tab: 3;
    --mt-cols-mob: 2;
    background: var(--mt-bg, #0c0d10);
    border-radius: 24px;
    padding: 48px 32px 40px;
}
.mt-l4-row {
    display: flex; gap: 22px; justify-content: center;
    flex-wrap: wrap;
}
/* Applied only when the shortcode explicitly sets a column count. */
.mt-l4-row.mt-l4-grid {
    display: grid;
    grid-template-columns: repeat(var(--mt-cols, 5), minmax(0, 1fr));
    gap: 22px;
    justify-content: stretch;
}
.mt-l4-row.mt-l4-grid .mt-l4-bar { width: 100%; }
.mt-l4-bar {
    --mt-accent: var(--mt-btn, #f59e0b);
    position: relative;
    width: 150px;
    display: flex; flex-direction: column;
    text-decoration: none;
    border-top: 4px solid var(--mt-accent);
    transition: transform .2s ease;
}
.mt-l4-bar:hover { transform: translateY(-4px); }
.mt-l4-top {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 4px 14px;
}
.mt-l4-role { color: var(--mt-accent); font: 600 11px/1 'Poppins', sans-serif; }
.mt-l4-name { color: var(--mt-heading, #fff); font: 700 15px/1.2 'Poppins', sans-serif; }
.mt-l4-photo {
    display: block;
    width: 100%;
    background-size: cover; background-position: top center;
}
.mt-l4-photo::before {
    content: '';
    display: block;
    width: 100%;
    padding-top: 166.6667%;
}
.mt-l4-caption {
    text-align: center; color: var(--mt-text, #9ca3af);
    font-size: 13px; margin: 30px 0 0; line-height: 1.7;
    max-width: 560px; margin-left: auto; margin-right: auto;
}

/* ---------- LAYOUT 5: magazine editorial listing ---------- */
.mt-layout-5 {
    --mt-cols: 1;
    --mt-cols-tab: 1;
    --mt-cols-mob: 1;
    background: var(--mt-bg, #faf7f0);
    padding: 46px clamp(20px, 4vw, 56px) 10px;
    border-radius: 14px;
}
.mt-l5-head { text-align: center; margin: 0 0 18px; }
.mt-l5-kicker {
    display: inline-block;
    font: 600 12px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: .28em; text-transform: uppercase;
    color: var(--mt-btn, #b45309);
    margin-bottom: 14px;
}
.mt-l5-title {
    margin: 0;
    font: 800 44px/1.1 Georgia, 'Times New Roman', serif;
    color: var(--mt-heading, #1a1a1a);
}
.mt-l5-rule {
    display: block; width: 64px; height: 3px; margin: 22px auto 0;
    background: var(--mt-btn, #b45309);
}

.mt-l5-list {
    column-count: var(--mt-cols, 1);
    column-gap: 56px;
}
.mt-l5-row {
    display: grid;
    grid-template-columns: 56px 170px 1fr;
    grid-template-areas: "index media body";
    align-items: center;
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid var(--mt-rule, rgba(20,15,5,.14));
    break-inside: avoid;
}
.mt-l5-list .mt-l5-row:first-child { padding-top: 4px; }
.mt-l5-row:nth-child(even) {
    grid-template-columns: 56px 1fr 170px;
    grid-template-areas: "index body media";
}

.mt-l5-index {
    grid-area: index;
    font: 800 32px/1 Georgia, 'Times New Roman', serif;
    color: var(--mt-btn, #b45309);
    opacity: .32;
    text-align: center;
}
@supports (-webkit-text-stroke: 1px black) {
    .mt-l5-index {
        opacity: 1;
        color: transparent;
        -webkit-text-stroke: 1.4px var(--mt-btn, #b45309);
    }
}

.mt-l5-media {
    grid-area: media;
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #ddd;
    text-decoration: none;
}
.mt-l5-media::before { content: ''; display: block; width: 100%; padding-top: 115%; }
.mt-l5-media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
    filter: grayscale(1) contrast(1.05);
    transition: filter .35s ease, transform .35s ease;
}
.mt-l5-row:hover .mt-l5-media img { filter: grayscale(0); transform: scale(1.03); }

.mt-l5-body { grid-area: body; min-width: 0; }
.mt-l5-badge {
    display: inline-block; margin-bottom: 10px; padding: 3px 11px;
    border: 1px solid var(--mt-btn, #b45309); border-radius: 999px;
    font: 600 10px/1.6 'Poppins', sans-serif; letter-spacing: .08em; text-transform: uppercase;
    color: var(--mt-btn, #b45309);
}
.mt-l5-name {
    margin: 0 0 6px;
    font: 700 28px/1.2 Georgia, 'Times New Roman', serif;
    color: var(--mt-heading, #1a1a1a);
}
.mt-l5-name a { color: inherit; text-decoration: none; }
.mt-l5-name a:hover { text-decoration: underline; }
.mt-l5-role {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
    font: 600 12px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--mt-text, #8a8578);
}
.mt-l5-role::before { content: ''; flex: 0 0 auto; width: 22px; height: 2px; background: var(--mt-btn, #b45309); }
.mt-l5-cta {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 13px/1 'Poppins', sans-serif;
    color: var(--mt-heading, #1a1a1a);
    text-decoration: none;
    border-bottom: 1px solid currentColor; padding-bottom: 3px;
    transition: gap .2s ease, color .2s ease;
}
.mt-l5-cta:hover { gap: 14px; color: var(--mt-btn, #b45309); }
.mt-l5-cta span { display: inline-block; transition: transform .2s ease; }
.mt-l5-cta:hover span { transform: translateX(3px); }

/* ---------- Responsive ----------
   Column counts below come from the shortcode (columns_tablet /
   columns_mobile), falling back to the per-layout defaults declared above. */
@media (max-width: 900px) {
    .mt-l1-grid { grid-template-columns: repeat(var(--mt-cols-tab, 2), minmax(0, 1fr)); }
    .mt-l1-title { font-size: 40px; }
    .mt-layout-2 { grid-template-columns: 1fr; }
    .mt-l2-cloud { min-height: 220px; }
    /* The scattered tiles in .mt-l2-cloud are absolutely positioned and can
       visually extend a bit below the cloud's own min-height box (e.g. the
       pos-4 tile bottoms out ~30px past it). Since .mt-l2-center is the very
       next item in the single-column mobile stack, it was starting right at
       that boundary and getting overlapped by the overflow. Push it down to
       clear the tallest tile instead of touching the cloud/tile rules. */
    .mt-l2-center { margin-top: 56px; }
    .mt-l3-grid { grid-template-columns: repeat(var(--mt-cols-tab, 2), minmax(0, 1fr)); }
    .mt-l4-row.mt-l4-grid { grid-template-columns: repeat(var(--mt-cols-tab, 3), minmax(0, 1fr)); }
    .mt-l5-list { column-count: var(--mt-cols-tab, 1); column-gap: 40px; }
    .mt-l5-title { font-size: 34px; }
    .mt-l5-row { grid-template-columns: 48px 130px 1fr; gap: 20px; }
    .mt-l5-row:nth-child(even) { grid-template-columns: 48px 1fr 130px; }
    .mt-l5-name { font-size: 24px; }
}
@media (max-width: 560px) {
    .mt-l1-grid { grid-template-columns: repeat(var(--mt-cols-mob, 2), minmax(0, 1fr)); gap: 14px; }
    .mt-l3-grid { grid-template-columns: repeat(var(--mt-cols-mob, 1), minmax(0, 1fr)); gap: 14px; }
    .mt-layout-4 { padding: 32px 16px 28px; }
    .mt-l4-row.mt-l4-grid { grid-template-columns: repeat(var(--mt-cols-mob, 2), minmax(0, 1fr)); gap: 14px; }
    .mt-l4-row { gap: 14px; }
    .mt-l4-bar { width: 44%; }
    .mt-l3-name { font-size: 16px; }
    /* Last-resort guard: guarantees the style 3 cards always occupy visible
       space on phones even if the padding spacer is overridden by a theme. */
    .mt-l3-card { min-height: 300px; }

    /* LAYOUT 5 on phones: stack media above the text instead of running the
       index/media/body columns side by side — at this width there isn't
       room for all three, and !important is needed to beat the more
       specific :nth-child(even) rule that sets its own grid-template-areas. */
    .mt-layout-5 { padding: 32px 18px 8px; }
    .mt-l5-list { column-count: var(--mt-cols-mob, 1); column-gap: 0; }
    .mt-l5-title { font-size: 28px; }
    .mt-l5-row,
    .mt-l5-row:nth-child(even) {
        grid-template-columns: 1fr !important;
        grid-template-areas: "media" "index" "body" !important;
        gap: 14px;
        padding: 26px 0;
    }
    .mt-l5-index { text-align: left; font-size: 24px; }
    .mt-l5-media { max-width: 220px; }
    .mt-l5-name { font-size: 22px; }
}

/* Safety net: if a caching/optimisation plugin ever strips the inline custom
   properties, the grids still resolve to a sane single/two column layout
   instead of collapsing. */
@supports not (grid-template-columns: repeat(var(--mt-cols), 1fr)) {
    .mt-l1-grid, .mt-l3-grid, .mt-l4-row.mt-l4-grid {
        display: flex;
        flex-wrap: wrap;
    }
    .mt-l1-card, .mt-l3-card, .mt-l4-row.mt-l4-grid .mt-l4-bar {
        flex: 1 1 240px;
    }
}
