/**
 * Insights Block Styles
 *
 * @package UltraLite_BS_ACF
 * @since 1.0.0
 */

.insights-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.insights-container {
  margin: 0 auto;
  border-radius: 32px;
  padding-top: 96px;
  padding-bottom: 96px;
}

/* Section Header */
.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 60px;
  gap: 30px;
}

.insights-header-content {
  flex: 1;
}

.insights-description {
  font-size: 16px;
  color: var(--white);
  margin: 0;
  line-height: 1.6;
  max-width: 600px;
}

.insights-header-action {
  display: flex;
  align-items: center;
}


/* Posts Grid */
.insights-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Post Card */
.insights-post-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--custom-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.insights-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.post-card-image {
  width: 100%;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.post-image {
  width: 100%;
  height: 100%;
  max-height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* .insights-post-card:hover .post-image {
  transform: scale(1.05);
} */

.post-card-content {
  padding: 0 25px 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 20px;
  color: var(--link-color);
}

.post-author,
.post-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-meta-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.post-author .post-meta-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../assets/images/icons/User.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.post-date .post-meta-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../assets/images/icons/Calendar.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.post-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.post-card-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--yellow-color);
  text-decoration: none;
}

.post-card-excerpt {
  margin: 0 0 20px 0;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  transition: color 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
  position: relative;
}

.post-card-link::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('../../assets/images/icons/arrow-right-readmore.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}

.post-card-link:hover::after {
  transform: rotate(-45deg);
}

.post-card-link:hover {
  text-decoration: none;
  color: var(--yellow-color);
  transition: transform 0.3s ease;
}

.no-posts-message {
  grid-column: 1 / -1;
  text-align: center;
  color: white;
  font-size: 18px;
  padding: 40px 0;
}

/* Responsive Design */
@media (max-width: 992px) {
  .insights-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .insights-title {
    font-size: 36px;
  }

  .insights-header {
    flex-direction: column;
  }

  .insights-header-action {
    align-self: flex-start;
  }
}

@media (max-width: 768px) {

  .insights-container {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .insights-section {
    padding: 0;
  }

  .insights-posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .insights-title {
    font-size: 32px;
  }

  .insights-description {
    font-size: 14px;
  }

  .insights-header {
    margin-bottom: 32px;
  }

  .post-card-image {
    height: 200px;
  }

  .insights-header {
    gap: 8px;
  }

  .post-card-content {
    padding: 24px;
  }
  .post-card-title {
    font-size: 20px;
    line-height: 28px;
  }
}

@media (max-width: 576px) {

  .insights-title {
    font-size: 28px;
  }

  .btn-see-more {
    padding: 10px 20px;
    font-size: 14px;
  }

}

/* MOBILE + TABLET HORIZONTAL SCROLL FOR INSIGHTS */
@media (max-width: 768px) {

  /* Make posts scroll horizontally */
  .insights-section .insights-posts-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    gap: 20px;
    padding-left: 0;
    padding-right: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
  }

  /* Hide scrollbar for Chrome/Safari */
  .insights-section .insights-posts-grid::-webkit-scrollbar {
    display: none;
  }

  /* Single card settings */
  .insights-section .insights-post-card {
    flex: 0 0 auto;
    width: 330px;
    max-width: 330px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
  }

  /* Ensure image fits card width */
  .insights-section .insights-post-card .post-card-image img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 175px;
  }

  /* Optional: prevent card hover scaling on mobile */
  .insights-section .insights-post-card:hover {
    transform: none;
  }

  .post-card-meta {
    align-items: flex-start;
    gap: 8px;
  }
}


@media screen and (max-width: 425px) {
  .insights-section .insights-post-card {
    flex: 0 0 auto;
    width: 293px !important;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
  }
  .post-card-meta {
    flex-direction: column !important;
}
}