/* InvexBlog Custom Styles - Harmonized with Invexcam Logo */
:root {
    --primary-color: #e31e24;      /* Rouge du logo */
    --secondary-color: #2c2c2c;    /* Noir du logo */
    --accent-gray: #8c8c8c;        /* Gris du logo */
    --light-gray: #f8f9fa;
    --dark-text: #2c2c2c;          /* Texte en noir du logo */
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(44, 44, 44, 0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
}

/* Footer Styles */
.footer-logo {
    height: 40px;
    width: auto;
}

.text-light-gray {
    color: #b8b8b8 !important;
}

.footer-link {
    color: #ffffff !important;
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

footer hr {
    border-color: #495057;
    opacity: 0.3;
}

.footer-category-badge {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-category-badge:hover {
    background-color: var(--secondary-color) !important;
    color: white !important;
    transform: translateY(-1px);
}

.footer-section-title {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 0.75rem !important;
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navigation - Performance Optimized */
.navbar {
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    min-height: 80px;
    will-change: transform, background-color;
    transform: translateZ(0); /* Hardware acceleration */
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0.25rem 0.5rem rgba(44, 44, 44, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    white-space: nowrap;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    color: var(--secondary-color) !important;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    will-change: transform, color, background-color;
    transform: translateZ(0);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(227, 30, 36, 0.05);
    transform: translateY(-1px);
}

.nav-link i {
    opacity: 0.7;
    transition: var(--transition);
}

.nav-link:hover i {
    opacity: 1;
    color: var(--primary-color) !important;
}

/* Search styling improvements */
.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.15);
}

.input-group .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsive improvements */
@media (max-width: 991.98px) {
    .navbar-brand span {
        font-size: 1.2rem;
    }
    
    .navbar {
        min-height: 70px;
    }
    
    /* Force hide desktop navigation on mobile/tablet */
    .d-none.d-md-flex {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .input-group {
        max-width: 200px !important;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Clean navigation responsive behavior */
@media (min-width: 768px) {
    #mobileNavigation {
        display: none !important;
    }
    
    /* Ensure mobile elements never show on desktop */
    .d-md-none {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    /* Hide desktop navigation on mobile */
    .d-none.d-md-flex {
        display: none !important;
    }
    
    .d-md-flex {
        display: none !important;
    }
    
    /* Mobile search styling */
    .input-group .btn-primary {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
}

/* Dynamic Social Media Widget Styles */
.social-media-bar {
    border-top: 1px solid rgba(227, 30, 36, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.social-media-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 30, 36, 0.1), transparent);
    transition: left 3s ease-in-out;
}

.social-media-bar:hover::before {
    left: 100%;
}

.social-icons {
    position: relative;
    z-index: 2;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #6c757d;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform, color, box-shadow;
    transform: translateZ(0);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    border-color: currentColor;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link:active {
    transform: translateY(-1px) scale(1.05);
}

/* Dynamic platform-specific animations */
.social-link[href*="facebook"]:hover {
    color: #1877f2;
    animation: bounce-facebook 0.6s ease;
}

.social-link[href*="facebook"]:hover::before {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.social-link[href*="x.com"]:hover {
    color: #000000;
    animation: shake-twitter 0.6s ease;
}

.social-link[href*="x.com"]:hover::before {
    background: linear-gradient(135deg, #000000, #424242);
}

.social-link[href*="linkedin"]:hover {
    color: #0077b5;
    animation: pulse-linkedin 0.8s ease;
}

.social-link[href*="linkedin"]:hover::before {
    background: linear-gradient(135deg, #0077b5, #00acc1);
}

.social-link[href*="instagram"]:hover {
    color: #e4405f;
    animation: rotate-instagram 0.6s ease;
}

.social-link[href*="instagram"]:hover::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link[href*="whatsapp"]:hover {
    color: #25d366;
    animation: wiggle-whatsapp 0.6s ease;
}

.social-link[href*="whatsapp"]:hover::before {
    background: linear-gradient(135deg, #25d366, #4caf50);
}

.social-link[href*="mailto"]:hover {
    color: var(--primary-color);
    animation: envelope-bounce 0.6s ease;
}

.social-link[href*="mailto"]:hover::before {
    background: linear-gradient(135deg, var(--primary-color), #f44336);
}

/* Custom animations for each platform */
@keyframes bounce-facebook {
    0%, 20%, 60%, 100% { transform: translateY(-3px) scale(1.1); }
    40% { transform: translateY(-6px) scale(1.15); }
    80% { transform: translateY(-1px) scale(1.08); }
}

@keyframes shake-twitter {
    0%, 100% { transform: translateY(-3px) scale(1.1) rotate(0deg); }
    25% { transform: translateY(-3px) scale(1.1) rotate(-2deg); }
    75% { transform: translateY(-3px) scale(1.1) rotate(2deg); }
}

@keyframes pulse-linkedin {
    0%, 100% { transform: translateY(-3px) scale(1.1); }
    50% { transform: translateY(-3px) scale(1.2); }
}

@keyframes rotate-instagram {
    0% { transform: translateY(-3px) scale(1.1) rotate(0deg); }
    100% { transform: translateY(-3px) scale(1.1) rotate(360deg); }
}

@keyframes wiggle-whatsapp {
    0%, 7%, 14%, 21%, 28%, 35%, 42%, 49%, 56%, 63%, 70%, 77%, 84%, 91%, 98%, 100% {
        transform: translateY(-3px) scale(1.1) rotate(0deg);
    }
    4%, 11%, 18%, 25%, 32%, 39%, 46%, 53%, 60%, 67%, 74%, 81%, 88%, 95% {
        transform: translateY(-3px) scale(1.1) rotate(-3deg);
    }
}

@keyframes envelope-bounce {
    0%, 100% { transform: translateY(-3px) scale(1.1) rotateX(0deg); }
    50% { transform: translateY(-5px) scale(1.15) rotateX(10deg); }
}

/* Social stats tooltip */
.social-link {
    position: relative;
}

.social-link::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.social-link:hover::after {
    opacity: 1;
}

/* Responsive social bar */
@media (max-width: 575.98px) {
    .social-media-bar {
        padding: 0.4rem 0 !important;
    }
    
    .social-link {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-right: 0.5rem !important;
    }
    
    .social-icons .me-3:last-child {
        margin-right: 0 !important;
    }
}

/* Footer Social Media Icons */
.footer-social-icons {
    flex-wrap: wrap;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #6c757d;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.footer-social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.footer-social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    border-color: currentColor;
}

.footer-social-link:hover::before {
    width: 100%;
    height: 100%;
}

/* Footer platform-specific colors and animations */
.footer-social-link[href*="facebook"]:hover {
    color: #1877f2;
    animation: bounce-facebook 0.6s ease;
}

.footer-social-link[href*="facebook"]:hover::before {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.footer-social-link[href*="x.com"]:hover {
    color: #000000;
    animation: shake-twitter 0.6s ease;
}

.footer-social-link[href*="x.com"]:hover::before {
    background: linear-gradient(135deg, #000000, #424242);
}

.footer-social-link[href*="linkedin"]:hover {
    color: #0077b5;
    animation: pulse-linkedin 0.8s ease;
}

.footer-social-link[href*="linkedin"]:hover::before {
    background: linear-gradient(135deg, #0077b5, #00acc1);
}

.footer-social-link[href*="instagram"]:hover {
    color: #e4405f;
    animation: rotate-instagram 0.6s ease;
}

.footer-social-link[href*="instagram"]:hover::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer-social-link[href*="whatsapp"]:hover {
    color: #25d366;
    animation: wiggle-whatsapp 0.6s ease;
}

.footer-social-link[href*="whatsapp"]:hover::before {
    background: linear-gradient(135deg, #25d366, #4caf50);
}

.footer-social-link[href*="mailto"]:hover {
    color: var(--primary-color);
    animation: envelope-bounce 0.6s ease;
}

.footer-social-link[href*="mailto"]:hover::before {
    background: linear-gradient(135deg, var(--primary-color), #f44336);
}

/* Footer tooltips */
.footer-social-link::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-social-link:hover::after {
    opacity: 1;
}

/* Responsive footer social icons */
@media (max-width: 575.98px) {
    .footer-social-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-right: 0.5rem !important;
    }
    
    .footer-social-icons .me-3:last-child {
        margin-right: 0 !important;
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
}

.article-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.bg-secondary {
    background-color: var(--accent-gray) !important;
}

/* Category Filter Buttons */
.category-filter {
    transition: var(--transition);
}

.category-filter.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Search Results */
.search-highlight {
    background-color: rgba(227, 30, 36, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Logo Styling */
.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Header decorative elements */
.navbar .position-absolute {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

/* Header banner styling */
.navbar img[alt="Tech Banner"] {
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 3px rgba(227, 30, 36, 0.2));
}

.navbar img[alt="Tech Banner"]:hover {
    opacity: 1 !important;
    transform: scale(1.02);
}

/* Header decoration small */
.navbar img[alt="Tech Decoration"] {
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(227, 30, 36, 0.3));
}

.navbar img[alt="Tech Decoration"]:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Accent colors for various elements */
.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-outline-secondary {
    color: var(--accent-gray);
    border-color: var(--accent-gray);
}

.btn-outline-secondary:hover {
    background-color: var(--accent-gray);
    border-color: var(--accent-gray);
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Categories page specific styles */
.sidebar-sticky {
    position: sticky;
    top: 20px;
    z-index: 1000;
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.list-group-item-action:hover {
    background-color: rgba(227, 30, 36, 0.1);
    border-color: var(--primary-color);
}

.list-group-item-action.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.list-group-item-action.active .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white;
}

.card-header {
    font-weight: 600;
    font-size: 0.95rem;
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.bg-primary-light {
    background-color: rgba(227, 30, 36, 0.1) !important;
}

.text-primary-dark {
    color: var(--dark-gray) !important;
}

/* Category cards animation */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.15);
    border-color: var(--primary-color);
}

.category-card .card-title a {
    color: var(--dark-gray);
    transition: color 0.3s ease;
}

.category-card:hover .card-title a {
    color: var(--primary-color);
}

.badge-category {
    background-color: rgba(227, 30, 36, 0.1) !important;
    color: var(--primary-color) !important;
    font-weight: 500;
}

/* Responsive design for categories page */
@media (max-width: 768px) {
    .sidebar-sticky {
        position: static;
        margin-bottom: 2rem;
    }
    
    .col-lg-3 {
        order: 2;
    }
    
    .col-lg-9 {
        order: 1;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 0.9rem;
    }
}

/* Widget styling */
.widget-item {
    transition: background-color 0.3s ease;
}

.widget-item:hover {
    background-color: rgba(227, 30, 36, 0.05);
}

.widget-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.popular-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Footer */
footer {
    background-color: var(--primary-color) !important;
}

footer .text-primary {
    color: var(--secondary-color) !important;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.25);
}

/* Comments */
.comment-form {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
}

/* Article Cards Grid */
.article-card {
    transition: var(--transition);
}

.article-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

/* Social Share Buttons */
.btn-facebook {
    background-color: #1877f2;
    border-color: #1877f2;
}

.btn-twitter {
    background-color: #1da1f2;
    border-color: #1da1f2;
}

.btn-linkedin {
    background-color: #0077b5;
    border-color: #0077b5;
}

.btn-whatsapp {
    background-color: #25d366;
    border-color: #25d366;
}

/* Newsletter Form */
#newsletter-form {
    transition: var(--transition);
}

#newsletter-form.loading {
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    footer,
    .btn,
    .social-share {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Media Gallery Styles */
.media-item-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.media-description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4em;
    max-height: 4.2em;
}

/* Enhanced Search Styles */
.search-dropdown {
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: #adb5bd;
}

.search-section-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.search-stats {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef;
}

.article-result:hover,
.category-result:hover,
.suggestion-item:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.2s ease;
}

.article-result.active,
.category-result.active,
.suggestion-item.active {
    background-color: #e3f2fd !important;
}

.search-result-image {
    border: 1px solid #dee2e6;
}

.search-result-placeholder {
    border: 1px solid #dee2e6;
}

.category-indicator {
    border-radius: 2px;
}

.suggestion-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Search highlighting */
mark {
    background-color: rgba(255, 193, 7, 0.5) !important;
    padding: 0 2px;
    border-radius: 2px;
}

/* Loading spinner animation */
@keyframes search-loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border-sm {
    animation: search-loading 1s linear infinite;
}

/* Search input focus enhancement */
input[name="q"]:focus {
    border-color: #e31e24;
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.25);
}

/* Mobile search optimizations */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 300px;
        font-size: 0.9rem;
    }
    
    .search-result-image,
    .search-result-placeholder {
        width: 32px !important;
        height: 32px !important;
    }
}

/* Widget item interactivity */
.widget-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.widget-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px);
}

.widget-item .widget-icon {
    transition: all 0.2s ease;
}

.widget-item:hover .widget-icon {
    transform: scale(1.1);
}

.widget-item .popular-rank {
    transition: all 0.2s ease;
}

.widget-item:hover .popular-rank {
    transform: scale(1.1) rotate(5deg);
}

/* Category card hover effects */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.category-card:hover .btn-outline-primary {
    background-color: #e31e24;
    border-color: #e31e24;
    color: white;
}

/* Hover shadow utility */
.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* News link hover effects */
.widget-item a {
    transition: color 0.2s ease;
}

.widget-item:hover a {
    color: #e31e24 !important;
}

/* Badge category styling */
.badge-category {
    background-color: #e31e24;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}
