.bs-blog-thumb img {
    max-width: 260px;
    height: auto;
}
.author-content h6 {
    margin-bottom: 0 !important;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}
.h2-blog-card .author-content span {
    font-size: 13px;
    color: var(--text-light);
}
.blog-author {
    padding: 16px;
}
.post-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.gallery-single {
    width: 100%;
    height: 400px;
    position: relative;
    cursor: pointer;
}
.gallery-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card-video-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.media-card-video-frame {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.media-card-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.08);
}

.gallery-double {
    display: flex;
    height: 350px;
}
.gallery-double .gallery-item {
    flex: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.gallery-double .gallery-item:first-child {
    margin-right: 2px;
}
.gallery-double img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 175px 175px;
    gap: 4px;
    height: 354px;
}
.gallery-grid .gallery-item:first-child {
    grid-row: span 2;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-single:hover img {
    transform: scale(1.02);
}

.gallery-grid .gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.gallery-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.gallery-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    z-index: 2;
}
.gallery-count i {
    margin-right: 5px;
    margin-top: -1px;
}
.post-content {
    padding: 20px;
}
.post-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--secondary-color);
}
.post-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.post-company {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.edit-post {
    margin-left: auto;
    margin-top: -22px;
}
.edit-post > div{
    padding-left: 20px;
    cursor: pointer;
}
.edit-post ul {
    padding: 0;
    border: none;
    margin-top: 10px !important;
}
.edit-post ul .edit_post_btn,
.edit-post ul .delete_post {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    padding: 10px 14px;
    width: 100%;
    text-align: left;
}
.edit-post ul .edit_post_btn svg,
.edit-post ul .edit_post_btn i,
.edit-post ul .delete_post svg {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    font-size: 20px;
}
.edit-post a{
    color: #0a0a0a;
}
.edit-post .edit_post_btn {
    color: #0a0a0a;
}
.edit-post .edit_post_btn i {
    color: var(--text-secondary);
}
.edit-post li {
    display: flex;
    align-items: center;
    padding: 0;
    justify-content: left;
}
.edit-post li:hover {
    background-color: #A81700;
}
.edit-post li:hover svg path{
    fill: #FFFFFF;
}
.edit-post li:hover a{
    color: #FFFFFF;
}
.edit-post li:hover .edit_post_btn,
.edit-post li:hover .edit_post_btn i {
    color: #FFFFFF;
}

/* Car details dropdown: keep horizontal spacing inside the menu */
.car-details-section .edit-post ul.dropdown-menu {
    padding: 6px;
    min-width: max-content;
}

.car-details-section .edit-post ul.dropdown-menu li {
    width: 100%;
    border-radius: 4px;
}

.car-details-section .edit-post ul.dropdown-menu li form {
    width: 100%;
    margin: 0;
}

.car-details-section .edit-post .car-card-menu-action {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 4px;
    text-align: left;
    color: #0a0a0a;
    background: transparent;
    white-space: nowrap;
}

.car-details-section .edit-post ul.dropdown-menu li:hover .car-card-menu-action {
    color: #ffffff;
}
.delete-post-modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}
.delete-post-modal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
}
.delete-post-modal .modal-footer {
    margin-left: auto;
    margin-right: auto;
}

.js-partner-media-sidebar .partner-media-sidebar__subtitle {
    line-height: 1.5;
    color: var(--text-light);
}

.js-partner-media-sidebar .car_listing_nav ul li a {
    word-break: break-word;
}

.partner-cover-upload__preview {
    border: 1px dashed #d5d9e2;
    border-radius: 10px;
    background-color: #f8f9fc;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.partner-cover-upload__preview.is-dragover {
    border-color: #a81700;
    background-color: #fff4f1;
}

.partner-cover-upload__preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partner-cover-upload__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8f99ab;
    font-weight: 600;
}

.partner-cover-upload__controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.partner-cover-upload__controls .btn {
    width: 100%;
}

.partner-cover-upload__controls .file_name {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.3;
    word-break: break-word;
}

.partner-video-preview {
    border: 1px dashed #d5d9e2;
    border-radius: 10px;
    background-color: #f8f9fc;
    overflow: hidden;
    position: relative;
}

.partner-video-preview .js-video-preview-frame {
    border: 0;
    width: 100%;
    height: 100%;
}

.partner-video-preview__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8f99ab;
    font-weight: 600;
}

.partner-media-section--inactive {
    opacity: 0.72;
}

.partner-media-form-card {
    padding: 34px 36px;
}

.partner-media-form__section + .partner-media-form__section {
    margin-top: 38px;
    padding-top: 34px;
    border-top: 1px solid #e4e9f2;
}

.partner-media-form__subsection {
    padding: 24px;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    background-color: #f8faff;
}


/*Todo Post.css-i mechin@*/
.blog-avatar {
    border: 2px solid #A81700;
}
.post-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #fcfcfc;
}
.action-button {
    display: flex;
    align-items: center;
    margin-right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}
.fa-solid, .fas {
    font-weight: 900;
}
.post-actions > a,
.post-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
    line-height: 1;
    margin-right: 0;
}
.post-actions a {
    color: var(--text-secondary);
}

.post-actions > a > i,
.post-actions > span > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}

.post-action-count {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1;
}

.post-actions > span.active,
.post-actions > span:hover,
.post-actions > span:hover > .post-action-count,
.post-actions > span.active > i,
.post-actions > span.active > .post-action-count,
.post-actions > a:hover > .post-action-count,
.post-actions > a.active > i,
.post-actions > a.active > .post-action-count,
.post-actions > a.active,
.post-actions > a:hover,
.post-likes.active > i,
.post-likes.active > .post-action-count{
    color: #A81700;
}
.input-field input[type=text] {
    max-width: 100%;
}
.input-field textarea{
    max-width: 100%;
    min-height: 200px;
}

.post-uploaded-photo-container {
    max-width: calc(100% - 183px);
}

.post-photo-upload {
    display: inline-block;
    width: 160px;
    height: 124px;
    border-radius: 10px;
    background-color: #FFFFFF;
    background-image: url("/assets/img/upload_image.png");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.post-uploaded-photo > img,
.post-uploaded-photo > video{
    width: 160px;
    height: 124px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
}
.post-uploaded-photo > input{
    display: none;
}
.post-uploaded-photo {
    position: relative;
    max-width: 183px;
    min-width: 183px;
}
.post-uploaded-photo > .cross {
    opacity: 0;
    transition: opacity 0.5s;
    cursor: pointer;
    z-index: 100;
}
.post-uploaded-photo:hover > .cross {
    opacity: 1;
}

.post-uploaded-photo:before {
    position: absolute;
    top: 0;
    left: 12px;
    content: '';
    width: 160px;
    height: 100%;
    display: block;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 9px;
    opacity: 0;
    transition: opacity 0.5s;
    max-height: 124px;
}
.post-uploaded-photo:hover:before {
    opacity: 1;
}
.subtitle {
    color: inherit;
}
.post-new-photo-upload-container {
    min-width: 183px;
}
.form-select {
    padding-top: 0;
    padding-bottom: 0;
}
@media (max-width: 767px) {
    .post-upload-photo {
        width: 100%;
    }
    .post-upload-photo-container {
        display: flex;
        flex-wrap: wrap;
    }
    .post-uploaded-photo-container {
        width: 100%;
        max-width: 100%;
    }
    .post-uploaded-photo {
        max-width: 160px;
        min-width: 133px;
    }
    .post-uploaded-photo > img,
    .post-uploaded-photo > video {
        width: 120px;
        height: 80px;
    }
    .post-uploaded-photo:before {
        max-width: 120px;
        height: 80px;
    }
    .listing_info_box {
        padding-left: 10px;
        padding-right: 10px;
    }

    .car-post-editor .garage-photos__existing,
    .car-post-editor .garage-photos__list--new {
        justify-content: space-between;
        gap: 12px;
    }

    .car-post-editor .garage-photo-card {
        width: calc((100% - 12px) / 2);
        max-width: none;
    }

    .post-editor .garage-photos__existing,
    .post-editor .garage-photos__list--new {
        justify-content: space-between;
        gap: 12px;
    }

    .post-editor .garage-photo-card {
        width: calc((100% - 12px) / 2);
        max-width: none;
    }

    .car-post-editor .car-post-editor__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .car-post-editor .car-post-editor__action {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .car-post-editor .car-post-editor__action--submit {
        order: 1;
    }

    .car-post-editor .car-post-editor__action--back {
        order: 2;
    }
    .partner-media-form-card {
        padding: 22px 14px;
    }
    .partner-media-form__section + .partner-media-form__section {
        margin-top: 28px;
        padding-top: 24px;
    }
    .partner-media-form__subsection {
        padding: 16px;
    }
    .post-photo-upload {
        width: 120px;
        height: 80px;
        background-size: 60px;
    }
    .bs-blog-thumb img {
        max-width: calc(50% - 10px);
        object-fit: contain;
    }
    .bs-blog-thumb {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .car-post-editor .garage-photo-card {
        width: 100%;
    }

    .post-editor .garage-photo-card {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-rows: 150px 150px;
        height: 304px;
    }

    .gallery-single {
        height: 300px;
    }

    .gallery-double {
        height: 250px;
    }

    .post-title {
        font-size: 18px;
    }

    .post-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-grid,
    .gallery-double {
        display: block;
        height: 250px;
    }

    .gallery-grid .gallery-item,
    .gallery-double .gallery-item {
        display: none;
        height: 100%;
        margin: 0;
    }

    .gallery-grid .gallery-item:first-child,
    .gallery-double .gallery-item:first-child {
        display: block;
    }

    .gallery-grid .gallery-item:first-child img,
    .gallery-double .gallery-item:first-child img {
        height: 100%;
    }

    .gallery-single {
        height: 250px;
    }
}

/* Links in post content */
.post-text .text-link {
    color: var(--primary-color, #A81700);
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
}
.post-text .text-link:hover {
    color: var(--secondary-color, #333333);
}
