/* Section: Casa Reforma */

.casa-reforma {
  width: 100%;
  margin: 0 0 var(--space-xl);
}

.casa-reforma-layout {
  display: grid;
  grid-template-columns: minmax(0, 38%) 34px minmax(0, 1fr);
  align-items: stretch;
}

/* Section: Casa Reforma (featured image) */

.casa-reforma-featured {
  position: relative;
  margin: 0;
  height: 0;
  min-height: 100%;
  align-self: stretch;
  overflow: hidden;
}

.casa-reforma-featured a {
  position: absolute;
  inset: 0;
  display: block;
}

.casa-reforma-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Section: Casa Reforma (vertical divider marquee) */

.casa-reforma-divider {
  position: relative;
  background: var(--black);
  height: 0;
  min-height: 100%;
  align-self: stretch;
  overflow: hidden;
}

.casa-reforma-divider__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.casa-reforma-divider__marquee {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: row;
  width: max-content;
  white-space: nowrap;

  animation: casa-reforma-divider-marquee 28s linear infinite;
}

.casa-reforma-divider__track {
  flex-shrink: 0;
  padding: 0;

  font-family: var(--font-base);
  font-size: var(--font-size-xxs);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;

  color: var(--white);
}

@keyframes casa-reforma-divider-marquee {
  from {
    transform: translate(-50%, -50%) rotate(-90deg) translateX(0);
  }

  to {
    transform: translate(-50%, -50%) rotate(-90deg) translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .casa-reforma-divider__marquee {
    animation: none;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
}

/* Section: Casa Reforma (post list) */

.casa-reforma-list {
  background: var(--beige);
  padding: var(--space-lg) var(--space-lg);
  align-self: start;
}

.casa-reforma-item {
  padding: var(--space-md) 0;
  border-bottom: 2px dotted var(--dark);
}

.casa-reforma-item:first-child {
  padding-top: 0;
}

.casa-reforma-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.casa-reforma-item-title {
  margin: 0 0 var(--space-sm);
}

.casa-reforma-item-title a {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dark);
  transition: opacity var(--transition-fast);
}

.casa-reforma-item-title a:hover {
  opacity: 0.7;
}

.casa-reforma-item-excerpt {
  margin: 0;
  width: 100%;
  max-width: 100%;

  font-family: var(--font-base);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  color: var(--dark);

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Section: Casa Reforma (responsive) */

@media (max-width: 1024px) {
  .casa-reforma-layout {
    grid-template-columns: minmax(0, 42%) 28px minmax(0, 1fr);
  }

  .casa-reforma-list {
    padding: var(--space-md) var(--space-md);
  }

  .casa-reforma-item-title a {
    font-size: var(--font-size-md);
  }
}

@media (max-width: 768px) {
  .casa-reforma-layout {
    grid-template-columns: 1fr;
  }

  .casa-reforma-featured {
    height: auto;
    min-height: 0;
  }

  .casa-reforma-featured a {
    position: relative;
    inset: auto;
    height: 280px;
  }

  .casa-reforma-featured img {
    position: static;
    height: 280px;
  }

  .casa-reforma-divider {
    height: 34px;
    min-height: 34px;
  }

  .casa-reforma-divider__viewport {
    position: relative;
    inset: auto;
    height: 100%;
  }

  .casa-reforma-divider__marquee {
    top: 50%;
    left: 0;
    animation: casa-reforma-divider-marquee-horizontal 22s linear infinite;
  }

  @keyframes casa-reforma-divider-marquee-horizontal {
    from {
      transform: translateY(-50%) translateX(0);
    }

    to {
      transform: translateY(-50%) translateX(-50%);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .casa-reforma-divider__marquee {
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }

  .casa-reforma-list {
    padding: var(--space-lg) var(--container-padding);
  }
}
