/* Portada: galería de publicaciones de Instagram (@contadores.ec).
   Imágenes locales en /assets/img/instagram (la CSP no permite el CDN de Instagram). */
.ig-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.ig-grid > .ig-post { flex: 0 0 calc((100% - 48px) / 4); }
.ig-post {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 14px;
  background: #fff; border: 1px solid var(--crema-borde, #eadfca);
  box-shadow: 0 6px 18px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s;
}
.ig-post img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.ig-post::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(23,23,23,.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC94D' stroke-width='2'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.ig-post.ig-reel::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFC94D'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E");
}
.ig-post:hover, .ig-post:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-card-hover, 0 14px 30px rgba(0,0,0,.14)); }
.ig-post:hover img { transform: scale(1.04); }
.ig-post:focus-visible { outline: 3px solid var(--oro, #F2A900); outline-offset: 2px; }
@media (max-width: 900px) { .ig-grid { gap: 12px; } .ig-grid > .ig-post { flex-basis: calc((100% - 12px) / 2); } }
@media (prefers-reduced-motion: reduce) { .ig-post, .ig-post img { transition: none; } .ig-post:hover, .ig-post:hover img { transform: none; } }
@media print { .ig-home { display: none !important; } }
