html, body {
    max-width: 100%;
    overflow-x: clip;
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
}

body.custom-background {
    background-color: #dbe4ee;
    background-position: left top;
    background-size: auto;
    background-repeat: repeat;
    background-attachment: scroll;
    padding: 16px 12px;
}

a {
    color: #1151d3;
    text-decoration: none;
}

a:hover, a:focus {
    color: #002954;
    text-decoration: none;
}

/* Ümumi sayt çərçivəsi */
#page.site {
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

#page > .wrapper {
    background-color: #f1f5f9;
    padding-bottom: 18px;
    border-radius: 10px;
}

#page > .wrapper > header.mg-headwidget {
    border-radius: 9px 9px 0 0;
    overflow: hidden;
}

#page, .wrapper, #content, .row, .mg-sidebar, .mg-widget, .php-article-card {
    max-width: 100%;
}

/* Top Bar */
.mg-headwidget .mg-head-detail {
    background: #202f5b;
    padding: 6px 12px;
}

.mg-head-detail .info-left {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-head-detail .info-left li,
.mg-headwidget .mg-head-detail .info-left li a,
.mg-headwidget .mg-head-detail li a i,
.mg-headwidget .mg-head-detail .info-right li a {
    color: #fff;
    font-size: 12.5px;
}

.mg-head-detail .info-left li span.time {
    background: #1151d3;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 6px;
}

/* Header Banner */
.mg-nav-widget-area-back {
    position: relative;
    background: linear-gradient(135deg, #141e3a 0%, #202f5b 60%, #1151d3 100%);
    background-size: cover;
    background-position: center;
}

.mg-nav-widget-area-back .overlay .inner {
    background-color: rgba(32, 47, 91, 0.45);
    padding: 26px 16px;
}

.site-branding-text .site-title {
    margin: 0;
    line-height: 1.1;
}

body .site-title a,
body .site-description {
    color: #10c100;
}

.site-branding-text .site-title a {
    font-family: 'Montserrat', sans-serif;
    font-size: 92px;
    font-weight: 800;
    word-break: break-word;
}

.site-branding-text .site-description {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* Navbar & Theme Menu */
.mg-menu-full {
    background: #202f5b;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mg-headwidget .navbar-wp {
    background: #202f5b;
    padding: 0 12px;
}

.mg-headwidget .navbar-wp .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 14px;
}

.mg-headwidget .navbar-wp .navbar-nav > li > a:hover,
.mg-headwidget .navbar-wp .navbar-nav > li > a:focus,
.mg-headwidget .navbar-wp .navbar-nav > .active > a,
.mg-headwidget .navbar-wp .navbar-nav > .active > a:hover,
.mg-headwidget .navbar-wp .navbar-nav > .active > a:focus {
    color: #fff;
    background: #1151d3;
}

.navbar-wp .dropdown-menu {
    background: #1f2024;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.navbar-wp .dropdown-menu > li > a,
.navbar-wp .dropdown-item {
    background: #1f2024;
    color: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.navbar-wp .dropdown-menu > .active > a,
.navbar-wp .dropdown-menu > .active > a:hover,
.navbar-wp .dropdown-menu > .active > a:focus,
.navbar-wp .dropdown-menu > li > a:hover,
.navbar-wp .dropdown-item:hover {
    background: #1151d3 !important;
    color: #fff !important;
}

.mobilehomebtn {
    background: #1151d3;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobilehomebtn:hover {
    color: #fff;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
}

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
}

/* Category Colors (Orijinal Newsup mavi və rəngli nişanlar) */
.mg-blog-category {
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mg-blog-category a,
a.newsup-categories,
a.newsup-categories.category-color-1 {
    color: #fff !important;
    background: #1151d3 !important;
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 2px;
    text-transform: uppercase;
    line-height: 1.3;
}

a.newsup-categories.category-color-2 { background: #feb236 !important; }
a.newsup-categories.category-color-3 { background: #622569 !important; }
a.newsup-categories.category-color-4 { background: #82b74b !important; }

/* Latest News Ticker */
.mg-latest-news-sec {
    margin-top: 8px;
    margin-bottom: 10px;
}

.mg-latest-news {
    display: flex !important;
    align-items: center !important;
    height: 38px !important;
    min-height: 38px !important;
    background: #fff !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden !important;
}

.mg-latest-news .bn_title {
    flex: 0 0 auto !important;
    width: auto !important;
    float: none !important;
    background-color: #1151d3;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.mg-latest-news .bn_title h2.title {
    font-size: 12px !important;
    font-weight: 700;
    color: #fff;
    padding: 0 12px !important;
    line-height: 38px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.mg-latest-news-slider {
    position: relative !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 38px !important;
    line-height: 38px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
}

.mg-latest-news-slider .yusif-ticker-track {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    will-change: transform;
    animation: yusifTickerMove 26s linear infinite;
}

.mg-latest-news-slider:hover .yusif-ticker-track {
    animation-play-state: paused;
}

.mg-latest-news-slider a {
    display: inline-block !important;
    margin-right: 28px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #222 !important;
    white-space: nowrap !important;
}

.mg-latest-news-slider a::before {
    content: "•";
    color: #1151d3;
    margin-right: 8px;
    font-weight: 800;
}

@keyframes yusifTickerMove {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Columns & Pagination */
#content .col-lg-6 {
    overflow: hidden;
}

@media only screen and (min-width: 992px) {
    #content .row {
        align-items: flex-start !important;
    }
    #content .col-lg-3 {
        position: relative !important;
        top: auto !important;
        z-index: 1;
        transform: none !important;
        transition: none !important;
    }
}

.pagination,
.nav-links,
ul.page-numbers {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    margin: 16px 0 !important;
    list-style: none;
}

.navigation.pagination .nav-links .page-numbers,
.navigation.pagination .nav-links a {
    background: #fff;
    color: #212121;
    padding: 4px 9px !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12.5px !important;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.navigation.pagination .nav-links .page-numbers.current,
.navigation.pagination .nav-links a:hover {
    border-color: #1151d3;
    background: #1151d3;
    color: #fff;
}

/* Center Slider & Post List */
#homemain {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

#homemain .yusif-slide-item {
    display: none;
    width: 100%;
}

#homemain .yusif-slide-item.active {
    display: block;
    animation: yusifSlideFade 0.4s ease;
}

@keyframes yusifSlideFade {
    from { opacity: 0.45; }
    to { opacity: 1; }
}

#homemain .mg-blog-post.lg {
    position: relative;
    width: 100% !important;
    height: 320px !important;
    min-height: 320px !important;
    background-color: #1e293b;
    background-size: cover !important;
    background-position: center center !important;
    border-radius: 6px;
    overflow: hidden;
}

#homemain .mg-blog-post.lg .link-div {
    position: absolute;
    inset: 0;
    z-index: 2;
}

#homemain .mg-blog-post.lg article.bottom {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.08) 100%);
    color: #fff;
}

#homemain .mg-blog-post.lg h4.title,
#homemain .mg-blog-post.lg h4.title a {
    margin: 6px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff !important;
}

#homemain .mg-blog-post.lg .mg-blog-meta,
#homemain .mg-blog-post.lg .mg-blog-date,
#homemain .mg-blog-post.lg .mg-blog-meta i {
    color: #e2e8f0 !important;
}

.post-form {
    color: #fff;
    background: #1151d3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 6px;
}

.yusif-slide-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 8px;
}

.yusif-slide-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.yusif-slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
}

.yusif-slide-dot.active {
    width: 22px;
    background: #1151d3;
}

.yusif-slide-btns {
    display: flex;
    gap: 6px;
}

.yusif-slide-btn {
    background: #fff;
    color: #1151d3;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.yusif-slide-btn:hover {
    background: #1151d3;
    color: #fff;
}

/* Orta Yazı Kartları */
.mg-posts-sec-post {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.mg-post-thumb.back-img.md {
    position: relative;
    width: 100%;
    height: 170px;
    background-color: #e2e8f0;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
}

.mg-post-thumb.back-img.md .link-div {
    position: absolute;
    inset: 0;
}

.mg-posts-modul-6 .mg-sec-top-post .title a,
.mg-sec-top-post h4.entry-title {
    color: #111827;
    margin: 6px 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.mg-posts-modul-6 .mg-sec-top-post .title a:hover {
    color: #1151d3;
}

.mg-blog-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.mg-blog-date {
    color: #475569;
}

.mg-content p {
    margin: 0;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.55;
}

/* Sidebar & Widgets (Orijinal Newsup Mavi Başlıq Lentləri) */
.mg-sidebar .mg-widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.mg-wid-title {
    border-bottom: 2px solid #1151d3;
    margin-bottom: 12px;
    padding: 0;
    display: flex;
    align-items: center;
}

.mg-sidebar .mg-widget .mg-wid-title h6,
.mg-sidebar .mg-widget .mg-wid-title .wtitle {
    display: inline-block;
    margin: 0;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    background: #1151d3 !important;
    border-radius: 3px 3px 0 0;
    letter-spacing: 0.2px;
}

.mg-sidebar .mg-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-sidebar .mg-widget ul li {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.mg-sidebar .mg-widget ul li:last-child {
    border-bottom: 0;
}

.mg-sidebar .mg-widget ul li a {
    color: #1e293b;
    font-weight: 500;
}

.mg-sidebar .mg-widget ul li a:hover,
.mg-sidebar .mg-widget ul li a:focus {
    color: #1151d3;
}

.mg-widget select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
}

.wp-calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 12.5px;
}

.wp-calendar-table caption {
    font-weight: 700;
    color: #1151d3;
    margin-bottom: 6px;
    caption-side: top;
}

.wp-calendar-table th,
.wp-calendar-table td {
    padding: 5px 3px;
    border: 1px solid #e2e8f0;
}

.wp-calendar-table td#today {
    background: #1151d3;
    color: #fff;
    font-weight: 700;
    border-radius: 3px;
}

/* Right Tabs (#exTab2) */
.mg-sidebar #exTab2 {
    background: #fff;
    border-radius: 6px;
}

.mg-sidebar #exTab2 .nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    border-bottom: 2px solid #1151d3 !important;
}

.mg-sidebar #exTab2 .nav-tabs .nav-item {
    flex: 1 1 0 !important;
    margin: 0 !important;
    text-align: center;
}

.mg-sidebar #exTab2 .nav-tabs .nav-link {
    padding: 7px 3px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    color: #212121;
    background: #fff;
    border: none !important;
    border-radius: 4px 4px 0 0 !important;
}

.mg-sidebar #exTab2 .nav-tabs .nav-link.active,
.mg-sidebar #exTab2 .nav-tabs .nav-link.active:hover,
.mg-sidebar #exTab2 .nav-tabs .nav-link.active:focus {
    background: #1151d3 !important;
    color: #fff !important;
}

.mg-sidebar #exTab2 .mg-posts-sec,
.mg-sidebar #exTab2 .mg-posts-sec-inner,
.mg-sidebar #exTab2 .small-list-post,
.mg-sidebar #exTab2 .small-list-post ul {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.mg-sidebar #exTab2 .small-post {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 4px !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.mg-sidebar #exTab2 .small-post:last-child {
    border-bottom: none !important;
}

.mg-sidebar #exTab2 .img-small-post {
    flex: 0 0 56px !important;
    width: 56px !important;
    height: 42px !important;
    overflow: hidden !important;
    border-radius: 4px;
    float: none !important;
    margin: 0 !important;
}

.mg-sidebar #exTab2 .img-small-post img {
    width: 56px !important;
    height: 42px !important;
    object-fit: cover !important;
    display: block;
}

.mg-sidebar #exTab2 .small-post-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
}

.mg-sidebar #exTab2 .mg-blog-category {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    margin-bottom: 2px !important;
}

.mg-sidebar #exTab2 .newsup-categories {
    font-size: 8px !important;
    padding: 1px 4px !important;
    line-height: 1.2 !important;
}

.mg-sidebar #exTab2 .title_small_post h5,
.title_small_post h5 a {
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    font-weight: 600;
    color: #212121;
}

.title_small_post h5 a:hover {
    color: #1151d3;
}

/* Single Post / Page Card */
.php-article-card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.php-article-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 12px;
}

.php-article-body {
    font-size: 16px;
    line-height: 1.75;
    color: #222;
    overflow-wrap: break-word;
}

.php-article-body img,
.php-article-body iframe,
.mg-widget img,
.mg-widget iframe,
.mg-widget table,
.mg-widget select {
    max-width: 100%;
}

.php-article-body iframe {
    width: 100% !important;
    min-height: 760px !important;
    height: 820px !important;
    border: 0 !important;
    border-radius: 8px;
}

/* Footer: kənarlardan 12px məsafə ilə səliqəli çərçivə */
#page > .wrapper > footer,
footer {
    max-width: calc(100% - 24px) !important;
    margin: 12px auto 0 auto !important;
    padding: 14px 16px !important;
    background: #090818 !important;
    background-image: none !important;
    color: #fff;
    border-radius: 8px !important;
    overflow: hidden;
}

footer .mg-footer-copyright {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
}

footer .mg-footer-copyright p,
footer .mg-footer-copyright div,
footer .mg-footer-copyright a {
    color: #e2e8f0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

footer p {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

@media only screen and (max-width: 991px) {
    .mg-sidebar { margin-top: 14px; }
    .mg-posts-sec-post { margin-bottom: 16px; }
    #chatBoxContainer {
        width: calc(100vw - 24px) !important;
        max-width: 360px;
        height: 75vh !important;
        max-height: 490px;
    }
}

@media only screen and (max-width: 640px) {
    body.custom-background { padding: 6px; }
    #page.site { border-radius: 8px; }
    .site-branding-text .site-title a { font-size: 40px; }
    .php-article-card { padding: 14px; }
    .php-article-card h1 { font-size: 20px; }
    .php-article-body iframe {
        min-height: 620px !important;
        height: 720px !important;
    }
    #homemain .mg-blog-post.lg {
        height: 240px !important;
        min-height: 240px !important;
    }
}

@media only screen and (max-width: 375px) {
    .site-branding-text .site-title a { font-size: 32px; }
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#emojiPicker span:hover {
    transform: scale(1.3);
}