/* Complete Header Override - Clean CashKaro Style Layout */

/* Global Font Family Override */
* {
    font-family: Manrope, "Helvetica Neue", "Arial Nova", Helvetica, Arial, sans-serif !important;
}

body,
html,
h1, h2, h3, h4, h5, h6,
p, span, div, a, button, input, textarea, select {
    font-family: Manrope, "Helvetica Neue", "Arial Nova", Helvetica, Arial, sans-serif !important;
}

/* Force complete reset of UIKit navbar */
.tas_nav.uk-navbar-container {
    all: unset !important;
    width: 100% !important;
    padding: 0 24px !important;
    height: 60px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    background: #fff !important;
    box-sizing: border-box !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}

/* Add padding to body to prevent content from hiding under fixed header */
body {
    padding-top: 60px !important;
}

/* Hide default mobile headers - we're using desktop header for all screens */
.tas_mobile_nav,
.tas_mobile_nav_2 {
    display: none !important;
}

/* Modern Preloader Animation */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modern-spinner {
    display: flex;
    gap: 12px;
    align-items: center;
}

.spinner-circle {
    width: 16px;
    height: 16px;
    background: #ed174f;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-circle:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hamburger Menu Icon - Modern 3-line style */
.hamburger-toggle [uk-icon] {
    display: none !important;
}

.hamburger-toggle::before {
    content: '' !important;
    display: block !important;
    width: 26px !important;
    height: 3px !important;
    background: #333 !important;
    box-shadow: 0 8px 0 #333, 0 16px 0 #333 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
}

.hamburger-toggle:hover::before {
    background: #ed174f !important;
    box-shadow: 0 8px 0 #ed174f, 0 16px 0 #ed174f !important;
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: #ed174f;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(237,23,79,0.3);
    z-index: 9999;
    transition: all 0.3s ease;
}

#scrollToTop:hover {
    background: #c91342;
    box-shadow: 0 6px 16px rgba(237,23,79,0.4);
    transform: translateY(-2px);
}

#scrollToTop:active {
    transform: translateY(0);
}

#scrollToTop i {
    font-size: 20px;
    line-height: 1;
}

/* Retina Display Support */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    
    /* Optimize images for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
    
    /* Logo sharpness on retina */
    .tas_nav .uk-logo img {
        image-rendering: -webkit-optimize-contrast !important;
    }
}

/* Navbar Left - Force inline layout */
.tas_nav .uk-navbar-left {
    all: unset !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

/* Hamburger Button - Force inline */
.hamburger-toggle {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    height: 36px !important;
    width: 36px !important;
    color: #333 !important;
    box-sizing: border-box !important;
}

.hamburger-toggle:hover {
    background: #f5f5f5 !important;
    border-radius: 4px !important;
}

.hamburger-toggle [uk-icon] {
    width: 22px !important;
    height: 22px !important;
}

/* Logo - Force inline beside hamburger */
.tas_nav .uk-navbar-item.uk-logo {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 45px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.tas_nav .uk-logo img {
    display: block !important;
    max-height: 45px !important;
    height: 45px !important;
    width: auto !important;
}

/* Search Bar - Center aligned */
.tas_nav .uk-width-expand.search {
    all: unset !important;
    flex: 1 1 auto !important;
    max-width: 450px !important;
    height: 36px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.tas_nav .search .uk-inline {
    width: 100% !important;
    height: 36px !important;
    position: relative !important;
    display: block !important;
}

.tas_nav .search .uk-input {
    width: 100% !important;
    height: 36px !important;
    font-size: 13px !important;
    padding: 0 40px 0 16px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 18px !important;
    background: #f9f9f9 !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
}

.tas_nav .search .uk-input {
    border: 2px solid #ed174f !important;
}

.tas_nav .search .uk-input:focus {
    background: #fff !important;
    border-color: #ed174f !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(237, 23, 79, 0.2) !important;
}

.tas_nav .search .uk-form-icon {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    color: #ed174f !important;
}

.tas_nav .search .uk-form-icon i {
    color: #ed174f !important;
    font-size: 20px !important;
}

/* Navbar Right - Push to end */
.tas_nav .uk-navbar-right {
    all: unset !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

/* Login Button */
.tas_nav .button-header {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 20px !important;
    font-size: 13px !important;
    height: 36px !important;
    line-height: 36px !important;
    white-space: nowrap !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

.tas_nav .button-header i {
    font-size: 14px !important;
}

/* User Profile */
.tas_nav .uk-grid-small {
    all: unset !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

.tas_nav .uk-grid-small > * {
    all: unset !important;
    box-sizing: border-box !important;
}

.tas_nav .uk-grid-small .uk-width-auto {
    display: inline-block !important;
}

.tas_nav .uk-grid-small .uk-width-expand {
    display: inline-block !important;
}

.tas_nav .uk-cover-container {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tas_nav .uk-cover-container canvas {
    width: 32px !important;
    height: 32px !important;
}

.tas_nav .uk-cover-container img {
    width: 32px !important;
    height: 32px !important;
    object-fit: cover !important;
}

.tas_nav h5 {
    font-size: 13px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.tas_nav .uk-comment-meta {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 1px 0 0 0 !important;
    white-space: nowrap !important;
}

/* Remove all UIKit default styles that interfere */
.tas_nav .uk-navbar-item {
    all: unset !important;
    box-sizing: border-box !important;
}

.tas_nav .uk-navbar-nav > li > a {
    all: unset !important;
    box-sizing: border-box !important;
}

/* Responsive */
@media (max-width: 960px) {
    .tas_nav.uk-navbar-container {
        padding: 0 16px !important;
        gap: 12px !important;
    }
    
    .tas_nav .uk-width-expand.search {
        max-width: 350px !important;
    }
}

@media (max-width: 640px) {
    /* Mobile: Two-row layout - Row 1: Hamburger + Logo, Row 2: Search */
    .tas_nav.uk-navbar-container {
        padding: 8px 12px !important;
        height: auto !important;
        min-height: auto !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Row 1: Hamburger + Logo (centered) */
    .tas_nav .uk-navbar-left {
        width: 100% !important;
        height: 40px !important;
        gap: 12px !important;
        justify-content: center !important;
        position: relative !important;
        transition: all 0.3s ease !important;
    }
    
    .tas_nav .hamburger-toggle {
        height: 40px !important;
        width: 40px !important;
        position: absolute !important;
        left: 0 !important;
    }
    
    .tas_nav .uk-navbar-item.uk-logo {
        height: 40px !important;
    }
    
    .tas_nav .uk-logo img {
        max-height: 40px !important;
        height: 40px !important;
    }
    
    /* Row 2: Search bar - Full width */
    .tas_nav .uk-width-expand.search {
        width: 100% !important;
        max-width: 100% !important;
        height: 40px !important;
        margin: 0 !important;
        order: 3 !important;
    }
    
    .tas_nav .search .uk-inline {
        height: 40px !important;
    }
    
    .tas_nav .search .uk-input {
        height: 40px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
        line-height: 40px !important;
    }
    
    .tas_nav .search .uk-form-icon {
        height: 40px !important;
    }
    
    /* Hide login/profile on mobile */
    .tas_nav .uk-navbar-right {
        display: none !important;
    }
    
    /* Sticky state: Show hamburger on left, hide logo, show search with pagination */
    .tas_nav.uk-navbar-container.sticky {
        padding: 8px 12px !important;
        height: 56px !important;
        flex-wrap: nowrap !important;
    }
    
    .tas_nav.uk-navbar-container.sticky .uk-navbar-left {
        width: auto !important;
        justify-content: flex-start !important;
    }
    
    .tas_nav.uk-navbar-container.sticky .hamburger-toggle {
        position: static !important;
    }
    
    .tas_nav.uk-navbar-container.sticky .uk-navbar-item.uk-logo {
        display: none !important;
    }
    
    .tas_nav.uk-navbar-container.sticky .uk-width-expand.search {
        order: 0 !important;
        margin-left: 8px !important;
    }
    
    /* Adjust body padding for mobile */
    body {
        padding-top: 96px !important;
    }
    
    body.sticky-active {
        padding-top: 56px !important;
    }
}
