/* =========================================================
   EcoFeed Solutions – Single blog post page
   Same palette / type / layout language as the other pages
   ========================================================= */

.post-page {
    --green: #4CAF50;
    --green-deep: #2e7d32;
    --gold: #FFD700;
    --cream: #FBF4E4;
    --ink: #111;
    --muted: #4d4d4d;
    --line: #ddd5bf;
    --ease: cubic-bezier(.22, .8, .24, 1);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

.post-page *, .post-page *::before, .post-page *::after { box-sizing: border-box; }
.post-page h1, .post-page h2, .post-page h3, .post-page p { margin: 0; padding: 0; }
.post-page a { color: inherit; text-decoration: none; }
.post-page .wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.post-page :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- Banner (uses the post's own image) ---------- */
.post-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(380px, 60vh, 540px);
    padding: 140px 0 56px;
    color: #fff;
    background: #1d3a21 url('../img/fish.jpg') center / cover no-repeat;
    border-radius: 0 0 44px 44px;
    overflow: hidden;
}

.post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 36%),
        linear-gradient(0deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .15) 100%);
}

.post-hero .wrap { position: relative; z-index: 1; width: 100%; }

.post-hero .blog-date {
    display: inline-block;
    margin-bottom: 18px;
    padding: 5px 14px;
    border-radius: 6px;
    background: var(--gold);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.post-hero .blog-title {
    max-width: 20ch;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(34px, 5.8vw, 74px);
    line-height: 1;
    letter-spacing: -.035em;
}

/* ---------- Article ---------- */
.blog-container { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px clamp(56px, 8vw, 96px); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
    font-weight: 600;
    color: var(--green-deep);
    transition: gap .25s var(--ease);
}

.back-link:hover { gap: 14px; }
.back-link svg { width: 16px; height: 16px; }

.blog-description { font-size: 19px; line-height: 1.85; color: #2b2b2b; }

/* ---------- Comments ---------- */
.comments-section { margin-top: 72px; }

.comments-section h2,
.comment-form h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -.02em;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--ink);
}

.comments-section h2 span { color: var(--green-deep); }

.comment {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 16px;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.avatar {
    grid-row: 1 / span 3;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 19px;
}

.comment-author { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 18px; line-height: 1.2; }
.comment-date { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.comment-text { color: #2b2b2b; overflow-wrap: anywhere; }
.no-comments { padding: 26px 0; color: var(--muted); }

/* ---------- Comment form ---------- */
.comment-form { margin-top: 56px; padding: 40px; border-radius: 14px; background: var(--cream); }
.comment-form h2 { margin-bottom: 24px; }

.comment-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; }

.comment-form input[type="text"],
.comment-form textarea {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 18px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: 500 16px 'DM Sans', sans-serif;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.comment-form input[type="text"] { height: 54px; }
.comment-form textarea { padding: 14px 18px; min-height: 140px; resize: vertical; line-height: 1.55; }

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, .25);
}

.comment-form button {
    height: 56px;
    padding: 0 36px;
    border: 0;
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    font: 600 17px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .25s var(--ease);
}

.comment-form button:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.comment-form button:disabled { opacity: .65; cursor: wait; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .post-page .wrap { padding: 0 18px; }
    .post-hero { min-height: 340px; padding: 110px 0 36px; border-radius: 0 0 28px 28px; }
    .blog-container { padding-left: 18px; padding-right: 18px; }
    .blog-description { font-size: 17px; }
    .comment { grid-template-columns: 40px 1fr; column-gap: 12px; }
    .avatar { width: 40px; height: 40px; font-size: 16px; }
    .comment-form { padding: 26px 18px; }
    .comment-form button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .post-page * { transition-duration: .01ms !important; }
}