/* Just2Minutes inner-page theme — matches the homepage visual system. */
.frontend-page-shell {
    max-width: 1360px;
    margin: 28px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 290px;
    gap: 28px;
    align-items: start;
}
.frontend-page-main { min-width: 0; }
.frontend-page-main > .page-card,
.frontend-page-main > .category-header,
.frontend-page-main > .author-header,
.frontend-page-main > .search-panel,
.frontend-page-main > .contact-card,
.frontend-page-main > article {
    background: #fff;
    border: 1px solid #e7ebe7;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(20,40,25,.045);
}
.frontend-page-main > .page-card,
.frontend-page-main > .search-panel,
.frontend-page-main > .contact-card { padding: 24px; }

.page-title-row { border-left: 5px solid #2e8b57; padding-left: 15px; margin-bottom: 24px; }
.page-title-row h1 { margin: 0 0 5px; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.page-title-row p { margin: 0; color: #6b7280; }

.frontend-post-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.frontend-post-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.frontend-post-card { background:#fff; border:1px solid #e7ebe7; border-radius:12px; overflow:hidden; height:100%; transition:.2s ease; }
.frontend-post-card:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(31,41,55,.09); }
.frontend-post-card .image-wrap { background:#f4f6f4; overflow:hidden; }
.frontend-post-card .image-wrap img { width:100%; height:auto; display:block; object-fit:contain; }
.frontend-post-card .card-body { padding:16px; }
.frontend-post-card h2,.frontend-post-card h3 { font-size:1rem; line-height:1.4; margin:0 0 8px; }
.frontend-post-card h2 a,.frontend-post-card h3 a { color:#172019; }
.frontend-post-card h2 a:hover,.frontend-post-card h3 a:hover { color:#2e8b57; }
.frontend-post-card p { color:#6b7280; font-size:.88rem; line-height:1.6; margin:0 0 12px; }
.frontend-post-meta { color:#8a918c; font-size:.76rem; display:flex; gap:12px; flex-wrap:wrap; }
.frontend-post-meta i { color:#2e8b57; }

.frontend-author-card { background:linear-gradient(135deg,#fff,#f5faf6); padding:22px; border:1px solid #e1e9e3; border-radius:12px; margin-bottom:22px; }
.frontend-author-card .author-avatar { width:92px;height:92px; border-radius:50%; object-fit:contain; background:#f0f4f0; border:4px solid #fff; box-shadow:0 3px 12px rgba(0,0,0,.08); }
.frontend-author-card .author-placeholder { width:92px;height:92px;border-radius:50%;background:#2e8b57;color:#fff;display:grid;place-items:center;font-size:2rem;font-weight:800; }

.frontend-search-form { display:flex; gap:8px; margin-bottom:20px; }
.frontend-search-form input { flex:1; border:1px solid #dfe5df; border-radius:8px; padding:11px 13px; }
.frontend-search-form button { border:0; border-radius:8px; background:#2e8b57;color:#fff;padding:0 18px;font-weight:700; }
.frontend-search-result { padding:18px 0; border-bottom:1px solid #edf0ed; }
.frontend-search-result:last-child { border-bottom:0; }
.frontend-search-result h2 { font-size:1.12rem; margin:0 0 7px; }
.frontend-search-result p { color:#69736c; margin:0 0 8px; line-height:1.65; }

.frontend-pagination { display:flex; justify-content:center; margin-top:28px; }
.frontend-pagination .pagination { gap:7px; flex-wrap:wrap; }
.frontend-pagination .page-link { border:1px solid #dfe6df; color:#2e8b57; border-radius:8px !important; min-width:40px; text-align:center; font-weight:600; }
.frontend-pagination .page-item.active .page-link { background:#2e8b57; border-color:#2e8b57; color:#fff; }
.frontend-pagination .page-item.disabled .page-link { color:#a4aca6; background:#f7f8f7; }

.contact-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); gap:22px; }
.contact-form-card,.contact-info-card { background:#fff; border:1px solid #e7ebe7; border-radius:12px; padding:22px; }
.contact-form-card label { font-weight:600; font-size:.88rem; margin-bottom:6px; }
.contact-form-card .form-control { border-color:#dfe5df; border-radius:8px; padding:11px 13px; }
.contact-form-card .form-control:focus { border-color:#2e8b57; box-shadow:0 0 0 3px rgba(46,139,87,.12); }
.contact-info-card .contact-info-item { display:flex; gap:12px; padding:13px 0; border-bottom:1px solid #edf0ed; }
.contact-info-card .contact-info-item:last-child { border-bottom:0; }
.contact-info-card .contact-icon { width:38px;height:38px;border-radius:9px;background:#eef8f1;color:#2e8b57;display:grid;place-items:center;flex:0 0 auto; }

.single-post-shell { max-width:1360px; margin:28px auto 60px; padding:0 20px; display:grid; grid-template-columns:250px minmax(0,1fr) 290px; gap:28px; align-items:start; }
.single-post-main { min-width:0; background:#fff; border:1px solid #e7ebe7; border-radius:12px; box-shadow:0 3px 14px rgba(20,40,25,.045); padding:26px; }
.single-post-main .post-featured-image img { width:100%; height:auto; display:block; border-radius:10px; }
.single-post-main .post-content img { max-width:100%; width:auto; height:auto; display:block; margin-left:auto; margin-right:auto; }
.single-post-main .post-content { font-size:1.03rem; line-height:1.85; }
.single-post-main .post-content table { max-width:100%; display:block; overflow-x:auto; }
.single-post-main .post-title { font-size:clamp(1.8rem,4vw,2.65rem); line-height:1.2; margin:8px 0 12px; }
.single-post-main .post-meta { display:flex; gap:10px; flex-wrap:wrap; font-size:.82rem; color:#7b837d; }
.single-post-main .related-posts .card-img-top { width:100%; height:auto; object-fit:contain; }

/* Ensure all article/post thumbnails show the complete source image. */
.frontend-page-shell img, .single-post-shell img { max-width:100%; height:auto; }
.frontend-page-shell .post-card .card-img-top, .single-post-shell .card-img-top { height:auto !important; object-fit:contain !important; }

@media (max-width: 1199px) {
    .frontend-page-shell,.single-post-shell { grid-template-columns:220px minmax(0,1fr) 260px; gap:20px; }
}
@media (max-width: 991px) {
    .frontend-page-shell,.single-post-shell { grid-template-columns:220px minmax(0,1fr); }
    .frontend-page-right { grid-column:2; }
    .frontend-page-shell > .home-right, .single-post-shell > .home-right { display:none; }
}
@media (max-width: 767px) {
    .frontend-page-shell,.single-post-shell { display:block; margin-top:18px; padding:0 14px; }
    .frontend-page-left,.frontend-page-right { margin-bottom:18px; }
    .frontend-post-grid,.frontend-post-grid.three { grid-template-columns:1fr; }
    .contact-layout { grid-template-columns:1fr; }
    .single-post-main { padding:18px; }
    .frontend-page-main > .page-card,.frontend-page-main > .search-panel,.frontend-page-main > .contact-card { padding:18px; }
}
.single-post-shell .post-layout-row { display:contents; }
.single-post-shell .preview-row { grid-column:1 / -1; }
.single-post-shell .frontend-page-right { min-width:0; }
.single-post-shell .sidebar-widget { background:#fff; border:1px solid #e7ebe7; border-radius:12px; box-shadow:0 3px 14px rgba(20,40,25,.045); }
.single-post-shell .sidebar-widget .widget-title { display:block; background:#2e8b57; color:#fff; margin:-20px -20px 14px; padding:11px 14px; border:0; border-radius:12px 12px 0 0; text-transform:none; }
@media(max-width:991px){.single-post-shell .post-layout-row{display:block}.single-post-shell .single-post-main,.single-post-shell .frontend-page-right{margin-bottom:20px}.single-post-shell .preview-row{margin-bottom:18px}}
/* Right sidebar widgets use the same green/orange header treatment as the homepage. */
.frontend-page-right .widget-card{border:1px solid #e7ebe7;border-radius:10px;overflow:hidden;box-shadow:0 3px 12px rgba(20,40,25,.045);}
.frontend-page-right .widget-card .card-body{padding:0;}
.frontend-page-right .widget-card .widget-title{display:block;background:#2e8b57;color:#fff;border:0;margin:0;padding:10px 13px;border-radius:0;font-size:.88rem;letter-spacing:0;text-transform:none;}
.frontend-page-right .widget-card .widget-title i{color:#fff;}
.frontend-page-right .widget-card form,.frontend-page-right .widget-card .list-group,.frontend-page-right .widget-card ul,.frontend-page-right .widget-card .d-flex{margin:0;padding:13px;}
.frontend-page-right .widget-card .list-group{padding-top:0;padding-bottom:0;}
.frontend-page-right .widget-card .list-group-item{padding:11px 0;border-color:#edf0ed;}
.frontend-page-right .widget-card .list-group-item:last-child{border-bottom:0;}
.frontend-page-right .widget-card .badge{background:#f1f4f1!important;color:#3c4540!important;border:1px solid #e2e7e3;}
.frontend-page-right .newsletter-widget .widget-title{background:#2e8b57;}
.frontend-page-right .newsletter-widget .card-body>p{padding:13px 13px 0;margin:0;}
.frontend-page-right .newsletter-widget .card-body>form{padding-top:0;}

.search-enhanced{display:flex;gap:8px;align-items:stretch}.search-enhanced .search-input-wrap{min-width:0}.search-enhanced>button{min-width:110px}@media(max-width:575px){.search-enhanced{flex-direction:column}.search-enhanced>button{width:100%;min-height:44px}}

/* Category pages: single right sidebar only, matching the single-post sidebar. */
.category-page-shell {
    grid-template-columns:minmax(0,1fr) 310px;
    gap:28px;
}
.category-page-shell .category-page-sidebar {
    grid-column:2;
    min-width:0;
}
.category-page-sidebar .sidebar-widget {
    background:#fff;
    border:1px solid #e7ebe7;
    border-radius:12px;
    box-shadow:0 3px 14px rgba(20,40,25,.045);
    padding:20px;
    margin-bottom:24px;
}
.category-page-sidebar .sidebar-widget .widget-title {
    display:block;
    background:#2e8b57;
    color:#fff;
    margin:-20px -20px 14px;
    padding:11px 14px;
    border-radius:12px 12px 0 0;
    font-size:.95rem;
    font-weight:700;
}
.category-page-sidebar .sidebar-widget .widget-title i { color:#fff; margin-right:8px; }
.category-page-sidebar .explore-list a {
    display:flex; align-items:center; gap:10px; padding:9px 3px;
    color:#26332c; text-decoration:none; font-size:12px;
    border-bottom:1px solid #edf0ed;
}
.category-page-sidebar .explore-list a:last-child { border-bottom:0; }
.category-page-sidebar .explore-list a i { width:18px; text-align:center; color:#16880d; }
.category-page-sidebar .popular-post-item,
.category-page-sidebar .latest-post-item {
    display:flex; align-items:center; gap:10px; padding:9px 0;
    border-bottom:1px solid #edf0ed; text-decoration:none; color:inherit;
}
.category-page-sidebar .popular-post-item:last-child,
.category-page-sidebar .latest-post-item:last-child { border-bottom:0; }
.category-page-sidebar .popular-rank { flex:0 0 22px; font-weight:700; font-size:.85rem; text-align:center; }
.category-page-sidebar .popular-thumb,
.category-page-sidebar .latest-thumb {
    width:82px; flex:0 0 82px; height:auto; border-radius:6px;
    overflow:hidden; background:#f3f5f3;
}
.category-page-sidebar .popular-thumb img,
.category-page-sidebar .latest-thumb img {
    display:block; width:100%; height:auto !important; max-height:none !important;
    object-fit:contain !important;
}
.category-page-sidebar .popular-content,
.category-page-sidebar .latest-content { min-width:0; flex:1; }
.category-page-sidebar .popular-title,
.category-page-sidebar .latest-title {
    font-size:.78rem; line-height:1.35; font-weight:600; color:#1f2a24;
}
.category-page-sidebar .popular-meta,
.category-page-sidebar .latest-meta { font-size:.68rem; color:#8a918c; margin-top:3px; }
.category-page-sidebar .category-list { list-style:none; margin:0; padding:0 4px 2px; }
.category-page-sidebar .category-list li { border-bottom:1px solid #edf0ed; }
.category-page-sidebar .category-list li:last-child { border-bottom:0; }
.category-page-sidebar .category-list li a {
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:9px 1px; color:#26332c; text-decoration:none;
}
.category-page-sidebar .category-list .cat-name { display:flex; align-items:center; gap:9px; min-width:0; }
.category-page-sidebar .category-list .cat-name i { width:18px; text-align:center; color:#16880d; }
.category-page-sidebar .category-list .cat-count {
    min-width:25px; background:#edf6ef; color:#16880d; border-radius:12px;
    padding:3px 7px; font-size:10px; font-weight:700; text-align:center;
}
@media(max-width:1199px){ .category-page-shell { grid-template-columns:minmax(0,1fr) 280px; } }
@media(max-width:991px){
    .category-page-shell { display:block; }
    .category-page-shell .category-page-sidebar { margin-top:24px; }
}

/* ============================================================
   INNER PAGE RESPONSIVE LAYOUT - MOBILE CLEANUP
   Applies to category, single-post and search pages.
   Desktop keeps sidebars beside the content; mobile removes them.
   ============================================================ */

/* Desktop/tablet: keep sidebars in the same grid row as content. */
@media (min-width: 992px) {
    .frontend-page-shell {
        align-items: start;
    }

    .frontend-page-shell > .frontend-page-main {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .frontend-page-shell > .frontend-page-left {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .frontend-page-shell:has(> .frontend-page-left) {
        grid-template-columns: 220px minmax(0, 1fr) 280px;
    }

    .frontend-page-shell:has(> .frontend-page-left) > .frontend-page-main {
        grid-column: 2;
    }

    .frontend-page-shell:has(> .frontend-page-left) > .frontend-page-right {
        grid-column: 3;
        grid-row: 1;
        min-width: 0;
    }

    .category-page-shell > .frontend-page-main,
    .category-page-shell > .category-page-sidebar {
        grid-row: 1;
    }

    .category-page-shell > .frontend-page-main {
        grid-column: 1;
    }

    .category-page-shell > .category-page-sidebar {
        grid-column: 2;
    }

    .single-post-shell {
        align-items: start;
    }

    .single-post-shell > .post-layout-row {
        display: contents !important;
    }

    .single-post-shell .single-post-main {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .single-post-shell > .frontend-page-right {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }
}

/* Mobile: content only. All sidebars are removed rather than stacked below content. */
@media (max-width: 991px) {
    .frontend-page-shell,
    .category-page-shell,
    .single-post-shell {
        display: block !important;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .frontend-page-shell > .frontend-page-left,
    .frontend-page-shell > .frontend-page-right,
    .category-page-shell > .category-page-sidebar,
    .single-post-shell > .frontend-page-right,
    .single-post-shell .frontend-page-left {
        display: none !important;
    }

    .frontend-page-shell > .frontend-page-main,
    .category-page-shell > .frontend-page-main,
    .single-post-shell .single-post-main {
        display: block !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
    }

    /* Prevent inner-page sidebar templates from being shown if nested. */
    .frontend-page-shell .frontend-page-left,
    .frontend-page-shell .frontend-page-right,
    .single-post-shell .sidebar-widget,
    .single-post-shell .sidebar-subscribe-card,
    .single-post-shell .category-page-sidebar {
        display: none !important;
    }

    /* Mobile search page */
    .search-large-form {
        width: 100%;
    }

    /* Mobile category cards */
    .category-featured,
    .frontend-post-card,
    .page-card {
        max-width: 100%;
    }

    .category-featured-image img,
    .post-featured-image img,
    .frontend-post-card .image-wrap img {
        max-width: 100%;
        height: auto !important;
    }

    /* Mobile article typography */
    .single-post-shell .post-content,
    .single-post-shell .post-header,
    .single-post-shell .post-nav,
    .single-post-shell .comments-section,
    .single-post-shell .post-author-box,
    .single-post-shell .related-posts-section {
        width: 100%;
        max-width: 100%;
    }
}

/* Small phones */
@media (max-width: 575px) {
    .frontend-page-shell,
    .category-page-shell,
    .single-post-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-title-row h1,
    .single-post-shell .post-header h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1.2;
    }

    .frontend-post-grid {
        grid-template-columns: 1fr !important;
    }

    .category-featured-body {
        padding: 16px;
    }
}

/* ============================================================
   SIMPLE MOBILE FOOTER FOR ALL INNER PAGES
   Desktop footer remains completely unchanged.
   ============================================================ */
@media (max-width: 767px) {
    .footer-modern .footer-top {
        padding: 22px 0 12px;
    }

    .footer-modern .footer-top > .row {
        display: block;
    }

    .footer-modern .footer-top .col-lg-2,
    .footer-modern .footer-top .col-lg-3 {
        display: none !important;
    }

    .footer-modern .footer-top .col-lg-4 {
        width: 100%;
        display: block !important;
    }

    .footer-modern .footer-brand {
        text-align: center;
    }

    .footer-modern .footer-description {
        max-width: 320px;
        margin: 8px auto 12px;
        font-size: .78rem;
        line-height: 1.5;
    }

    .footer-modern .footer-logo {
        max-width: 170px;
        height: auto;
    }

    .footer-modern .footer-social {
        justify-content: center;
    }

    .footer-modern .footer-bottom {
        padding: 12px 0 18px;
    }

    .footer-modern .footer-bottom .row {
        display: block;
        margin: 0;
    }

    .footer-modern .footer-bottom .col-md-6 {
        width: 100%;
        padding: 0;
        text-align: center !important;
    }

    .footer-modern .footer-copyright {
        font-size: .72rem;
        margin-bottom: 7px;
    }

    .footer-modern .footer-legal {
        font-size: .68rem;
        line-height: 1.7;
    }

    .footer-modern .footer-divider {
        margin: 0 3px;
    }
}
