/* Directorio institucional del Cuerpo de Concejales. */
body { background: #fff; }

.page-header-civic,
.council-page {
    --council-ink: #142b45;
    --council-muted: #5a6b7f;
    --council-blue: #1b4b8f;
    --council-line: #dce5ef;
}

.page-header-civic h1,
.council-roster-heading h2,
.council-resources-heading h2,
.council-member-identity h3 {
    font-family: "Montserrat", system-ui, sans-serif;
}

.page-header-civic .page-header-kicker { font-size: .75rem; }

.council-page {
    padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 5vw, 4.5rem);
    background: #fff;
}

.council-container { max-width: 1240px; }

.page-header-civic .council-count {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .65rem .85rem;
    border: 1px solid var(--council-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(17, 42, 70, .06);
}

.council-count-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    background: #edf3fa;
    color: var(--council-blue);
    font-size: 1.1rem;
}

.council-count-copy { display: grid; line-height: 1.1; }
.council-count-copy strong { color: var(--council-ink); font-size: 1.3rem; letter-spacing: -.04em; }
.council-count-copy > span { margin-top: .2rem; color: #276444; font-size: .8125rem; font-weight: 650; }

.council-roster-heading,
.council-resources-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}
.council-roster-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    align-items: end;
}

.council-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: .6rem;
    color: #3a5a7b;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.council-roster-heading h2,
.council-resources-heading h2 {
    margin: 0;
    color: var(--council-ink);
    font-size: clamp(1.55rem, 2.3vw, 1.75rem);
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1.18;
}

.council-roster-heading > div > p,
.council-resources-heading > p {
    max-width: 54ch;
    margin: .45rem 0 0;
    color: var(--council-muted);
    font-size: .93rem;
    line-height: 1.55;
}

.council-roster-meta {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: .55rem;
}

.council-office-note {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .15rem;
    padding: .58rem .75rem;
    border: 1px solid var(--council-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    color: #516378;
    font-size: .8125rem;
    line-height: 1.4;
}
.council-office-note > i { color: var(--council-blue); font-size: .95rem; }
.council-office-note strong { color: #344d67; font-weight: 700; }

.council-roster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.council-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--council-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(18, 42, 68, .035);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.council-card::before {
    position: absolute;
    top: 0;
    right: 1.2rem;
    left: 1.2rem;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: #c7d8eb;
    content: '';
}
.council-card:hover {
    transform: translateY(-2px);
    border-color: #c4d2e1;
    box-shadow: 0 12px 28px rgba(18, 42, 68, .075);
}

.council-card-heading {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 88px;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8edf3;
}

.council-avatar {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    overflow: hidden;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #eaf0f7;
    box-shadow: 0 0 0 1px #dce5ef, 0 3px 8px rgba(19, 47, 78, .08);
    color: #234c78;
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: .03em;
}
.council-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

.council-member-identity { min-width: 0; }
.council-member-identity h3 {
    margin: 0 0 .25rem;
    color: #172d47;
    font-size: 1.125rem;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.28;
    overflow-wrap: anywhere;
}
.council-member-role {
    color: #65758a;
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.council-member-details {
    display: grid;
    gap: .05rem;
    margin: .4rem 0 .65rem;
}
.council-member-details > div {
    display: flex;
    justify-content: space-between;
    gap: .9rem;
    padding: .52rem 0;
    border-bottom: 1px solid #edf1f5;
}
.council-member-details > div:last-child { border-bottom: 0; }
.council-member-details dt { flex: 0 0 auto; color: #5a6b7f; font-size: .875rem; font-weight: 550; }
.council-member-details dd { margin: 0; color: #263e59; font-size: .875rem; font-weight: 680; text-align: right; overflow-wrap: anywhere; }

.council-member-email {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    margin-top: auto;
    padding: .65rem .7rem;
    border: 1px solid #e5ebf2;
    border-radius: 10px;
    background: #f7f9fc;
    color: #244f80;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.council-member-email > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.council-member-email > i:first-child { flex: 0 0 auto; font-size: .9rem; }
.council-member-email > i:last-child { flex: 0 0 auto; color: #73869c; font-size: .72rem; }
.council-member-email:hover { border-color: #c4d4e6; background: #eef4fa; color: #153a70; }
.council-member-email:focus-visible,
.council-resource:focus-visible { outline: 3px solid #2455b8; outline-offset: 3px; }

.council-empty-state {
    padding: 1rem;
    border: 1px solid var(--council-line);
    border-radius: 16px;
    background: #fff;
}

.council-resources {
    margin-top: clamp(3rem, 5vw, 4.5rem);
    padding-top: clamp(2.2rem, 4vw, 3rem);
    border-top: 1px solid #dce4ed;
}
.council-resources-heading { align-items: end; margin-bottom: 1.25rem; }
.council-resources-heading > p { max-width: 38ch; margin: 0 0 .1rem; }
.council-resources-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.council-resource {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: start;
    gap: .9rem;
    min-height: 174px;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--council-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(18, 42, 68, .035);
    color: var(--council-ink);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.council-resource:hover { transform: translateY(-2px); border-color: #c4d2e1; box-shadow: 0 12px 28px rgba(18, 42, 68, .075); color: var(--council-ink); }
.council-resource--internal { border-color: #173d69; background: #15375f; color: #fff; }
.council-resource--internal:hover { border-color: #0f2a4b; background: #102f54; color: #fff; }
.council-resource-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid #dbe6f2;
    border-radius: 13px;
    background: #edf3fa;
    color: #1b4b8f;
    font-size: 1.25rem;
}
.council-resource--internal .council-resource-icon { border-color: rgba(255, 255, 255, .19); background: rgba(255, 255, 255, .11); color: #fff; }
.council-resource-content { display: grid; gap: .36rem; }
.council-resource-label { color: #5a6b7f; font-size: .75rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.council-resource-content strong { color: inherit; font-size: 1.2rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.25; }
.council-resource-content > span:last-child { max-width: 45ch; color: #5d6f83; font-size: .9375rem; line-height: 1.5; }
.council-resource--internal .council-resource-label { color: #c2d2e4; }
.council-resource--internal .council-resource-content > span:last-child { color: #e1eaf4; }
.council-resource-action {
    display: inline-flex;
    align-items: center;
    align-self: end;
    gap: .45rem;
    grid-column: 2 / -1;
    color: #244f80;
    font-size: .875rem;
    font-weight: 750;
}
.council-resource--internal .council-resource-action { color: #fff; }
.council-resource-action i { transition: transform 160ms ease; }
.council-resource:hover .council-resource-action i { transform: translate(2px, -2px); }

@media (max-width: 991.98px) {
    .council-roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .council-page { padding-top: 2rem; }
    .council-roster-heading { grid-template-columns: 1fr; align-items: start; gap: .9rem; }
    .council-resources-heading { align-items: flex-start; flex-direction: column; gap: .9rem; }
    .council-roster-grid,
    .council-resources-grid { grid-template-columns: 1fr; }
    .council-roster-meta { align-items: stretch; }
    .council-office-note { align-items: flex-start; }
    .council-resource { min-height: 160px; }
}

@media (max-width: 420px) {
    .page-header-civic .council-count { gap: .55rem; padding: .55rem .65rem; }
    .council-card { padding: 1rem; }
    .council-avatar { width: 68px; height: 68px; flex-basis: 68px; }
    .council-resource { grid-template-columns: 42px minmax(0, 1fr); gap: .75rem; padding: 1rem; }
    .council-resource-icon { width: 42px; height: 42px; }
    .council-resource-action { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .council-card,
    .council-resource,
    .council-member-email,
    .council-resource-action i { transition: none; }
    .council-card:hover,
    .council-resource:hover,
    .council-resource:hover .council-resource-action i { transform: none; }
}
