/* Product Card Image Styles */
.product-card .product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--secondary);
}

.product-card .product-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.15);
}

.product-card .product-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.85) 0%, rgba(5, 150, 105, 0.4) 100%);
    transition: opacity 0.3s ease;
}

.product-card:nth-child(2) .product-image-overlay {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.85) 0%, rgba(124, 58, 237, 0.4) 100%);
}

.product-card:nth-child(3) .product-image-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 58, 95, 0.5) 100%);
}

.product-card:nth-child(4) .product-image-overlay {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85) 0%, rgba(217, 119, 6, 0.4) 100%);
}

.product-card .product-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    color: white;
    opacity: 0.95;
    transition: var(--transition-bounce);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.product-card:hover .product-icon {
    transform: scale(1.25) rotate(5deg);
}

.product-card .product-header h3 {
    font-size: 24px;
}

/* Background Images for Sections */
.section-bg-image {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}

.section-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.85) 50%, rgba(248, 250, 252, 0.95) 100%);
    z-index: 0;
}

.section-bg-image > * {
    position: relative;
    z-index: 1;
}

/* Features with Background */
.features.section-bg-image {
    background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&q=80');
}

/* Testimonials with Background */
.testimonials.section-bg-image {
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80');
}

.testimonials.section-bg-image::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.9) 50%, rgba(15, 23, 42, 0.95) 100%);
}

.testimonials.section-bg-image .section-title,
.testimonials.section-bg-image .section-tag,
.testimonials.section-bg-image .section-desc {
    color: white;
}

.testimonials.section-bg-image .testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
}

/* Products with Background */
.products.section-bg-image {
    background-image: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80');
}

/* Contact with Background */
.contact-section.has-bg {
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}

.contact-section.has-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.85) 100%);
    z-index: 0;
}

.contact-section.has-bg > * {
    position: relative;
    z-index: 1;
}

/* Hero Section Enhanced */
.hero-enhanced {
    position: relative;
    overflow: hidden;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, transparent 50%),
        url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?w=1920&q=80') center/cover;
    opacity: 0.15;
    z-index: 0;
}

/* CTA with Background */
.cta-enhanced {
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Floating Cards Effect */
.floating-cards {
    perspective: 1000px;
}

.floating-cards .card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.floating-cards .card-3d:hover {
    transform: translateY(-10px) rotateX(2deg);
}

/* Gradient Overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Parallax Backgrounds */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Image Frames */
.image-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: var(--transition-bounce);
}

.image-frame:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Split Section with Image */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.split-section .split-image {
    height: 100%;
    min-height: 500px;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .split-section {
        grid-template-columns: 1fr;
    }
    
    .split-section .split-image {
        min-height: 300px;
    }
}

/* Testimonial Avatar Images */
.testimonial-card .author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    transition: var(--transition-bounce);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
    flex-shrink: 0;
}

.testimonial-card .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card:hover .author-avatar {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.45);
}

/* Hide initials when image is present */
.testimonial-card .author-avatar img + * {
    display: none;
}

/* Hero Section with Image */
.hero.has-image .hero-content {
    max-width: 580px;
}

.hero-image-container {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 440px;
    height: 440px;
    z-index: 1;
    animation: hero-image-float 8s ease-in-out infinite;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(5, 150, 105, 0.2);
}

@keyframes hero-image-float {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-58%); }
}

/* CTA Section Background Image */
.cta-section.has-bg-image {
    background: 
        linear-gradient(135deg, rgba(5, 150, 105, 0.92) 0%, rgba(4, 120, 87, 0.95) 100%),
        url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80') center/cover;
}

/* Stats Section with Background */
.stats-section.has-bg-image {
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 95, 0.95) 100%),
        url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80') center/cover;
}

/* Image Loading Animation */
@keyframes image-load {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.product-card .product-image img,
.testimonial-card .author-avatar img,
.hero-image-container img {
    animation: image-load 0.8s ease-out;
}

/* Lazy Loading Placeholder */
.product-image.loading {
    background: linear-gradient(90deg, var(--surface-alt) 0%, var(--border-light) 50%, var(--surface-alt) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
