/*
Theme Name: Expense Manager Blog
Theme URI: https://expensemanager.app/blogs/
Author: Pavans Group
Description: Classic theme that mirrors the navbar and footer of the Expense Manager marketing site (expensemanager.app) for the /blogs section.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: expense-manager
*/

.blog-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 100px 20px 80px;
}

.blog-wrap .sec-title {
    margin-bottom: 30px;
}

/* Listing page — mirrors the site's interior-page header pattern (e.g. .em-faq) */
.em-blog {
    padding-top: 80px;
}

.em-blog__header {
    max-width: 640px;
    margin: 50px auto 50px;
}

.em-blog__header.no-post-fnd{
    height: calc(100vh - 85px - 405px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-post-fnd-inner{
    border: 1px solid var(--primary-clr);
    border-radius: var(--radius-md);
    background: #f5fff9;
    padding:50px;
}

.em-blog__header .cmn-btn {
    display: inline-flex;
    margin-top: 16px;
}

.blog-grid {
    display: flex;
    flex-wrap:wrap;
    gap: 28px;
}

.blog-card {
    background: var(--white-clr, #fff);
    border: none;
    border-radius: var(--radius-md, 16px);
    box-shadow: 0 2px 14px var(--shadow-clr, rgba(0, 0, 0, 0.06));
    overflow: hidden;
    transition: var(--transition, all 0.3s ease);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    cursor: pointer;
    width:calc(100% / 3 - ( 2 * 28px ) / 3)
}

.blog-card:hover {
    box-shadow: 0 10px 30px var(--shadow-clr, rgba(0, 0, 0, 0.12));
}

.blog-card__thumb {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-top-left-radius: var(--radius-md, 16px);
    border-top-right-radius: var(--radius-md, 16px);
    background: var(--light-green, #e2ffeb);
}

.blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-clr, #6b7280);
    font-size: 13px;
}

.blog-card__meta-author {
    color: var(--primary-clr, #19bc66);
    font-weight: 600;
}

.blog-card__meta-read {
    white-space: nowrap;
}

.blog-card__meta-category {
    color: var(--primary-clr, #19bc66);
    font-weight: 600;
    white-space: nowrap;
}

.blog-card__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--heading-clr, #222);
    line-height: 1.4;
    margin-bottom: 10px;
}

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

.blog-card__title a:hover {
    color: var(--primary-clr, #19bc66);
}

.blog-card__excerpt {
    color: var(--text-clr, #444);
    font-size: 15px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 50px;
}

.blog-pagination a,
.blog-pagination span {
    padding: 8px 16px;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--light-clr, #ddd);
    color: var(--heading-clr, #222);
    text-decoration: none;
    font-size: 14px;
}

.blog-pagination a:hover {
    background: var(--light-green, #e2ffeb);
    border-color: var(--primary-clr, #19bc66);
}

.blog-pagination .current {
    background: var(--primary-clr, #19bc66);
    border-color: var(--primary-clr, #19bc66);
    color: #fff;
}

@media (max-width: 767px) {
    .em-blog {
        padding-top: 60px;
    }

    .em-blog__header {
        margin-bottom: 30px;
    }
}

.blog-detail {
    padding: 100px 0 50px;
}

.blog-detail__content {
    margin: 0 auto;
    color: var(--text-clr, #444);
    font-size: 16px;
    line-height: 1.6;
    font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

.blog-detail__content img {
    max-width: 100%;
    width:100%;
    height: auto;
    border-radius: var(--radius-md, 16px) !important;
    margin-bottom: 20px;
}

.blog-detail__content h5 {
    color: var(--primary-clr, #19bc66);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
}

.blog-detail__content h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--heading-clr, #222);
    margin-bottom: 20px;
}

.blog-detail__content h2,
.blog-detail__content h3,
.blog-detail__content h4,
.blog-detail__content h6 {
    color: var(--heading-clr, #222);
    font-weight: 700;
    margin: 25px 0 10px;
}

.blog-detail__content h2 {
    font-size: 26px;
}

.blog-detail__content h3 {
    font-size: 20px;
}

.blog-detail__content h4 {
    font-size: 18px;
}

.blog-detail__content h6 {
    font-size: 14px;
}

.blog-detail__content strong,
.blog-detail__content b {
    color: var(--heading-clr, #222);
    font-weight: 700;
}

.blog-detail__content blockquote {
    margin: 15px 0;
    padding: 12px 20px;
    border-left: 3px solid var(--primary-clr, #19bc66);
    background: #f5fff9;
    color: var(--text-clr, #444);
    font-style: italic;
}

.blog-detail__content p {
    margin-bottom: 10px;
    color: var(--text-clr);
}

.blog-detail__content ul,
.blog-detail__content ol {
    margin: 0 0 20px;
    padding-left: 22px;
    
}

.blog-detail__content ul li,
.blog-detail__content ol li {
    margin-bottom: 8px;
    color:var(--text-clr);
    list-style-type: disc;
}

.blog-detail__content a {
    color: var(--primary-clr, #19bc66);
}

.blog-detail__content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: 0 2px 14px var(--shadow-clr, rgba(0, 0, 0, 0.06));
}

.blog-detail__content th,
.blog-detail__content td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--light-clr, #eee);
}

.blog-detail__content td {
    color: var(--text-clr);
    font-size:14px;
}

.blog-detail__content th {
    background: #efefef;
    color: var(--heading-clr, #222);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.blog-detail__content tbody tr:last-child td {
    border-bottom: none;
}

.blog-detail__content tbody tr:hover {
    background: #f7f7f7;
}

.blog-related {
    padding-top: 50px;
    margin-top:50px;
    border-top: 1px solid var(--light-clr, #eee);
}

.blog-related__title {
    font-weight: 600;
    color: var(--heading-clr, #222);
    margin-bottom: 40px;
    text-align:center;
}

.blog-single__thumb {
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    margin-bottom: 30px;
}

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

.blog-single__meta {
    color: var(--primary-clr, #19bc66);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}

.blog-single__title {
    font-size: 34px;
    font-weight: 700;
    color: var(--heading-clr, #222);
    margin-bottom: 20px;
}

.blog-single__content {
    color: var(--text-clr, #444);
    font-size: 16px;
    line-height: 1.8;
}

.blog-single__content h2,
.blog-single__content h3 {
    color: var(--heading-clr, #222);
    margin: 30px 0 15px;
}

.blog-single__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm, 8px);
}

.blog-single__content a {
    color: var(--primary-clr, #19bc66);
}

.blog-empty {
    text-align: center;
    color: var(--text-clr, #444);
    padding: 40px 0;
    border: 1px solid var(--primary-clr);
    border-radius: var(--radius-md);
    background: #f5fff9;
    max-width: 500px;
    margin-inline: auto;
}

.blog-empty p{
    font-size: 18px;
    font-weight: 500;
}

.blog-empty .cmn-btn {
    display: inline-flex;
    margin-top: 16px;
}


.blog-detail__content .search-form {
    position: relative;
}

.blog-detail__content .search-submit {
    display: none;
}

.blog-detail__content .search-form label{
    width:100%;
    margin-bottom:20px;
    position: relative;
    display: block;
}

.blog-detail__content .search-field {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 40px 0 44px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary-clr);
    font-size: 15px;
    color: var(--heading-clr);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.blog-detail__content .search-form label::before{
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23aab8c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.blog-detail__content .search-field::placeholder {
    color: #98a2b3;
}
.blog-detail__content .em-btn{}
.blog-detail__content .search-field:focus {
    border-color: var(--secondary-clr);
    box-shadow: 0 0 0 3px rgba(25, 188, 102, 0.15);
    background: #f5fff9;
}

.blog-detail__content .search-field::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.blog-cta {
    background: var(--white-clr, #fff);
    border-radius: var(--radius-md, 16px);
    box-shadow: 0 2px 14px var(--shadow-clr, rgba(0, 0, 0, 0.06));
    padding: 15px;
    text-align: center;
}

.blog-cta__img {
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
    background: var(--light-green);
    border-radius: var(--radius-md, 16px);
    border: 0.95px solid #0000000f;
}

.blog-cta__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading-clr, #222);
    margin-bottom: 10px;
}

.blog-cta__text {
    font-size: 14px;
    color: var(--text-clr, #444);
    margin-bottom: 20px;
}

.blog-cta__row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap:wrap;
}

.blog-cta__row .em-btn img{
    border-radius:0 !important;
}

.blog-cta__row .em-btn .em-btn__icon{
    width:20px;
    height:20px !important;
}

.blog-detail__content .em-btn{
    color:#ffffff;
    min-width:auto;
    padding: 10px 12px;
    width:calc(100% / 2 - ( 1 * 10px ) / 2);
    height: 46px;
}

.blog-detail__content .em-btn img{
    margin-bottom:0;
}

@media screen and (max-width: 1199px) {
    .blog-detail__content .em-btn{
        width:100%;
    }
}

@media screen and (max-width: 991px) {
    .blog-grid{
       gap:20px;
    }
    .blog-card{
        width:calc(100% / 2 - ( 1 * 20px ) / 2);
    }
    .blog-detail__content .elementor > .elementor-element{
        flex-direction:column;
    }

    .blog-detail__content .elementor > .elementor-element > .e-flexbox-base{
        width:100% !important;
    }

    .blog-detail__content .em-btn{
        width:calc(100% / 2 - ( 1 * 10px ) / 2);
    }
}

@media screen and (max-width: 767px) {
    .blog-card{
        width:100%;
    }
}

@media screen and (max-width: 575px) {
    .blog-empty {
        max-width: 500px;
    }
  }

@media screen and (max-width: 480px) {  
    .blog-card__title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .blog-card__excerpt{
        font-size: 14px;
    }

    .blog-detail__content h1{
        font-size:24px;
        margin-bottom: 10px;
    }

    .blog-detail__content p{
        font-size:14px;
    }

    .blog-detail__content h2{
        font-size:22px;
    }

    .blog-detail__content h3{
        font-size:18px;
    }

    .blog-detail__content ul li, .blog-detail__content ol li{
        font-size:14px;
    }

    .blog-detail__content .search-field{
        height: 40px;
        font-size: 14px;
    }

    .no-post-fnd-inner {
        padding:20px;
    }
}