/* COMPANIES TIMELINE (index page) */
.company-timeline { position: relative; padding: 20px 0; }

/* Center spine on desktop */
.company-timeline__spine { display: none; }

.company-timeline__row {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    align-items: center; gap: 48px; margin-bottom: 56px;
}
.company-timeline__row:last-child { margin-bottom: 0; }

/* Node (year + dot) sits centered on the spine */
.company-timeline__node {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; z-index: 2;
}
.company-timeline__node-dot {
    width: 16px; height: 16px; border-radius: 50%; background: var(--color-accent);
    border: 3px solid #fff; box-shadow: 0 0 0 3px var(--color-accent);
}
.company-timeline__node-year {
    margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--color-accent);
    background: #fff; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--color-border);
    white-space: nowrap;
}

.company-timeline__card {
    display: flex; gap: 16px; align-items: center;
    background: #fff; border: 1px solid var(--color-border); border-radius: 14px;
    padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.company-timeline__card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,.09); transform: translateY(-3px);
    border-color: var(--color-accent);
}

.company-timeline__image { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.company-timeline__image img { width: 100%; height: 100%; object-fit: cover; }

.company-timeline__body h3 { margin: 4px 0 6px; font-size: 18px; }
.company-timeline__body p { margin: 0 0 8px; font-size: 14px; color: var(--color-muted); line-height: 1.5; }
.company-timeline__meta { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }

/* Active badge overlays the bottom of the image as a ribbon by default;
   .company-timeline__badge--inline is the fallback used only when a
   company has no image to overlay it on. */
.company-timeline__badge {
    background: rgba(16,185,129,.94); color: #fff; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; text-align: center;
}
.company-timeline__image .company-timeline__badge {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0;
}
.company-timeline__badge--inline { padding: 2px 8px; border-radius: 999px; display: inline-block; }
.company-timeline__type { font-size: 11px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .03em; }
.company-timeline__link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-accent); font-size: 13px; font-weight: 600; margin-top: 4px; }
.company-timeline__link i { font-size: 11px; transition: transform .15s ease; }
.company-timeline__card:hover .company-timeline__link i { transform: translateX(3px); }

/* Alternating sides: left row's card sits in the left column, right row's
   card sits in the right column — the empty column keeps the zig-zag gap */
.company-timeline__row.is-left .company-timeline__card { grid-column: 1; }
.company-timeline__row.is-right .company-timeline__card { grid-column: 2; }
.company-timeline__row.is-right .company-timeline__card { flex-direction: row-reverse; text-align: right; }
.company-timeline__row.is-right .company-timeline__meta { justify-content: flex-end; }
.company-timeline__row.is-right .company-timeline__link { flex-direction: row-reverse; }

/* Mobile: KEEP the double-sided zig-zag (per request — collapsing to a
   single column loses what makes this look good), just compact
   everything down so it fits without overflowing or wrapping badly. */
@media (max-width: 640px) {
    .company-timeline__row { gap: 10px; margin-bottom: 32px; }
    .company-timeline__node-year { font-size: 10px; padding: 1px 6px; }
    .company-timeline__node-dot { width: 12px; height: 12px; }

    .company-timeline__card { flex-direction: column; padding: 10px; border-radius: 12px; }
    .company-timeline__row.is-right .company-timeline__card { flex-direction: column; text-align: center; }
    .company-timeline__image { width: 100%; height: 72px; }
    .company-timeline__body { text-align: center; width: 100%; }
    .company-timeline__row.is-right .company-timeline__meta,
    .company-timeline__row.is-right .company-timeline__link { justify-content: center; flex-direction: row; }
    .company-timeline__meta { justify-content: center; }

    .company-timeline__body h3 { font-size: 14px; margin: 2px 0 4px; }
    .company-timeline__body p {
        font-size: 12px; margin-bottom: 6px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .company-timeline__link { font-size: 11px; }
    .company-timeline__type { font-size: 9px; }
}

@media (max-width: 420px) {
    .company-timeline__row { gap: 6px; margin-bottom: 24px; }
    .company-timeline__image { height: 56px; }
    .company-timeline__card { padding: 8px; }
    .company-timeline__body h3 { font-size: 12.5px; }
    .company-timeline__body p { display: none; } /* not enough room left for both title and description to stay legible at this width */
    .company-timeline__node-year { font-size: 9px; padding: 1px 5px; }
    .company-timeline__link { font-size: 10px; }
}

/* COMPANY DETAIL PAGE */
.company-detail__banner { padding: 24px; min-height: 280px; }
.company-detail__banner-content {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; text-align: center; max-width: 760px; margin: 0 auto; height: 100%;
}
.company-detail__logo {
    width: clamp(88px, 10vw, 128px);
    max-height: 118px;
    object-fit: contain;
    margin: 54px 0 4px;
}
.company-detail__banner h1 {
    font-size: clamp(24px, 3vw, 38px);
    margin: 0;
    line-height: 1.15;
}
.company-detail__banner p {
    margin: 0;
    font-size: 16px;
    color: rgba(255,255,255,.9);
}
.company-detail__description { font-size: 18px; color: var(--color-muted); }
.company-detail__services { columns: 2; }

@media (max-width: 640px) {
    .company-detail__banner { min-height: 240px; padding: 20px; }
    .company-detail__banner-content { gap: 8px; }
    .company-detail__logo { width: 84px; max-height: 96px; }
    .company-detail__banner h1 { font-size: 24px; }
    .company-detail__banner p { font-size: 14px; }
}

/* TEAM GRID (shared: company detail page + /team index) */
.company-page-intro,
.events-page-intro,
.team-page {
    display: grid;
    gap: 28px;
    margin-bottom: 0;
}

.company-page-intro,
.events-page-intro,
.team-page__intro {
    max-width: 900px;
    margin-bottom: 0;
}

.company-page-intro + .section-inner,
.events-page-intro + .section-inner {
    padding-top: 0;
}

.company-page-intro .section-heading,
.events-page-intro .section-heading,
.team-page__intro .section-heading {
    margin-bottom: 12px;
}

.section-heading__eyebrow {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-muted);
}

.company-page-intro h2,
.events-page-intro h2,
.team-page__intro h2,
.section-heading h2 {
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    line-height: 0.97;
    letter-spacing: -0.06em;
    margin: 0;
    font-weight: 800;
}

.company-page-intro__copy,
.events-page-intro__copy,
.team-page__intro-copy {
    margin: 0;
    max-width: 860px;
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--color-muted);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px;
    margin-top: 8px;
}

.team-card {
    text-align: left;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 28px rgba(20, 22, 26, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
    box-shadow: 0 18px 34px rgba(15, 109, 94, 0.08);
}

.team-card__image-wrap {
    padding: 14px 14px 0;
}

.team-card img {
    width: 100%;
    height: 260px;
    border-radius: 16px;
    object-fit: cover;
    object-position: center top;
    display: block;
    background: #f2f2f2;
}

.team-card__body {
    padding: 16px 18px 18px;
}

.team-card__body h4 {
    margin: 0 0 6px;
    font-size: 1.18rem;
    line-height: 1.25;
}

.team-card__body p {
    margin: 0 0 4px;
    font-size: 0.92rem;
    color: var(--color-accent);
    font-weight: 700;
}

.team-card__body span {
    color: var(--color-muted);
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .team-card img {
        height: 300px;
    }
}
