/* images-styles.css — Tennis Heute Image Styles */

/* Hero Image Styles */
[data-content="hero"] figure {
  margin-top: 2rem;
  max-width: var(--max-width-content);
}

[data-content="hero"] .hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

[data-content="hero"] figcaption {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 0.75rem;
}

/* Article Images */
figure {
  margin: 2rem 0;
  max-width: 100%;
}

.article-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  aspect-ratio: 800 / 450;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

figcaption {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
  line-height: 1.5;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .article-image {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .article-image:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }

  [data-content="hero"] .hero-image {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  figure {
    margin: 1.5rem 0;
  }

  .article-image {
    border-radius: 4px;
  }

  figcaption {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }

  [data-content="hero"] figure {
    margin-top: 1.5rem;
  }

  [data-content="hero"] .hero-image {
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  }
}

@media (max-width: 480px) {
  figure {
    margin: 1rem 0;
  }

  figcaption {
    font-size: 0.75rem;
  }

  [data-content="hero"] .hero-image {
    border-radius: 4px;
  }
}

/* Loading state for lazy-loaded images */
.article-image[loading="lazy"] {
  background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-border) 50%, var(--color-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.article-image[loading="lazy"].loaded {
  animation: none;
  background: none;
}

/* Print styles */
@media print {
  .article-image,
  [data-content="hero"] .hero-image {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  figure {
    page-break-inside: avoid;
  }
}
