/* ========================================
        Images and Media Styles
======================================== */

/* Logo Styles */
.site-logo {
width: 200px;
height: 60px;
object-fit: contain;
transition: transform 0.3s ease, filter 0.3s ease;
}

.site-logo:hover {
transform: scale(1.05);
filter: brightness(1.1);
}

/* Hero Banner */
.hero-banner {
width: 100%;
height: auto;
max-height: 400px;
object-fit: cover;
border-radius: var(--radius);
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
margin-bottom: 2rem;
animation: fadeInScale 0.8s ease-out;
}

/* Content Images */
.content-image {
width: 100%;
max-width: 800px;
height: auto;
border-radius: var(--radius);
box-shadow: var(--shadow);
margin: 2rem auto;
display: block;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-hover);
}

/* Feature Images */
.feature-image {
width: 100%;
height: 300px;
object-fit: cover;
border-radius: var(--radius);
margin-bottom: 1.5rem;
filter: brightness(0.95);
transition: filter 0.3s ease, transform 0.3s ease;
}

.feature-image:hover {
filter: brightness(1);
transform: scale(1.02);
}

/* Icon Styles */
.stat-icon {
width: 50px;
height: 50px;
margin-bottom: 1rem;
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
animation: floatAnimation 3s ease-in-out infinite;
}

.inline-icon {
width: 24px;
height: 24px;
vertical-align: middle;
margin-right: 0.5rem;
display: inline-block;
}

/* Image Container */
.image-container {
position: relative;
overflow: hidden;
border-radius: var(--radius);
margin: 2rem 0;
}

.image-container img {
width: 100%;
height: auto;
display: block;
}

.image-caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
color: white;
padding: 1.5rem 1rem 1rem;
font-size: 0.9rem;
transform: translateY(100%);
transition: transform 0.3s ease;
}

.image-container:hover .image-caption {
transform: translateY(0);
}

/* Gallery Grid */
.image-gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.gallery-item {
position: relative;
overflow: hidden;
border-radius: var(--radius);
box-shadow: var(--shadow);
transition: transform 0.3s ease;
}

.gallery-item:hover {
transform: scale(1.05);
}

.gallery-item img {
width: 100%;
height: 200px;
object-fit: cover;
}

/* Split Image Layout */
.split-image-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
align-items: center;
margin: 2rem 0;
}

.split-image-layout img {
width: 100%;
height: auto;
border-radius: var(--radius);
box-shadow: var(--shadow);
}

/* Lazy Loading Placeholder */
.lazy-image {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: loading 1.5s infinite;
}

/* Animations */
@keyframes fadeInScale {
from {
    opacity: 0;
    transform: scale(0.95);
}
to {
    opacity: 1;
    transform: scale(1);
}
}

@keyframes floatAnimation {
0%, 100% {
    transform: translateY(0);
}
50% {
    transform: translateY(-10px);
}
}

@keyframes loading {
0% {
    background-position: 200% 0;
}
100% {
    background-position: -200% 0;
}
}

/* Responsive Images */
@media (max-width: 768px) {
.hero-banner {
    max-height: 250px;
}

.split-image-layout {
    grid-template-columns: 1fr;
}

.feature-image {
    height: 200px;
}

.stat-icon {
    width: 40px;
    height: 40px;
}

.site-logo {
    width: 150px;
    height: 45px;
}
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
.content-image,
.feature-image {
    filter: brightness(0.9);
}

.content-image:hover,
.feature-image:hover {
    filter: brightness(1);
}

.stat-icon {
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.1));
}
}

/* Print Styles */
@media print {
.hero-banner,
.feature-image,
.gallery-item,
.stat-icon {
    display: none;
}

.content-image {
    max-width: 100%;
    page-break-inside: avoid;
}
}

/* Accessibility */
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}

/* Image Error State */
img.error {
position: relative;
min-height: 200px;
background: var(--bg-alt);
display: flex;
align-items: center;
justify-content: center;
}

img.error::after {
content: "Bild konnte nicht geladen werden";
position: absolute;
color: var(--text-light);
font-size: 0.9rem;
}

/* Aspect Ratio Containers */
.aspect-16-9 {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
}

.aspect-16-9 img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}

.aspect-4-3 {
position: relative;
padding-bottom: 75%;
height: 0;
overflow: hidden;
}

.aspect-4-3 img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}

/* Overlay Effects */
.image-overlay {
position: relative;
overflow: hidden;
}

.image-overlay::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, 
    rgba(0, 102, 204, 0.8), 
    rgba(255, 107, 53, 0.8));
opacity: 0;
transition: opacity 0.3s ease;
z-index: 1;
}

.image-overlay:hover::before {
opacity: 0.3;
}