:root {
    --blue-900: #1657ad;
    --blue-800: #2a6fbe;
    --blue-700: #1f5fbf;
    --gold: #dfab17;
    --text: #4d5a6c;
    --muted: #8b95a3;
    --line: #d9dde4;
    --panel: #ffffff;
    --card-shadow: 0 10px 20px rgba(17, 73, 144, 0.12);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #ffffff;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
}

.top-email-bar {
    background: var(--blue-900);
    color: #ffffff;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

.top-email-bar a {
    color: #ffffff;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(39, 110, 191, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 18px rgba(13, 57, 120, 0.16);
}

.main-navbar .container {
    min-height: 86px;
}

.brand-wrap {
    gap: 0.9rem;
}

.brand-wrap img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-wrap strong {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.15;
}

.nav-link {
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 500;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.nav-link:hover,
.nav-link:focus {
    color: #f6f7fa !important;
}

.hero {
    position: relative;
    background:
        linear-gradient(rgba(17, 91, 175, 0.84), rgba(17, 91, 175, 0.84)),
        url("../imagem/maconaria.jpg") center/cover;
    text-align: center;
    color: #ffffff;
    padding: 4.4rem 0 9rem;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.05rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.hero-lines {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.85;
    font-size: 0.96rem;
}

.hero-subline {
    margin-top: 1.35rem;
    font-size: 1rem;
}

.hero-cta {
    margin-top: 3rem;
}

.hero-cta a,
.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1rem 2.5rem;
    border-radius: 12px;
}

.visit-section {
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}

.visit-grid,
.presidents-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}

.visit-card,
.president-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    text-align: center;
    padding: 1.5rem 1rem 1.35rem;
}

.visit-card-link,
.gallery-link {
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.visit-card-link:hover,
.gallery-link:hover {
    color: inherit;
    transform: translateY(-2px);
}
.visit-card {
    min-height: 285px;
}

.visit-card img,
.president-avatar img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    margin-bottom: 0.95rem;
}

.visit-chip {
    color: #767f8d;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.visit-card h3 {
    margin: 0.8rem 0 0;
    color: #737c89;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.55;
}

.section-shell {
    padding: 4.2rem 0 0;
}

.section-title {
    text-align: center;
    margin-bottom: 1.8rem;
}

.section-title h2 {
    font-size: 2.05rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #5c6674;
    margin-bottom: 0.35rem;
}

.section-title p,
.section-title div {
    margin: 0;
    color: #9aa3ad;
    font-size: 0.88rem;
}

.history-panel,
.calendar-table-wrap,
.legal-panel {
    border: 1px solid #dfe5ef;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

.history-panel {
    padding: 1.8rem;
}

.history-grid {
    display: grid;
    grid-template-columns: minmax(320px, 400px) 1fr;
    gap: 2rem;
    align-items: start;
}

.history-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-content: start;
}

.history-photo {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dfe5ef;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 73, 144, 0.1);
}

.history-photo img {
    width: 100%;
    height: 205px;
    object-fit: cover;
    display: block;
}

.history-text {
    padding-right: 0;
}

.history-text p {
    color: #69727f;
    font-size: 0.92rem;
    line-height: 1.72;
    text-align: justify;
    margin-bottom: 1rem;
}

.calendar-table-wrap {
    max-width: 1120px;
    margin: 0 auto;
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #d6dbe3;
    padding: 0.85rem 0.7rem;
    font-size: 0.9rem;
    text-align: left;
    color: #5b6472;
    background: #ffffff;
}

.calendar-table thead th {
    background: #e8edf7;
    color: #6b7482;
    font-weight: 700;
}

.calendar-table tbody tr:nth-child(even) td {
    background: #f8f9fc;
}

.calendar-empty {
    text-align: center;
    color: #8f98a5;
    padding: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1120px;
    margin: 0 auto;
}

.gallery-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: #ffffff;
}

.gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.gallery-body {
    padding: 1rem;
}

.gallery-body h3 {
    font-size: 0.96rem;
    color: #29548b;
    margin-bottom: 0.35rem;
}

.gallery-body p {
    margin: 0;
    color: #7a8593;
    font-size: 0.83rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 3rem;
    max-width: 1120px;
    margin: 0 auto;
}

.admin-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.admin-avatar,
.president-avatar {
    flex-shrink: 0;
    overflow: hidden;
    background: #f3f6fb;
}

.admin-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 4px solid #0d61cc;
}

.admin-avatar img,
.president-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-item h3,
.president-card h3 {
    margin: 0 0 0.2rem;
    color: #2d6cc0;
    font-size: 1rem;
    font-weight: 700;
}

.admin-item p,
.president-card p {
    margin: 0;
    color: #7f8997;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-period {
    text-align: center;
    color: #7d8793;
    font-size: 0.82rem;
    margin: -0.75rem 0 1.8rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
    background:
        linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
        url("../imagem/mestrehiram.png") center/720px no-repeat;
}

.contact-details {
    padding: 1rem 0.5rem 1rem 0;
}

.contact-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(13, 97, 204, 0.12);
    color: #0d61cc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    flex-shrink: 0;
}

.contact-copy h3 {
    font-size: 0.95rem;
    color: #404852;
    margin: 0 0 0.85rem;
    font-weight: 700;
}

.contact-copy p,
.contact-copy a {
    margin: 0;
    color: #2d3136;
    font-size: 0.95rem;
    line-height: 1.75;
}

.contact-map {
    border: 1px solid #dbe2ec;
    border-radius: 8px;
    overflow: hidden;
    min-height: 360px;
    box-shadow: var(--card-shadow);
    background: #ffffff;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
}

.page-hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    padding: 3.2rem 0 1.5rem;
    text-align: center;
}

.page-hero h1 {
    color: #2368c0;
    margin-bottom: 0.6rem;
}

.page-hero .hero-lines {
    color: #6d7684;
}

.president-card {
    min-height: 250px;
}

.president-avatar {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    border: 4px solid #0d61cc;
    margin: 0 auto 1rem;
}

.president-card .period-label {
    margin-top: 0.75rem;
    color: #768191;
    font-size: 0.82rem;
}

.president-card .mandato-label {
    margin-top: 0.35rem;
    color: #98a1ae;
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0;
}

.legal-panel {
    max-width: 1160px;
    margin: 0 auto;
    padding: 1.8rem 2rem;
}

.legal-panel h2,
.legal-panel h3 {
    color: #2d6cc0;
    font-weight: 700;
}

.legal-panel h2 {
    font-size: 1.3rem;
    margin-top: 0;
}

.legal-panel h3 {
    font-size: 1rem;
    margin-top: 1.6rem;
}

.legal-panel p,
.legal-panel li {
    color: #5f6876;
    font-size: 0.92rem;
    line-height: 1.75;
    text-align: justify;
}

.legal-panel ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.site-footer {
    margin-top: 4rem;
    background: var(--blue-900);
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
    padding: 1.1rem 0;
    font-size: 0.84rem;
}

@media (max-width: 1199px) {
    .visit-grid,
    .presidents-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .history-grid,
    .admin-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .visit-grid,
    .presidents-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .main-navbar .container {
        min-height: auto;
        padding-top: 0.6rem;
        padding-bottom: 0.8rem;
    }
}





.admin-history-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 1120px;
    margin: 0 auto 1.5rem;
}

.admin-history-btn {
    border: 1px solid #cfe0f7;
    background: #ffffff;
    color: #2a5fa7;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 6px 14px rgba(17, 73, 144, 0.08);
}

.admin-history-btn span {
    display: inline-block;
    margin-left: 0.5rem;
    color: #0d61cc;
}

.admin-history-btn.active {
    background: #1f5fbf;
    color: #ffffff;
    border-color: #1f5fbf;
}

.admin-history-btn.active span {
    color: #ffffff;
}

.admin-history-panel {
    display: none;
}

.admin-history-panel.active {
    display: block;
}
