/* ============================================
   GND Instagram Feed v2 — Frontend Styles
   Vertical (4:5) portrait grid
   ============================================ */

.gnd-ig-feed {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.gnd-ig-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px;
}
.gnd-ig-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #555;
  margin: 0 0 24px;
}

/* Grid */
.gnd-ig-grid {
  display: grid !important;
  gap: 8px;
}
.gnd-ig-grid.gnd-ig-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.gnd-ig-grid.gnd-ig-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.gnd-ig-grid.gnd-ig-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.gnd-ig-grid.gnd-ig-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* Post item — VERTICAL PORTRAIT */
a.gnd-ig-item,
.gnd-ig-feed .gnd-ig-grid .gnd-ig-item {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  aspect-ratio: 4 / 5 !important;
  width: 100% !important;
  height: auto !important;
  background: #f0f0f0 !important;
  text-decoration: none !important;
  border-radius: 4px;
}

/* Image — absolute fill */
a.gnd-ig-item img,
.gnd-ig-feed .gnd-ig-grid .gnd-ig-item img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* Hide alt text on broken images */
a.gnd-ig-item img { font-size: 0; color: transparent; }

/* Broken image placeholder */
a.gnd-ig-item.gnd-ig-broken,
.gnd-ig-item.gnd-ig-broken {
  background: #e5e5e5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.gnd-ig-item.gnd-ig-broken::after {
  content: "";
  width: 32px; height: 32px; opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

/* Hover */
.gnd-ig-item:hover img { transform: scale(1.05); filter: brightness(0.85); }
.gnd-ig-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 2;
}
.gnd-ig-item:hover .gnd-ig-overlay { opacity: 1; }
.gnd-ig-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border-radius: 50%;
}

/* Focus (WCAG) */
.gnd-ig-item:focus-visible {
  outline: 3px solid #C9A84C; outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(201,168,76,0.3);
}
.gnd-ig-item:focus-visible img { transform: scale(1.05); filter: brightness(0.85); }
.gnd-ig-item:focus-visible .gnd-ig-overlay { opacity: 1; }

/* Follow button */
.gnd-ig-follow { margin-top: 24px; }
.gnd-ig-follow-btn {
  display: inline-block; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: #FFF !important; background: #C9A84C; border: 2px solid #C9A84C;
  border-radius: 4px; padding: 12px 28px; text-decoration: none;
  transition: all 0.25s ease; min-height: 44px;
}
.gnd-ig-follow-btn:hover {
  background: #B8953D; border-color: #B8953D; color: #FFF !important;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.gnd-ig-follow-btn:focus-visible { outline: 3px solid #C9A84C; outline-offset: 2px; }

/* Empty */
.gnd-ig-empty { padding: 40px 20px; background: #F9F9F9; border-radius: 4px; margin-bottom: 20px; }
.gnd-ig-empty p { font-family: 'DM Sans', sans-serif; font-size: 15px; color: #888; margin: 0; }
.gnd-ig-empty a { color: #856B24; font-weight: 600; }

/* Responsive */
@media (max-width: 1024px) {
  .gnd-ig-grid.gnd-ig-cols-6 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 767px) {
  .gnd-ig-grid.gnd-ig-cols-6,
  .gnd-ig-grid.gnd-ig-cols-4,
  .gnd-ig-grid.gnd-ig-cols-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .gnd-ig-title { font-size: 20px; }
  .gnd-ig-follow-btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .gnd-ig-item img, .gnd-ig-overlay, .gnd-ig-follow-btn { transition: none; }
}
