/*
 * CasaRinaldi How To
 * Dedicated Bud entry: how-to
 */

.page-template-template-how-to .hero,
.cr-how-to-listing .hero {
  margin-bottom: 0 !important;
}

.how-to-listing {
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.how-to-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 1.5rem;
}

.how-to-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  background: #fff;
}

.how-to-card__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f2f2f2;
}

.how-to-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease-in-out;
}

.how-to-card:hover .how-to-card__media img {
  transform: scale(1.08);
}

.how-to-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #f2f2f2;
}

.how-to-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 1.5rem;
}

.how-to-card__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
}

.how-to-card__title a {
  color: inherit;
  text-decoration: none;
}

.how-to-card__excerpt {
  margin: 0 0 2rem;
}

.how-to-card__read-more {
  margin-top: auto;
  align-self: flex-start;
}

.how-to-empty {
  padding: 3rem 0 5rem;
}

.how-to-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.how-to-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.how-to-pagination .page-numbers li {
  list-style: none;
}

.how-to-pagination a,
.how-to-pagination span {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #9ca3af;
  border-radius: 9999px;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.how-to-pagination .current {
  border-color: #a87848;
  background: #a87848;
  color: #fff;
}

.cr-how-to-single {
  background: #fff;
}

.cr-how-to-single .entry-content {
  padding-right: 2rem;
  padding-left: 2rem;
}

.cr-how-to-single .entry-content p {
  margin-bottom: 2rem;
}

.cr-how-to-single .entry-content img {
  width: 100%;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.cr-how-to-single .entry-content h2,
.cr-how-to-single .entry-content h3,
.cr-how-to-single .entry-content h4 {
  font-weight: 700;
  line-height: 1.25;
}

.cr-how-to-single .entry-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.cr-how-to-single .entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  font-size: 1rem;
}

.cr-how-to-single .entry-content h4 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.cr-how-to-single .entry-content > h2:first-child,
.cr-how-to-single .entry-content > h3:first-child,
.cr-how-to-single .entry-content > h4:first-child {
  margin-top: 0;
}

.cr-how-to-single .entry-content ol,
.cr-how-to-single .entry-content ul {
  margin-bottom: 2rem;
  padding-left: 1rem;
  list-style-type: inherit;
}

.cr-how-to-single .entry-content ol {
  list-style-type: decimal;
}

.cr-how-to-single .entry-content li + li {
  margin-top: 0.35rem;
}

@media (min-width: 768px) {
  .how-to-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how-to-card__content {
    padding: 2rem;
  }

  .cr-how-to-single .entry-content {
    padding-right: 120px;
    padding-left: 120px;
  }

  .cr-how-to-single .entry-content img {
    width: 560px;
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .cr-how-to-single .entry-content img.alignright {
    float: right;
    clear: left;
    margin-right: -120px;
    padding-left: 3rem;
  }

  .cr-how-to-single .entry-content img.alignleft {
    float: left;
    clear: right;
    margin-left: -120px;
    padding-right: 3rem;
  }
}

@media (min-width: 1024px) {
  .how-to-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 2rem;
  }
}

@media (min-width: 1280px) {
  .cr-how-to-single .entry-content {
    padding-right: 320px;
    padding-left: 320px;
  }

  .cr-how-to-single .entry-content img.alignright {
    margin-right: -320px;
  }

  .cr-how-to-single .entry-content img.alignleft {
    margin-left: -320px;
  }
}
