/*==============================================
   ECOROADS Blog grid (category + tag archives)
===============================================*/

/* ---- Header band ---- */
.er-blog-head {
    background-color: #030d28;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
/* darker overlay than the theme default (30%) for white text over photos */
.er-blog-head::before {
    background: rgba(3, 13, 40, 0.60) !important;
}
.er-blog-head .er-head-label {
    display: inline-block;
    color: #fd5d14;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.er-blog-head .title h1 {
    text-transform: capitalize;
}

/* ---- Section ---- */
/* The theme force-hides section.latest-blog-area (display:none !important);
   make sure the blog section is always visible even if that class is present. */
.er-blog-area,
section.er-blog-area {
    display: block !important;
    padding: 80px 0 70px;
    background: #fff;
}

/* ---- Card ---- */
/* Force equal-height columns (theme grid may be float-based), so the
   Read More buttons line up at the same bottom edge across all cards. */
.er-blog-area .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.er-blog-col {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}
.single-blog-post.er-blog-card {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(3, 13, 40, 0.07);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.single-blog-post.er-blog-card:hover {
    box-shadow: 0 18px 40px rgba(3, 13, 40, 0.13);
    transform: translateY(-4px);
}
.single-blog-post.er-blog-card .img-holder {
    border-radius: 0;
}
.single-blog-post.er-blog-card .img-holder img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

/* ---- Card body ---- */
/* high specificity to beat theme's .single-blog-post .text-holder { display:block } */
.single-blog-post.er-blog-card .er-blog-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 24px;
}
.er-read-time {
    display: block;
    color: #fd5d14;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
/* "X MIN READ" as a white rounded sticker in the top-right of the card image */
.er-blog-card .img-holder {
    position: relative;
}
.er-blog-card .img-holder .er-read-time {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    margin: 0;
    padding: 1px 9px;
    background: #ffffff38;
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 0px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(3, 13, 40, 0.18);
}
.single-blog-post.er-blog-card .text-holder .blog-title {
    font-size: 21px;
    line-height: 29px;
    font-weight: 600;
    margin: 0px 0 10px;
}
.er-blog-date {
    color: #8a8f98;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 14px;
}
.single-blog-post.er-blog-card .text-holder p.er-blog-excerpt {
    color: #5b6068;
    font-size: 15px;
    line-height: 26px;
    font-weight: 400;
    margin: 0 0 18px;
}

/* ---- Tags (pills) ---- */
.er-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.er-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #f0f1f3;
    color: #5b6068;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.er-tag:hover,
.er-tag:focus {
    background: #fd5d14;
    color: #fff;
    text-decoration: none;
}

/* ---- Read more (theme .btn-one button) ---- */
.er-blog-more {
    margin-top: auto;
    text-align: right;
}
.er-blog-more .btn-one {
    line-height: 42px;
    padding: 0 26px;
    font-size: 15px;
}

/* ---- Empty state ---- */
.er-blog-empty {
    text-align: center;
    color: #8a8f98;
    font-size: 18px;
    padding: 40px 0;
}

/* ---- Pagination ---- */
/* Theme's navigation_markup_template filter strips the .nav-links wrapper,
   so .page-numbers are rendered as direct children here. */
.er-blog-pagination {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.er-blog-pagination .nav-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.er-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 50px;
    background: #f0f1f3;
    color: #030d28;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.er-blog-pagination a.page-numbers:hover,
.er-blog-pagination .page-numbers.current {
    background: #fd5d14;
    color: #fff;
}
.er-blog-pagination .er-flip {
    display: inline-block;
    transform: rotate(180deg);
}

/* ---- Tag filter bar (archive) ---- */
.er-blog-filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 35px;
    padding: 14px 22px;
    background: #f7f8f9;
    border-radius: 8px;
    color: #5b6068;
    font-size: 15px;
}
.er-blog-filterbar strong {
    color: #030d28;
}
.er-blog-clear {
    color: #fd5d14;
    font-weight: 600;
    font-size: 14px;
}
.er-blog-clear:hover {
    color: #ec520c;
}

/* ---- Single article ---- */
.er-single-area {
    padding: 70px 0 90px;
    background: #fff;
}
.er-single-meta {
    color: #8a8f98;
    font-size: 14px;
    margin-bottom: 22px;
}
.er-single-meta .er-read-time {
    display: inline;
    color: #fd5d14;
}
.er-single-meta .er-single-dot {
    margin: 0 8px;
}
.er-single-thumb {
    margin-bottom: 34px;
    border-radius: 8px;
    overflow: hidden;
}
.er-single-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.er-single-content {
    color: #3a3f47;
    font-size: 17px;
    line-height: 30px;
    font-family: Poppins, sans-serif;
}
.er-single-content p {
    margin: 0 0 20px;
    line-height: 1.6;
}
.er-single-content h2,
.er-single-content h3,
.er-single-content h4 {
    color: #030d28;
    font-weight: 600;
    margin: 34px 0 14px;
    line-height: 1.3;
}
.er-single-content h2 { font-size: 28px; }
.er-single-content h3 { font-size: 23px; }
.er-single-content h4 { font-size: 19px; }
/* Pretty list markers — scoped to the article body only */
.er-single-content ul,
.er-single-content ol {
    margin: 0 0 22px 0;
    padding-left: 4px;
    list-style: none;
}
.er-single-content ul li,
.er-single-content ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 28px;
}
.er-single-content ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 9px;
    width: 9px;
    height: 9px;
    background: #fd5d14;
    border-radius: 50%;
}
.er-single-content ol {
    counter-reset: er-ol;
}
.er-single-content ol li {
    counter-increment: er-ol;
}
.er-single-content ol li::before {
    content: counter(er-ol) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #fd5d14;
    font-weight: 700;
}
.er-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0 24px;
    cursor: zoom-in;
}

/* ---- Lightbox for article images ---- */
.er-lightbox {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 13, 40, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: zoom-out;
    padding: 30px;
}
.er-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.er-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    margin: 0;
}
.er-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}
.er-lightbox-close:hover,
.er-lightbox-close:focus {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}
.er-single-content a {
    color: #fd5d14;
    text-decoration: underline;
}
.er-single-content blockquote {
    margin: 24px 0;
    padding: 18px 26px;
    border-left: 4px solid #fd5d14;
    background: #f7f8f9;
    font-style: italic;
    color: #030d28;
}
.er-single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 30px;
    font-size: 15px;
}
.er-single-content th,
.er-single-content td {
    border: 1px solid #e3e6e9;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    line-height: 24px;
}
.er-single-content tr:first-child th {
    background: #030d28;
    color: #fff;
    font-weight: 600;
}
.er-single-content tr:nth-child(even) td {
    background: #f7f8f9;
}
.er-single-tags {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #eceef0;
}

/* ---- Responsive ---- */
@media only screen and (max-width: 991px) {
    .er-blog-head .title h1 {
        font-size: 42px;
        line-height: 52px;
    }
    .er-blog-area {
        padding: 60px 0 40px;
    }
}
@media only screen and (max-width: 767px) {
    .er-blog-head .title h1 {
        font-size: 32px;
        line-height: 40px;
    }
    .single-blog-post.er-blog-card .img-holder img {
        height: 220px;
    }
}

/* ---- Single article: compact breadcrumb header (blog pages only) ---- */
section.er-single-head {
    padding-top: 70px;
    padding-bottom: 55px;
}
section.er-single-head .title {
    margin-bottom: 16px;
}
section.er-single-head .title h1 {
    font-size: 38px;
    line-height: 48px;
}
@media only screen and (max-width: 991px) {
    section.er-single-head {
        padding-top: 42px;
        padding-bottom: 42px;
    }
    section.er-single-head .title h1 {
        font-size: 30px;
        line-height: 40px;
    }
}
@media only screen and (max-width: 767px) {
    section.er-single-head .title h1 {
        font-size: 25px;
        line-height: 33px;
    }
}
