/*
 Theme Name:   GeneratePress Child
 Template:     generatepress
 Version:      1.0.0
 Description:  Enviro-Smart child theme
*/

/* ============================================================
   ENVIRO-SMART — Custom Header & Nav
   ============================================================ */

body {
    --es-sticky-top: 0px;
    --es-header-offset: 110px;
}

html {
    scroll-padding-top: calc(var(--es-sticky-top) + var(--es-header-offset));
}

body.admin-bar {
    --es-sticky-top: 32px;
}

@media (max-width: 899px) {
    body {
        --es-header-offset: 60px;
    }
}

@media (max-width: 782px) {
    body.admin-bar {
        --es-sticky-top: 46px;
    }
}

.es-header {
    background: #ffffff;
    position: sticky;
    top: var(--es-sticky-top);
    z-index: 1100;
}

.es-top-bar {
    background: #ffffff;
    padding: 14px 0 0 0;
}

.es-top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.es-logo-wrap {
    position: relative;
    z-index: 10;
    margin-bottom: -27px;
}

.es-logo-img {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

/* Phone pill — gold border, dark green text */
.es-phone-pill {
    display: inline-block;
    background: #1e5518;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 50px;
    border: 3px solid #e8a020;
    text-decoration: none;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.es-phone-pill:hover {
    background: #e8a020;
    color: #ffffff !important;
    text-decoration: none;
}

/* ── 5px green stripe ── */
.es-stripe {
    height: 5px;
    background: #5cb85c;
}

/* ── Dark green nav bar ── */
.es-nav {
    background: #2a6b1f;
    position: relative;
    z-index: 1;
}

.site-content {
    position: relative;
    z-index: 1;
}

.site-content [id],
#content {
    scroll-margin-top: calc(var(--es-sticky-top) + var(--es-header-offset));
}

.es-mobile-bar {
    display: none;
}

/* Nav inner: right-aligned menu */
.es-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: flex-end;
}

/* ── Menu list ── */
.es-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    gap: 4px;
}

/* ── Top-level list items ── */
.es-menu > li {
    position: relative;
    display: flex;
    align-items: center;
}

/* Extra breathing room before the dropdown item */
.es-menu > li.menu-item-has-children {
    margin-left: 6px;
}

/* ── Top-level links ── */
.es-menu > li > a {
    display: block;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.4;
    background: transparent;
    transition: background 0.15s ease;
}

.es-menu > li > a:hover {
    background: #e8a020;
    color: #ffffff !important;
}

.es-menu > li.current-menu-item > a,
.es-menu > li.current-menu-ancestor > a {
    background: #4caf35;
    color: #ffffff !important;
}

/* Contact — styled like all other pills */

.es-menu .dropdown-menu-toggle {
    display: none !important;
}

/* ── Dropdown parent: flatten pill bottom ── */
.es-menu > li.menu-item-has-children:hover > a,
.es-menu > li.menu-item-has-children:focus-within > a {
    background: #e8a020 !important;
    color: #ffffff !important;
    border-radius: 20px 20px 0 0 !important;
}

/* ── Sub-menu ── */
.es-menu > li.menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    margin: 0;
    padding: 0 3px 8px 3px;
    background: #e8a020;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    z-index: 999;
    list-style: none;
}

.es-menu > li.menu-item-has-children:hover > .sub-menu,
.es-menu > li.menu-item-has-children:focus-within > .sub-menu {
    display: block;
}

.es-menu .sub-menu li {
    background: #1e5518;
    margin: 0;
    width: 100%;
}

.es-menu .sub-menu li:last-child {
    border-radius: 0 0 15px 15px;
}

.es-menu .sub-menu a,
.es-menu .sub-menu a:visited {
    display: block;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    transition: background 0.12s ease;
}

.es-menu .sub-menu li:last-child a {
    border-bottom: none;
}

.es-menu .sub-menu a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #ffffff !important;
}


/* ============================================================
   MOBILE  (< 900px)
   ============================================================ */

@media (max-width: 899px) {

    /* Hide desktop elements */
    .es-top-bar,
    .es-stripe {
        display: none !important;
    }

    /* Entire header goes green on mobile */
    .es-header {
        background: #2a6b1f !important;
    }

    /* Ensure nav bar is visible */
    #es-navigation.es-nav {
        display: block !important;
        background: #2a6b1f !important;
    }

    /* Show mobile bar */
    .es-mobile-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        min-height: 60px;
    }

    .es-mobile-logo-img {
        height: 33px;
        width: auto;
        display: block;
    }

    /* Hamburger button */
    .es-hamburger {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        cursor: pointer;
        padding: 6px;
        display: flex !important;
        flex-direction: column;
        gap: 4px;
    }

    .es-hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    /* X when open */
    #es-navigation.es-nav--open .es-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    #es-navigation.es-nav--open .es-hamburger span:nth-child(2) {
        opacity: 0;
    }
    #es-navigation.es-nav--open .es-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Menu hidden by default on mobile */
    .es-nav-inner {
        padding: 0 !important;
        display: none !important;
        justify-content: flex-start;
    }

    #es-navigation.es-nav--open .es-nav-inner {
        display: block !important;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    /* Stacked menu */
    .es-menu {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 8px 0 !important;
        gap: 0 !important;
    }

    .es-menu > li {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0 !important;
    }

    .es-menu > li > a {
        border-radius: 0 !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Sub-menu on mobile — tap to toggle */
    .es-menu > li.menu-item-has-children > .sub-menu {
        position: static !important;
        display: none !important;
        width: 100%;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        left: 0 !important;
        background: #1a4d14;
    }

    .es-menu > li.menu-item-has-children:hover > .sub-menu {
        display: none !important;
    }

    .es-menu > li.menu-item-has-children.es-sub-open > .sub-menu {
        display: block !important;
    }

    .es-menu .sub-menu li {
        background: #1a4d14;
    }

    .es-menu .sub-menu li:last-child {
        border-radius: 0 !important;
    }

    .es-menu .sub-menu a {
        padding: 11px 20px 11px 32px !important;
        font-size: 15px !important;
    }

    /* Kill desktop gold hover/open states on mobile */
    .es-menu > li > a:hover {
        background: rgba(255,255,255,0.08) !important;
        border-radius: 0 !important;
    }
    .es-menu > li.menu-item-has-children:hover > a,
    .es-menu > li.menu-item-has-children:focus-within > a,
    .es-menu > li.menu-item-has-children.es-sub-open > a {
        background: rgba(255,255,255,0.08) !important;
        border-radius: 0 !important;
        color: #ffffff !important;
    }

    /* Current page stays light green */
    .es-menu > li.current-menu-item > a,
    .es-menu > li.current-menu-ancestor > a {
        background: #4caf35 !important;
        border-radius: 0 !important;
    }

    /* Subtle chevron instead of +/- */
    .es-menu > li.menu-item-has-children > a {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    .es-menu > li.menu-item-has-children > a::after {
        content: "›";
        font-size: 20px;
        opacity: 0.5;
        transition: transform 0.2s ease;
        line-height: 1;
    }
    .es-menu > li.menu-item-has-children.es-sub-open > a::after {
        transform: rotate(90deg);
        opacity: 0.9;
    }
}



/* ============================================================
   ENVIRO-SMART — Footer
   ============================================================ */

.es-footer {
    background: #1e3d14;
    color: rgba(255,255,255,0.85);
    border-top: 4px solid #e8a020;
}

.es-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 30px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
}

/* ── Brand column ── */
.es-footer-logo {
    height: 38px;
    width: auto;
    margin-bottom: 14px;
    display: block;
}

.es-footer-tagline {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    margin: 0 0 18px;
}

.es-footer-phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(232,160,32,0.5);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.es-footer-phone-pill:hover {
    background: #e8a020;
    border-color: #e8a020;
}

.es-footer-phone-pill svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #e8a020;
}

.es-footer-phone-pill:hover svg {
    color: #ffffff;
}

.es-footer-social {
    display: flex;
    gap: 8px;
}

.es-footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #ffffff !important;
    transition: background 0.15s ease;
}

.es-footer-social-link svg {
    width: 15px;
    height: 15px;
}

.es-footer-social-link:hover {
    background: #e8a020;
}

/* ── Nav columns ── */
.es-footer-heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #e8a020;
    margin: 0 0 16px;
}

.es-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.es-footer-links li a {
    display: block;
    color: rgba(255,255,255,0.75) !important;
    font-size: 14px;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.es-footer-links li a:hover {
    color: #ffffff !important;
}

.es-footer-links li.es-footer-sub a {
    font-size: 13px;
    color: rgba(255,255,255,0.5) !important;
    padding: 3px 0 3px 12px;
    border-left: 2px solid rgba(232,160,32,0.3);
    margin-left: 4px;
}

.es-footer-links li.es-footer-sub a:hover {
    color: rgba(255,255,255,0.85) !important;
    border-left-color: #e8a020;
}

/* ── Copyright bar ── */
.es-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.es-footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.es-footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.es-footer-bottom-links a {
    color: rgba(255,255,255,0.45) !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.es-footer-bottom-links a:hover {
    color: rgba(255,255,255,0.8) !important;
}

.es-footer-dot {
    opacity: 0.4;
}

/* ── Mobile footer ── */
@media (max-width: 767px) {
    .es-footer-inner {
        grid-template-columns: 1fr;
        padding: 36px 20px 28px;
        gap: 30px;
    }

    .es-footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 14px 20px;
    }
}


/* ── Full-width landing pages ────────────────────────────────
   Applied to any page using the no-sidebar GP layout.
   Removes the page title, entry padding, and content constraints
   so our es-section components run edge-to-edge.
   ──────────────────────────────────────────────────────────── */

/* Hide page title on landing-style pages */
.page-id-19 .entry-header,
.page-template-full-width .entry-header {
    display: none;
}

/* Remove default entry padding so our sections go edge-to-edge */
.page-id-19 .entry-content,
.page-template-full-width .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Remove GeneratePress container constraints on these pages */
.page-id-19 .site-content .content-area,
.page-id-19 #primary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    float: none !important;
}

/* Remove any extra bottom/top margin GeneratePress adds */
.page-id-19 article.page {
    margin: 0 !important;
    padding: 0 !important;
}


/* ── Landing Page Template ───────────────────────────────────
   #es-landing-content bypasses the GP grid entirely.
   Sections inside use their own max-width via .es-wrap.
   ──────────────────────────────────────────────────────────── */
#es-landing-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Kill any GP wrapper padding/max-width above the landing content */
.page-template-template-landing .site-content,
.page-template-template-landing .inside-site-content,
.page-template-template-landing #primary,
.page-template-template-landing .content-area,
.page-template-template-landing #main,
.page-template-template-landing article,
.page-template-template-landing .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.es-installation-page .site-content {
    display: block;
}

.es-installation-page .inside-site-content,
.es-installation-page #primary,
.es-installation-page .content-area,
.es-installation-page #main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

.es-installation-page article.page {
    margin: 0 auto !important;
}

.es-installation-page .inside-article {
    max-width: 1120px;
    margin: 0 auto;
}

/* ============================================================
   ENVIRO-SMART — Blog Experience
   ============================================================ */

.blog .site-content,
.category .site-content,
.single-post .site-content {
    display: block;
}

.blog .inside-site-content,
.blog #primary,
.blog .content-area,
.blog #main,
.category .inside-site-content,
.category #primary,
.category .content-area,
.category #main,
.single-post .inside-site-content,
.single-post #primary,
.single-post .content-area,
.single-post #main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.es-blog-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 100%;
    background:
        radial-gradient(circle at top left, rgba(232,160,32,0.13), transparent 30%),
        linear-gradient(180deg, #f7f8f2 0%, #ffffff 240px);
}

.es-blog-hero-band {
    padding: 48px 24px 36px;
}

.es-blog-hero,
.es-blog-archive-hero,
.es-blog-single__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 36px;
    align-items: start;
}

.es-blog-hero__copy h1,
.es-blog-archive-hero__copy h1,
.es-blog-single__copy h1 {
    font-size: clamp(2.15rem, 4vw, 4rem);
    line-height: 1.05;
    color: #183214;
    margin: 0 0 16px;
    max-width: 12ch;
}

.es-blog-archive-hero__copy h1 {
    max-width: 14ch;
}

.es-blog-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 24px;
}

.es-blog-kpi {
    min-width: 140px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(42,107,31,0.12);
    box-shadow: 0 12px 30px rgba(23,43,17,0.06);
}

.es-blog-kpi strong {
    display: block;
    font-size: 1.3rem;
    color: #1e5518;
    margin-bottom: 4px;
}

.es-blog-kpi span {
    display: block;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #5a6658;
}

.es-blog-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.es-blog-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(42,107,31,0.16);
    background: #ffffff;
    color: #24561b !important;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.es-blog-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(42,107,31,0.34);
    box-shadow: 0 10px 24px rgba(31,61,20,0.08);
}

.es-blog-chip--solid {
    background: #1f4f17;
    border-color: #1f4f17;
    color: #ffffff !important;
}

.es-blog-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.es-blog-section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.08;
    color: #183214;
    max-width: 14ch;
}

.es-blog-section-head p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #546151;
}

.es-blog-card {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(42,107,31,0.12);
    box-shadow: 0 16px 38px rgba(23,43,17,0.08);
    min-height: 100%;
}

.es-blog-card--feature {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbf7 100%);
}

.es-blog-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #d8e4d1 0%, #eef4e8 100%);
    overflow: hidden;
}

.es-blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.es-blog-card:hover .es-blog-card__media img {
    transform: scale(1.04);
}

.es-blog-card__placeholder {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 24px;
    background:
        linear-gradient(140deg, rgba(30,85,24,0.98) 0%, rgba(18,49,13,0.96) 100%);
    color: #ffffff;
}

.es-blog-card__placeholder span {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.es-blog-card__placeholder strong {
    font-size: 1.35rem;
    line-height: 1.1;
    max-width: 12ch;
}

.es-blog-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 24px 26px;
}

.es-blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.8rem;
    color: #6b7668;
}

.es-blog-card__meta span {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.es-blog-card__meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c7d0c1;
    display: inline-block;
}

.es-blog-card__title {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.18;
    color: #163113;
}

.es-blog-card--feature .es-blog-card__title {
    font-size: clamp(1.7rem, 2.2vw, 2.3rem);
}

.es-blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.es-blog-card__title a:hover {
    color: #2a6b1f;
}

.es-blog-card__excerpt {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.75;
    color: #556152;
}

.es-blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #1f4f17 !important;
    font-weight: 800;
    text-decoration: none;
}

.es-blog-card__cta::after {
    content: "→";
    transition: transform 0.16s ease;
}

.es-blog-card:hover .es-blog-card__cta::after {
    transform: translateX(3px);
}

.es-topic-grid,
.es-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.es-topic-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
    border: 1px solid rgba(42,107,31,0.12);
    box-shadow: 0 16px 36px rgba(23,43,17,0.07);
}

.es-topic-card__header h3 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    line-height: 1.1;
    color: #173015;
}

.es-topic-card__header p,
.es-topic-card__feature p {
    margin: 0;
    color: #596557;
    line-height: 1.7;
    font-size: 0.95rem;
}

.es-topic-card__count,
.es-topic-card__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(42,107,31,0.08);
    color: #27591f;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.es-topic-card__feature {
    padding: 18px 18px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(42,107,31,0.95) 0%, rgba(25,61,18,0.95) 100%);
    color: #ffffff;
}

.es-topic-card__feature-link {
    display: block;
    margin: 0 0 10px;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.35;
}

.es-topic-card__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.es-topic-card__list a,
.es-topic-card__footer {
    color: #24561b !important;
    text-decoration: none;
    font-weight: 700;
}

.es-topic-card__list a:hover,
.es-topic-card__footer:hover,
.es-blog-backlink:hover {
    color: #e8a020 !important;
}

.es-topic-card__footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(42,107,31,0.12);
}

.es-blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.es-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(42,107,31,0.14);
    background: #ffffff;
    color: #24561b;
    text-decoration: none;
    font-weight: 700;
}

.es-blog-pagination .current,
.es-blog-pagination a:hover {
    background: #24561b;
    border-color: #24561b;
    color: #ffffff;
}

.es-blog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.es-blog-cta h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.1;
}

.es-blog-cta .es-lead {
    margin: 0;
    max-width: 720px;
    color: rgba(255,255,255,0.76);
}

.es-blog-archive-hero__copy,
.es-blog-single__copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.es-blog-backlink {
    display: inline-flex;
    align-self: flex-start;
    color: #24561b !important;
    text-decoration: none;
    font-weight: 700;
}

.es-blog-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #667261;
    font-size: 0.92rem;
    font-weight: 600;
}

.es-blog-single__deck {
    margin: 0;
    max-width: 62ch;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #576553;
}

.es-blog-single__media {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 44px rgba(23,43,17,0.12);
}

.es-blog-single__media img {
    display: block;
    width: 100%;
    height: auto;
}

.es-blog-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    align-items: start;
}

.es-blog-prose {
    min-width: 0;
    font-size: 1.04rem;
    line-height: 1.85;
    color: #2d372d;
}

.es-blog-prose > *:first-child {
    margin-top: 0;
}

.es-blog-prose h2,
.es-blog-prose h3,
.es-blog-prose h4 {
    color: #173015;
    line-height: 1.16;
    margin-top: 2em;
    margin-bottom: 0.65em;
}

.es-blog-prose p,
.es-blog-prose ul,
.es-blog-prose ol,
.es-blog-prose blockquote {
    max-width: 68ch;
}

.es-blog-prose a {
    color: #1f5a1a;
}

.es-blog-prose blockquote {
    margin: 2em 0;
    padding: 22px 24px;
    border-left: 4px solid #e8a020;
    background: #faf8f1;
    color: #435040;
    font-style: italic;
}

.es-blog-prose img {
    border-radius: 18px;
}

.es-blog-single__aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 24px;
}

.es-blog-aside-card {
    padding: 22px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(42,107,31,0.12);
    box-shadow: 0 16px 34px rgba(23,43,17,0.08);
}

.es-blog-aside-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #173015;
}

.es-blog-aside-card p {
    margin: 0 0 18px;
    line-height: 1.75;
    color: #5a6657;
}

.es-blog-aside-card--cta {
    background: linear-gradient(180deg, #1d4f16 0%, #163c12 100%);
    color: #ffffff;
}

.es-blog-aside-card--cta .es-section-label,
.es-blog-aside-card--cta h3,
.es-blog-aside-card--cta p {
    color: #ffffff;
}

.es-blog-grid--related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .es-blog-hero,
    .es-blog-archive-hero,
    .es-blog-single__hero,
    .es-blog-single__layout,
    .es-blog-section-head {
        grid-template-columns: 1fr;
    }

    .es-blog-single__aside {
        position: static;
    }

    .es-topic-grid,
    .es-blog-grid,
    .es-blog-grid--related {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .es-blog-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .es-blog-hero-band {
        padding: 34px 20px 22px;
    }

    .es-topic-grid,
    .es-blog-grid,
    .es-blog-grid--related {
        grid-template-columns: 1fr;
    }

    .es-blog-kpis {
        flex-direction: column;
    }

    .es-blog-kpi {
        width: 100%;
    }

    .es-blog-card__body,
    .es-topic-card,
    .es-blog-aside-card {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ── Header layout: widen top-bar + nav inners so logo (incl. tagline) clears nav links ── */
.es-top-bar-inner,
.es-nav-inner {
    max-width: 1440px;
}

/* ── Blog two-column layout ──────────────────────────────── */
.es-blog-feed-section {
  padding: 48px 0 72px;
  background: var(--off-white, #f8f9f5);
}
.es-blog-feed-section .es-wrap {
  padding-left: 30px;
  padding-right: 30px;
}

.es-blog-layout {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 40px;
  align-items: start;
}

.es-blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--es-sticky-top) + var(--es-header-offset) + 20px);
}

/* Lane nav inside sidebar card */
.es-blog-lane-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}
.es-blog-lane-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 500;
  color: var(--gray-text, #444);
  transition: background .14s, color .14s;
  border-left: 3px solid transparent;
}
.es-blog-lane-link:hover {
  background: #f0f7ec;
  color: var(--green-dark, #2a6b1f);
  text-decoration: none;
}
.es-blog-lane-link.is-active {
  background: #edf5ea;
  color: var(--green-deep, #1e3d14);
  font-weight: 700;
  border-left-color: var(--gold, #e8a020);
}
.es-blog-lane-link__name {
  flex: 1;
}
.es-blog-lane-link__count {
  font-size: .70rem;
  font-weight: 700;
  background: #e2eedb;
  color: var(--green-dark, #2a6b1f);
  border-radius: var(--radius-pill, 999px);
  padding: 2px 9px;
  flex-shrink: 0;
  margin-left: 8px;
  min-width: 28px;
  text-align: center;
}
.es-blog-lane-link.is-active .es-blog-lane-link__count {
  background: var(--gold, #e8a020);
  color: #1a1a1a;
}

/* Content column */
.es-blog-content__head {
  margin-bottom: 28px;
}
.es-blog-content__head h2 {
  margin: 4px 0 0;
  font-size: 1.6rem;
}

/* Sidebar-aware grid — 2 cols instead of 3 in content area */
.es-blog-grid--sidebar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Slim category hero */
.es-blog-hero-band--slim {
  padding: 36px 0 40px;
}
.es-blog-hero-band--slim .es-wrap {
  max-width: 800px;
}

/* Responsive */
@media (max-width: 960px) {
  .es-blog-layout {
    grid-template-columns: 1fr;
  }
  .es-blog-feed-section .es-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .es-blog-sidebar {
    position: static;
  }
  .es-blog-lane-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .es-blog-lane-link {
    border-left: none;
    border: 1px solid #dde8d6;
    border-radius: var(--radius-pill, 999px);
    padding: 6px 14px;
    font-size: .8rem;
  }
  .es-blog-lane-link.is-active {
    border-color: var(--gold, #e8a020);
    background: #edf5ea;
  }
  .es-blog-lane-link__count { display: none; }
  .es-blog-aside-card--cta { display: none; }
  .es-blog-grid--sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .es-blog-grid--sidebar {
    grid-template-columns: 1fr;
  }
}
