/* Governance directory — member cards (USL brand) */

.gov-page {
    background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 38%, #f8fafc 100%);
}

.gov-section {
    margin-bottom: 4rem;
}

.gov-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 33, 71, 0.1);
}

.gov-section-header__icon {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #002147 0%, #003366 100%);
    color: #c9a227;
    font-size: 1.25rem;
    border-radius: 0.85rem;
    box-shadow: 0 4px 14px rgba(0, 33, 71, 0.18);
}

.gov-section-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #002147;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.gov-section-header__desc {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.55;
    max-width: 52rem;
}

.gov-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1280px) {
    .gov-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* —— Card shell —— */
.gov-card {
    --gov-accent: #002147;
    --gov-accent-soft: rgba(0, 33, 71, 0.08);
    --gov-gold: #c9a227;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 33, 71, 0.08);
    border-radius: 1rem;
    box-shadow:
        0 1px 2px rgba(0, 33, 71, 0.04),
        0 8px 24px -8px rgba(0, 33, 71, 0.1);
    overflow: hidden;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.gov-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 33, 71, 0.14);
    box-shadow:
        0 4px 8px rgba(0, 33, 71, 0.05),
        0 16px 36px -10px rgba(0, 33, 71, 0.16);
}

.gov-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.gov-card[data-type="council"] { --gov-accent: #002147; --gov-accent-soft: rgba(0, 33, 71, 0.1); }
.gov-card[data-type="senate"] { --gov-accent: #0f766e; --gov-accent-soft: rgba(15, 118, 110, 0.1); }
.gov-card[data-type="management"] { --gov-accent: #1e40af; --gov-accent-soft: rgba(30, 64, 175, 0.1); }
.gov-card[data-type="committee"] { --gov-accent: #6d28d9; --gov-accent-soft: rgba(109, 40, 217, 0.1); }
.gov-card[data-type="other"] { --gov-accent: #475569; --gov-accent-soft: rgba(71, 85, 105, 0.1); }

/* —— Portrait —— */
.gov-card__media {
    position: relative;
    flex-shrink: 0;
    background: linear-gradient(180deg, #e8eef4 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(0, 33, 71, 0.06);
}

.gov-card__media-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 300px;
    overflow: hidden;
    background: #e2e8f0;
}

.gov-card__media-frame img,
.gov-card__media-frame .gov-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.gov-card:hover .gov-card__media-frame img,
.gov-card:hover .gov-card__media-frame .gov-card__photo {
    transform: scale(1.04);
}

.gov-card__media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(0, 33, 71, 0.18) 100%
    );
    pointer-events: none;
}

.gov-card__type {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    z-index: 2;
    padding: 0.28rem 0.65rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--gov-accent);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.2);
}

.gov-card__status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.28rem 0.6rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
}

.gov-card__status--active {
    color: #14532d;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(22, 163, 74, 0.35);
}

.gov-card__status--past {
    color: #334155;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* —— Body —— */
.gov-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem 1.2rem 1.2rem;
    border-left: 3px solid var(--gov-accent);
}

.gov-card__name {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #002147;
    line-height: 1.35;
    letter-spacing: -0.015em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gov-card:hover .gov-card__name {
    color: var(--gov-accent);
}

.gov-card__role {
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--gov-accent);
    background: var(--gov-accent-soft);
    border-radius: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gov-card__role:empty {
    display: none;
}

.gov-card__facts {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gov-card__facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}

.gov-card__facts i {
    flex-shrink: 0;
    width: 0.9rem;
    margin-top: 0.15rem;
    text-align: center;
    color: var(--gov-accent);
    font-size: 0.72rem;
    opacity: 0.85;
}

.gov-card__facts span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gov-card__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.gov-card__contact {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
}

.gov-card__contact i {
    font-size: 0.65rem;
    color: var(--gov-accent);
}

/* Legacy meta (if used elsewhere) */
.gov-card__committee,
.gov-card__meta {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.gov-card__committee i,
.gov-card__meta i {
    color: var(--gov-accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 0.9rem;
    text-align: center;
}

.gov-card__meta a {
    color: #1e40af;
    text-decoration: none;
    word-break: break-word;
}

.gov-card__footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 33, 71, 0.06);
}

.gov-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gov-accent);
    background: #fff;
    border: 1px solid rgba(0, 33, 71, 0.14);
    border-radius: 0.5rem;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        gap 0.2s ease;
}

.gov-card:hover .gov-card__cta {
    color: #fff;
    background: var(--gov-accent);
    border-color: var(--gov-accent);
    gap: 0.55rem;
}

.gov-show-more {
    margin-top: 1.5rem;
    text-align: center;
}

.gov-show-more button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #002147;
    background: #fff;
    border: 1px solid rgba(0, 33, 71, 0.15);
    border-radius: 0.55rem;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.gov-show-more button:hover {
    background: #002147;
    color: #fff;
    border-color: #002147;
}

@media (max-width: 640px) {
    .gov-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.15rem;
    }

    .gov-card__media-frame {
        aspect-ratio: 1 / 1;
        max-height: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gov-card,
    .gov-card__media-frame img,
    .gov-card__media-frame .gov-card__photo,
    .gov-card__cta {
        transition: none;
    }
}
