/*
Theme Name: Niskarsha News
Theme URI: https://samyogk.com.np
Author: Samyog Khatiwada
Author URI: https://samyogk.com.np
Description: A clean, modern, and minimalistic Nepalese News Portal theme.
Version: 1.0.0
Text Domain: niskarsha-news
*/

/* Breaking News Thumbnail - Main Container */
.breaking-news-thumnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

/* Image Styling */
.breaking-news-thumnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fill container while maintaining aspect ratio */
    object-position: center; /* Center the image */
    transition: all 0.4s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: inherit;
}

/* Lazy Loading Placeholder */
.breaking-news-thumnail img.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Loading Animation */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover Effects */
.breaking-news-thumnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.breaking-news-thumnail:hover img {
    transform: scale(1.05); /* Slight zoom effect */
    filter: brightness(1.1);
}

/* Responsive Breakpoints */

/* Large Desktop (â‰¥ 1200px) */
@media screen and (min-width: 1200px) {
    .breaking-news-thumnail {
        padding-bottom: 56.25%; /* 16:9 */
        min-height: 250px;
    }
    
    .breaking-news-thumnail img {
        min-height: 250px;
    }
}

/* Desktop (992px - 1199px) */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    .breaking-news-thumnail {
        padding-bottom: 60%; /* Slightly taller for desktop */
        min-height: 220px;
    }
    
    .breaking-news-thumnail img {
        min-height: 220px;
    }
}

/* Tablet Large (768px - 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .breaking-news-thumnail {
        padding-bottom: 65%; /* Taller for tablet */
        min-height: 200px;
    }
    
    .breaking-news-thumnail img {
        min-height: 200px;
    }
}

/* Tablet Small (576px - 767px) */
@media screen and (min-width: 576px) and (max-width: 767px) {
    .breaking-news-thumnail {
        padding-bottom: 70%; /* Even taller for small tablets */
        min-height: 180px;
    }
    
    .breaking-news-thumnail img {
        min-height: 180px;
    }
}

/* Mobile Large (480px - 575px) */
@media screen and (min-width: 480px) and (max-width: 575px) {
    .breaking-news-thumnail {
        padding-bottom: 75%;
        min-height: 160px;
    }
    
    .breaking-news-thumnail img {
        min-height: 160px;
    }
}

/* Mobile (â‰¤ 479px) */
@media screen and (max-width: 479px) {
    .breaking-news-thumnail {
        padding-bottom: 80%; /* Tallest for mobile */
        min-height: 140px;
        border-radius: 6px;
    }
    
    .breaking-news-thumnail img {
        min-height: 140px;
    }
    
    /* Reduce hover effects on mobile */
    .breaking-news-thumnail:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .breaking-news-thumnail:hover img {
        transform: scale(1.02);
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .breaking-news-thumnail {
        padding-bottom: 60%;
        min-height: 120px;
    }
    
    .breaking-news-thumnail img {
        min-height: 120px;
    }
}

/* High DPI/Retina Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .breaking-news-thumnail img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .breaking-news-thumnail {
        background-color: #2d3748;
    }
    
    .breaking-news-thumnail img.lazy-load {
        background: linear-gradient(90deg, #4a5568 25%, #2d3748 50%, #4a5568 75%);
    }
}

/* Print Styles */
@media print {
    .breaking-news-thumnail {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .breaking-news-thumnail img {
        max-width: 100%;
        height: auto;
    }
}

/* Focus States for Accessibility */
.breaking-news-thumnail:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Reduced Motion for Users with Motion Sensitivity */
@media (prefers-reduced-motion: reduce) {
    .breaking-news-thumnail,
    .breaking-news-thumnail img {
        transition: none !important;
    }
    
    .breaking-news-thumnail:hover {
        transform: none !important;
    }
    
    .breaking-news-thumnail:hover img {
        transform: none !important;
    }
}

/* Container for Banner Section */
.banner-section {
    margin-bottom: 2rem;
}

.banner-section .breaking-news-thumnail {
    margin-bottom: 1rem;
}

/* Integration with UIKit Grid */
.uk-grid .breaking-news-thumnail {
    margin-bottom: 0;
}

.uk-grid-collapse .breaking-news-thumnail {
    margin-bottom: 0;
}

/* Custom Aspect Ratios for Different Layouts */
.breaking-news-thumnail--portrait {
    aspect-ratio: 3 / 4;
    padding-bottom: 133.33%;
}

.breaking-news-thumnail--square {
    aspect-ratio: 1 / 1;
    padding-bottom: 100%;
}

.breaking-news-thumnail--wide {
    aspect-ratio: 21 / 9;
    padding-bottom: 42.86%;
}

/* Utility Classes */
.breaking-news-thumnail--no-aspect {
    aspect-ratio: unset;
    padding-bottom: 0;
    height: auto;
}

.breaking-news-thumnail--fixed-height {
    height: 200px;
    padding-bottom: 0;
}

.breaking-news-thumnail--contain {
    object-fit: contain;
}

.breaking-news-thumnail--fill {
    object-fit: fill;
}

/* ==========================================
   Red & Blue Minimalistic Theme Overrides
   ========================================== */

/* Main Header Menu overrides */
.main-menu {
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0;
    border-bottom: 3px solid #004b87 !important; /* Royal Blue accent */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Navbar item styling and wrapping fixes */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow: visible !important; /* Remove scrollbars */
    }
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important; /* Align left to keep items close */
        width: auto !important;
        margin: 0 !important;
    }
    .navbar-nav .nav-item {
        white-space: nowrap !important;
        margin-right: 22px !important; /* Consistent, clean spacing between links */
        margin-left: 0 !important;
    }
    .navbar-nav .nav-link {
        font-family: 'Anek Devanagari', 'Mukta', sans-serif !important;
        font-size: 1.25rem !important; /* Slightly bigger font size */
        font-weight: 600 !important; /* Clean semi-bold weight */
        padding: 6px 2px !important;
        color: #2c3e50 !important;
        transition: color 0.15s ease-in-out;
    }
    .navbar-nav .nav-link:hover {
        color: #d90429 !important; /* Crimson Red hover */
    }
}

/* Category Headings */
.category-heading {
    border-bottom: 2px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
    padding-bottom: 5px !important;
}
.category-heading span {
    border-bottom: 3px solid #004b87 !important; /* Blue accent */
    padding-bottom: 5px !important;
    display: inline-block !important;
}
.category-heading span a {
    color: #004b87 !important;
    font-weight: bold !important;
    font-size: 1.25rem !important;
    text-decoration: none !important;
}
.category-heading span a:hover {
    color: #d90429 !important; /* Red hover */
}

/* Custom Ad Spaces */
.ad-space-container {
    padding: 15px 0;
    text-align: center;
    background-color: transparent;
}
.ad-box-banner {
    width: 100%;
    max-width: 970px;
    height: 90px;
    background: #f8f9fa;
    border: 1px dashed #7f8c8d;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.03);
}
.ad-box-banner:hover {
    border-color: #d90429;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.ad-box-text {
    color: #555555;
    font-weight: bold;
    font-family: 'Mukta', sans-serif;
    font-size: 1rem;
}

/* News Title Colors */
a.uk-link, .uk-link {
    color: #004b87 !important;
    transition: color 0.2s ease-in-out;
}
a.uk-link:hover, .uk-link:hover {
    color: #d90429 !important;
}

/* General Layout Accents */
.border-bottom {
    border-bottom: 1px solid #e2e8f0 !important;
}
/* ==========================================
   Anek Devanagari & Dropdown Custom Styles
   ========================================== */



/* Custom Dropdown Hover Trigger */
.nav-item.dropdown {
    position: relative;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 180px;
    padding: 8px 0;
    margin: 0;
    font-size: 1.05rem;
    text-align: left;
    list-style: none;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 20px;
    clear: both;
    font-family: 'Anek Devanagari', 'Mukta', sans-serif !important;
    font-weight: bold !important;
    color: #333333 !important;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: background-color 0.15s, color 0.15s;
}

.dropdown-item:hover {
    color: #ffffff !important;
    background-color: #004b87 !important; /* Blue background on hover */
}

/* Sticky Navbar Logo Casing */
.navbar-sticky-logo-container {
    display: none !important;
    transition: all 0.3s ease;
}

.uk-active .navbar-sticky-logo-container {
    display: block !important;
}

/* Clean, minimalistic borders under category headings */
.category-heading {
    border-bottom: 2px solid #e2e8f0 !important;
}
.category-heading span {
    border-bottom: 3px solid #004b87 !important;
}
.category-heading span a {
    font-family: 'Anek Devanagari', 'Mukta', sans-serif !important;
    font-weight: 700 !important;
}

/* Minimalistic Card Overrides */
.uk-card-default {
    background: #ffffff !important;
    color: #333333 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease-in-out !important;
}
.uk-card-default:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    border-color: #cbd5e1 !important;
}

/* Mobile Offcanvas Menu Typography */
.navbar-category li a {
    font-family: 'Anek Devanagari', 'Mukta', sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #333333 !important;
    transition: color 0.15s ease-in-out;
}
.navbar-category li a:hover {
    color: #d90429 !important;
}

/* Body Primary Font Override to Mukta */
body, p, span, div, h1, h2, h3, h4, h5, h6, a, ul, li {
    font-family: 'Mukta', sans-serif !important;
}

/* Maintain Anek Devanagari for Navigation Elements as requested */
.navbar-nav .nav-link, 
.dropdown-item, 
.navbar-category li a,
.category-heading span a {
    font-family: 'Anek Devanagari', 'Mukta', sans-serif !important;
}


/* ==========================================================================
   WordPress Navigation & Submenu Styles (Parity Resolution)
   ========================================================================== */

/* Strip default list styling and padding from menus */
.navbar-nav, 
.navbar-nav li, 
.navbar-nav .sub-menu, 
.navbar-nav .sub-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Force horizontal layout for navigation bar */
.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Relative positioning for parent list items */
.navbar-nav li {
    position: relative !important;
}

/* Style WordPress nested lists as hover dropdowns */
.navbar-nav .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: none !important;
    z-index: 999 !important;
    min-width: 180px !important;
    padding: 8px 0 !important;
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
}

/* Display sub-menu on hover of parent li */
.navbar-nav li:hover > .sub-menu {
    display: block !important;
}

/* Submenu list items width */
.navbar-nav .sub-menu li {
    width: 100% !important;
}

/* Submenu links styling */
.navbar-nav .sub-menu li a {
    color: #333333 !important;
    display: block !important;
    padding: 8px 16px !important;
    font-family: 'Anek Devanagari', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

/* Hover effect on submenu links */
.navbar-nav .sub-menu li a:hover {
    background: #f8f9fa !important;
    color: #004b87 !important;
}


/* ==========================================================================
   Brute-Force Reset for bullet points and vertical alignment (Parity Fix)
   ========================================================================== */

header ul, 
header li, 
header a,
.navbar-container ul, 
.navbar-container li, 
.navbar-container a {
    list-style: none !important;
    list-style-type: none !important;
    text-decoration: none !important;
}

/* Force flex row layout for primary menus */
.navbar-container ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Parent elements layout context */
.navbar-container ul li {
    position: relative !important;
    list-style: none !important;
}

/* Absolute positioning for submenus / nested lists */
.navbar-container ul li ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: none !important;
    z-index: 9999 !important;
    min-width: 180px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
    flex-direction: column !important; /* Stack vertically inside dropdowns */
    list-style: none !important;
}

/* Trigger display dropdown on hover */
.navbar-container ul li:hover > ul {
    display: flex !important;
}

/* Inner dropdown items styling */
.navbar-container ul li ul li {
    width: 100% !important;
    display: block !important;
    list-style: none !important;
}

/* Inner dropdown item links formatting */
.navbar-container ul li ul li a {
    color: #333333 !important;
    display: block !important;
    padding: 8px 16px !important;
    font-family: 'Anek Devanagari', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    background: transparent !important;
    text-align: left !important;
}
.navbar-container ul li ul li a:hover {
    background: #f8f9fa !important;
    color: #004b87 !important;
}


/* ==========================================================================
   Anek Devanagari White Spaced Menu Bar Style Overrides
   ========================================================================== */

/* Spacing and White text for Primary Menu Links */
.navbar-container a,
.navbar-container ul li a,
.navbar-container ul.navbar-nav li a,
.navbar-container ul.navbar-nav a,
header nav a,
header nav ul li a {
    font-family: 'Anek Devanagari', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.18rem !important;
    color: #ffffff !important;
    padding: 12px 18px !important; /* Spacing between links */
    display: block !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

/* Hover highlight on primary items */
.navbar-container a:hover,
.navbar-container ul li a:hover,
.navbar-container ul.navbar-nav li a:hover,
header nav a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure sub-menu items remain dark gray text for readability on white background */
.navbar-container ul li ul li a,
.navbar-container ul.navbar-nav ul li a,
.navbar-container ul.sub-menu li a,
.navbar-container .sub-menu a,
header nav ul.sub-menu li a {
    color: #333333 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    background: transparent !important;
    background-color: transparent !important;
    display: block !important;
}

/* Hover highlights for dropdown submenu items */
.navbar-container ul li ul li a:hover,
.navbar-container ul.navbar-nav ul li a:hover,
.navbar-container ul.sub-menu li a:hover,
.navbar-container .sub-menu a:hover {
    background-color: #f8f9fa !important;
    color: #004b87 !important;
}


/* ==========================================================================
   Chevron Dropdown Indicators and Scroll Sticky Logo Controls
   ========================================================================== */

/* Add dynamic down arrow indicators to parent menu items */
.navbar-container ul li.menu-item-has-children > a:after,
.navbar-nav li.menu-item-has-children > a:after {
    content: " ▾" !important;
    font-size: 0.85rem !important;
    display: inline-block !important;
    margin-left: 5px !important;
    vertical-align: middle !important;
    color: inherit !important;
}

/* Hide sticky logo by default */
.navbar-sticky-logo-container {
    display: none !important;
}

/* Display sticky logo only when sticky navigation bar is active */
.uk-active .navbar-sticky-logo-container {
    display: block !important;
}
