/*
 * Image Visibility Fix for Dark Mode
 * Ensures all images are properly visible
 */

/* GENERAL IMAGE FIXES */
[data-theme="dark"] img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    filter: brightness(0.9) contrast(1.05) !important;
    transition: filter 0.3s ease !important;
}

[data-theme="dark"] img:hover {
    filter: brightness(1) contrast(1.1) !important;
}

/* LOGO IMAGES */
[data-theme="dark"] .navbar-brand img,
[data-theme="dark"] .site-logo img,
[data-theme="dark"] #header-logo {
    filter: brightness(1.1) contrast(1.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
}

/* CAROUSEL IMAGES */
[data-theme="dark"] .carousel img,
[data-theme="dark"] .owl-carousel img,
[data-theme="dark"] .header-carousel img {
    filter: brightness(0.85) contrast(1.15) !important;
}

/* CONTENT IMAGES */
[data-theme="dark"] .about img,
[data-theme="dark"] .service-item img,
[data-theme="dark"] .feature-card img {
    filter: brightness(0.9) contrast(1.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* PROJECT/PORTFOLIO IMAGES */
[data-theme="dark"] .portfolio-item img,
[data-theme="dark"] .media-1 img,
[data-theme="dark"] .project-img {
    filter: brightness(0.9) contrast(1.05) !important;
    transition: all 0.3s ease !important;
}

[data-theme="dark"] .portfolio-item:hover img,
[data-theme="dark"] .media-1:hover img {
    filter: brightness(1) contrast(1.1) !important;
    transform: scale(1.02) !important;
}

/* TEAM IMAGES */
[data-theme="dark"] .team-item img,
[data-theme="dark"] .team-member img {
    filter: brightness(0.95) contrast(1.05) !important;
    border: 3px solid rgba(255, 255, 255, 0.1) !important;
}

/* BLOG/ARTICLE IMAGES */
[data-theme="dark"] .blog-item img,
[data-theme="dark"] .article img {
    filter: brightness(0.9) contrast(1.1) !important;
}

/* BACKGROUND IMAGES */
[data-theme="dark"] .bg-image,
[data-theme="dark"] .hero-bg,
[data-theme="dark"] .section-bg {
    filter: brightness(0.7) contrast(1.2) !important;
}

/* SPECIFIC FIX FOR ABOUT SECTION IMAGE */
[data-theme="dark"] .about .position-absolute img,
[data-theme="dark"] .about .position-relative img {
    filter: brightness(0.95) contrast(1.05) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* FIX FOR MISSING IMAGES - SHOW PLACEHOLDER */
[data-theme="dark"] img[src=""],
[data-theme="dark"] img:not([src]),
[data-theme="dark"] img[src="img/my_recom.png"] {
    background: linear-gradient(135deg, #374151, #4b5563) !important;
    border: 2px dashed rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    min-height: 200px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[data-theme="dark"] img[src=""]:before,
[data-theme="dark"] img:not([src]):before,
[data-theme="dark"] img[src="img/my_recom.png"]:before {
    content: "🖼️ Image" !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1.2rem !important;
}

/* LIGHT MODE IMAGE ADJUSTMENTS */
[data-theme="light"] img {
    filter: none !important;
    opacity: 1 !important;
}

/* RESPONSIVE IMAGE FIXES */
@media (max-width: 768px) {
    [data-theme="dark"] img {
        filter: brightness(0.95) contrast(1.05) !important;
    }
}

/* PRINT MODE - RESET FILTERS */
@media print {
    [data-theme="dark"] img {
        filter: none !important;
    }
}
