/* Instagram is shared by Home and city pages. Media behaviour lives in
   instagram-videos.js; no page-specific rules or playback overlays are needed. */
#instagram.service-videos {
  margin: 0;
  padding: 48px 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#instagram .service-videos-inner {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
#instagram .ig-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(0 0 0 / 8%);
}
#instagram .ig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #fff;
}
#instagram .ig-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  color: #262626;
  text-decoration: none;
}
#instagram .ig-avatar-wrapper {
  display: flex;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
}
#instagram .ig-avatar {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #fff;
}
#instagram .ig-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#instagram .ig-handle { color: #262626; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#instagram .ig-bio { margin-top: 2px; color: #262626; font-size: 14px; line-height: 1.5; }
#instagram .ig-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; color: #262626; font-size: 15px; line-height: 1.5; }
#instagram .ig-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 24px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #0673bd;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
#instagram .ig-follow:hover { background: #065e9b; color: #fff; }
#instagram .ig-carousel-wrapper { position: relative; width: 100%; background: #fff; }
#instagram .ig-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  cursor: pointer;
}
#instagram .ig-nav:hover { background: #f1f5f9; }
#instagram .ig-nav svg { width: 24px; height: 24px; stroke-width: 2.5; }
#instagram .ig-nav-prev { left: 6px; }
#instagram .ig-nav-next { right: 6px; }
#instagram .service-videos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  box-sizing: border-box;
}
#instagram .service-video-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#instagram .service-video-poster,
#instagram .service-video-item video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}
#instagram .service-video-item video { opacity: 0; transition: opacity .2s ease; }
#instagram .service-video-item video.visible { opacity: 1; }
#instagram .service-videos-instructions {
  margin: 0;
  padding: 10px 16px 16px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
#instagram .service-video-description {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#instagram .service-video-item:focus-visible,
#instagram .ig-nav:focus-visible,
#instagram .ig-follow:focus-visible,
#instagram .ig-left:focus-visible {
  outline: 3px solid #075985;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}
@media (max-width: 650px) {
  #instagram.service-videos { padding: 32px 0; }
  #instagram .ig-header { flex-direction: column; padding: 20px 16px 12px; }
  #instagram .ig-left { flex-direction: column; gap: 12px; text-align: center; }
  #instagram .ig-stats { justify-content: center; gap: 8px 16px; }
  #instagram .ig-follow { width: 100%; }
  #instagram .ig-nav { display: flex; }
  #instagram .service-videos-grid {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1.02;
    overflow: hidden;
    padding: 0;
    touch-action: pan-y;
  }
  #instagram .service-video-item {
    position: absolute;
    width: 74%;
    box-shadow: 0 8px 20px rgb(0 0 0 / 14%);
    transition: transform .3s ease, opacity .3s ease, filter .3s ease;
  }
  #instagram .service-video-item.item-active { z-index: 3; transform: translateX(0); opacity: 1; filter: none; }
  #instagram .service-video-item.item-prev { z-index: 2; transform: translateX(-68%) scale(.85); opacity: .8; filter: brightness(.65); }
  #instagram .service-video-item.item-next { z-index: 2; transform: translateX(68%) scale(.85); opacity: .8; filter: brightness(.65); }
  #instagram .service-video-item.item-hidden { z-index: 1; transform: scale(.6); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  #instagram .service-video-item,
  #instagram .service-video-item video { transition: none; }
}
