/* =============================================================================
   Cases e Resultados — Single page
   Scope: .sm-case-single
   Reuses .sm-programa-hero, .sm-programa-content, .sm-projeto-gallery from style.css
   ============================================================================= */

/* ---- Text paragraphs spacing ---- */
.sm-case-text p {
  margin: 0 0 16px !important;
  color: #5f5f5f !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}

.sm-case-text p:last-child {
  margin-bottom: 0 !important;
}

/* ---- Video section ---- */
.sm-case-video {
  padding: 0 0 60px;
}

.sm-case-video__shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.sm-case-video__wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #e9e9e9;
  max-width: 740px;
  margin: 0 auto;
}

.sm-case-video__wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =============================================================================
   RESPONSIVE — MOBILE (≤ 767px)
   ============================================================================= */

/* =============================================================================
   RESPONSIVE — TABLET (≤ 991px)
   ============================================================================= */

@media (max-width: 991px) {
  /* Hero: stack info above media, reduce media aspect-ratio */
  .sm-case-single .sm-programa-hero__media {
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 260px;
    margin: 0 auto;
  }
}

/* =============================================================================
   RESPONSIVE — MOBILE (≤ 767px)
   ============================================================================= */

@media (max-width: 767px) {
  .sm-case-text p {
    font-size: 16px !important;
  }

  .sm-case-video {
    padding: 0 0 40px;
  }

  .sm-case-video__shell {
    padding: 0 16px;
  }

  .sm-case-video__wrap {
    border-radius: 8px;
  }

  /* Gallery section */
  .sm-case-single .sm-projeto-gallery-section {
    padding: 0 0 40px;
  }

  .sm-case-single .sm-projeto-gallery-section__title {
    font-size: 22px;
  }

  .sm-case-single .sm-projeto-gallery__thumbs {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
  }
}

/* =============================================================================
   Cases e Resultados — Archive / Listing
   ============================================================================= */

.sm-cases-archive__section {
  padding: 60px 0 80px;
}

.sm-cases-archive__shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.sm-cases-archive__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.sm-cases-archive__card {
  position: relative;
}

.sm-cases-archive__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.sm-cases-archive__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9e9e9;
  margin-bottom: 16px;
  border-radius: 10px;
}

.sm-cases-archive__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.sm-cases-archive__card:hover .sm-cases-archive__image img {
  transform: scale(1.04);
}

.sm-cases-archive__image-placeholder {
  width: 100%;
  height: 100%;
  background: #e9e9e9;
}

.sm-cases-archive__title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 0 8px !important;
  line-height: 1.3 !important;
}

.sm-cases-archive__excerpt {
  font-size: 14px !important;
  color: #666 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  font-weight: 400 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sm-cases-archive__empty {
  text-align: center;
  color: #888 !important;
  font-size: 16px !important;
  padding: 40px 0;
}

@media (max-width: 991px) {
  .sm-cases-archive__grid {
    gap: 36px 28px;
  }
}

@media (max-width: 767px) {
  .sm-cases-archive__section {
    padding: 40px 0 60px;
  }

  .sm-cases-archive__shell {
    padding: 0 16px;
  }

  .sm-cases-archive__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .sm-cases-archive__title {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .sm-cases-archive__section {
    padding: 32px 0 48px;
  }

  .sm-cases-archive__shell {
    padding: 0 16px;
  }

  .sm-cases-archive__title {
    font-size: 17px !important;
  }

  .sm-cases-archive__excerpt {
    font-size: 13px !important;
  }
}
