/* Post List Element Styles */

.post-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

.post-list-grid.columns-1 {
  grid-template-columns: 1fr;
}

.post-list-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.post-list-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.post-item {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  border: 1px solid #e5e5e5;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Banner Header */
.post-banner-heading {
  background-color: #0d9eec;
  color: #fff;
  text-align: center;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.heading-title {
  margin: 0;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
}

/* Post Images */
.post-images {
  display: flex;
  flex-direction: row;
  height: auto;
  width: 100%;
}

.post-images img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: none;
}

.post-images.two-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Contact Bar */
.post-contact {
  background-color: #0d9eec;
  padding: 10px 15px;
  color: #fff;
}

.contact-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone, .website {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.phone i, .website i {
  margin-right: 5px;
}

/* Post Content */
.post-title {
  margin: 15px 0 10px;
  padding: 0 15px;
  font-size: 18px;
  font-weight: 700;
}

.post-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: #0d9eec;
}

.post-excerpt {
  padding: 0 15px;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  max-height: 6em; /* Limit height to approximately 4 lines */
  overflow: hidden;
  position: relative;
}

/* Button */
.post-button-wrapper {
  margin-top: auto;
  padding: 0 15px 15px;
  text-align: left;
}

.post-button-wrapper.center {
  text-align: center;
}

.post-button-wrapper.right {
  text-align: right;
}

.post-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background-color: #0d9eec;
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.post-button:hover {
  background-color: #0b84c5;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.post-button i {
  margin-right: 5px;
}

/* Responsive Styles */
@media screen and (min-width: 1200px) {
  .post-list-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 991px) {
  .post-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .heading-title {
    font-size: 20px;
  }
  
  .post-images img {
    height: 140px;
  }
}

@media screen and (max-width: 767px) {
  .post-list-grid {
    grid-template-columns: 1fr;
  }
  
  .heading-title {
    font-size: 18px;
  }
  
  .post-banner-heading {
    min-height: 70px;
  }
  
  .post-images img {
    height: 120px;
  }
  
  .post-contact {
    padding: 8px 12px;
  }
  
  .contact-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .phone {
    margin-bottom: 5px;
  }
  
  .post-title {
    font-size: 16px;
    margin: 12px 0 8px;
  }
  
  .post-excerpt {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    max-height: 5.6em;
  }
  
  .post-button {
    font-size: 13px;
    padding: 6px 15px;
  }
}
