/* =============================================
   Comite Frontend — Timeline + Member detail
   Design tokens based, modern layout
   ============================================= */

.gas-comite-history-page {
    padding: 32px 0 64px;
}

/* =============================================
   CONTAINER
   ============================================= */
.gas-comite-history {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--gas-space-l);
    color: var(--gas-text-color);
}

/* =============================================
   OVERLINE (shared label)
   ============================================= */
.gas-comite-history__overline {
    display: inline-block;
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gas-primary);
    margin-bottom: var(--gas-space-xs);
}

/* =============================================
   METRICS
   ============================================= */
.gas-comite-history__hero-metrics {
    margin-bottom: var(--gas-space-l);
    display: flex;
    gap: var(--gas-space-s);
}

.gas-comite-history__metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--gas-space-m) var(--gas-space-l);
    border-radius: var(--gas-radius-l);
    background: var(--gas-bg-surface);
    border: var(--gas-border-width) solid var(--gas-border-color);
    box-shadow: var(--gas-shadow-xs);
    min-width: 110px;
}

.gas-comite-history__metric-value {
    font-size: var(--gas-text-2xl);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.gas-comite-history__metric-label {
    font-size: var(--gas-text-xs);
    color: var(--gas-text-color-light);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.gas-comite-history__section-header {
    margin-bottom: var(--gas-space-m);
}

.gas-comite-history__section-title {
    margin: 0;
    font-size: var(--gas-text-xl);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-text-color);
}

.gas-comite-history__section-desc {
    margin: var(--gas-space-xs) 0 0;
    max-width: 700px;
    color: var(--gas-text-color-light);
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-normal);
}

.gas-comite-history__timeline > .gas-comite-history__section-header {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.gas-comite-history__timeline > .gas-comite-history__section-header .gas-comite-history__section-desc {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.gas-comite-history__timeline > .gas-comite-history__hero-metrics {
    justify-content: center;
}

.gas-comite-history__hero-metrics--timeline {
    margin-bottom: var(--gas-space-m);
}

/* =============================================
   PERSON CARD (timeline era members)
   ============================================= */
.gas-comite-history__person {
    display: flex;
    gap: var(--gas-space-m);
    align-items: flex-start;
    padding: var(--gas-space-m);
    border-radius: var(--gas-radius-l);
    background: var(--gas-bg-surface);
    border: var(--gas-border-width) solid var(--gas-border-color);
    box-shadow: var(--gas-shadow-xs);
    transition: box-shadow var(--gas-transition-normal);
}

.gas-comite-history__person:hover {
    box-shadow: var(--gas-shadow-m);
}

.gas-comite-history__person--compact {
    padding: var(--gas-space-s);
}

.gas-comite-history__person-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--gas-radius-m);
    background: var(--gas-neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--gas-weight-bold);
    font-size: var(--gas-text-m);
    color: var(--gas-primary);
    overflow: hidden;
    flex: 0 0 auto;
}

.gas-comite-history__person-avatar--sm {
    width: 42px;
    height: 42px;
    font-size: var(--gas-text-s);
}

.gas-comite-history__person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gas-comite-history__person-name {
    margin: 0;
    font-size: var(--gas-text-s);
    font-weight: var(--gas-weight-semi);
    color: var(--gas-text-color);
}

.gas-comite-history__person-role {
    display: inline-block;
    margin-top: 2px;
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-medium);
    color: var(--gas-primary);
}

.gas-comite-history__person-detail {
    margin: var(--gas-space-xs) 0 0;
    font-size: var(--gas-text-xs);
    color: var(--gas-text-color-light);
    line-height: var(--gas-leading-normal);
}

.gas-comite-history__person-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--gas-space-xs);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi);
    color: var(--gas-primary);
    text-decoration: none;
    transition: color var(--gas-transition-normal);
}

.gas-comite-history__person-link:hover {
    color: var(--gas-primary-dark);
}

/* =============================================
   TIMELINE — centered alternating layout
   ============================================= */
.gas-comite-history__timeline {
    margin-bottom: var(--gas-space-2xl);
}

.gas-comite-history__timeline-track {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Vertical line running down the center */
.gas-comite-history__timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--gas-primary), var(--gas-primary-light) 30%, var(--gas-neutral-200) 100%);
}

.gas-comite-history__era {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    width: 100%;
    padding: var(--gas-space-s) 0;
}

/* Center column: dot + date */
.gas-comite-history__era-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 56px;
    justify-self: center;
}

.gas-comite-history__era-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gas-primary);
    box-shadow: 0 0 0 4px var(--gas-primary-ultra-light), 0 0 0 6px var(--gas-bg-surface);
    flex-shrink: 0;
}

.gas-comite-history__era-line {
    display: none;
}

.gas-comite-history__era-date {
    display: block;
    font-size: var(--gas-text-s);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-primary);
    margin-top: var(--gas-space-xs);
    padding: var(--gas-space-xs) var(--gas-space-s);
    background: var(--gas-bg-surface);
    border: var(--gas-border-width) solid var(--gas-primary-light);
    border-radius: var(--gas-radius-l);
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
}

.gas-comite-history__era-sep {
    display: inline;
}

/* Card body: alternates left / right */
.gas-comite-history__era-body {
    padding: 0 var(--gas-space-m);
    min-width: 0;
}

/* Odd eras (1st, 3rd, 5th…): card LEFT, marker CENTER, empty RIGHT */
.gas-comite-history__era:nth-child(odd) .gas-comite-history__era-body {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
}

.gas-comite-history__era:nth-child(odd) .gas-comite-history__era-marker {
    grid-column: 2;
    grid-row: 1;
}

.gas-comite-history__era:nth-child(odd)::after {
    content: '';
    grid-column: 3;
    grid-row: 1;
}

/* Even eras (2nd, 4th, 6th…): empty LEFT, marker CENTER, card RIGHT */
.gas-comite-history__era:nth-child(even)::before {
    content: '';
    grid-column: 1;
    grid-row: 1;
}

.gas-comite-history__era:nth-child(even) .gas-comite-history__era-marker {
    grid-column: 2;
    grid-row: 1;
}

.gas-comite-history__era:nth-child(even) .gas-comite-history__era-body {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
}

.gas-comite-history__era-card {
    display: inline-block;
    text-align: left;
    width: 100%;
    max-width: 480px;
    padding: var(--gas-space-m);
    border-radius: var(--gas-radius-l);
    background: var(--gas-bg-surface);
    border: var(--gas-border-width) solid var(--gas-border-color);
    box-shadow: var(--gas-shadow-xs);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gas-comite-history__era-card:hover {
    box-shadow: var(--gas-shadow-s);
    transform: translateY(-2px);
}

/* Align cards to the edge closest to the center line */
.gas-comite-history__era:nth-child(odd) .gas-comite-history__era-card {
    float: right;
}

.gas-comite-history__era:nth-child(even) .gas-comite-history__era-card {
    float: left;
}

.gas-comite-history__era-text {
    margin: 0;
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-loose);
    color: var(--gas-text-color);
}

.gas-comite-history__era-members {
    margin-top: var(--gas-space-m);
    padding-top: var(--gas-space-m);
    border-top: var(--gas-border-width) solid var(--gas-neutral-200);
}

.gas-comite-history__era-members-title {
    margin: 0 0 var(--gas-space-s);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gas-text-color-light);
}

.gas-comite-history__era-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gas-space-s);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.gas-comite-history__empty {
    padding: var(--gas-space-2xl);
    border-radius: var(--gas-radius-l);
    border: 2px dashed var(--gas-neutral-300);
    background: var(--gas-neutral-50);
    text-align: center;
    color: var(--gas-text-color-light);
    font-size: var(--gas-text-s);
}

/* =============================================
   MEMBER DETAIL PAGE
   ============================================= */
.gas-comite-member-page {
    padding: 32px 0 64px;
}

.gas-comite-member {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--gas-space-l);
    color: var(--gas-text-color);
}

/* BACK LINK */
.gas-comite-member__back {
    display: inline-flex;
    align-items: center;
    gap: var(--gas-space-xs);
    margin-bottom: var(--gas-space-m);
    font-size: var(--gas-text-s);
    font-weight: var(--gas-weight-semi);
    color: var(--gas-primary);
    text-decoration: none;
    transition: color var(--gas-transition-normal);
}

.gas-comite-member__back:hover {
    color: var(--gas-primary-dark);
}

/* HERO */
.gas-comite-member__hero {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: var(--gas-space-xl);
    padding: var(--gas-space-xl);
    border-radius: var(--gas-radius-xl);
    background: linear-gradient(135deg, var(--gas-primary-ultra-light) 0%, var(--gas-bg-surface) 100%);
    border: var(--gas-border-width) solid var(--gas-border-color);
    box-shadow: var(--gas-shadow-s);
    margin-bottom: var(--gas-space-l);
}

.gas-comite-member__portrait {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--gas-radius-l);
    background: var(--gas-neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 60px;
    font-weight: var(--gas-weight-bold);
    color: var(--gas-primary);
}

.gas-comite-member__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gas-comite-member__name {
    margin: 0 0 var(--gas-space-s);
    font-size: var(--gas-text-2xl);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-primary-dark);
    line-height: var(--gas-leading-tight);
}

/* ROLE BADGES */
.gas-comite-member__role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gas-space-xs);
    margin-bottom: var(--gas-space-s);
}

.gas-comite-member__role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px var(--gas-space-m);
    border-radius: var(--gas-radius-full);
    background: var(--gas-primary);
    color: var(--gas-text-color-inverse);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi);
}

.gas-comite-member__role-desc {
    margin: 0 0 var(--gas-space-s);
    color: var(--gas-text-color-light);
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-normal);
}

/* WEBSITE LINK */
.gas-comite-member__website {
    display: inline-flex;
    align-items: center;
    gap: var(--gas-space-xs);
    padding: var(--gas-space-xs) var(--gas-space-m);
    border-radius: var(--gas-radius-full);
    background: var(--gas-primary-ultra-light);
    border: var(--gas-border-width) solid var(--gas-primary-light);
    color: var(--gas-primary);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi);
    text-decoration: none;
    margin-bottom: var(--gas-space-m);
    transition: background var(--gas-transition-normal), color var(--gas-transition-normal);
}

.gas-comite-member__website:hover {
    background: var(--gas-primary);
    color: var(--gas-text-color-inverse);
}

/* MANDATES */
.gas-comite-member__mandates {
    margin-top: var(--gas-space-m);
    padding-top: var(--gas-space-m);
    border-top: var(--gas-border-width) solid var(--gas-neutral-200);
}

.gas-comite-member__mandates-title {
    margin: 0 0 var(--gas-space-s);
    font-size: var(--gas-text-s);
    font-weight: var(--gas-weight-semi);
    color: var(--gas-text-color);
}

.gas-comite-member__mandates-list {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s);
}

.gas-comite-member__mandate {
    padding: var(--gas-space-s) var(--gas-space-m);
    border-radius: var(--gas-radius-m);
    background: var(--gas-bg-surface);
    border: var(--gas-border-width) solid var(--gas-border-color);
}

.gas-comite-member__mandate-dates {
    display: block;
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-primary);
    margin-bottom: 4px;
}

.gas-comite-member__mandate-desc {
    margin: 0;
    font-size: var(--gas-text-xs);
    color: var(--gas-text-color-light);
    line-height: var(--gas-leading-normal);
}

/* SECTIONS */
.gas-comite-member__section {
    padding: var(--gas-space-l);
    border-radius: var(--gas-radius-l);
    border: var(--gas-border-width) solid var(--gas-border-color);
    background: var(--gas-bg-surface);
    box-shadow: var(--gas-shadow-xs);
    margin-bottom: var(--gas-space-m);
}

.gas-comite-member__section-title {
    margin: 0 0 var(--gas-space-m);
    font-size: var(--gas-text-l);
    font-weight: var(--gas-weight-bold);
    color: var(--gas-text-color);
}

.gas-comite-member__prose {
    color: var(--gas-text-color-light);
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-loose);
}

/* EXTRAS */
.gas-comite-member__extras {
    display: grid;
    gap: var(--gas-space-m);
}

.gas-comite-member__extra-card {
    padding: var(--gas-space-m);
    border-radius: var(--gas-radius-m);
    border: var(--gas-border-width) solid var(--gas-neutral-200);
    background: var(--gas-neutral-50);
}

.gas-comite-member__extra-title {
    margin: 0 0 var(--gas-space-s);
    font-size: var(--gas-text-s);
    font-weight: var(--gas-weight-semi);
    color: var(--gas-text-color);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .gas-comite-history__hero-metrics {
        flex-wrap: wrap;
    }

    .gas-comite-member__hero {
        grid-template-columns: 1fr;
        padding: var(--gas-space-l);
    }

    .gas-comite-member__portrait {
        max-width: 280px;
    }

    /* Collapse timeline to single column */
    .gas-comite-history__timeline-track::before {
        left: 20px;
    }

    .gas-comite-history__era {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0;
    }

    .gas-comite-history__era:nth-child(odd) .gas-comite-history__era-body,
    .gas-comite-history__era:nth-child(even) .gas-comite-history__era-body {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        padding: 0 0 0 var(--gas-space-s);
    }

    .gas-comite-history__era:nth-child(odd) .gas-comite-history__era-marker,
    .gas-comite-history__era:nth-child(even) .gas-comite-history__era-marker {
        grid-column: 1;
        grid-row: 1;
        width: auto;
    }

    .gas-comite-history__era:nth-child(odd)::after,
    .gas-comite-history__era:nth-child(even)::before {
        display: none;
    }

    .gas-comite-history__era:nth-child(odd) .gas-comite-history__era-card,
    .gas-comite-history__era:nth-child(even) .gas-comite-history__era-card {
        float: none;
        max-width: none;
    }

    .gas-comite-history__era-dot {
        width: 12px;
        height: 12px;
    }

    .gas-comite-history__era-date {
        font-size: var(--gas-text-xs);
        padding: 2px var(--gas-space-xs);
        white-space: normal;
    }

    .gas-comite-history__era-sep {
        display: block;
        font-size: 0;
        height: 0;
    }

    .gas-comite-history__timeline > .gas-comite-history__section-header {
        text-align: left;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .gas-comite-history {
        padding: 0 var(--gas-space-m);
    }

    .gas-comite-member {
        padding: 0 var(--gas-space-m);
    }

    .gas-comite-history__era-members-grid {
        grid-template-columns: 1fr;
    }

    .gas-comite-member__hero {
        padding: var(--gas-space-m);
    }

    .gas-comite-member__section {
        padding: var(--gas-space-m);
    }
}
