.insights {
  width: 100%;
  position: relative;
  background-color: var(--mesana-white);
  z-index: 2;
  margin-top: -1px;
}

.insights-container {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 100px 82px;
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.insights-header-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.insights-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--mesana-cream);
  color: var(--mesana-red);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.insights-title {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 48px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  color: var(--mesana-red);
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.insights-title-highlight {
  font-family: 'PT Serif Regular', sans-serif;
  font-style: italic;
}

.insights-more-link {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--mesana-red);
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.6s ease-in;
  position: relative;
}

/* Underline animation: left -> right */
.insights-more-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.insights-more-link img {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
}

.insights-more-link:hover {
  opacity: 0.7;
}

.insights-more-link:hover::after {
  transform: scaleX(1);
}

/* Fade in header text when revealed */
.insights-header.reveal .insights-badge,
.insights-header.reveal .insights-title,
.insights-header.reveal .insights-more-link {
  opacity: 1;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.insight-card {
  display: flex;
  flex-direction: column;
  background-color: var(--mesana-white);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

/* Reveal state for staggered fade-in */
.insight-card.reveal {
  opacity: 1;
}

.insight-card-image-wrapper {
  width: 100%;
  overflow: hidden;
}

.insight-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--mesana-cream);
  /* background: linear-gradient(135deg, var(--mesana-cream) 0%, var(--mesana-cream-2) 100%); */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.insight-card-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: insightShimmer 1.2s ease-in-out infinite;
  pointer-events: none;
}

.insight-card-image-placeholder img {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.insight-card-image-placeholder.image-loaded::before {
  animation: none;
  opacity: 0;
}

.insight-card-image-placeholder.image-loaded img {
  opacity: 1;
}

@keyframes insightShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.insight-card-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insight-card-content {
  min-height: 240px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  background-color: var(--mesana-cream-2);
  gap: 16px;
}

.insight-card-title {
  font-family: 'Libre Franklin SemiBold', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mesana-black);
  margin: 0;
  width: 70%;
}

.insight-card-description {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--mesana-black);
  width: 70%;
  margin: 0;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insight-card-link {
  font-family: 'Libre Franklin SemiBold', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--mesana-black);
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.3s ease;
  margin-top: auto;
}

.insight-card-link:hover {
  opacity: 0.7;
}

.insights-button-wrapper {
  display: none;
}

.insights-button {
  display: none;
}

@media (max-width: 968px) {
  .insights-container {
    padding: 60px 82px 0;
  }

  .insights-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
}

@media (max-width: 768px) {
  .insights-container {
    padding: 40px 20px;
    padding-bottom: 0;
  }

  .insights-title {
    font-size: 32px;
  }

  .insight-card-link {
    font-size: 12px;
  }

  .insights-header {
    margin-bottom: 32px;
  }

  .insight-card-content {
    min-height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  .insight-card-title {
    width: 100%;
    font-size: 20px;
  }

  .insight-card-description {
    font-size: 12px;
    width: 100%;
  }

  .insights-more-link {
    display: none;
  }

  .insights-header-left {
    gap: 12px;
  }

  .insights-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    grid-column: 1 / -1;
  }

  .insights-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--mesana-white);
    border: 1px solid var(--mesana-red);
    border-radius: 60px;
    padding: 8px 24px;
    height: 38px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
  }

  .insights-button-text {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--mesana-red);
  }
  
}

@media (max-width: 640px) {
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

