.wall-with-ads {
    display: grid;
    grid-template-columns: 450px minmax(0, 650px) 450px;
    justify-content: center;
    align-items: start;
    gap: 60px;
    margin: 0px auto;
    background: #f7f7f7;
}

.wall-with-ads .wall {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    min-width: 0;
}

.wall-ad {
    position: sticky;
    top: 100px;
    width: 100%;
}

.wall-ad a {
    display: block;
    overflow: hidden;
    border-radius: 0px;
}

.wall-ad img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0px;
}
    #mainbox {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 20px auto;
        box-sizing: border-box;
    }
    #mainbox *,
    .core-rail * {
        box-sizing: border-box;
    }
    .core-rail {
        width: 100%;
        min-width: 0;
        padding: 22px;
        margin-bottom: 0px;
        background: #ffffff;
        border: 1px solid #e9e9e9;
        box-shadow: 0 5px 25px rgba(20, 20, 20, 0.055);
        transition: box-shadow .25s ease, border-color .25s ease;
    }

    .core-rail.margin20 {
        margin-top: 0px;
    }
    .core-rail:hover {
        box-shadow: 0 9px 32px rgba(20, 20, 20, 0.075);
    }

    .copose-post {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 18px !important;
        color: #252525;
        font-size: 20px;
        font-weight: 500;
        line-height: 1.1;
    }
    .copose-post i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        color:#111;
        background: #f5b92a;
        font-size: 19px;
    }
    #wallbox {
        width: 100% !important;
        margin: 15px 0;
        text-align: left !important;
    }
    #texter,
    .textwall,
    .commenting.pb-cmnt-textarea {
        display: block;
        width: 100% !important;
        min-width: 0;
        min-height: 100px;
        padding: 15px 16px;
        color: #252525;
        background: #f8f9fb;
        border: 1px solid #e7e8eb;
        border-radius: 13px;
        outline: none;
        resize: vertical;
        font-size: 15px;
        line-height: 1.65;
        transition: border-color .2s ease, box-shadow .2s ease,
                    background .2s ease;
    }
    #texter:focus,
    .textwall:focus,
    .commenting.pb-cmnt-textarea:focus {
        background: #fff;
        border-color: #e85d04;
        box-shadow: 0 0 0 4px rgba(232, 93, 4, .09);
    }
    
    #texter::placeholder,
    .commenting.pb-cmnt-textarea::placeholder {
        color: #969696;
    }
    #wallForm .pull-left {
        display: flex;
        flex-wrap: wrap;
        gap: 9px;
        float: none !important;
        margin: 12px 0;
    }
    
    .btn-upload {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        padding: 10px 15px;
        color: #444;
        background: #fff;
        border: 1px solid #e9e9e9;
        border-radius: 11px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: .2s ease;
    }

    .btn-upload:hover {
        color: #8b6925;
        background: #fbf6e9;
        border-color: #8b6925;
        transform: translateY(-1px);
    }

    .btn-upload i {
        font-size: 16px;
    }
    .sharing-posting-button {
        padding-top: 10px;
            padding-bottom: 25px;
        border-top: 1px solid #f0f0f0;
    }
    .post-button {
        min-width: 105px;
        min-height: 43px;
        padding: 11px 25px;
        color: #111;
        background:#f5b92a;
        border: 0;
        border-radius: 11px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: background .2s ease, transform .2s ease;
    }
    .post-button:hover {
        background: #111;
        transform: translateY(-1px);
        color:#f5b92a;
    }
    .profile_pic_name {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }
    .profile_pic_name > a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }
    .profile_pic_name img,
    .profile_pic_name .imageprofile img,
    .commentingimage img {
        display: block;
        width: 49px;
        height: 49px;
        flex: 0 0 49px;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid #f1f1f1;
    }

    .profile_pic_name h5 {
        min-width: 0;
        margin: 0;
        color: #252525;
        font-size: 15px;
        font-weight: 600;
        line-height: 14px;
        overflow-wrap: anywhere;
        font-family: 'DM Sans', sans-serif;
    }
    .profile_pic_name h5 small {
        color: #777;
        font-size: 11px;
        font-weight: 400;
        font-family: 'DM Sans', sans-serif;
    }
    #mainbox .row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin-right: -10px;
        margin-left: -10px;
    }
    .profile_pic_name-hide-dotts {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-left: 60%;
    }

    .dropbtn{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        color: #555;
        background: #fff;
        border: 1px solid #ededed;
        border-radius: 50%;
        cursor: pointer;
        transition: .2s ease;
    }
    
    .dropbtn:hover,
    .my-post-delete-btn:hover {
        color: #8b6925;
        background: #fbf6e9;
    }
    
    .dropdown {
        position: relative;
    }

    .dropdown-content {
        z-index: 100;
        min-width: 155px;
        padding: 6px;
        background: #fff;
        border: 1px solid #e9e9e9;
        border-radius: 12px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
        right: 0;
        left: auto;
    }
    
    .dropdown-content a {
        display: block;
        padding: 8px 12px;
        color: #333;
        border-radius: 8px;
        text-decoration: none;
        font-size:15px;
    }
    
    .dropdown-content a:hover {
       color: #8b6925; background: #fbf6e9;
    }

    /* Post content */
    .post_content_image {
        min-width: 0;
        margin-top: 18px !important;
        color: #000;
        font-size: 15px;
        line-height: 1.4;
        overflow-wrap: anywhere;
        font-weight: 400;
        font-family: 'DM Sans', sans-serif;
    }
    
    .more1 {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    
    .more1 a {
        color: rgb(224, 168, 1);
    }
    .more1 a:hover {
        color: #23527c;
    }
    
    .more1 img {
        max-width: 100%;
        height: auto;
    }
    
    .post-img {
        width: 100%;
        min-width: 0;
        margin-top: 15px;
        overflow: hidden;
        background: #fff;
    }
    
    .post-img > a {
        display: block;
        width: 100%;
    }
    
    .post-img > a > img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 580px;
        margin: 0 auto;
        object-fit: contain;
    }
    
    .post-img iframe {
        display: block;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        border: 0;
    }

    /* Likes and comments count */
    .linkes_and_comments {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        border-bottom: 1px solid #ededed;
    }
    
    .linkes_and_comments .btn-custom {
        padding: 4px 0;
        color: #737373;
        background: transparent;
        border: 0;
        font-size: 13px;
        cursor: pointer;
    }
    
    .linkes_and_comments .btn-custom:disabled {
        opacity: 1;
        cursor: default;
    }
    
    /* Like and comment action bar */
    .like_comment_shear {
        width: 100%;
        min-width: 0;
        padding-top: 12px;
    }
    
    .like_comment_shear > .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .like_comment_shear .btn-custom {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0px 0px;
        color: #555;
        background: #fff;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: .2s ease;
        border: none;
    }
    
    
    .like_comment_shear .btn-custom:disabled {
        opacity: .65;
        cursor: not-allowed;
    }
    
    /* Comments list */
    .commentcontainer {
        width: 100%;
        min-width: 0;
        margin-top: 16px;
    }
    
    .commentcontainer > div {
        display: flex;
        align-items: flex-start;
        gap: 11px;
        width: 100%;
        padding: 12px 0;
        overflow: visible !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .commentingimage {
        flex: 0 0 38px;
        width: 38px;
    }
    
    .commentingimage img,
    .commentingimage .imageprofile img {
        width: 38px;
        height: 38px;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .commentingtext {
        flex: 1;
        min-width: 0;
        padding: 11px 14px;
        background: #f6f7f9;
        border-radius: 4px 14px 14px 14px;
    }
    
    .commentingtext h3 {
        margin: 0 0 5px;
        color: #292929;
        font-size: 12px;
        font-weight: 600;
        font-family: 'DM Sans', sans-serif;
    }
    
    .commentingtext p {
        margin: 0;
        color: #505050;
        font-size: 12px;
        line-height: 1.5;
        overflow-wrap: anywhere;
        font-family: 'DM Sans', sans-serif;
    }
    
    /* Comment editor */
    .boxcomment {
        display: none;
        width: 100%;
        margin-top: 14px;
    }
    
    .boxcomment .card,
    #mainbox .card-info {
        width: 100%;
        padding: 14px;
        background: #fff;
        border: 1px solid #e9e9e9;
        border-radius: 14px;
    }
    
    .boxcomment .commenting.pb-cmnt-textarea {
        min-height: 75px;
        margin-bottom: 12px;
        resize: vertical;
    }
    
    .boxcomment .btn-primary,
    #mainbox .btn-primary {
        padding: 10px 22px;
        color: #111;
        background: #f5b92a;
        border: 0;
        border-radius: 9px;
        font-weight: 600;
        cursor: pointer;
    }
    
    .boxcomment .btn-primary:hover,
    #mainbox .btn-primary:hover {
        background: #000;
        color:#f5b92a;
    }
    
    /* Image upload */
    .upload_container {
        width: 100%;
        padding: 15px;
        background: #fafafa;
        border: 1px dashed #d5d5d5;
        border-radius: 14px;
    }
    
    .file_input_container {
        width: 100%;
        padding: 16px;
        color: #666;
        background: #fff;
        border-radius: 10px;
        font-size: 13px;
    }
    
    #preview img {
        display: block;
        max-width: 100%;
        max-height: 400px;
        margin: 12px auto;
        object-fit: contain;
        border-radius: 12px;
    }
    
    /* Edit post area */
    [id^="myModaledit"] {
        width: 100%;
        margin-top: 16px;
        background: #fffaf6;
        border-radius: 14px;
    }
    
    [id^="myModaledit"] textarea {
        width: 100%;
        min-height: 90px;
        padding: 12px;
        border: 1px solid #e6e6e6;
        border-radius: 10px;
        resize: vertical;
    }

    .core-rail > a > img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 14px;
    }

    .core-rail button:focus-visible,
    .core-rail a:focus-visible {
        outline: 3px solid rgba(232, 93, 4, .35);
        outline-offset: 3px;
    }


    .dropdown-content {
        display: none;
        position: absolute;
        z-index: 9999;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }

    .iip-wall-modal.modal {
        padding: 15px !important;
        z-index: 10050;
    }
    
    
    .iip-wall-modal .modal-dialog {
        width: 100%;
        max-width: 460px;
        margin: 40px auto;
        position: relative;
        transform: translateY(12px);
        transition: transform 0.25s ease;
    }
    
    .iip-wall-modal.in .modal-dialog {
        transform: translateY(0);
    }

    /* Modal card */
    #mainbox .modal-content,
    .iip-wall-modal .modal-content {
        display: none;
        position: relative;
        width: 100%;
        max-height: 82vh;
        overflow: hidden;
        background: #fff;
        border: 1px solid #ededed;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
    }
    
    /* Header */
    .iip-wall-modal .modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 22px;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .iip-wall-modal .modal-title {
        margin: 0;
        color: #222;
        font-size: 18px;
        font-weight: 700;
    }
    
    /* Close button */
    .iip-wall-modal .modal-header .close {
        float: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #f5f5f5;
        color: #333;
        font-size: 25px;
        line-height: 1;
        text-shadow: none;
        opacity: 1;
        cursor: pointer;
    }
    
    .iip-wall-modal .modal-header .close:hover {
        background: #fff0e8;
        color: #e85d04;
    }
    
    /* Scrollable modal body */
    .iip-wall-modal .modal-body {
        padding: 12px 22px 20px;
        max-height: calc(82vh - 80px);
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* User rows inside likes/followers list */
    .iip-wall-modal .profile_pic_name {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .iip-wall-modal .profile_pic_name:last-child {
        border-bottom: 0;
    }
    
    .iip-wall-modal .profile_pic_name img {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .iip-wall-modal .profile_pic_name h5 {
        margin: 0;
        color: #292929;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
    
    /* Backdrop */
    .modal-backdrop {
        z-index: 10040;
    }
    
    .modal-backdrop.in {
        opacity: 0.55;
    }
    
    .readmore-content {
        display: block;
        max-width: 100%;
        overflow: hidden;
        max-height: 75px;
        transition: max-height 0.35s ease;
    }
    
    .readmore-content.is-expanded {
        max-height: none;
        overflow: visible;
    }
    
    .readmore-content img {
        max-width: 100%;
        height: auto;
    }
    
    .readmore-toggle {
        display: inline-block;
        margin-top: 6px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #e0a801;
        font-weight: 600;
        cursor: pointer;
    }
    
    .readmore-toggle[hidden] {
        display: none !important;
    }
    
    .profile_pic_name-hide-dotts .post-delete {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}
.profile_pic_name-hide-dotts .my-post-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ededed;
    border-radius: 50%;
    background: #fff;
    color: #444;
    font-size: 18px;
    cursor: pointer;
    transition: .2s ease;
}

.profile_pic_name-hide-dotts .my-post-delete-btn:hover {
    color: #8b6925;
    background: #fbf6e9;
}

/* Popup hidden by default */
.profile_pic_name-hide-dotts .post-action-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 220px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .15);
    z-index: 99999;
}

/* Open popup */
.profile_pic_name-hide-dotts .post-delete.is-open .post-action-popup {
    display: block;
    animation: postPopupIn .18s ease;
}

/* Popup links */
.profile_pic_name-hide-dotts .post-action-popup li {
    margin: 0;
    padding: 0;
}

.profile_pic_name-hide-dotts .post-action-popup li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    white-space: normal;
}

.profile_pic_name-hide-dotts .post-action-popup li a:hover {
    background: #fbf6e9;
    color: #8b6925;
}

.profile_pic_name-hide-dotts .post-action-popup .fa {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    font-size: 15px;
}

.profile_pic_name-hide-dotts .post-action-popup .fa-thumbs-up {
    color: #198754;
}

.profile_pic_name-hide-dotts .post-action-popup .fa-trash-o {
    color: #dc3545;
}

.profile_pic_name-hide-dotts .post-action-popup .fa-pencil {
    color: #0d6efd;
}

@keyframes postPopupIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */

@media (min-width: 1200px) and (max-width: 1599px) {
    .wall-with-ads {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(0, 650px)
            minmax(220px, 1fr)!important;;
        gap: 24px;
        padding-inline: 20px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .wall-with-ads {
        grid-template-columns:
            minmax(180px, 1fr)
            minmax(0, 2fr)
            minmax(180px, 1fr)!important;;
        gap: 16px;
        padding-inline: 16px;
    }
}

/* Tablets: hide side ads if they are optional */
@media (min-width: 768px) and (max-width: 991px) {
    .wall-with-ads {
        grid-template-columns: 150px minmax(0, 650px) 150px !important;
        max-width: 760px;
        gap: 24px;
        padding-inline: 20px;
    }

}
@media (max-width: 767px) {
    
    .wall-with-ads {
        grid-template-columns: 50px minmax(0, 680px) 50px;
        gap: 12px;
        display: block;
  
    }
    .wall-ad img {display:none;}

    #mainbox {
        margin-top: 12px;
    }

    .core-rail {
        padding: 14px;
        margin-bottom: 0px;
        border-radius: 0px;
    }


    .copose-post {
        gap: 9px;
        font-size: 18px;
        margin: 0 0 0px !important;
    }

    .copose-post i {
        width: 36px;
        height: 36px;
    }

    #texter {
        min-height: 85px;
        padding: 12px;
        font-size: 14px;
    }
    #wallbox{margin: 0px 0;}

    #wallForm {height: 225px;}
    #wallForm .pull-left {
        gap: 7px;
        
    }

    .btn-upload {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 40px;
        padding: 9px 10px;
        font-size: 12px;
    }

    .post-button {
        width: 100%;
    }

    #mainbox .row {
        align-items: flex-start;
    }

    #mainbox .row > .col-md-col-md-7,
    #mainbox .row > .col-md-col-md-5 {
        width: 100%;
    }

    #mainbox .row > .col-md-col-md-5 {
        margin-top: 12px;
    }

    .profile_pic_name-hide-dotts {
        justify-content: flex-end;
        margin-left: 125px;
    }

    .profile_pic_name img,
    .profile_pic_name .imageprofile img {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .post_content_image {
        margin-top: 12px !important;
        font-size: 13px;
        line-height: 1.3;
    }

    .post-img {
        margin-top: 20px;
        border-radius: 0px;
    }

    .post-img > a > img {
        max-height: 75vh;
        border-radius: 0px;
    }
    
    
    .like_comment_shear {
        padding-top: 0px;
    }
    
     .like_comment_shear > .btn-group {
    display: inline-block;}

    .linkes_and_comments {
        gap: 1px;
        padding-top: 5px;
    }

    .like_comment_shear .btn-custom {
        flex: 1 1 0;
        padding: 10px 8px;
        font-size: 12px;
    }

    .commentcontainer > div {
        gap: 8px;
    }

    .commentingtext {
        padding: 10px 11px;
    }

    .upload_container {
        padding: 10px;
    }
    
    .profile_pic_name h5 {
        font-size: 12px;
        line-height: 11px;
        font-family: 'DM Sans', sans-serif;
    }
    .profile_pic_name h5 small {
        font-size: 10px;
    }
       .iip-wall-modal.modal {
        padding: 10px !important;
    }

    .iip-wall-modal .modal-dialog {
        max-width: 100%;
        margin: 15px auto;
    }

    #mainbox .modal-content,
    .iip-wall-modal .modal-content {
        max-height: 85vh;
        border-radius: 16px;
    }

    .iip-wall-modal .modal-header {
        padding: 15px 16px;
    }

    .iip-wall-modal .modal-body {
        max-height: calc(85vh - 70px);
        padding: 10px 16px 16px;
    }
    .profile_pic_name-hide-dotts .my-post-delete-btn {
        width: 34px;
        height: 34px;
    }

    .profile_pic_name-hide-dotts .post-action-popup {
        width: 210px;
    }
    
}

@media (min-width: 768px) and (max-width: 991px) {

    .core-rail {
        padding: 18px;
    }

    .profile_pic_name img,
    .profile_pic_name .imageprofile img {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .btn-upload {
        padding: 9px 11px;
    }

    .like_comment_shear .btn-custom {
        padding: 10px 12px;
    }
}


@media (min-width: 992px) and (max-width: 1199px) {

    .core-rail {
        padding: 20px;
    }

    .post-img > a > img {
        max-height: 620px;
    }
}

@media (min-width: 1200px) {

    #mainbox {
        margin-top: 24px;
    }

    .core-rail {
        padding: 24px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .core-rail
    .btn-upload,
    .post-button,
    .dropbtn,
    .my-post-delete-btn,
    .like_comment_shear .btn-custom {
        transition: none;
    }
}
