/* =========================================================
   Vedic People — Children Display Shortcode Styles
   Supports:
   1. Grid article layout
   2. Horizontal carousel layout
   ========================================================= */


/* =========================================================
   GRID DESIGN
   Matches the article/search-result style
   ========================================================= */

.vp-child-articles {
  width: min(1600px, calc(100vw - 64px));
  margin-left: auto;
  margin-right: auto;
}

.vp-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px 56px;
  margin-top: 28px;
}

@media (max-width: 768px) {
  .vp-results-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.vp-result-card {
  margin: 0;
}

.vp-result-link {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  padding: 6px 2px;
}

.vp-result-link:hover .vp-result-title,
.vp-result-link:focus .vp-result-title {
  color: #5757CE;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vp-result-link:focus {
  outline: 2px solid #5757CE;
  outline-offset: 4px;
}

.vp-result-title {
  color: #111111;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-result-excerpt {
  margin-top: 12px;
  color: #555555;
  font-size: 12pt;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.35em * 3);
}


/* =========================================================
   CAROUSEL DESIGN
   Matches the earlier vp-archive / vp-carousel structure
   ========================================================= */

.vp-archive--shortcode {
  width: 100%;
}

.vp-archive--shortcode .vp-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.vp-archive--shortcode .vp-carousel__item {
  flex: 0 0 280px;
  max-width: 280px;
  scroll-snap-align: start;
}

@media (max-width: 767px) {
  .vp-archive--shortcode .vp-carousel__item {
    flex: 0 0 72%;
    max-width: 72%;
  }
}

.vp-archive--shortcode .vp-carousel::-webkit-scrollbar {
  height: 8px;
}

.vp-archive--shortcode .vp-carousel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}

.vp-archive--shortcode .vp-carousel::-webkit-scrollbar-track {
  background: transparent;
}


/* =========================================================
   CARD
   ========================================================= */

.vp-archive--shortcode .vp-card {
  display: block;
}

.vp-archive--shortcode .page-image-container {
  width: 100%;
}

.vp-archive--shortcode .page-image-container a {
  display: block;
  text-decoration: none;
}

.vp-archive--shortcode .page-featured-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 693 / 979;
  object-fit: cover;
  border-radius: 18px;
}

.vp-archive--shortcode .page-details {
  margin-top: 12px;
}

.vp-archive--shortcode .page-title {
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.25;
  font-weight: 400;
}

.vp-archive--shortcode .page-title a {
  color: #0000EE;
  text-decoration: none;
}

.vp-archive--shortcode .page-title a:hover,
.vp-archive--shortcode .page-title a:focus {
  text-decoration: underline;
}

.vp-archive--shortcode .page-excerpt {
  display: none;
}


/* =========================================================
   FALLBACK WHEN NO FEATURED IMAGE EXISTS
   ========================================================= */

.vp-archive--shortcode .vp-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 693 / 979;
  border-radius: 18px;
  background: linear-gradient(180deg, #d8d8d8 0%, #efefef 100%);
  text-decoration: none;
  padding: 20px;
  text-align: center;
}

.vp-archive--shortcode .vp-no-image__inner {
  color: #222222;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}