/* =========================================
   RayLink Image Styles
   Consistent image treatments across the site
   ========================================= */

/* === Hero Images === */
.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 112, 243, 0.85) 0%,
        rgba(0, 112, 243, 0.4) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-8);
    color: white;
    text-align: center;
}

/* === Card Images === */
.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--color-neutral-100);
}

.card-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
}

/* === Feature Images === */
.feature-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-image:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* === Illustration Styles === */
.illustration {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.illustration-sm {
    max-width: 150px;
}

.illustration-lg {
    max-width: 500px;
}

/* === Empty State === */
.empty-state-illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--space-6);
    opacity: 0.6;
}

/* === Background Images === */
.bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg-image-overlay {
    position: relative;
}

.bg-image-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.bg-image-overlay > * {
    position: relative;
    z-index: 2;
}

/* === Image Grid === */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.image-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.image-grid-item:hover img {
    transform: scale(1.05);
}

/* === Thumbnail Styles === */
.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
}

.thumbnail-sm {
    width: 50px;
    height: 50px;
}

.thumbnail-lg {
    width: 120px;
    height: 120px;
}

/* === Avatar Images === */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--bg-surface);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

/* === Image Loading States === */
.image-loading {
    background: linear-gradient(
        90deg,
        var(--color-neutral-100) 0%,
        var(--color-neutral-200) 50%,
        var(--color-neutral-100) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* === Responsive Image Utilities === */
@media (max-width: 768px) {
    .hero-image-container {
        border-radius: var(--radius-lg);
    }

    .card-image {
        height: 200px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }
}

/* === Attribution Styles === */
.image-attribution {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-2);
    text-align: center;
}

.image-attribution a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.image-attribution a:hover {
    color: var(--text-link-hover);
}
