/* ==============================================
   ENW Shorts Reels — Shorts do Site
   Galeria horizontal de Reels do Instagram
   ============================================== */

.ensr-section {
  --ensr-font: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --ensr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ensr-gap:  14px;

  font-family: var(--ensr-font);
  background: #ffffff;
  padding: 24px 0 32px;
}

/* ═══════════════════════════════════════════
   CABEÇALHO
   ═══════════════════════════════════════════ */
.ensr-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ensr-section-title {
  font-family: var(--ensr-font);
  font-size: 24px;
  font-weight: 900;
  color: #111111;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.ensr-see-more {
  font-family: var(--ensr-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #28a745;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.ensr-see-more:hover { opacity: 0.65; }

/* ═══════════════════════════════════════════
   SCROLL WRAP
   ═══════════════════════════════════════════ */
.ensr-scroll-wrap {
  width: 100%;
}

.ensr-scroll-wrap.is-scrollable {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.ensr-scroll-wrap.is-scrollable::-webkit-scrollbar      { height: 4px; }
.ensr-scroll-wrap.is-scrollable::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.ensr-track {
  display: flex;
  gap: var(--ensr-gap);
  align-items: flex-start;
}

.ensr-scroll-wrap.is-scrollable .ensr-track {
  flex-wrap: nowrap;
  min-width: min-content;
}

/* ═══════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════ */
.ensr-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.ensr-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ═══════════════════════════════════════════
   THUMB — proporção via padding-bottom
   ═══════════════════════════════════════════ */
.ensr-thumb-wrap {
  position: relative;
  width: 100%;
  height: 0;
  background: #1a1a1a;
  overflow: hidden;
  border-radius: 8px;
}

.ensr-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s var(--ensr-ease), opacity 0.25s;
}

.ensr-card:hover .ensr-thumb-img {
  transform: scale(1.04);
  opacity: 0.9;
}

.ensr-thumb-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none; /* clique vai para o link pai */
}

/* Overlay gradiente no rodapé do card */
.ensr-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.1) 45%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* ── Play button ── */
.ensr-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: #ffffff;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  opacity: 0.88;
  transition: opacity 0.2s, transform 0.2s var(--ensr-ease);
  pointer-events: none;
  line-height: 1;
}

.ensr-card:hover .ensr-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.12);
}

/* ── Duração (badge bottom-right) ── */
.ensr-duration {
  position: absolute;
  bottom: 46px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #ffffff;
  font-family: var(--ensr-font);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ── Meta: autor + data (rodapé do card) ── */
.ensr-card-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: none;
}

.ensr-meta-author {
  font-family: var(--ensr-font);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ensr-meta-date {
  font-family: var(--ensr-font);
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── Título abaixo do card ── */
.ensr-card-title {
  font-family: var(--ensr-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #111111;
  margin: 10px 0 0 0;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.ensr-card:hover .ensr-card-title { color: #555555; }

/* ═══════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════ */
.ensr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ensr-lightbox[hidden] { display: none; }

.ensr-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
}

.ensr-lb-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.ensr-lb-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.ensr-lb-close:hover { opacity: 1; }

.ensr-lb-frame-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 177.78%; /* 9:16 */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.ensr-lb-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVO — TABLET
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .ensr-section-title { font-size: 20px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVO — MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 767px) {
  .ensr-section { padding: 20px 0 24px; }
  .ensr-section-title { font-size: 18px; }
  .ensr-duration { font-size: 10px; bottom: 38px; }
  .ensr-meta-author { font-size: 11px; }
  .ensr-meta-date   { font-size: 9px; }
  .ensr-card-title  { font-size: 12px; }

  .ensr-lb-content  { max-width: 90vw; }
}

/* ═══════════════════════════════════════════
   ANIMAÇÃO
   ═══════════════════════════════════════════ */
@keyframes ensr-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ensr-header { animation: ensr-fade-in 0.35s ease both; }
.ensr-card:nth-child(1) { animation: ensr-fade-in 0.4s 0.04s ease both; }
.ensr-card:nth-child(2) { animation: ensr-fade-in 0.4s 0.07s ease both; }
.ensr-card:nth-child(3) { animation: ensr-fade-in 0.4s 0.10s ease both; }
.ensr-card:nth-child(4) { animation: ensr-fade-in 0.4s 0.13s ease both; }
.ensr-card:nth-child(5) { animation: ensr-fade-in 0.4s 0.16s ease both; }
.ensr-card:nth-child(n+6) { animation: ensr-fade-in 0.4s 0.18s ease both; }

@media (prefers-reduced-motion: reduce) {
  .ensr-header, .ensr-card { animation: none !important; }
  .ensr-thumb-img, .ensr-play-btn { transition: none !important; }
}
