/*
Theme Name: Newspaperex
Theme URI: https://themeansar.com/free-themes/newspaperex
Author: Themeansar
Author URI: https://themeansar.com
Description: Newspaperex is a fast, clean, modern-looking Best Responsive News Magazine WordPress theme. The theme is fully widgetized, so users can manage the content by using easy to use widgets. Newspaperex is suitable for dynamic news, newspapers, magazine, publishers, blogs, editors, online and gaming magazines, newsportals,personal blogs, newspaper, publishing or review siteand any creative website. Newspaperex is SEO friendly, WPML,Gutenberg, translation and RTL ready. Live preview : https://newsup.themeansar.com/newspaperex/ and documentation at https://docs.themeansar.com/docs/newsup/
Version: 2.3
Requires PHP: 7.0
Requires at least: 5.4
Tested up to: 6.5
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Template: newsup
Text Domain: newspaperex
Tags: blog, portfolio, news, grid-Layout, one-column, two-columns, three-columns, flexible-header, left-sidebar, right-sidebar, custom-background, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, post-formats, rtl-language-support, theme-options, sticky-post, threaded-comments, translation-ready, block-styles, wide-blocks

Newspaperex WordPress Theme is child theme of Newsup, Copyright 2020 Themeansar
Newspaperex is distributed under the terms of the GNU General Public License v3

Newspaperex is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.
*/

/* --- ORIGINAL CHILD THEME STYLES --- */
a:focus { outline: 1px solid; }
span.time { margin-left: 5px; padding: 2px 4px; border-radius: 2px; font-size: 14px; font-weight: 600; line-height: 35px; }
.mg-social li span.icon-soci { float: unset; }
.mg-headwidget.center .heacent { margin-top: unset !important; }
.mg-headwidget.center .logo-center, .mg-headwidget.center .navbar-header, .mg-headwidget.center .site-branding-text  { float: none; text-align: center; }
.mg-headwidget.center .navbar-brand { float: none; display: inline-block; margin: 8px auto 0 auto; font-weight: bold; }
.mg-headwidget.center .heacent { margin-top: 40px; color: #fff; }
.navbar-wp .dropdown-menu.searchinner .btn { border: medium none; border-radius: 0 4px 4px 0; height: 40px; line-height: 25px; padding: 5px 15px; }
.mg-search-box .dropdown-toggle::after { display: none; }
.m-header { display: none; }
.desk-header { display: flex; }
.mobilehomebtn { width: 30px; text-align: center; line-height: 30px; height: 30px; }
.logo-auto { margin-left: auto; margin-right: auto; text-align: center; }
.mg-blog-post.md{ width: 49.8%; float: left; height: 236px; }
.mg-blog-post.md .bottom h4 { font-size: 26px; }
.mb1px { margin-bottom: 1px; }
.mg-blog-post.lg.mins { width: 100%; height: 222.5px; margin-bottom: 30px; }
.mg-blog-post.lg.mins h4.title { font-size: 22px; }
.mg-blog-post-box .mg-header { padding: 20px 20px; }
footer .site-description { letter-spacing: 1.2px; }
.mg-headwidget .site-branding-text .text-center { color: #fff; text-align: center; }
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { box-shadow: 0 1px 3px rgb(0 0 0 / 15%); }
.mg-social.info-right a:focus{ outline: none; }
.mg-nav-widget-area .navbar-brand{ margin-right: 0; }
.comment-detail .edit-link a, .comment-detail .reply a, pre.wp-block-code a { text-decoration: underline; }

@media (min-width: 1200px) { .mg-blog-post.md .bottom h4 { max-height: 65px; overflow: hidden; } }
@media (max-width: 991px) {
    .navbar-wp .navbar-nav > li> a i { display: none; }
    #menu-primary li.active.home { display: none; }
    .m-header { width: 100%; padding-right: 15px; padding-left: 15px; display: flex; justify-content: space-between; }
    .desk-header { display: none; }
}
@media (max-width: 767px) and (min-width: 576px) {
    .mg-fea-area .col-md-3 { display: flex; }
    .mg-fea-area .mg-blog-post.lg.mins { margin: 0 5px 30px 0; }
    .mg-fea-area .col-md-3.top-right-area{ display: block; }
}
@media screen and (max-width: 767px) and (min-width: 240px) {
    .mg-headwidget .navbar-wp .navbar-nav > li> a { position: relative; border-bottom: 1px solid rgba(225,225,225,0.4); }
}
@media (min-width: 240px) and (max-width: 576px){
    .mg-fea-area .mg-blog-post.lg.mins,.mg-fea-area  .mg-posts-sec { margin-bottom:20px; }
    .mg-fea-area .mr-bot60 { margin-bottom: 50px; }
}

/* ==========================================================================
   TARGETED FIX FOR PROGRAM STUDI (PAGE ID 34)
   ========================================================================== */

/* 1. Ensure columns FLOAT and don't wrap on desktop */
@media (min-width: 992px) {
    .page-id-34 main#content .col-md-8 {
        width: 66.6666% !important;
        float: left !important;
        display: block !important;
    }
    .page-id-34 main#content aside.col-md-4 {
        width: 33.3333% !important;
        float: left !important;
        display: block !important;
        clear: none !important;
    }
    /* Clearfix for the row if floats are used */
    .page-id-34 main#content .row::after {
        content: "";
        display: table;
        clear: both;
    }
}

/* 2. Fix Horizontal Overflow on the page */
.page-id-34 {
    overflow-x: hidden !important;
}

/* 3. Sidebar Widget Internal Overflow Prevention */
.page-id-34 .mg-sidebar .mg-widget,
.page-id-34 .mg-sidebar .wp-block-group {
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
}

/* 4. Calendar Widget - Detailed Fix for Sidebar fit */
.page-id-34 .wp-block-calendar {
    max-width: 100% !important;
    overflow-x: auto !important;
    margin: 0 !important;
}

.page-id-34 .wp-block-calendar table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 0.8em !important;
}

.page-id-34 .wp-block-calendar th,
.page-id-34 .wp-block-calendar td {
    padding: 3px 0 !important;
    text-align: center !important;
}

/* 5. Mobile Stacking (Below 992px) */
@media (max-width: 991px) {
    .page-id-34 main#content .col-md-8,
    .page-id-34 main#content aside.col-md-4 {
        width: 100% !important;
        float: none !important;
        display: block !important;
    }
}

/* --- FORCE GRID FIX FOR PROGRAM STUDI --- */
/* This handles the case where structural tags might be misaligned */
@media (min-width: 992px) {
    .page-id-34 #content .row {
        display: block !important;
        width: 100% !important;
    }
    
    .page-id-34 #content .col-md-8 {
        width: 66.6666% !important;
        float: left !important;
        padding-right: 15px !important;
    }
    
    .page-id-34 #content .col-md-4,
    .page-id-34 #content aside.col-md-4 {
        width: 33.3333% !important;
        float: right !important; /* Force to the right side */
        padding-left: 15px !important;
        margin-top: 0 !important;
        position: relative !important;
        top: 0 !important;
    }
    
    /* Ensure the row clears floats */
    .page-id-34 #content .row:after {
        content: "";
        display: table;
        clear: both;
    }
}

/* Specific overflow fix for the sidebar content */
.page-id-34 .mg-sidebar {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Fix for the problematic Program Unggulan div */
.page-id-34 .mg-card-box div[style*="gap: 20px"] {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px !important;
}
