#ue-page {
    min-height: unset;
}
#page_body_editor-wrapper * {
    box-sizing: unset;
}
.ue-builder-v4 {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,
        Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

.ue-builder-v4 img {
    height: auto;
    float: none;
    max-width: 100%;
}

.ue-builder-v4 *[class^="layout_group-limit_content"] {
    box-sizing: content-box;
}

.ue-builder-v4,
.ue-builder-v4 *,
.ue-builder-v4 *:after,
.ue-builder-v4 *:before {
    box-sizing: border-box;
}
.ue-builder-v4 hr {
    height: 0;
    color: inherit;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin: 0;
}

.ue-builder-v4 button {
    background-color: transparent;
    border-width: 0;
    padding: 0;
    margin: 0;
    color: inherit;
}

.ue-builder-v4 select,
.ue-builder-v4 input,
.ue-builder-v4 textarea {
    color: inherit;
}

/* Override theme's aggressive global resets for Bootstrap-based pages */
.products-list-section img,
.categories-list-section img,
.articles-list-section img,
.article-detail-section img,
.newes-sidebar img,
.newest-item img {
    float: none;
}

/* Article card layout fixes */
.newest-item .item-content {
    flex: 1;
    min-width: 0;
}
.newest-item .content-top {
    flex: 1;
}
.newest-item .item-date {
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 12px;
}

/* Article detail metadata */
.newes-time {
    color: #888;
    font-size: 14px;
}
.newes-author {
    color: #888;
    font-size: 14px;
}

/* Contact page */
.contact-form-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #eef0f4;
}
.contact-form .form-label {
    font-weight: 500;
}
.contact-info a {
    color: #2563eb;
    text-decoration: none;
}

/* ========== Articles List Redesign ========== */
body.page-news .articles-list-section {
    background: #f1f5f9 !important;
    padding: 3rem 0 4rem !important;
}

body.page-news .newest-box {
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.page-news .newest-box .newest-item {
    display: flex !important;
    align-items: stretch !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
    transition: box-shadow .25s, transform .25s !important;
}
body.page-news .newest-box .newest-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.1) !important;
    transform: translateY(-2px) !important;
}

body.page-news .newest-box .newest-item .item-img {
    width: 300px !important;
    flex: 0 0 300px !important;
    margin-right: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: #e2e8f0 !important;
    min-height: 200px !important;
}
body.page-news .newest-box .newest-item .item-img a {
    display: block;
    width: 100%;
    height: 100%;
}
body.page-news .newest-box .newest-item .item-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform .4s ease !important;
}
body.page-news .newest-box .newest-item:hover .item-img img {
    transform: scale(1.06) !important;
}

body.page-news .newest-box .newest-item .item-content {
    padding: 24px 28px !important;
    min-width: 0;
}

body.page-news .newest-box .newest-item .item-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 8px !important;
    line-height: 1.45 !important;
}
body.page-news .newest-box .newest-item .item-title a {
    color: #1a1a2e !important;
    text-decoration: none !important;
}
body.page-news .newest-box .newest-item .item-title a:hover {
    color: #2563eb !important;
}

body.page-news .newest-box .newest-item .item-summary {
    color: #6b7280 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.page-news .newest-box .newest-item .item-date {
    padding-top: 14px !important;
    border-top: 1px solid #f0f1f3 !important;
    margin-top: 14px !important;
    font-size: 13px !important;
    color: #9ca3af !important;
}

body.page-news .newest-box .newest-item .item-date i {
    margin-right: 4px;
}

/* Tags in article list */
body.page-news .newes-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
body.page-news .newes-tags a {
    display: inline-block;
    font-size: 12px;
    color: #2563eb;
    background: #eff4ff;
    border-radius: 999px;
    padding: 2px 10px;
    text-decoration: none;
    transition: background .2s;
}
body.page-news .newes-tags a:hover {
    background: #dbe9ff;
}

/* Tablet */
@media (max-width: 991px) {
    body.page-news .newest-box .newest-item .item-img {
        width: 220px !important;
        flex: 0 0 220px !important;
        min-height: 150px !important;
    }
    body.page-news .newest-box .newest-item .item-content {
        padding: 18px 20px !important;
    }
    body.page-news .newest-box .newest-item .item-title {
        font-size: 16px !important;
    }
}
/* Mobile */
@media (max-width: 767px) {
    body.page-news .newest-box .newest-item {
        flex-direction: column !important;
    }
    body.page-news .newest-box .newest-item .item-img {
        width: 100% !important;
        flex: 0 0 auto !important;
        min-height: 180px !important;
        max-height: 220px !important;
    }
    body.page-news .newest-box .newest-item .item-content {
        padding: 16px !important;
    }
    body.page-news .newest-box .newest-item .item-title {
        font-size: 16px !important;
    }
}

/* ========== Contact Page Fixes ========== */
body.page-contact .page-contact-content {
    font-size: 15px !important;
    color: #374151 !important;
}
body.page-contact .page-contact-content h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}
body.page-contact .contact-info i {
    font-size: 18px !important;
    color: #2563eb !important;
}
body.page-contact .contact-info span {
    font-size: 15px !important;
}
body.page-contact .contact-info strong {
    color: #374151 !important;
}
body.page-contact .contact-form-wrap .form-control {
    font-size: 15px !important;
}
body.page-contact .contact-form-wrap .btn {
    font-size: 15px !important;
}

/* ========== Page Content Fixes ========== */
body.page-service-content #header .content {
    max-width: none !important;
}
body.page-service-content #sitecontent .content {
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #374151 !important;
}
body.page-service-content #sitecontent .content p {
    margin-bottom: 1rem !important;
}

/* ========== Nav Protection from Bootstrap Override ========== */
#header,
#header .content,
#header #logo,
#header #logo img,
#header #nav,
#header #nav li { box-sizing:content-box !important; }
#header .content { line-height:normal !important; }
#header #nav .navitem a,
#header #nav .navitem .subnav a {
    text-decoration: none !important;
    font-size: 13px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    box-sizing: content-box !important;
}
#header #nav .navitem .subnav li a {
    font-size: 12px !important;
}

/* ========== Products List Width Fix ========== */
body.page-products .products-list-section .container {
    max-width: 1300px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}
