/**
 * Ex-governadores — layout institucional (tema: --primary #0046ad, Montserrat / Open Sans)
 */

.ex-gov-page {
    background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 220px);
}

.ex-gov-header {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .ex-gov-header {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }
}

.ex-gov-eyebrow {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary, #0046ad);
    margin-bottom: 0.5rem;
}

.ex-gov-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
    font-weight: 700;
    color: var(--dark, #333);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.ex-gov-title-line {
    width: 56px;
    height: 4px;
    background: var(--secondary, #ffc107);
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.ex-gov-intro {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 640px;
}

.ex-gov-intro a {
    color: var(--primary, #0046ad);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ex-gov-intro a:hover {
    color: #003870;
}

/* Grelha: cartões com mesma altura */
.ex-gov-grid {
    --ex-gov-frame-w: 132px;
    --ex-gov-frame-h: 168px;
}

.ex-gov-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 56, 112, 0.1);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 56, 112, 0.06);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.ex-gov-card:hover {
    box-shadow: 0 8px 28px rgba(0, 56, 112, 0.12);
    border-color: rgba(0, 70, 173, 0.18);
    transform: translateY(-3px);
}

.ex-gov-card__accent {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary, #0046ad) 0%, #1a6fd4 50%, var(--primary, #0046ad) 100%);
    flex-shrink: 0;
}

.ex-gov-card__media {
    flex-shrink: 0;
    padding: 1.15rem 1rem 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}

.ex-gov-card__photo-frame {
    position: relative;
    width: var(--ex-gov-frame-w);
    height: var(--ex-gov-frame-h);
    min-width: var(--ex-gov-frame-w);
    min-height: var(--ex-gov-frame-h);
    max-width: var(--ex-gov-frame-w);
    max-height: var(--ex-gov-frame-h);
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, #e8ecf2 0%, #dce2ea 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 16px rgba(0, 56, 112, 0.1);
    border: 1px solid rgba(0, 56, 112, 0.08);
}

.ex-gov-card__photo-frame .ex-gov-card__photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.ex-gov-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    background: linear-gradient(160deg, #eef1f6 0%, #e2e7ef 100%);
}

.ex-gov-card__placeholder-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(0, 70, 173, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #0046ad);
    font-size: 1.35rem;
    opacity: 0.75;
}

.ex-gov-card__placeholder-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7a8798;
    line-height: 1.2;
    max-width: 100%;
}

/* Corpo: anular margens globais do tema (h3/p têm margin-bottom: 1rem em reference-theme.css) */
.ex-gov-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.85rem 1rem;
    text-align: center;
    min-height: 0;
}

.ex-gov-card__body h3,
.ex-gov-card__body p {
    margin-top: 0;
    margin-bottom: 0;
}

.ex-gov-card__ano {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b778c;
    line-height: 1.25;
    margin: 0 0 0.35rem;
    min-height: 2.0em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ex-gov-card__nome {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    color: #1c2b45;
    line-height: 1.00;
    margin: 0 0 0.2rem !important;
    min-height: 3.2em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ex-gov-card__desc {
    font-size: 0.68rem;
    color: #5c6678;
    line-height: 1.32;
    margin: 0 0 0.4rem;
    min-height: 2.65em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ex-gov-card__lema {
    font-size: 0.62rem;
    line-height: 1.25;
    color: #4a5568;
    font-style: italic;
    margin: 0;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 56, 112, 0.08);
    min-height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ex-gov-card__lema:not(:empty)::before {
    content: '\201C';
}

.ex-gov-card__lema:not(:empty)::after {
    content: '\201D';
}

.ex-gov-card__lema:empty {
    border-top-color: transparent;
    padding-top: 0;
    min-height: 0;
    margin-top: 0;
}

.ex-gov-cta {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.55rem 1.35rem;
    border-radius: 8px;
    border-width: 2px;
    color: var(--primary, #0046ad);
    border-color: var(--primary, #0046ad);
}

.ex-gov-cta:hover {
    background: var(--primary, #0046ad);
    border-color: var(--primary, #0046ad);
    color: #fff;
}

.ex-gov-empty {
    max-width: 500px;
    margin: 1rem auto;
    border-radius: 10px !important;
}

@media (min-width: 992px) {
    .ex-gov-card__nome {
        font-size: 0.76rem;
    }
}
