/* Infographic Theme v1.0.6 — Masonry / natural aspect ratio (Pinterest-style).
   This stylesheet loads after the legacy design styles to override the old
   fixed-aspect 3-column grid without altering global Theme CSS/contracts. */

/* The solutions on the homepage are six compact, readable cards per row. */
.igv-section-services .igv-service-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.igv-section-services .igv-service-card {
  display: block;
  min-width: 0;
  min-height: 162px;
  padding: 13px 11px;
}
.igv-section-services .igv-service-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}
.igv-section-services .igv-service-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
}
.igv-section-services .igv-service-text strong {
  display: block;
  margin-top: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.igv-section-services .igv-service-text small {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.igv-section-services .igv-card-art { display: none; }

/* Infographic Theme 1.0.6 — NO javascript masonry sizing, NO aspect box.
   Native multi-column layout wraps every image at exactly its intrinsic ratio.
   This rule intentionally overrides legacy grid and fixed image backgrounds. */
body.igv-theme .igv-project-grid {
  display: block !important;
  column-count: var(--ifg-columns, 5);
  column-gap: 14px;
  column-fill: balance;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  height: auto !important;
  min-height: 0 !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
}
body.igv-theme .igv-project-grid > .igv-project-card {
  display: inline-block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box;
  vertical-align: top;
  break-inside: avoid;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  overflow: visible;
  transform: none !important;
}
body.igv-theme .igv-project-grid .igv-project-cover {
  display: block !important;
  position: relative;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
/* Both img and source asset have the same aspect ratio. No width/height HTML
   attrs: even stale WordPress metadata cannot force an incorrect ratio. */
body.igv-theme .igv-project-grid .igv-project-cover > img.ifg-original-image,
body.igv-theme .igv-project-grid .igv-project-cover > img {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  transform: none !important;
  vertical-align: top;
  box-shadow: none !important;
}
body.igv-theme .igv-project-grid .igv-project-cover > .igv-graph,
body.igv-theme .igv-project-grid .igv-project-cover > .igv-gallery-placeholder {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
}
body.igv-theme .igv-project-grid .igv-project-details {
  display: block;
  background: transparent !important;
  padding: 6px 0 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
body.igv-theme .igv-project-grid .igv-project-details h3 {
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.4;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
body.igv-theme .igv-project-grid .igv-project-details .igv-meta-tag,
body.igv-theme .igv-project-grid .igv-project-details p,
body.igv-theme .igv-project-grid .igv-project-details > .igv-text-link { display:none; }
body.igv-theme .igv-project-grid > .igv-inline-empty,
body.igv-theme .igv-project-grid > p { width:100%; column-span:all; }
/* Single-project image renders at original aspect ratio, same as listing. */
body.igv-theme .igv-project-gallery .igv-gallery-item {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  line-height: 0;
  overflow: visible !important;
}
body.igv-theme .igv-project-gallery .igv-gallery-item img {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
/* Five desktop columns; four tablet-large; three tablet; two phone. */
@media (max-width:1199px) {
  body.igv-theme .igv-project-grid { column-count:4; }
  .igv-section-services .igv-service-grid {grid-template-columns: repeat(3,minmax(0,1fr));}
}
@media (max-width:950px) {
  body.igv-theme .igv-project-grid { column-count:3; }
}
@media (max-width:680px) {
  body.igv-theme .igv-project-grid {column-count:2;column-gap:10px;}
  body.igv-theme .igv-project-grid > .igv-project-card {margin-bottom:10px !important;}
  .igv-section-services .igv-service-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .igv-section-services .igv-service-card {min-height:154px;}
  body.igv-theme .igv-project-grid .igv-project-details h3 {font-size:10px !important;}
}
@media (max-width:340px) {
  body.igv-theme .igv-project-grid {column-count:1;}
  .igv-section-services .igv-service-grid {grid-template-columns:1fr;}
}
