/* ============================================================
   CITY COUNCIL DIRECTORY  —  "Legislative Directory"
   Flat civic styling for the public city-council page,
   matching the legislative-library register aesthetic.
   Scoped under `.city-council-page`. Loads after pages.css.
   ============================================================ */

.city-council-page {
    --cc-green-deep: #0d351f;
    --cc-green: #14532d;
    --cc-green-mid: #1f7a3d;
    --cc-amber: #f08a24;
    --cc-amber-dark: #cf6d09;
    --cc-gold: #ffc72c;
    --cc-ink: #1c2b22;
    --cc-muted: #5c6b62;
    --cc-line: rgba(20, 83, 45, .16);
    --cc-r-sm: 6px;

    background: #ffffff;
    color: var(--cc-ink);
}

/* ============================================================
   Shell
   ============================================================ */
.city-council-page .cc-main {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 52px;
}

.city-council-page .cc-shell {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ============================================================
   Hero — flat chamber-green docket field
   ============================================================ */
.city-council-page .cc-hero {
    position: relative;
    background: var(--cc-green-deep);
    border-radius: var(--cc-r-sm);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.city-council-page .cc-hero__rule {
    height: 4px;
    background: linear-gradient(90deg, var(--cc-gold) 0 40%, var(--cc-amber) 40% 100%);
}

.city-council-page .cc-hero__grille {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
            rgba(255, 255, 255, .045) 0 2px,
            transparent 2px 26px);
    pointer-events: none;
}

.city-council-page .cc-hero__body {
    position: relative;
    padding: clamp(22px, 3.6vw, 42px);
}

.city-council-page .cc-hero__eyebrow {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ffd97a;
}

.city-council-page .cc-hero__title {
    margin: .4rem 0 .5rem;
    font-size: clamp(1.75rem, 4.6vw, 2.7rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -.015em;
    color: #ffffff;
    text-wrap: balance;
}

.city-council-page .cc-hero__subtitle {
    margin: 0;
    max-width: 720px;
    color: rgba(240, 246, 242, .82);
    line-height: 1.65;
    font-size: .96rem;
}

.city-council-page .cc-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.city-council-page .cc-hero__meta-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--cc-r-sm);
}

.city-council-page .cc-hero__meta-item strong {
    color: #ffd97a;
    font-weight: 800;
    margin-right: 5px;
}

/* ============================================================
   Section headers
   ============================================================ */
.city-council-page .cc-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cc-line);
}

.city-council-page .cc-section-kicker {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--cc-amber-dark);
}

.city-council-page .cc-section-title {
    margin: 4px 0 0;
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--cc-green);
}

.city-council-page .cc-section-count {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cc-muted);
    white-space: nowrap;
}

/* ============================================================
   Executives (Mayor / Vice Mayor) — horizontal cards
   ============================================================ */
.city-council-page .cc-executives {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.city-council-page .cc-executive {
    position: relative;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-r-sm);
    padding: 20px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.city-council-page .cc-executive::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--cc-gold), var(--cc-amber));
    border-radius: var(--cc-r-sm) 0 0 var(--cc-r-sm);
}

.city-council-page .cc-executive:hover {
    border-color: rgba(20, 83, 45, .3);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.city-council-page .cc-executive:focus-visible {
    outline: 2px solid var(--cc-amber);
    outline-offset: 2px;
}

.city-council-page .cc-executive__media {
    display: flex;
    height: 100%;
    background: #ffffff;
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-r-sm);
    padding: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.city-council-page .cc-executive__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 3px;
}

.city-council-page .cc-executive__body {
    min-width: 0;
}

.city-council-page .cc-executive__name {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--cc-green);
    line-height: 1.15;
}

.city-council-page .cc-executive__position {
    margin: 6px 0 0;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cc-amber-dark);
}

.city-council-page .cc-executive__rule {
    display: block;
    width: 48px;
    height: 3px;
    margin: 14px 0;
    background: linear-gradient(90deg, var(--cc-green-mid), var(--cc-amber));
    border-radius: 2px;
}

.city-council-page .cc-executive__bio {
    margin: 0;
    font-size: .92rem;
    line-height: 1.7;
    color: #374151;
    overflow-wrap: break-word;
    word-break: break-word;
}

.city-council-page .cc-read-more {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cc-green);
    background: #ffffff;
    border: 1px solid rgba(20, 83, 45, .3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.city-council-page .cc-read-more:hover {
    background: rgba(20, 83, 45, .08);
    border-color: rgba(20, 83, 45, .5);
    color: var(--cc-green-deep);
}

.city-council-page .cc-read-more:focus-visible {
    outline: 2px solid var(--cc-amber);
    outline-offset: 2px;
}

.city-council-page .cc-executive__bio br {
    display: block;
    margin-top: .45rem;
}

/* ============================================================
   Council members — grid cards
   ============================================================ */
.city-council-page .cc-members {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.city-council-page .cc-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-r-sm);
    padding: 22px 18px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.city-council-page .cc-member:hover {
    border-color: rgba(20, 83, 45, .3);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.city-council-page .cc-member:focus-visible {
    outline: 2px solid var(--cc-amber);
    outline-offset: 2px;
}

.city-council-page .cc-member__img {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid rgba(240, 138, 36, .32);
    background: #f3f4f6;
}

.city-council-page .cc-member__name {
    margin: 14px 0 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--cc-green);
    line-height: 1.25;
}

.city-council-page .cc-member__position {
    margin: 4px 0 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cc-amber-dark);
}

.city-council-page .cc-member__committees {
    width: 100%;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--cc-line);
    text-align: left;
}

.city-council-page .cc-member__comm-label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cc-muted);
}

.city-council-page .cc-member__comm-list {
    margin: 8px 0 0;
    padding-left: 18px;
    list-style: disc;
    font-size: .82rem;
    line-height: 1.5;
    color: #374151;
}

.city-council-page .cc-member__comm-list li + li {
    margin-top: 4px;
}

.city-council-page .cc-member__bio {
    margin: 12px 0 0;
    font-size: .82rem;
    line-height: 1.6;
    color: #4b5563;
    overflow-wrap: break-word;
    word-break: break-word;
}

.city-council-page .cc-member__bio br {
    display: block;
    margin-top: .4rem;
}

/* ============================================================
   Empty state
   ============================================================ */
.city-council-page .cc-empty {
    text-align: center;
    padding: 44px 20px;
    background: #ffffff;
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-r-sm);
}

.city-council-page .cc-empty__title {
    margin: 0;
    color: #4b5563;
    font-size: .95rem;
}

/* ============================================================
   Profile modal — flat civic
   ============================================================ */
.city-council-page .profile-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 20, 12, .72);
    backdrop-filter: blur(6px);
}

.city-council-page .profile-modal.is-open {
    display: flex;
}

.city-council-page .profile-modal-shell {
    width: 100%;
    max-width: 940px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--cc-r-sm);
    background: #ffffff;
    border: 1px solid rgba(240, 138, 36, .18);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
}

.city-council-page .profile-modal.is-open .profile-modal-shell {
    animation: cc-modal-in 240ms ease-in-out;
}

.city-council-page .profile-modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--cc-line);
    background: linear-gradient(90deg, rgba(31, 122, 61, .08), rgba(240, 138, 36, .1));
}

.city-council-page .profile-modal-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cc-amber-dark);
    background: #ffffff;
    border: 1px solid rgba(240, 138, 36, .25);
}

.city-council-page .profile-modal-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cc-green);
    line-height: 1.2;
}

.city-council-page .profile-modal-close {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(20, 83, 45, .2);
    border-radius: 999px;
    background: #ffffff;
    color: var(--cc-green);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.city-council-page .profile-modal-close:hover {
    color: var(--cc-amber-dark);
    border-color: rgba(240, 138, 36, .4);
    background: #fff7ed;
    transform: scale(1.04);
}

.city-council-page .profile-modal-body {
    padding: 22px;
    overflow-y: auto;
}

.city-council-page .profile-loading {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #4b5563;
    text-align: center;
    border: 1px dashed rgba(20, 83, 45, .2);
    background: #fafafa;
    border-radius: var(--cc-r-sm);
}

.city-council-page .profile-loading-spinner {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 3px solid rgba(20, 83, 45, .18);
    border-top-color: var(--cc-green-mid);
    animation: cc-spin .8s linear infinite;
}

.city-council-page .profile-loading-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cc-green);
}

.city-council-page .profile-loading-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.city-council-page .profile-error {
    border-radius: var(--cc-r-sm);
    border: 1px solid rgba(185, 28, 28, .2);
    background: #fff5f5;
    color: #991b1b;
    padding: 22px;
    text-align: center;
}

/* ============================================================
   Profile body — injected by profile.php into the modal.
   Self-contained (literal colors) so it also renders inside the
   committee-profile page modal (.modal-overlay), not just here.
   ============================================================ */
.cc-profile {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #1c2b22;
}

.cc-profile__head {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 22px;
    align-items: start;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(20, 83, 45, .14);
}

.cc-profile__media {
    background: #ffffff;
    border: 1px solid rgba(20, 83, 45, .16);
    border-radius: 6px;
    padding: 8px;
    overflow: hidden;
}

.cc-profile__media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
    border-radius: 3px;
}

.cc-profile__info {
    min-width: 0;
}

.cc-profile__name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #14532d;
    line-height: 1.15;
}

.cc-profile__position {
    margin: 6px 0 0;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #cf6d09;
}

.cc-profile__rule {
    display: block;
    width: 48px;
    height: 3px;
    margin: 14px 0;
    background: linear-gradient(90deg, #1f7a3d, #f08a24);
    border-radius: 2px;
}

.cc-profile__comm-label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #5c6b62;
}

.cc-profile__comm-list {
    margin: 8px 0 0;
    padding-left: 18px;
    list-style: disc;
    font-size: .86rem;
    line-height: 1.55;
}

.cc-profile__comm-list li + li {
    margin-top: 4px;
}

.cc-profile__comm-list a {
    color: #1f7a3d;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.cc-profile__comm-list a:hover {
    color: #cf6d09;
    border-bottom-color: #cf6d09;
}

.cc-profile__bio {
    font-size: .92rem;
    line-height: 1.7;
    color: #374151;
    overflow-wrap: break-word;
    word-break: break-word;
}

.cc-profile__bio br {
    display: block;
    margin-top: .45rem;
}

.cc-profile-error {
    border-radius: 6px;
    border: 1px solid rgba(185, 28, 28, .2);
    background: #fff5f5;
    color: #991b1b;
    padding: 22px;
    text-align: center;
}

.cc-profile-error h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.cc-profile-error p {
    margin: 8px 0 0;
    font-size: .88rem;
}

@media (max-width: 640px) {
    .cc-profile__head {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cc-profile__media {
        max-width: 200px;
        margin: 0 auto;
    }
}

@keyframes cc-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cc-modal-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   Scroll reveal (directory cards)
   ============================================================ */
.city-council-page .js-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.city-council-page .js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .city-council-page .js-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .city-council-page .profile-modal.is-open .profile-modal-shell {
        animation: none;
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .city-council-page .cc-executive {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .city-council-page .cc-executive__media {
        max-width: 220px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .city-council-page .cc-main {
        width: calc(100% - 20px);
        margin: 18px auto 36px;
    }

    .city-council-page .cc-shell {
        gap: 22px;
    }

    .city-council-page .cc-hero__meta-item {
        font-size: .66rem;
        padding: 5px 9px;
    }

    .city-council-page .cc-members {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 12px;
    }

    .city-council-page .cc-member {
        padding: 18px 14px;
    }

    .city-council-page .profile-modal-shell {
        max-height: 90vh;
    }

    .city-council-page .profile-modal-top {
        padding: 14px 16px;
    }

    .city-council-page .profile-modal-title {
        font-size: 16px;
    }

    .city-council-page .profile-modal-body {
        padding: 14px;
    }
}
