/* Little Caterpillars — blog list + single post. Matches the brand
   (pink/green gradient sections, white rounded cards) used elsewhere on the
   site, instead of the stock theme's generic blog template look. */

/* Popup contact form (.form-popup-bg/.form-container/.close-button) is
   normally defined inline per-page — blog.php/post.php don't carry that
   inline block, so it's defined once here instead. */
.form-popup-bg {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    background-color: rgba(94, 110, 141, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s 0s, visibility 0s .3s;
    overflow-y: auto;
    z-index: 10000;
}
.form-popup-bg.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s 0s, visibility 0s 0s;
}
.form-popup-bg:before {
    content: '';
    background-color: #fff;
    opacity: .25;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.form-container {
    background-color: #2d3638;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,.19), 0 6px 6px rgba(0,0,0,.23);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding: 40px;
    color: #fff;
}
.close-button {
    background: none;
    color: #fff;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 0;
    right: 0;
    border: solid 1px #fff;
}

/* ===== Hero bands ===== */
.lc-blog-hero,
.lc-post-hero {
    background: linear-gradient(150deg, #0d3016 0%, #11401c 55%, #1a5c2a 100%);
    padding: 76px 20px 64px;
    text-align: center;
}
.lc-blog-hero h1,
.lc-post-hero h1 {
    color: #fff;
    font-family: "DK cover up", inherit;
    font-weight: 400;
    font-size: 46px;
    margin: 0 0 12px;
}
.lc-blog-hero p {
    color: rgba(255,255,255,.78);
    font-size: 16px;
    margin: 0;
    max-width: 520px;
    margin: 0 auto;
}
.lc-post-hero { padding-bottom: 100px; }
.lc-post-hero .lc-post-date {
    color: #7de1c2;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 14px;
}
.lc-post-hero h1 { font-size: 38px; max-width: 760px; margin: 0 auto; line-height: 1.25; }

/* ===== Search ===== */
.lc-blog-search {
    max-width: 480px;
    margin: -28px auto 54px;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}
.lc-blog-search form {
    display: flex;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,.14);
    padding: 6px;
}
.lc-blog-search input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
    min-width: 0;
}
.lc-blog-search input:focus { outline: none; }
.lc-blog-search button {
    background: #ec0667;
    color: #fff;
    border: none;
    padding: 0 22px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: background .15s ease;
}
.lc-blog-search button:hover { background: #c8054f; }

/* ===== Card grid (shared by list page + "more posts") ===== */
.lc-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
@media (max-width: 991px) { .lc-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .lc-blog-grid { grid-template-columns: 1fr; } }

.lc-blog-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}
.lc-blog-card:hover { transform: translateY(-6px); box-shadow: 0 20px 45px rgba(0,0,0,.12); }
.lc-blog-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #f1efe9; }
.lc-blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.lc-blog-card:hover .lc-blog-card-img img { transform: scale(1.06); }
.lc-blog-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.lc-blog-card-date { font-size: 12px; font-weight: 700; color: #ec0667; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.lc-blog-card-body h2 { font-size: 19px; font-weight: 700; color: #11401c; line-height: 1.35; margin: 0 0 10px; }
.lc-blog-card-body h2 a { color: inherit; text-decoration: none; }
.lc-blog-card-body h2 a:hover { color: #ec0667; }
.lc-blog-card-body p { font-size: 14.5px; color: #555; line-height: 1.6; margin: 0 0 16px; flex: 1; }
.lc-blog-card-readmore { font-size: 13.5px; font-weight: 700; color: #11401c; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.lc-blog-card-readmore:hover { color: #ec0667; gap: 9px; }

.lc-blog-empty { text-align: center; padding: 60px 20px; color: #888; font-size: 16px; max-width: 1200px; margin: 0 auto; }

/* ===== Pagination ===== */
.lc-blog-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 20px 70px; }
.lc-blog-pagination a {
    min-width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #fff; border: 1px solid #eee;
    color: #444; text-decoration: none; font-size: 14px; font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.lc-blog-pagination a.active { background: #11401c; color: #fff; border-color: #11401c; }
.lc-blog-pagination a:hover:not(.active) { border-color: #ec0667; color: #ec0667; }

/* ===== Single post ===== */
.lc-post-wrap { max-width: 760px; margin: -56px auto 20px; padding: 0 20px; }
.lc-post-image { border-radius: 20px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,.18); margin-bottom: 36px; }
.lc-post-image img { width: 100%; display: block; }
.lc-post-body { font-size: 17px; line-height: 1.85; color: #333; }
.lc-post-body h1, .lc-post-body h2, .lc-post-body h3 { color: #11401c; font-family: "DK cover up", inherit; font-weight: 400; margin: 34px 0 14px; }
.lc-post-body p { margin: 0 0 20px; }
.lc-post-body img { max-width: 100%; border-radius: 14px; margin: 20px 0; display: block; }
.lc-post-body blockquote { border-left: 4px solid #ec0667; margin: 24px 0; padding: 4px 0 4px 20px; color: #555; font-style: italic; }
.lc-post-body a { color: #ec0667; }
.lc-post-body ul, .lc-post-body ol { margin: 0 0 20px; padding-left: 22px; }

.lc-post-notfound { max-width: 600px; margin: -40px auto 80px; padding: 0 20px; text-align: center; }
.lc-post-notfound p { color: #555; font-size: 16px; margin-bottom: 22px; }

.lc-post-more { max-width: 1200px; margin: 40px auto 0; padding: 0 20px 70px; }
.lc-post-more h3 { font-family: "DK cover up", inherit; font-weight: 400; color: #11401c; font-size: 26px; margin-bottom: 24px; text-align: center; }

@media (max-width: 480px) {
    .lc-blog-hero h1, .lc-post-hero h1 { font-size: 32px; }
    .lc-post-hero h1 { font-size: 28px; }
    .lc-post-body { font-size: 16px; }
}
