/* Galeria de Ex-Prefeitos Section Styles */
:root {
    --pref-primary: #016CB0;
    --pref-accent: #1A82C4;
    --pref-text: #364153;
    --pref-text-muted: #6A7282;
    --pref-bg: #EEF2F5;
    --pref-white: #FFFFFF;
    --pref-border: #E5E7EB;
    --pref-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --pref-transition: all 0.3s ease;
}

.ex-prefeitos-hero {
    height: 227px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../images/semed-hero-bg.png');
    /* Reusing high quality bg */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--gallery-white);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.ex-prefeitos-hero .container {
    width: 100%;
}

.ex-prefeitos-hero h1 {
    font-size: calc(42px * var(--var-fontscale));
    font-weight: 700;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    text-align: left;
    color: white;
}

.ex-prefeitos-hero .accessibility-icons {
    position: absolute;
    top: 30px;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ex-prefeitos-acc-icon {
    width: 38px;
    height: 38px;
    background: #2563EB;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(0.9rem * var(--var-fontscale));
    border: 2px solid white;
    cursor: pointer;
}

.ex-prefeitos-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.ex-prefeitos-breadcrumb {
    color: var(--pref-text-muted);
    margin-bottom: 25px;
    text-align: left;
    font-size: calc(14px * var(--var-fontscale));
    font-weight: 400;
    font-family: "Montserrat", sans-serif;
}

.ex-prefeitos-breadcrumb a {
    font-size: calc(14px * var(--var-fontscale));
    font-weight: 400;
    color: var(--pref-primary);
    font-family: "Montserrat", sans-serif;
    text-decoration: none;
}

/* Filters */
.ex-prefeitos-filters {
    margin-bottom: 40px;
}

.filter-label {
    display: block;
    font-size: calc(20px * var(--var-fontscale));
    font-weight: 600;
    color: #293B49;
    margin-bottom: 12px;
    text-align: left;
}

.filter-select-wrapper {
    position: relative;
    width: 250px;
}

.filter-select {
    width: 322px;
    height: 48px;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid var(--pref-border);
    appearance: none;
    background: white;
    font-size: calc(18px * var(--var-fontscale));
    font-weight: 400;
    color: var(--pref-text);
    cursor: pointer;
}

.filter-select-wrapper::after {
    content: ' ';
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21" fill="none"><path d="M15 8L10 13L5 8" stroke="%23293B49" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    position: absolute;
    right: -57px;
    top: 50%;
    transform: translateY(-50%);
    font-size: calc(0.7rem * var(--var-fontscale));
    color: var(--pref-text-muted);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

/* Grid */
.ex-prefeitos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.mayor-card {
    background: var(--pref-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--pref-card-shadow);
    border: 1px solid transparent;
    width: 385px;
    height: 520px;
    padding: 16px 20px;
}

.mayor-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--pref-primary);
}

.mayor-img-wrapper {
    height: 396px;
    overflow: hidden;
    background: #f0f0f0;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
}

.mayor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mayor-body {
    padding-top: 16px;
}

.mayor-date {
    display: block;
    font-size: calc(16px * var(--var-fontscale));
    font-weight: 700;
    color: #293B49;
    margin-bottom: 8px;
    text-align: left;
    font-family: "Montserrat", sans-serif;
}

.mayor-name {
    display: block;
    font-size: calc(20px * var(--var-fontscale));
    font-weight: 400;
    color: #293B49;
    margin-bottom: 12px;
    text-align: left;
    font-family: "Montserrat", sans-serif;
}

.mayor-link {
    font-size: calc(0.85rem * var(--var-fontscale));
    color: var(--pref-accent);
    text-decoration: underline;
    font-weight: 500;
    text-align: left;
    width: 100%;
    font-family: "Montserrat", sans-serif;
    display: block;
}

/* See All Button */
.see-all-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 80px;
}

.btn-see-all {
    border: 1px solid #1A82C4;
    color: #1A82C4;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: calc(18px * var(--var-fontscale));
    width: 298px;
    height: 44px;
    font-family: "Montserrat", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}


.see-also-header {
    margin-bottom: 44px;
    display: flex;
}

.see-also-title {
    font-size: calc(32px * var(--var-fontscale));
    font-weight: 600;
    font-family: "Montserrat", sans-serif;
    color: #293B49;
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.see-also-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #016CB0;
}

.see-also-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 80px;
}

.see-also-item {
    position: relative;
    width: 384px;
    height: 192px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 19px 16px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: calc(25px * var(--var-fontscale));
    font-family: "Montserrat", sans-serif;
}

.see-also-item svg {
    margin-top: 5px;
}

.see-also-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 1;
}

.see-also-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.see-also-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Footer link */
.gallery-footer-link {
    text-align: left;
    margin-top: 40px;
    padding-bottom: 60px;
}

.gallery-footer-link a {
    color: #1A82C4;
    text-decoration: underline;
    font-size: calc(18px * var(--var-fontscale));
    font-weight: 400;
    font-family: "Montserrat", sans-serif;
}


@media (max-width: 1024px) {
    .ex-prefeitos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .ex-prefeitos-grid,
    .see-also-grid {
        grid-template-columns: 1fr;
    }

    .see-all-wrapper {
        justify-content: center;
    }
}