.community-main {
    color: #24332c;
    background: #f7f5ef;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

.community-main section {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

.community-container.community-narrow {
    width: min(620px, calc(100% - 40px));
}

.community-hero {
    padding: clamp(56px, 9vw, 112px) 0;
    color: #fff;
    background:
        linear-gradient(90deg, rgb(18 34 27 / 82%), rgb(18 34 27 / 34%)),
        url("../images/civitella_del_lago_piazza_vittorio_emanuele.jpg") center 48% / cover;
}

.community-hero h1,
.community-form-card h1 {
    margin: 0 0 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.08;
}

.community-hero p:not(.community-eyebrow) {
    max-width: 700px;
    margin: 0 0 26px;
    color: #f4f1eb;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.community-eyebrow {
    margin: 0 0 10px;
    color: #b08a55;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.community-hero .community-eyebrow {
    color: #d4b47f;
}

.community-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin: 0.4rem 0.5rem 0.4rem 0;
    padding: 0.7rem 1.25rem;
    color: #fff !important;
    border: 1px solid #4ea2e3;
    border-radius: 0;
    background: #4ea2e3;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1.2px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.community-button:hover,
.community-button:focus {
    color: #fff;
    border-color: #1f7dc5;
    background: #1f7dc5;
    text-decoration: none;
}

.community-button-small {
    min-height: 40px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
}

.community-button-outline {
    border-color: rgba(255, 255, 255, 0.75);
    background: transparent;
}

.community-button-outline:hover,
.community-button-outline:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.community-button-danger {
    border-color: #a54238;
    background: #a54238;
}

.community-button-danger:hover,
.community-button-danger:focus {
    border-color: #7c2f28;
    background: #7c2f28;
}

.community-section {
    padding: clamp(42px, 7vw, 80px) 0;
    background: #f7f5ef !important;
}

.community-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.community-section-heading h2,
.community-external h2,
.community-submit-card h2 {
    margin: 0;
    color: #24332c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.15;
}

.community-section-heading > p {
    max-width: 420px;
    margin: 0;
    color: #69736d;
}

.community-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 14px;
    margin: 0 0 28px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e1d8;
}

.community-filters label,
.community-form label {
    display: block;
    color: #34463c;
    font-size: 0.92rem;
    font-weight: 600;
}

.community-filters input,
.community-filters select,
.community-form input,
.community-form select,
.community-form textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 7px;
    padding: 10px 12px;
    color: #24332c;
    border: 1px solid #c9cec9;
    border-radius: 0;
    background: #fff;
    font: 400 1rem/1.4 Roboto, "Helvetica Neue", Arial, sans-serif;
}

.community-form textarea {
    min-height: 150px;
    resize: vertical;
}

.community-filters input:focus,
.community-filters select:focus,
.community-form input:focus,
.community-form select:focus,
.community-form textarea:focus {
    border-color: #4ea2e3;
    outline: 2px solid rgba(78, 162, 227, 0.2);
}

.community-filters .community-button {
    margin: 0;
}

.community-listings {
    display: grid;
    gap: 16px;
}

.community-listing,
.community-empty {
    padding: clamp(20px, 4vw, 30px);
    background: #fff;
    border: 1px solid #e5e1d8;
}

.community-listing h3,
.community-listing h2,
.community-empty h3,
.community-empty h2 {
    margin: 14px 0 10px;
    color: #24332c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1.25;
}

.community-listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #69736d;
    font-size: 0.88rem;
}

.community-badge,
.community-status {
    display: inline-block;
    padding: 4px 9px;
    color: #2e5b45;
    background: #edf3ee;
    font-size: 0.78rem;
    font-weight: 700;
}

.community-listing-description {
    margin: 0 0 14px;
    color: #3e4942;
    overflow-wrap: anywhere;
}

.community-listing time,
.community-own-listing time {
    color: #69736d;
    font-size: 0.88rem;
}

.community-text-link,
.community-form-foot a,
.community-external-links a {
    color: #2e5b45;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.community-empty {
    margin: 24px 0;
    text-align: center;
}

.community-empty p {
    margin: 0;
    color: #69736d;
}

.community-external {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.8fr);
    gap: 36px;
    margin-top: 54px;
    padding: clamp(24px, 5vw, 42px);
    background: #fff;
    border-left: 4px solid #4ea2e3;
}

.community-external p:not(.community-eyebrow) {
    margin: 12px 0 0;
    color: #69736d;
}

.community-external-links {
    display: grid;
    align-content: center;
    gap: 12px;
}

.community-auth-section {
    min-height: 62vh;
    display: flex;
    align-items: center;
}

.community-form-card {
    padding: clamp(24px, 5vw, 44px);
    background: #fff;
    border: 1px solid #e5e1d8;
}

.community-form-card h1 {
    color: #24332c;
    font-size: clamp(2rem, 4vw, 3rem);
}

.community-form-card > p:not(.community-eyebrow) {
    color: #69736d;
}

.community-form {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.community-form input,
.community-form select,
.community-form textarea {
    margin-top: -6px;
    margin-bottom: 5px;
}

.community-form label span,
.community-form small {
    color: #69736d;
    font-size: 0.85rem;
    font-weight: 400;
}

.community-form .community-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #3e4942;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

.community-form .community-consent input {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #2e5b45;
}

.community-form .community-consent a {
    color: #2e5b45;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.community-form small {
    margin-top: -8px;
    line-height: 1.45;
}

.community-form .community-button {
    justify-self: start;
    margin-top: 8px;
}

.community-form-foot {
    margin: 22px 0 0 !important;
}

.community-alert,
.community-success {
    margin: 18px 0;
    padding: 13px 16px;
    border-left: 4px solid #a54238;
    background: #fff;
    color: #652d27 !important;
}

.community-success {
    border-color: #2e7d51;
    color: #245b3b !important;
}

.community-dashboard-hero {
    padding: 58px 0;
}

.community-dashboard-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.community-status-pending {
    color: #76551b;
    background: #fbf2dc;
}

.community-status-rejected {
    color: #7c2f28;
    background: #f9e8e5;
}

.community-status-approved {
    color: #245b3b;
    background: #e3f1e7;
}

.community-inline-form,
.community-moderation-actions form {
    display: inline-block;
    margin: 12px 10px 0 0;
}

.community-submit-card {
    max-width: 760px;
    margin-top: 54px;
}

.community-logout-form {
    margin-top: 28px;
}

.community-text-button {
    padding: 0;
    color: #2e5b45;
    border: 0;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.community-moderation-actions {
    margin-top: 14px;
}

.community-main a:focus-visible,
.community-main button:focus-visible,
.community-main input:focus-visible,
.community-main select:focus-visible,
.community-main textarea:focus-visible {
    outline: 3px solid #d58a37;
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .community-filters {
        grid-template-columns: 1fr 1fr;
    }

    .community-section-heading {
        display: block;
    }

    .community-section-heading > p {
        margin-top: 12px;
    }

    .community-external {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 520px) {
    .community-container,
    .community-container.community-narrow {
        width: min(100% - 28px, 1120px);
    }

    .community-filters {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .community-listing-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .community-button {
        width: 100%;
        margin-right: 0;
    }

    .community-hero .community-button {
        width: auto;
    }
}
