/* ============================================
   IMAGE STYLES FOR PRONOSTIC LYON
   ============================================ */

img{max-width: 100%;height: auto;}

/* Base Image Container Styles */
.image-container {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-hover);
}

/* Image Base Styles */
.content-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-container:hover .content-image {
    transform: scale(1.05);
}

/* Image Overlay Effect */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(218, 30, 40, 0) 0%,
        rgba(218, 30, 40, 0.3) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* Hero Banner Specific */
.hero-image-container {
    border-radius: 0 0 12px 12px;
    max-height: 480px;
    overflow: hidden;
}

.hero-image-container .content-image {
    object-position: center 30%;
    min-height: 300px;
}

/* Tactical Analysis Image */
.tactical-image {
    max-width: 100%;
    border: 3px solid var(--primary);
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 1rem;
}

/* Statistics Dashboard Image */
.stats-image-container {
    margin: 2rem 0 3rem 0;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

/* Betting Types Illustration */
.betting-types-image {
    float: right;
    max-width: 45%;
    margin: 0 0 1.5rem 2rem;
    shape-outside: margin-box;
}

/* Stadium Image - Full Width */
.stadium-image-container {
    margin: 3rem -2rem;
    border-radius: 0;
    max-height: 500px;
}

.stadium-image-container .content-image {
    object-position: center;
}

/* Derby/Confrontations Image */
.derby-image-container {
    position: relative;
    margin: 2rem 0;
    border: 4px solid var(--primary);
}

.derby-image-container::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--gradient);
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.derby-image-container:hover::before {
    opacity: 0.3;
}

/* Image Caption */
.image-caption {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.75rem;
    padding: 0 1rem;
}

/* Loading Animation */
.content-image {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-card) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: imageLoading 1.5s ease-in-out infinite;
}

@keyframes imageLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.content-image[src] {
    animation: none;
    background: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .betting-types-image {
        float: none;
        max-width: 100%;
        margin: 2rem 0;
    }
    
    .stadium-image-container {
        margin: 2rem -1rem;
    }
}

@media (max-width: 768px) {
    .hero-image-container {
        max-height: 300px;
    }
    
    .stadium-image-container {
        margin: 2rem 0;
        max-height: 350px;
    }
    
    .image-container {
        margin: 1.5rem 0;
    }
    
    .stats-image-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        max-height: 250px;
    }
    
    .hero-image-container .content-image {
        min-height: 200px;
    }
    
    .stadium-image-container {
        max-height: 250px;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .tactical-image {
        background: var(--bg-card);
        border-color: var(--primary);
    }
    
    .stats-image-container {
        background: var(--bg-card);
        border-color: var(--border);
    }
    
    .image-overlay {
        background: linear-gradient(
            180deg,
            rgba(255, 77, 79, 0) 0%,
            rgba(255, 77, 79, 0.2) 100%
        );
    }
}

/* Accessibility */
.content-image:focus {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Print Styles */
@media print {
    .image-container {
        break-inside: avoid;
        box-shadow: none;
    }
    
    .content-image {
        max-height: 400px;
    }
}