/*
Theme Name: Newspanel
Version: 1.0

html, body {
    overflow-x: hidden;
    width: 100%;
}
*/
/* --- Reset --- */
* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: sans-serif; }



/* --- Header Layout --- */
.desktop-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    max-width: 1170px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- Menu (Fixing Screenshot 2026-06-04 221532.png) --- */
#menu-main { 
    display: flex !important; 
    list-style: none !important; 
    margin: 0 !important; 
    padding: 0 !important; 
    gap: 25px !important; 
}

#menu-main li a { 
    text-decoration: none; 
    color: #333; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 14px; 
}




.search-icon-btn {
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #333;
    position: relative; /* Allows z-index to work */
    z-index: 99999;     /* Puts it on top of all other elements */
}
/* Force the search buttons to be interactable */
#search-icon-desktop, #search-icon-mobile {
    position: relative;
    z-index: 99999 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Container styling */
#search-form-overlay {
    position: absolute;
    top: 65px; 
    right: 20px;
    width: 300px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 99999;
    border: 1px solid #eee;
}

/* Align input and button side-by-side */
#search-form-overlay .search-form {
    display: flex;
    gap: 5px;
}

/* Input field */
#search-form-overlay .search-field {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Search Button */
#search-form-overlay .search-submit {
    background: #0000ff; /* Blue background */
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}


/* --- Mobile Header --- */
.mobile-header { display: none; }

@media (max-width: 768px) {
    .desktop-header { display: none !important; }
    .mobile-header { display: flex !important; align-items: center; justify-content: space-between; padding: 10px; }
}



/* --- Header Layout (Sticky removed) --- */
.site-header { 
    border-bottom: 1px solid #eee; 
    padding: 10px 0; 
    background-color: #ffffff !important;
    width: 100%;
}

/* --- Hero Grid --- */
.hero-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr; 
    grid-template-rows: 200px 200px; 
    gap: 15px; 
    max-width: 1170px; 
    margin: 20px auto; 
    padding: 0 15px;
}

.hero-grid article { 
    position: relative; 
    overflow: hidden; 
    border-radius: 8px; 
}

.hero-grid article img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

/* --- Responsive Hero (Mobile Fix) --- */
@media (max-width: 768px) {
    .hero-grid { 
        display: grid; 
        grid-template-columns: 1fr !important; 
        grid-template-rows: auto !important;   
        gap: 15px; 
    }
    
    .hero-grid article { 
        grid-area: auto !important; 
        height: 250px !important;   
    }
}

/* --- Overlays --- */
.img-wrap { position: relative; display: block; width: 100%; height: 100%; }

.cat-overlay { 
    position: absolute; top: 10px; left: 10px; background: #000; 
    color: #fff; padding: 3px 8px; font-size: 11px; font-weight: bold; text-transform: uppercase; z-index: 2;
}

.title-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    background: linear-gradient(transparent, rgba(0,0,0,0.8)); 
    color: #fff; padding: 15px 10px 10px; font-size: 14px; font-weight: bold; line-height: 1.2; z-index: 1;
}

/* --- Responsive Hero --- */
@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .hero-grid article { height: 200px; }
}

/* --- Main Content & Blog Feed --- */
.site-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1170px;
    margin: 40px auto;
    padding: 0 15px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.post-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.post-content { 
    padding: 15px;
    min-height: 120px; /* Ensures the box doesn't collapse if text is short */
}

.post-content h2 { 
    font-size: 18px; 
    margin: 0 0 10px 0; 
    color: #333; 
    line-height: 1.3;
}

.post-content p { 
    font-size: 14px; 
    color: #555; 
    margin: 0; 
    line-height: 1.5;
}

/* --- Responsive Feed --- */
@media (max-width: 768px) {
    .site-container { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
}

/* --- Final Minimal Pagination --- */
.pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important; /* Increases space between buttons */
    margin: 40px 0 !important;
}

.pagination .page-numbers {
    padding: 10px 25px !important; /* Makes them look like substantial buttons */
    border: 1px solid #000 !important;
    text-decoration: none !important;
    color: #000 !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    background: #fff !important;
    min-width: 80px; /* Ensures consistent width */
    text-align: center;
}

/* Current active page styling */
.pagination .current {
    background: #000 !important;
    color: #fff !important;
}

/* Previous/Next styling */
.pagination .prev, 
.pagination .next {
    background: #000 !important;
    color: #fff !important;
}

/* Removes dots if they appear */
.pagination .dots {
    display: none !important;
}
/* Force hide any extra page numbers that are not the current one, previous, or next */
.pagination .page-numbers:not(.current):not(.prev):not(.next) {
    display: none !important;
}



/* --- Footer --- */
.site-footer { 
    margin-top: 30px; 
    padding: 30px 0; 
    border-top: 1px solid #eee; 
    background: #f9f9f9; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: auto 1fr; /* Credits takes auto, menu takes remaining space */
    gap: 20px; 
    align-items: center; 
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-credits p {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.footer-menu-list { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    justify-content: flex-end; 
    gap: 20px; 
    white-space: nowrap; /* Prevents words from wrapping */
}

.footer-menu-list li a { 
    text-decoration: none; 
    color: #333; 
    font-size: 14px; 
    text-transform: uppercase;
}

/* --- Responsive Footer --- */
@media (max-width: 768px) {
    .footer-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .footer-menu-list { 
        justify-content: center; 
        gap: 15px;
        white-space: normal; /* Allows wrapping on small mobile screens */
    }
}


/* --- Single Post Page Layout --- */
.single-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1170px;
    margin: 40px auto;
    padding: 0 15px;
}

/* Post Header */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 10px; }
.post-title { font-size: 32px; margin: 0 0 20px 0; line-height: 1.2; }

/* Meta Row - Aligned Left with Gap */
.meta-row { 
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 15px; 
    margin-bottom: 25px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px; 
}

.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar { border-radius: 50%; }


/* Content */
.featured-image img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 30px; }
.entry-content p { font-size: 17px; line-height: 1.8; color: #333; margin-bottom: 20px; }

/* Related Posts */
.related-posts-section { margin: 50px 0; padding-top: 30px; border-top: 2px solid #000; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }


/* Container for social buttons */
.social-share-buttons {
    display: flex;
    flex-wrap: wrap; 
    justify-content: flex-start; 
    gap: 8px;
    margin: 20px 0;
    width: 100%; 
}

/* Base button styling (Pill shape) */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap; 
    transition: transform 0.2s, background 0.3s;
}

.social-btn:hover {
    transform: scale(1.05);
}

/* Responsive: Compact style for mobile */
@media (max-width: 600px) {
    .social-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Brand Colors (Assigned by PHP class) */
.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #000000; }
.btn-pinterest { background-color: #bd081c; }
.btn-linkedin { background-color: #0077b5; }
.btn-whatsapp { background-color: #25d366; }
.btn-threads { background-color: #000000; }
.btn-reddit { background-color: #ff4500; }
.btn-instagram { background-color: #e1306c; }
.btn-ok { background-color: #ee8208; }
.btn-vk { background-color: #45668e; }
.btn-bluesky { background-color: #0085ff; }
.btn-mastodon { background-color: #6364ff; }
.btn-stumbleupon { background-color: #eb4924; }

/* --- Emergency Mobile Fix --- */
@media (max-width: 480px) {
    .social-share-buttons {
        gap: 5px; /* Tighten the gap */
    }
    
    .social-btn {
        padding: 5px 8px !important; /* Smaller padding */
        font-size: 11px !important;  /* Smaller text */
        flex: 1 1 auto; /* Allow buttons to grow/shrink more freely */
        min-width: auto; /* Allow them to get as small as needed */
    }
}





/* Post Header Spacing */
.post-title {
    margin: 15px 0 20px 0 !important;
}

.meta-row {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
}

/* Entry Content improvements */
.entry-content {
    margin-top: 30px;
}

.entry-content h2, .entry-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #111;
}

/* --- Navigation Stacking Fix --- */

.post-navigation {
    display: block !important; /* Forces vertical stacking */
    margin: 40px 0 !important;
    border-top: 2px solid #eee !important;
    padding-top: 20px !important;
}

.nav-prev, .nav-next {
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important; /* Full width for stacking */
    margin-bottom: 30px !important;
    gap: 15px !important;
}

/* This targets the div containing the text labels and titles */
.nav-prev > div, .nav-next > div {
    display: block !important;
}

/* Ensure consistent mobile look */
@media (max-width: 768px) {
    .nav-prev, .nav-next {
        width: 100% !important;
    }
}
/* Stack Related Posts into a single column on mobile */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr !important; /* Forces a single column */
        gap: 20px !important;
    }
}

/* --- Single Post Page Layout --- */
.single-container {
    display: grid;
    /* On mobile (default), it's 1 column */
    grid-template-columns: 1fr; 
    gap: 40px;
    max-width: 1170px;
    margin: 40px auto;
    padding: 0 15px;
}

/* On tablets/desktops, switch to 2 columns */
@media (min-width: 769px) {
    .single-container {
        grid-template-columns: 1fr 300px;
    }
}

/* --- Category Button Styling --- */
.post-category a { 
    background: #000; 
    color: #fff; 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 11px; 
    text-transform: uppercase; 
    text-decoration: none;
    font-weight: bold;
}

/* --- Sub-Category Tabs --- */
.sub-cat-tabs {
    display: flex;
    flex-wrap: nowrap;     /* Forces tabs to stay on one row */
    gap: 8px;              /* Reduced gap to fit content */
    margin-bottom: 20px;
    padding: 10px 15px;    /* Padding prevents touching edges */
    border-bottom: 1px solid #eee;
    width: 100%;           /* Ensure container occupies full width */
    max-width: 100vw;      /* Prevents container from exceeding viewport */
    box-sizing: border-box; /* Ensures padding does not affect total width */
    overflow-x: hidden;    /* Clips overflow to stop scrolling */
}

.sub-cat-tabs .tab {
    flex: 1;               /* Distributes width equally among tabs */
    padding: 6px 4px;      /* Compact padding for mobile fit */
    background: #f4f4f4;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 11px;       /* Compact font size to avoid line breaks */
    font-weight: bold;
    text-align: center;
    white-space: nowrap;   /* Ensures text stays on one line */
    transition: all 0.3s;
    min-width: 0;          /* Allows tabs to shrink properly */
}

.sub-cat-tabs .tab.active, 
.sub-cat-tabs .tab:hover {
    background: #000;
    color: #fff;
}

/* --- Category Content Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Ensure the post images look uniform */
.post-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.title-link {
    text-decoration: none;
    color: inherit;
}

.post-item .title-link h2 {
    font-size: 18px;
    margin: 15px 15px 5px 15px;
    line-height: 1.3;
}

.post-item p {
    margin: 0 15px 15px 15px;
    color: #666;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr; /* Stack into 1 column on mobile */
    }
}



/* --- 1. Mobile Menu Overlay (Main Container) --- */
#mobile-menu-overlay, .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: #fff;
    transition: 0.3s ease;
    z-index: 9999;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}

#mobile-menu-overlay.active, .mobile-menu-overlay.active { 
    left: 0; 
}

/* --- 2. Menu Content Positioning --- */
.mobile-nav-container, .mobile-nav-wrapper {
    margin-top: 80px; 
    padding: 20px;
}

/* --- 3. Close Button (Fixed and Styled) --- */
.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    background: none !important; /* Force override */
    border: none !important;
    cursor: pointer;
    color: #333 !important; /* Forces dark color for visibility */
    z-index: 10000;
}

.close-menu:hover {
    color: #000 !important;
}

/* --- 4. Credits --- */
.menu-credits { 
    position: absolute; 
    bottom: 20px; 
    left: 20px; 
    color: #777; 
    font-size: 14px; 
}

/* --- 5. Desktop Hide --- */
@media screen and (min-width: 769px) {
    .mobile-header { display: none; }
    #mobile-menu-overlay, .mobile-menu-overlay { display: none; }
}
/* Forcing the menu drop and visibility */
#mobile-menu-overlay {
    margin-top: 80px !important;
    padding-top: 50px !important;
}
/* --- 1. Increase Hamburger Icon Size --- */
.hamburger-btn {
    font-size: 32px; /* Makes the icon larger */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* --- 2. Mobile Menu Positioning (Centered Vertically) --- */
.mobile-nav-wrapper {
    margin-top: 0; /* Removed the 80px drop */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers menu in the middle */
    height: 80vh; /* Takes up most of the height for centering */
}

/* --- 3. Bold Text & No Bullets --- */
.mobile-nav-container ul {
    list-style: none !important; /* Removes bullets */
    padding: 0;
    margin: 0;
}

.mobile-nav-container ul li a {
    font-weight: 800; /* Makes text bold */
    font-size: 24px;  /* Adjust size as needed */
    color: #000;
    text-decoration: none;
    display: block;
    padding: 15px 0;
}

/* --- 4. Close Button --- */
.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px; /* Larger X */
    background: none !important;
    border: none !important;
    cursor: pointer;
    color: #333 !important;
    z-index: 10000;
    display: none;
}

.mobile-menu-overlay.active .close-menu {
    display: block;
}


/* --- Modern Comment Section --- */

/* Increase container spacing */
#respond {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Ensure notes (the email/required disclaimer) are black */
.comment-notes {
    color: #000 !important;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Ensure labels are bold and high contrast (Black) */
.comment-form label {
    font-weight: 700;
    color: #000;
    display: block;
    margin-bottom: 5px;
}

/* Make input fields larger for better touch targets */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #999; /* Higher contrast border */
    border-radius: 4px;
    font-size: 16px; /* Prevents auto-zoom on mobile */
    background: #fff;
    color: #000;
}

/* Textarea height */
.comment-form textarea {
    min-height: 150px;
}

/* Improve contrast for text, name, email, website */
.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
    color: #000 !important;
}

/* Button styling to match your search button */
.comment-form #submit {
    background: #0000ff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
}

.comment-form #submit:hover {
    background: #0000cc;
}

/* Checkbox alignment for accessibility */
.comment-form-cookies-consent {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
}

/* --- Fix Breadcrumb Color --- */
.breadcrumb, 
.breadcrumb a, 
.breadcrumbs, 
.breadcrumbs a, 
.yoast-breadcrumb, 
.yoast-breadcrumb a {
    color: #000 !important;
    font-weight: 600; /* Optional: makes it slightly more readable */
}

/* Ensure the separators (if they are text) are also black */
.breadcrumb-separator {
    color: #000 !important;
}

/* Container adjustments */
.primary-menu-container {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    background: #ffffff;
}

/* Menu items */
.primary-menu ul {
    list-style: none;
    display: flex;
    gap: 30px; /* Modern, generous spacing */
    margin: 0;
    padding: 0;
}

.primary-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    position: relative;
}

/* Modern Hover Effect (Underline animation) */
.primary-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #0073aa; /* Matches your link color */
    transition: width 0.3s ease;
}

.primary-menu a:hover {
    color: #0073aa;
}

.primary-menu a:hover::after {
    width: 100%;
}
/* --- Clean Widget Feed --- */

/* Remove underlines from all links in widgets */
.homepage-widget-area a, 
.homepage-widget-area a:hover, 
.homepage-widget-area a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Ensure the widget items match your main feed styling */
.homepage-widget-area .widget {
    margin-bottom: 30px;
}

/* Style the widget title to look like a clean header */
.homepage-widget-area h2, 
.homepage-widget-area .widget-title {
    font-size: 18px !important;
    color: #000 !important;
    margin: 10px 0 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}

/* Make images in widgets look clean like the feed */
.homepage-widget-area img {
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.homepage-widget-area a:hover img {
    opacity: 0.8;
}

/* Ensure the text description is clean */
.homepage-widget-area p {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}
/* --- 404 Page Styles --- */
.error-404-container {
    text-align: center; 
    padding: 100px 20px;
}
.btn-home {
    background: #000; 
    color: #fff; 
    padding: 12px 25px; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: bold;
    display: inline-block;
    margin-top: 30px;
}


/* ==========================================================================
   Widget & Homepage Section Styling
   ========================================================================== */

/* --- Standard Front-End Styling --- */
.widget,
.home-widget-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.widget-title,
.cat-title {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
    font-size: 18px;
    text-transform: uppercase;
    color: #333;
}

/* --- Widget Labels (Admin/Customizer Only) --- */
.custom-widget-label {
    display: block;
    background: #000;
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 5px;
    pointer-events: none; /* Ensures clicking the label clicks the widget */
}

/* Hide labels on the front end by default */
.widget .custom-widget-label,
.home-widget-section .custom-widget-label {
    display: none;
}

/* --- WordPress Customizer Preview Overrides --- 
   Forces widgets and labels to be visible within the Customizer 
   ========================================================================== */
.wp-customizer .widget, 
.wp-customizer .home-widget-section,
#customize-preview .widget,
#customize-preview .home-widget-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #f000ff !important; /* Customizer edit background */
    border: 1px solid #ddd !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
}

#customize-preview .widget-title,
#customize-preview .cat-title {
    color: #000 !important;
    display: block !important;
    border-bottom: 2px solid #000 !important;
}

/* Reveal labels specifically in the Customizer */
.wp-customizer .custom-widget-label,
#customize-preview .custom-widget-label {
    display: block !important;
}

/* ==========================================================================
   Ad Space Reservation & Layout Styling
   ========================================================================== */

.ad-container {
    width: 100%;
    min-height: 300px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ad-container-social {
    min-height: 400px;
    overflow: hidden;
}

.ad-container-side {
    display: block;
    width: 100%;
    min-height: 650px;
    margin-bottom: 20px;
    text-align: center;
    background-color: #f9f9f9; /* Subtle background to reserve the space visually */
    border: 1px dashed #ddd;   /* Helpful for your own planning */
    overflow: hidden;
}

/* --- Mobile Optimization --- 
   Reduces white space on smaller screens to keep content accessible 
   ========================================================================== */
@media screen and (max-width: 768px) {
    .ad-container-side {
        min-height: 250px; /* Reduces the massive gap on mobile */
    }
}