/* =========================================================
   community.css — posts & forms
========================================================= */

.community-header {
    padding: 4rem 0 2rem;
    max-width: 760px;
}

.community-title {
    margin: 1.5rem 0 1rem;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: .95;
    letter-spacing: -.04em;
}

.community-lead {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 60ch;
}

/* ---------- TOGGLE BUTTON ---------- */
.post-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0 1rem;
    background: var(--fg);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.post-toggle:hover { background: var(--accent); }

.toggle-icon {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform .2s;
}

.post-toggle.open .toggle-icon { transform: rotate(45deg); }

/* ---------- POST FORM ---------- */
.post-form {
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.post-form.open { display: block; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--muted);
    text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    background: var(--bg);
    color: var(--fg);
    transition: border-color .2s, background .2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.form-field textarea { resize: vertical; min-height: 100px; }

.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.form-submit {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -8px rgba(255,59,31,.5);
}

.form-notice {
    padding: 1rem 1.25rem;
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* ---------- POSTS LIST ---------- */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0 4rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
    background: var(--soft);
    border-radius: 20px;
    font-size: 1.05rem;
}

.post {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2rem;
}

.post-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.post-author { font-weight: 700; font-size: .95rem; }
.post-time { font-size: .8rem; color: var(--muted); }

.post-title {
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin-bottom: 1.25rem;
    color: var(--fg);
}

/* ---------- POST META GRID ---------- */
.post-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    padding: 1.25rem;
    background: var(--soft);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.post-meta-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.post-meta-item span {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.post-meta-item strong {
    font-size: .95rem;
    font-weight: 700;
}

.post-details {
    font-size: 1rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin-bottom: 1.25rem;
    white-space: pre-wrap;
}

.post-contact {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    background: var(--soft);
    border-radius: 999px;
    font-size: .9rem;
    margin-bottom: 1rem;
}

.post-contact span {
    color: var(--muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ---------- COMMENTS ---------- */
.post-comments {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.comments-count {
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}

.comment {
    background: var(--soft);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
}

.comment-head {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    margin-bottom: .35rem;
}

.comment-head strong { font-size: .9rem; }

.comment-head span {
    font-size: .75rem;
    color: var(--muted);
}

.comment-text {
    font-size: .93rem;
    line-height: 1.6;
    color: #2a2a2a;
    white-space: pre-wrap;
}

.comment-form {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: .9rem;
    background: #fff;
    color: var(--fg);
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form button {
    justify-self: flex-start;
    padding: .65rem 1.5rem;
    background: var(--fg);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.comment-form button:hover { background: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .post { padding: 1.5rem; }
    .post-title { font-size: 1.25rem; }
    .community-header { padding: 2.5rem 0 1.5rem; }
    .post-form { padding: 1.5rem; }
    .post-meta { padding: 1rem; }
}