* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #27352b;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e6ebe6;
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: contents;
    line-height: 0;
}

.brand img {
    display: block;
    width: 26%;
    height: 26%;
    object-fit: contain;
    object-position: left center;
}

.nav nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav nav a:hover,
.link {
    color: #315d3d;
}

.toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 1.5rem;
}

.hero {
    min-height: 640px;
    display: grid;
    align-items: center;
    background: linear-gradient(120deg, #183a25, #63805a 55%, #d8bd72);
    color: #fff;
}

.hero-in {
    padding: 90px 0;
    max-width: 780px;
    margin-left: max(16px, calc((100vw - 1120px) / 2));
}

.eyebrow {
    font-size: .72rem;
    letter-spacing: .18em;
    font-weight: 800;
    color: #ad7630;
}

.hero .eyebrow {
    color: #f2d79d;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.7rem);
    line-height: .97;
    letter-spacing: -.05em;
    margin: 14px 0 22px;
}

.hero em {
    font-family: Georgia, serif;
    font-weight: 400;
}

.hero p {
    font-size: 1.15rem;
    max-width: 650px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    border: 1px solid #d2dbd3;
    border-radius: 999px;
    padding: 10px 20px;
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.primary {
    background: #315d3d;
    border-color: #315d3d;
    color: #fff;
}

.white {
    color: #315d3d;
}

.full {
    width: 100%;
}

.section {
    padding: 82px 0;
}

.soft {
    background: #f3f6f0;
}

.heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
}

.heading h2,
.section h2 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.1;
    color: #26382c;
}

.grid {
    display: grid;
    gap: 20px;
}

.four {
    grid-template-columns: repeat(4, 1fr);
}

.three {
    grid-template-columns: repeat(3, 1fr);
}

.card,
.associate,
.form,
.box,
.testimonial,
.loginbox {
    border: 1px solid #e0e7e0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px #1f39270c;
}

.card {
    padding: 28px;
}

.card i {
    font-size: 2rem;
    font-style: normal;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 55px;
    align-items: center;
}

.landscape {
    height: 390px;
    border-radius: 24px;
    background: linear-gradient(#c9dfd2 0 46%, #7da66d 46% 67%, #4e724a 67%);
    position: relative;
    overflow: hidden;
}

.landscape:before {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: #f1cd76;
    right: 65px;
    top: 50px;
}

.landscape:after {
    content: "";
    position: absolute;
    bottom: 80px;
    left: -60px;
    border-left: 220px solid transparent;
    border-right: 220px solid transparent;
    border-bottom: 230px solid #638363;
}

.associate {
    overflow: hidden;
}

.photo {
    width: 100%;
    height: 180px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #315d3d, #9aae7b);
    color: #fff;
    font-weight: 800;
    letter-spacing: .15em;
}

.photo.image {
    display: block;
    object-fit: cover;
    letter-spacing: normal;
}

.photo.large {
    height: 420px;
    border-radius: 20px;
}

.pad {
    padding: 22px;
}

.pad small {
    color: #a46e2b;
    font-weight: 700;
}

.quote {
    padding: 75px 0;
    background: #eaf0e8;
}

.quote blockquote,
.testimonial blockquote {
    font: 2.5rem/1.25 Georgia, serif;
    margin: 15px 0;
    max-width: 850px;
}

.cta {
    padding: 52px 0;
    background: #315d3d;
    color: #fff;
}

.cta .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.cta h2 {
    color: #fff;
    max-width: 700px;
}

.pagehero {
    padding: 88px 0;
    background: #edf2eb;
}

.pagehero h1 {
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    line-height: 1;
    margin: 12px 0;
}

.search,
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

.search input {
    flex: 1;
}

.form {
    padding: 30px;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.form-header h1 {
    margin-bottom: 0;
}

.form-section {
    border: 0;
    border-top: 1px solid #e1e8e1;
    padding: 28px 0 0;
    margin: 0 0 32px;
}

.form-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.form-section legend {
    padding: 0;
    margin-bottom: 22px;
    font-size: 1.35rem;
    font-weight: 750;
    color: #315d3d;
}

.formgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.full-field {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 650;
    margin-bottom: 16px;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cdd8ce;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    margin-top: 6px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #9db9a2;
    outline-offset: 1px;
}

textarea {
    resize: vertical;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 35px;
}

.checkbox-field input {
    width: auto;
    margin: 0;
}

.field-help {
    color: #687568;
    margin-top: -8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-manager {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin: 15px 0 25px;
}

.photo-item {
    border: 1px solid #dce5dd;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f9f6;
}

.photo-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.photo-item label {
    margin: 0;
    padding: 9px;
    font-size: .9rem;
}

.photo-item input {
    width: auto;
    margin-right: 5px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 45px;
}

.gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
}

.associate-detail {
    align-items: start;
}

.box {
    padding: 22px;
    margin-top: 24px;
}

.map {
    height: 410px;
    border-radius: 22px;
    background: radial-gradient(circle, #a9c89c 0 4%, transparent 5%), linear-gradient(135deg, #dce8d7, #a5bea0);
    background-size: 65px 65px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #55705a;
}

.narrow {
    max-width: 760px;
}

.testimonial {
    padding: 35px;
    margin-bottom: 20px;
}

.login {
    min-height: 650px;
    background: #f3f6f1;
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

.loginbox {
    width: min(460px, 100%);
    padding: 34px;
}

.flash {
    position: fixed;
    right: 18px;
    top: 92px;
    z-index: 30;
    padding: 13px 18px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 25px #0002;
}

.success {
    border-left: 4px solid #39804c;
}

.error {
    border-left: 4px solid #b34b49;
}

.adminnav {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.adminnav a {
    padding: 8px 13px;
    border: 1px solid #d7e0d7;
    border-radius: 999px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stats div {
    padding: 28px;
    border-radius: 18px;
    background: #edf2eb;
}

.stats b {
    display: block;
    font-size: 2.8rem;
}

.stats span {
    color: #687568;
}

.table {
    overflow: auto;
    margin-top: 25px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid #e2e8e2;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f4ef;
}

.inline {
    display: inline;
    margin: 0 0 0 8px;
}

.inline button {
    border: 0;
    background: none;
    color: #a33;
    cursor: pointer;
    padding: 0;
}

.empty {
    padding: 35px;
    text-align: center;
    background: #f3f6f0;
    border-radius: 15px;
}

footer {
    background: #1e3024;
    color: #dce6dd;
    padding-top: 52px;
}

.foot {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 45px;
    padding-bottom: 42px;
}

.footer-logo {
    display: inline-block;

    border-radius: 12px;
    padding: 8px 12px;
    line-height: 0;
    margin-bottom: 12px;
}

.footer-logo img {
    display: block;
    width: 50%;
    height: 50%;
    object-fit: contain;
}

footer a:hover {
    text-decoration: underline;
}

.copy {
    text-align: center;
    border-top: 1px solid #ffffff20;
    padding: 18px;
    font-size: .85rem;
}

@media (max-width: 800px) {
    .toggle {
        display: block;
    }

    .nav nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .nav nav.open {
        display: flex;
    }

    .four,
    .three,
    .split,
    .foot,
    .stats,
    .formgrid {
        grid-template-columns: 1fr;
    }

    .photo-manager,
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .full-field {
        grid-column: auto;
    }

    .hero-in {
        margin: auto;
        padding: 75px 0;
    }

    .section {
        padding: 62px 0;
    }

    .cta .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search,
    .filters,
    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .form-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        width: calc(100% - 26px);
    }

    .brand img {
        width: 160px;
        height: 56px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .pagehero {
        padding: 62px 0;
    }

    .quote blockquote,
    .testimonial blockquote {
        font-size: 1.8rem;
    }

    .form,
    .card {
        padding: 20px;
    }

    .photo-manager,
    .gallery {
        grid-template-columns: 1fr 1fr;
    }
}


/* Cadastro de fotos: uma imagem por seletor. */
.photo-upload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:16px 0; }
.photo-upload-grid label { display:block; }
.photo-upload-grid input[type="file"] { margin-top:8px; width:100%; }
.btn.danger { border-color:#b42318; color:#b42318; }
.btn.danger:hover { background:#b42318; color:#fff; }
@media (max-width:700px) { .photo-upload-grid { grid-template-columns:1fr; } }

/* Lista administrativa de associados */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: middle; }
.admin-list-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-actions form { margin: 0; }
.status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: .85rem; }
.status-active { background: #e6f4ea; }
.status-inactive { background: #eee; }
/*
 * Listas administrativas no celular
 *
 * As tabelas continuam sendo usadas em telas maiores, mas em telas
 * pequenas cada registro passa a ocupar um card. Isso evita rolagem
 * horizontal e mantém todas as informações e ações acessíveis.
 */
@media (max-width: 700px) {
    .table-wrap {
        width: 100%;
        overflow: visible;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table th,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table {
        min-width: 0;
        background: transparent;
        border-collapse: separate;
    }

    .admin-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-table tbody {
        display: grid;
        gap: 14px;
    }

    .admin-table tr {
        background: #fff;
        border: 1px solid #e0e7e0;
        border-radius: 14px;
        box-shadow: 0 5px 18px #1f39270c;
        padding: 12px;
    }

    .admin-table td {
        min-width: 0;
        padding: 9px 4px;
        border-bottom: 1px solid #edf1ed;
        overflow-wrap: anywhere;
    }

    .admin-table td:last-child {
        border-bottom: 0;
    }

    .admin-table td:first-child {
        padding-top: 4px;
    }

    .admin-list-thumb {
        width: 100%;
        max-width: 180px;
        height: 110px;
    }

    .table-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .table-actions .btn,
    .table-actions form,
    .table-actions form .btn {
        width: 100%;
    }

    /* Mensalidades e outras tabelas administrativas legadas. */
    .adminnav ~ .table {
        width: 100%;
        overflow: visible;
    }

    .adminnav ~ .table table {
        display: block;
        width: 100%;
        min-width: 0;
        background: transparent;
    }

    .adminnav ~ .table table thead,
    .adminnav ~ .table table > tr:first-child {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .adminnav ~ .table table tbody {
        display: grid;
        gap: 14px;
    }

    .adminnav ~ .table table tr {
        display: block;
        width: 100%;
        background: #fff;
        border: 1px solid #e0e7e0;
        border-radius: 14px;
        box-shadow: 0 5px 18px #1f39270c;
        padding: 8px 12px;
    }

    .adminnav ~ .table table td {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 9px 4px;
        border-bottom: 1px solid #edf1ed;
        overflow-wrap: anywhere;
    }

    .adminnav ~ .table table td:last-child {
        border-bottom: 0;
    }

    .adminnav ~ .table table td::before {
        display: block;
        margin-bottom: 2px;
        color: #687568;
        font-size: .76rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .adminnav ~ .table table td:nth-child(1)::before { content: "Associado"; }
    .adminnav ~ .table table td:nth-child(2)::before { content: "Referência"; }
    .adminnav ~ .table table td:nth-child(3)::before { content: "Vencimento"; }
    .adminnav ~ .table table td:nth-child(4)::before { content: "Valor"; }
    .adminnav ~ .table table td:nth-child(5)::before { content: "Status"; }
    .adminnav ~ .table table td:nth-child(6)::before { content: "Pagamento"; }
    .adminnav ~ .table table td:nth-child(7)::before { content: "Ações"; }
}

/* Notícias públicas e filtros */
.news-filters {
    align-items: flex-end;
}

.news-filters label {
    min-width: 180px;
    margin: 0;
}

.news-card h3 {
    line-height: 1.25;
}

.center-link {
    text-align: center;
    margin-top: 30px;
}

.news-detail-section {
    background: #f5f6f2;
}

.news-paper {
    max-width: 980px;
    padding: 34px;
    background: #fff;
    border: 1px solid #dfe5dc;
    box-shadow: 0 12px 35px #1f39270d;
}

.news-paper-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 28px;
    border-top: 2px solid #315d3d;
    border-bottom: 1px solid #cfd8cf;
    color: #687568;
    font-size: .78rem;
    letter-spacing: .08em;
}

.news-lead-image {
    margin: 0 0 28px;
}

.news-lead-image img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.news-columns {
    column-count: 2;
    column-gap: 42px;
    column-rule: 1px solid #e2e7e0;
    font-family: Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.8;
}

.news-columns p {
    margin-top: 0;
}

.news-dropcap:first-letter {
    float: left;
    font-size: 4rem;
    line-height: .8;
    padding: 7px 8px 0 0;
    color: #315d3d;
}

.news-back {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e2e7e0;
}

@media (max-width: 700px) {
    .news-paper {
        padding: 20px;
    }

    .news-paper-header {
        flex-direction: column;
        gap: 5px;
    }

    .news-columns {
        column-count: 1;
    }
}
