
/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-900:    #1b5e20;
    --green-800:    #2e7d32;
    --green-700:    #388e3c;
    --green-400:    #66bb6a;
    --green-200:    #a5d6a7;
    --green-50:     #f1f8f1;
    --red-600:      #e53935;
    --text-900:     #1a1a1a;
    --text-600:     #4a4a4a;
    --text-400:     #757575;
    --border:       #d8ecd8;
    --card-bg:      #ffffff;
    --page-bg:      #f8faf8;
    --font:         'Inter', "Helvetica Neue", Helvetica, Arial, sans-serif;
    --max-width:    1280px;
    --radius:       8px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg:    0 10px 32px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.07);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    color: var(--text-900);
    background: var(--page-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--green-800); text-decoration: none; }
a:hover { color: var(--green-700); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Header === */
.site-header {
    background: var(--green-900);
    color: #fff;
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), var(--shadow-md);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}
.logo-icon { width: 32px; height: 24px; flex-shrink: 0; }
.logo-name {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.logo-tagline {
    display: block;
    font-size: 0.68rem;
    color: var(--green-400);
    letter-spacing: 0.01em;
    margin-top: 0.05rem;
    font-weight: 400;
}
.main-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

/* === Home Hero === */
.site-hero {
    background: linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
    color: #fff;
    padding: 5rem 2rem 4.5rem;
    position: relative;
    overflow: hidden;
}
.site-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.site-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--green-200);
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
}

/* === Posts Grid === */
.posts-grid-section { padding: 3rem 0 4rem; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-200);
}
.post-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--green-50);
    flex-shrink: 0;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.post-card:hover .post-thumb img { transform: scale(1.06); }
.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--green-200), var(--border));
}

.post-info {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-info h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-900);
    line-height: 1.4;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}
.post-card:hover .post-info h2 { color: var(--green-800); }
.excerpt {
    font-size: 0.78rem;
    color: var(--text-400);
    line-height: 1.55;
    flex: 1;
}
.read-more {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green-700);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.post-card:hover .read-more { color: var(--green-800); }

/* === Post Header (full-bleed image + title) === */
.post-header {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}
.post-header--no-image {
    background: linear-gradient(160deg, var(--green-900), var(--green-700));
    min-height: 220px;
}
.post-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.45) 60%,
        rgba(0,0,0,0.78) 100%
    );
    display: flex;
    align-items: flex-end;
    width: 100%;
}
.post-header-overlay .container,
.post-header--no-image .container {
    padding-bottom: 2.5rem;
    padding-top: 2.5rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    transition: color 0.2s;
}
.back-link:hover { color: #fff; }
.post-header h1,
.post-header--no-image h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    max-width: 760px;
}

/* === Post Detail Content === */
.post-detail { padding: 3rem 0 5rem; }

.post-layout { max-width: 760px; }

.post-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-600);
}
.post-content p { margin-bottom: 1.1rem; }
.post-content strong { font-weight: 600; color: var(--text-900); }

/* Section headings promoted from standalone <strong> */
.post-content h3.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-900);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--green-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content ol {
    margin: 0.5rem 0 1.5rem 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}
.post-content ol li {
    counter-increment: steps;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
    align-items: flex-start;
    font-size: 0.975rem;
    line-height: 1.7;
}
.post-content ol li::before {
    content: counter(steps);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    background: var(--green-800);
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05rem;
}
.post-content ul {
    margin: 0.5rem 0 1.5rem 1.25rem;
}
.post-content ul li {
    margin-bottom: 0.4rem;
    font-size: 0.975rem;
    line-height: 1.7;
}

/* Figures from [caption] shortcode */
.post-content figure.wp-caption {
    margin: 1.75rem 0;
    max-width: 100%;
}
.post-content figure.wp-caption img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.post-content figure.wp-caption figcaption {
    font-size: 0.78rem;
    color: var(--text-400);
    margin-top: 0.5rem;
    font-style: italic;
    padding-left: 0.25rem;
}

/* Inline images */
.post-content img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin: 1.25rem 0;
    cursor: zoom-in;
}

/* === Featured image below hero === */
.post-featured-image-wrap {
    background: var(--green-50);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}
.post-featured-image-wrap a {
    display: inline-block;
    cursor: zoom-in;
}
.post-featured-image {
    max-height: 480px;
    width: auto;
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: none !important;
    margin: 0;
}

/* === Lightbox === */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}
#lightbox.active { display: flex; }
.lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 60px rgba(0,0,0,0.6);
    border: none;
    margin: 0;
    cursor: default;
}
#lb-close {
    position: fixed;
    top: 0.75rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s;
    font-family: sans-serif;
}
#lb-close:hover { opacity: 1; }

/* === Footer === */
.site-footer {
    background: var(--green-900);
    color: var(--green-400);
    padding: 2.5rem 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.footer-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}
.footer-brand p {
    font-size: 0.8rem;
    color: var(--green-400);
}

/* === Responsive === */
@media (max-width: 1100px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .post-header { min-height: 300px; }
    .site-hero { padding: 3rem 1.5rem 2.5rem; }
}
@media (max-width: 480px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .post-info { padding: 0.7rem 0.8rem 0.9rem; }
    .logo-tagline { display: none; }
    .container { padding: 0 1rem; }
}
@media (max-width: 360px) {
    .posts-grid { grid-template-columns: 1fr; }
}
