/**
 * SimCzech Visual Enhancements v2.0
 * Glassmorphism, card animations, skeleton loading, parallax
 * Doplňuje existující simczech-custom.css
 */

/* ============================================
   CARD HOVER ANIMATIONS
   ============================================ */
.views-row article,
.sc-card,
.node--view-mode-teaser {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}

.views-row article:hover,
.sc-card:hover,
.node--view-mode-teaser:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
              0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--sc-accent, #f59e0b);
}

/* Subtle scale on image hover */
.views-row article img,
.sc-card img,
.node--view-mode-teaser img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.views-row article:hover img,
.sc-card:hover img,
.node--view-mode-teaser:hover img {
  transform: scale(1.05);
}

/* Image container overflow hidden */
.views-row article .field--name-field-image,
.sc-card .field--name-field-image,
.node--view-mode-teaser .field--name-field-image {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.sc-glass {
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

/* Glass sidebar widgets */
.region-sidebar .block-content,
.region-sidebar .block {
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: backdrop-filter 0.3s, background 0.3s;
}

.region-sidebar .block:hover {
  background: rgba(30, 41, 59, 0.8);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.sc-skeleton {
  background: linear-gradient(90deg,
    var(--sc-bg-card, #1e293b) 0%,
    rgba(148, 163, 184, 0.1) 50%,
    var(--sc-bg-card, #1e293b) 100%
  );
  background-size: 200% 100%;
  animation: sc-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.sc-skeleton--image {
  aspect-ratio: 16/9;
  border-radius: 8px;
  margin-bottom: 12px;
}

.sc-skeleton--title {
  height: 1.2em;
  width: 75%;
  margin-bottom: 8px;
}

.sc-skeleton--text {
  height: 0.9em;
  width: 100%;
  margin-bottom: 6px;
}

.sc-skeleton--text:last-child {
  width: 60%;
}

.sc-skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.sc-skeleton--badge {
  width: 60px;
  height: 20px;
  border-radius: 10px;
}

@keyframes sc-skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.sc-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.sc-reveal--delay-1 { transition-delay: 0.1s; }
.sc-reveal--delay-2 { transition-delay: 0.2s; }
.sc-reveal--delay-3 { transition-delay: 0.3s; }
.sc-reveal--delay-4 { transition-delay: 0.4s; }

/* ============================================
   GLOW EFFECTS
   ============================================ */
.sc-glow {
  position: relative;
}

.sc-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(245, 158, 11, 0.3),
    rgba(59, 130, 246, 0.3),
    rgba(245, 158, 11, 0.3)
  );
  background-size: 300% 300%;
  animation: sc-glow-shift 4s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.sc-glow:hover::before {
  opacity: 1;
}

@keyframes sc-glow-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   BADGE & TAG STYLES
   ============================================ */
.sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sc-badge--sim { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.sc-badge--mod { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.sc-badge--tutorial { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.sc-badge--review { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.sc-badge--news { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.sc-badge--blog { background: rgba(236, 72, 153, 0.2); color: #f472b6; }

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.sc-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sc-accent, #f59e0b), #3b82f6);
  z-index: 10001;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================
   TYPE BADGES ON CARDS
   ============================================ */
.sc-card__type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
}

/* ============================================
   STAT COUNTERS
   ============================================ */
.sc-stats-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
}

.sc-stat {
  text-align: center;
  flex: 1;
}

.sc-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sc-accent, #f59e0b);
  font-variant-numeric: tabular-nums;
}

.sc-stat__label {
  font-size: 0.7rem;
  color: var(--sc-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   BREADCRUMB ENHANCEMENT
   ============================================ */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 8px 0;
  font-size: 0.8rem;
}

.breadcrumb li::before {
  content: '›';
  margin-right: 6px;
  color: var(--sc-text-muted, #64748b);
}

.breadcrumb li:first-child::before {
  content: none;
}

.breadcrumb a {
  color: var(--sc-text-muted, #94a3b8);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--sc-accent, #f59e0b);
}

/* ============================================
   SMOOTH FOCUS STYLES
   ============================================ */
:focus-visible {
  outline: 2px solid var(--sc-accent, #f59e0b);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .views-row article,
  .sc-card,
  .sc-reveal,
  .sc-skeleton,
  .sc-glow::before {
    transition: none;
    animation: none;
    transform: none;
    opacity: 1;
  }
}
