/*
 * NPL Sports Pro Theme - Widgets & Sidebars Styles
 * File: Assets/css/widgets.css
 */

/* ===================================================================
 * TABLE OF CONTENTS
 * 1. General Widget & Section Title Styles
 * 2. NPL Popular Posts Widget
 * 3. Featured Recent Posts Widget
 * 4. Custom Category List Widget
 * 5. NPL Custom Recent Posts Widget
 * 6. Post List (Round Thumbs) Widget
 * 7. Tabbed Posts Widget - Premium Modern Style
 * 8. Advertisement Slots (Responsive & Banners)
 * 9. Front Page - Admin Edit Links
 * 10. Post Views Counter Styling
 * 11. Responsive Styles - Widgets
 * 12. Default WordPress List Widgets (PRO DESIGN)
 * =================================================================== */

/* ===================================================================
 * 1. General Widget & Section Title Styles
 * =================================================================== */
.widget {
    background-color: #fff !important; 
    padding: 10px !important; 
    border: 1px solid #e5e5e5 !important; 
    margin-bottom: 20px !important;
}

.widget:last-of-type {
    margin-bottom: 0 !important;
}

.section-title,
.widget-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    color: #08a3ba !important;
    background: none !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    display: block !important;
}

.section-title::after,
.widget-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    width: 70px !important;
    height: 2px !important;
    background-color: #08a3ba !important;
    display: block !important;
}

.widget ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

/* ===================================================================
 * 2. NPL Popular Posts Widget
 * =================================================================== */
.popular-posts-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    margin-bottom: 15px !important;
    border-bottom: none !important;
    padding-bottom: 10px !important;
    position: relative;
    margin-top: 0 !important; 
}

.popular-posts-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 4px;
    background-color: #dd0000; 
}

.popular-post-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.popular-posts-list > .popular-post-item:last-child {
    margin-bottom: 0; 
}

.popular-post-thumbnail img {
    width: 250px;
    height: 120px;
    border-radius: 20%;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-post-category {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.popular-post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.popular-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-post-title a:hover {
    color: #dd0000;
}

.popular-posts-title.has-custom-bg::after {
    display: none;
}

/* ===================================================================
 * 3. Featured Recent Posts Widget
 * =================================================================== */
.frp-featured-post {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.frp-featured-thumbnail img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.frp-featured-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.frp-featured-title a { 
    color: #333; 
    text-decoration: none; 
}

.frp-featured-title a:hover { 
    color: #0010a0; 
}

.frp-featured-meta { 
    font-size: 13px; 
    color: #888; 
    margin-bottom: 10px; 
}

.frp-featured-excerpt { 
    font-size: 15px; 
    line-height: 1.6; 
    color: #555; 
}

.frp-featured-excerpt p { 
    margin: 0; 
}

.frp-list-item { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
}

.frp-post-list > .frp-list-item:last-child { 
    margin-bottom: 0; 
    padding-bottom: 0; 
}

.frp-list-thumbnail img { 
    width: 150px; 
    height: 90px; 
    object-fit: cover; 
    flex-shrink: 0; 
}

.frp-list-title { 
    font-size: 15px; 
    line-height: 1.4; 
    font-weight: 500; 
    margin: 0 0 4px 0; 
}

.frp-list-title a { 
    color: #333; 
    text-decoration: none; 
}

.frp-list-title a:hover { 
    color: #0010a0; 
}

.frp-list-meta { 
    font-size: 12px; 
    color: #888; 
}

/* ===================================================================
 * 4. Custom Category List Widget
 * =================================================================== */
.widget_npl_category_list .widget-title {
    display: flex;
    align-items: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700; 
    text-transform: uppercase;
}

.widget_npl_category_list .widget-title::after {
    content: '';
    display: block;
    flex-grow: 1; 
    height: 4px;
    background-color: #0010a0; 
    margin-left: 20px;
    position: static;
    width: auto;
    bottom: auto;
    left: auto;
}

.npl-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.npl-category-list-wrapper > .npl-category-item:last-child {
    border-bottom: none;
}

.npl-category-item .cat-name { 
    color: #333; 
    font-size: 16px; 
    font-weight: 700; 
}

.npl-category-item:hover .cat-name { 
    color: #0010a0; 
}

.npl-category-item .cat-count { 
    font-weight: 400; 
    font-size: 15px; 
    color: #777; 
}

/* ===================================================================
 * 5. NPL Custom Recent Posts Widget (PRO DESIGN)
 * =================================================================== */
.widget-area .widget_npl_custom_recent_posts .widget-title { 
    font-size: 16px; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-top: 5px;
    margin-right: -30px;
    margin-bottom: 25px;
    margin-left: -30px; 
    padding: 15px 30px; 
    border-bottom: none;
    background-color: #0010a0;
    color: #ffffff;
}

.widget_npl_custom_recent_posts ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

/* Pro Design Flexbox Layout */
.npl-pro-post-item { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    margin-bottom: 15px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f0f0f0; 
    transition: all 0.3s ease; 
}

.npl-pro-post-item:last-child { 
    margin-bottom: 0; 
    border-bottom: none; 
    padding-bottom: 0; 
}

/* Hover background effect */
.npl-pro-post-item:hover {
    background-color: #fafafa;
    border-radius: 5px;
    padding-left: 5px;
    padding-right: 5px;
}

/* Thumbnail Styling */
.npl-pro-thumb { 
    flex-shrink: 0; 
    overflow: hidden; 
    border-radius: 4px; 
}

.npl-pro-thumb img { 
    width: 80px; 
    height: 60px; 
    object-fit: cover; 
    transition: transform 0.4s ease; 
    display: block; 
}

.npl-pro-post-item:hover .npl-pro-thumb img { 
    transform: scale(1.1); 
}

/* Content Styling */
.npl-pro-content { 
    flex-grow: 1; 
}

.npl-pro-title { 
    font-size: 15px; 
    line-height: 1.4; 
    margin: 0 0 5px 0; 
    font-weight: 600; 
}

.npl-pro-title a { 
    color: #222; 
    text-decoration: none; 
    transition: color 0.3s ease; 
}

.npl-pro-post-item:hover .npl-pro-title a { 
    color: #dd0000; 
}

/* Date Styling */
.npl-pro-date { 
    font-size: 12px; 
    color: #888; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

.npl-pro-date i {
    color: #bbb;
}

/* ===================================================================
 * 6. Post List (Round Thumbs) Widget (FIXED DESIGN)
 * =================================================================== */
.widget.widget_npl_round_thumbs_widget { 
    padding: 15px !important; /* Fixed padding so title shows properly */
}

.widget_npl_round_thumbs_widget .widget-title,
.npl-widget-title-modern {
    display: flex; 
    align-items: center; 
    font-size: 16px; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin: 0 0 20px 0; 
    padding-bottom: 10px; 
    border-bottom: 1px solid #e5e5e5;
}

.npl-widget-title-modern span { 
    margin-right: 15px; 
}

.npl-widget-title-modern::after { 
    content: ''; 
    display: block; 
    flex-grow: 1; 
    height: 3px; 
    background-color: #dd0000; 
}

.npl-round-posts-list-wrapper { 
    padding: 0; 
}

.npl-round-post-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px; 
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 15px;
}

.npl-round-post-item:last-child { 
    margin-bottom: 0; 
    border-bottom: none;
    padding-bottom: 0;
}

.npl-round-thumb {
    flex-shrink: 0;
}

.npl-round-thumb img { 
    width: 80px;  /* Standard width */
    height: 60px; /* Standard height for rectangular look */
    object-fit: cover;
    border: 2px solid #f9f9f9;
    border-radius: 25px; /* FIXED: Slight curve instead of weird round shape */
    display: block; 
    transition: opacity 0.3s ease; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.npl-round-thumb:hover img { 
    opacity: 0.8; 
}

.npl-round-content {
    flex-grow: 1;
}

.npl-round-content .npl-round-cat { 
    font-size: 11px; 
    font-weight: bold; 
    text-transform: uppercase; 
    color: #dd0000; 
    display: block; 
    margin-bottom: 4px; 
}

.npl-round-content .npl-round-title { 
    font-size: 14px; 
    font-weight: 600; 
    line-height: 1.4; 
    margin: 0; 
}

.npl-round-content .npl-round-title a { 
    color: #333; 
    text-decoration: none; 
    transition: color 0.3s ease; 
}

.npl-round-content .npl-round-title a:hover { 
    color: #0010a0; 
}

.npl-round-nav { 
    display: flex; 
    justify-content: flex-start; 
    gap: 5px; 
    margin-top: 25px; 
    border-top: 1px solid #e5e5e5; 
    padding-top: 20px; 
}

.npl-round-nav .npl-round-prev,
.npl-round-nav .npl-round-next { 
    width: 30px; 
    height: 30px; 
    border: 1px solid #e5e5e5; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 12px; 
    color: #888; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}

.npl-round-nav .npl-round-prev:hover,
.npl-round-nav .npl-round-next:hover { 
    background-color: #dd0000; 
    border-color: #dd0000; 
    color: #ffffff; 
}

/* ===================================================================
 * 7. Tabbed Posts Widget - Premium Modern Style
 * Features: Date Inside Thumbnails, Fixed Tab Spacing, 7 Devices Ready
 * =================================================================== */

.npl-tabbed-widget { 
    background: #fff;
    border: 1px solid #f0f0f0;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* 1. Modern Tabs Navigation */
.npl-tabs-nav { 
    display: flex; 
    margin: 0 !important; 
    padding: 0 !important; 
    background-color: #f9f9f9; 
    border-bottom: 2px solid #eee;
    list-style: none !important;
}

.npl-tab-trigger { 
    flex: 1; 
    text-align: center; 
    padding: 14px 5px; 
    font-size: 10px; 
    font-weight: 600; 
    text-transform: uppercase;
    color: #888; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.npl-tab-trigger:hover { 
    color: #555;
}

.npl-tab-trigger.active { 
    background-color: #0010a0; 
    color: #fff; 
    position: relative;
}

.npl-tab-trigger.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #0010a0;
	color: #fff;
}

/* 2. Content Area Padding */
.npl-tabs-content { 
    padding: 20px 15px; 
}

.npl-tab-panel { 
    display: none; 
    animation: nplFadeIn 0.5s ease;
}

@keyframes nplFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.npl-tab-panel.active { 
    display: block; 
}

/* 3. Post List Item Styling - NO MORE BORING BLUE */
.npl-tab-post-item { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 10px; 
    padding-bottom: 18px; 
    border-bottom: 1px solid #f5f5f5; 
    transition: 0.3s;
}

.npl-tab-post-item:last-child { 
    margin-bottom: 0; 
    padding-bottom: 0; 
    border-bottom: none; 
}

/* Thumbnail with Date Overlay */
.npl-tab-thumb {
    flex: 0 0 95px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    height: 65px;
}

.npl-tab-thumb img { 
    width: 95px !important; 
    height: 65px !important; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.5s ease;
}

.npl-tab-post-item:hover .npl-tab-thumb img {
    transform: scale(1.1);
}

.npl-tab-date-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #0010a0; /* Brand Color Background */
    color: #fff;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

/* Post Content Styling (THE FIX) */
.npl-tab-details {
    flex: 1;
}

.npl-tab-post-title { 
    font-size: 12px; 
    line-height: 1.3; 
    font-weight: 600; /* Extra bold like big news sites */
    margin: 0; 
}

.npl-tab-post-title a { 
    color: #111; /* DARK BLACK - Professional look */
    text-decoration: none; 
    transition: 0.2s ease-in-out;
}

.npl-tab-post-item:hover .npl-tab-post-title a { 
    color: #0010a0; /* Changes to blue only on hover */
    padding-left: 2px; /* Subtle movement effect */
}

/* ============================================================
   RESPONSIVE (FOR 7 DEVICES)
   ============================================================ */

@media (max-width: 480px) {
    .npl-tab-thumb { flex: 0 0 85px; height: 60px; }
    .npl-tab-thumb img { width: 85px !important; height: 60px !important; }
    .npl-tab-post-title { font-size: 14px; }
}

/* ===================================================================
 * 8. Advertisement Slots (Responsive & Banners)
 * =================================================================== */
.ad-slot { 
    margin: 30px 0; 
    text-align: center; 
    overflow: hidden; 
}

.ad-slot-header, 
.ad-slot-below-breaking { 
    margin: 10px auto; 
}

.ad-slot-sidebar .widget-title { 
    margin-bottom: 20px; 
}

.ad-slot iframe, 
.ad-slot ins { 
    margin: 0 auto !important; 
}

.ad-slot-header, 
.ad-slot-in-content, 
.ad-slot-below-breaking { 
    min-height: 90px !important; 
    max-width: 728px !important; 
}

.ad-slot-sidebar { 
    min-height: 250px; 
}

.section-advertisement { 
    padding-top: 5px; 
    border: none; 
    background: none; 
    text-align: center; 
    margin-bottom: 5px; 
}

.homepage-ad-banner {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto; 
    border: 1px solid #e5e5e5; 
    background-color: #f9f9f9; 
    color: #aaa; 
    font-size: 14px;
    width: 728px !important; 
    height: 90px !important; 
}

.mobile-header-ad-area { 
    display: none; 
    text-align: center; 
    padding: 10px 0; 
    background-color: #f5f5f5; 
}

.mobile-header-ad-area > div, 
.mobile-header-ad-area ins { 
    margin: 0 auto; 
    width: 350px; 
    height: 50px !important; 
}

/* ===================================================================
 * 9. Front Page - Admin Edit Links
 * =================================================================== */
.section-title { 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.npl-edit-link { 
    background-color: #d13639; 
    color: #fff !important; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 11px; 
    text-transform: uppercase; 
    font-weight: 700; 
    opacity: 0.6; 
    transition: all 0.3s ease; 
    z-index: 10; 
}

.npl-edit-link:hover { 
    opacity: 1; 
    background-color: #000; 
    color: #fff !important; 
    transform: scale(1.05); 
}

/* ===================================================================
 * 10. Post Views Counter Styling
 * =================================================================== */
.entry-meta .views-meta { 
    font-weight: bold; 
}

/* ===================================================================
 * 11. Responsive Styles - Widgets (7 Devices)
 * =================================================================== */
@media (min-width: 1441px) {
    .npl-edit-link { 
        font-size: 13px; 
        padding: 4px 10px; 
    }
}

@media (max-width: 1100px) {
    .ad-slot-header, 
    .ad-slot-in-content, 
    .ad-slot-below-breaking { 
        max-width: 667px !important; 
    }
}

@media (max-width: 991px) {
    .ad-slot-header, 
    .ad-slot-in-content, 
    .ad-slot-below-breaking { 
        max-width: 467px !important; 
        min-height: 50px !important; 
    }
    
    .mobile-header-ad-area { 
        display: block; 
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .homepage-ad-banner { 
        width: 467px !important; 
        height: 60px !important; 
    }
}

@media (max-width: 767px) {
    .ad-slot-header, 
    .ad-slot-in-content, 
    .ad-slot-below-breaking { 
        max-width: 350px !important; 
        min-height: 50px !important; 
    }
}

@media (max-width: 425px) {
    .npl-edit-link { 
        padding: 1px 4px; 
        font-size: 9px; 
    }
}

/* ===================================================================
 * 12. Default WordPress List Widgets & Blocks (PRO DESIGN)
 * Targets Classic Recent Posts AND modern Gutenberg Latest Posts Blocks
 * =================================================================== */

.widget_recent_entries ul li,
.widget_block .wp-block-latest-posts li,
.widget_archive ul li,
.widget_categories ul li {
    position: relative;
    padding: 12px 0 12px 20px;
    border-bottom: 1px dashed #e5e5e5;
    transition: all 0.3s ease;
    margin-bottom: 0; /* Override default block margins */
}

.widget_recent_entries ul li:last-child,
.widget_block .wp-block-latest-posts li:last-child,
.widget_archive ul li:last-child,
.widget_categories ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Chevron Icon */
.widget_recent_entries ul li::before,
.widget_block .wp-block-latest-posts li::before,
.widget_archive ul li::before,
.widget_categories ul li::before {
    content: '\f105'; /* FontAwesome Chevron Right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 14px; 
    color: #dd0000; /* NPL Brand Red */
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Link Styles */
.widget_recent_entries ul li a,
.widget_block .wp-block-latest-posts li a,
.widget_archive ul li a,
.widget_categories ul li a {
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block; 
}

/* Hover Effects */
.widget_recent_entries ul li:hover,
.widget_block .wp-block-latest-posts li:hover,
.widget_archive ul li:hover,
.widget_categories ul li:hover {
    background-color: #fafafa;
}

.widget_recent_entries ul li:hover a,
.widget_block .wp-block-latest-posts li:hover a,
.widget_archive ul li:hover a,
.widget_categories ul li:hover a {
    color: #0010a0; /* Brand Blue */
    transform: translateX(4px); /* Halka Right Slide */
}

.widget_recent_entries ul li:hover::before,
.widget_block .wp-block-latest-posts li:hover::before,
.widget_archive ul li:hover::before,
.widget_categories ul li:hover::before {
    color: #0010a0;
    transform: translateX(4px);
}

/* Date Styling (If block shows date) */
.widget_recent_entries ul li .post-date,
.widget_block .wp-block-latest-posts__post-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    font-weight: normal;
}

/* ===================================================================
 * 11. Responsive Styles - Widgets (7 Devices)
 * =================================================================== */
@media (min-width: 1441px) {
    .npl-edit-link { font-size: 13px; padding: 4px 10px; }
}

@media (min-width: 992px) {
    .homepage-ad-banner { width: 728px ! important; }
}

@media (max-width: 1100px) {
    .ad-slot-header, .ad-slot-in-content, .ad-slot-below-breaking { max-width: 667px !important; }
}

@media (max-width: 991px) {
    .ad-slot-header, .ad-slot-in-content, .ad-slot-below-breaking { max-width: 467px !important; min-height: 50px !important; }
    .mobile-header-ad-area { display: block; }
}

@media (min-width: 768px) {
    .homepage-ad-banner { width: 467px ! important; height: 60px ! important; }
}

@media (max-width: 767px) {
    .ad-slot-header, .ad-slot-in-content, .ad-slot-below-breaking { max-width: 350px !important; min-height: 50px !important; }
}

@media (max-width: 425px) {
    .npl-edit-link { padding: 1px 4px; font-size: 9px; }
}