/* ═══════════════════════════════════════════════════════════════════════════
   Hero Explode Widget — Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & box model ───────────────────────────────────────────────────── */
.hew-wrapper *,
.hew-wrapper *::before,
.hew-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.hew-wrapper {
  position: relative;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hew-hero-section {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;                /* overridable via Elementor control */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay */
.hew-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 1;
}

/* ── Tile mosaic container ───────────────────────────────────────────────── */
.hew-tiles-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Individual tiles (created by JS) */
.hew-tile {
  position: absolute;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  transform-origin: center center;
}

/* ── Hero text content ───────────────────────────────────────────────────── */
.hew-hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 2rem;
  max-width: 860px;
  pointer-events: none;
}

.hew-hero-title {
  font-family: 'Georgia', serif;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.2rem;
}

.hew-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 2.5rem;
}

/* ── Scroll indicator ────────────────────────────────────────────────────── */
.hew-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: hew-bounce 2s ease-in-out infinite;
  pointer-events: none;
}

.hew-scroll-indicator span {
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.6);
}

.hew-scroll-indicator svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.7);
}

@keyframes hew-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL SPACER (gives room for the sticky animation to play)
   ═══════════════════════════════════════════════════════════════════════════ */
.hew-scroll-spacer {
  height: 200vh;
  position: relative;
  z-index: 5;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLES SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hew-articles-section {
  position: relative;
  z-index: 20;
  background: #f5f5f7;
  padding: 80px 40px 100px;
}

.hew-articles-header {
  text-align: center;
  margin-bottom: 48px;
}

.hew-articles-title {
  font-family: 'Georgia', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #1a1a2e;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.hew-grid {
  display: grid;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.hew-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.hew-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.hew-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .hew-grid-cols-3,
  .hew-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hew-grid { grid-template-columns: 1fr; }
  .hew-articles-section { padding: 60px 20px 80px; }
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.hew-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(40px);
}

.hew-card.hew-card--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.hew-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Thumbnail */
.hew-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e0e0e0;
}

.hew-card-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.hew-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hew-card:hover .hew-card-thumb img {
  transform: scale(1.06);
}

.hew-card-thumb--placeholder {
  background: linear-gradient(135deg, #ddd 0%, #bbb 100%);
}

/* Card body */
.hew-card-body {
  padding: 20px 22px 24px;
}

.hew-card-date {
  display: block;
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hew-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.hew-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.hew-card-title a:hover { color: #6c63ff; }

.hew-card-excerpt {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
}

.hew-card-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c63ff;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: gap 0.2s;
}

.hew-card-link:hover { color: #4f46e5; }

/* ── No posts ─────────────────────────────────────────────────────────────── */
.hew-no-posts {
  text-align: center;
  color: #888;
  padding: 40px;
  grid-column: 1 / -1;
}
