/* Instagram-specific styling. */

.ig-body {
  background: white;
  color: #262626;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Top nav */
.ig-topnav {
  background: white;
  border-bottom: 1px solid #dbdbdb;
  position: sticky; top: 49px; z-index: 800;
}
.ig-nav-inner {
  max-width: 975px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 60px;
}
.ig-logo {
  font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
  font-size: 28px;
  font-weight: 400;
}
.ig-search {
  background: #efefef;
  border-radius: 8px;
  padding: 6px 12px;
  width: 268px;
}
.ig-search input {
  background: transparent; border: none; outline: none;
  width: 100%; font: inherit;
}
.ig-nav-icons {
  display: flex; gap: 22px; margin-left: auto;
  align-items: center; font-size: 22px;
}
.ig-nav-icons a { color: #262626; text-decoration: none; cursor: pointer; }
.ig-me-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
}

/* Profile */
.ig-page {
  max-width: 975px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}
.ig-profile {
  display: flex;
  gap: 64px;
  align-items: center;
  padding-bottom: 44px;
}
.ig-profile-avatar {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  position: relative;
  flex-shrink: 0;
}
.ig-profile-avatar::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: white url('brand/dragonfly-logo-square.jpg') center / cover no-repeat;
}
.ig-profile-info { flex: 1; }
.ig-profile-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ig-handle {
  font-size: 20px; font-weight: 400;
  margin: 0 12px 0 0;
}
.ig-btn {
  background: #efefef; border: none;
  padding: 7px 16px; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; color: #262626;
}
.ig-btn:hover { background: #dbdbdb; }
.ig-btn-primary { background: #efefef; }
.ig-btn-icon { padding: 7px 10px; font-size: 16px; }
.ig-profile-stats {
  display: flex; gap: 40px;
  margin-bottom: 20px;
  font-size: 16px;
}
.ig-profile-stats strong { font-weight: 600; }
.ig-profile-bio {
  font-size: 14px;
  line-height: 1.5;
}
.ig-profile-bio strong { font-weight: 600; }
.ig-profile-bio a { color: #00376b; text-decoration: none; font-weight: 500; }

/* Highlights */
.ig-highlights {
  display: flex; gap: 32px;
  padding: 16px 0 32px;
  border-bottom: 1px solid #dbdbdb;
  overflow-x: auto;
}
.ig-highlight {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  flex-shrink: 0;
}
.ig-highlight-circle {
  width: 77px; height: 77px;
  border-radius: 50%;
  background: #fafafa;
  border: 1px solid #dbdbdb;
  display: grid; place-items: center;
  font-size: 28px;
}
.ig-highlight span {
  font-size: 12px; font-weight: 500;
  max-width: 80px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Tabs */
.ig-tabs {
  display: flex; justify-content: center;
  gap: 60px;
  border-bottom: 1px solid #dbdbdb;
  margin-bottom: 4px;
  margin-top: -1px;
}
.ig-tabs a {
  padding: 18px 0;
  border-top: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  color: #8e8e8e;
  text-decoration: none;
  cursor: pointer;
  margin-top: -1px;
}
.ig-tabs a.active {
  color: #262626;
  border-top-color: #262626;
}

/* Grid */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 28px 0;
}
.ig-tile {
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #1a1a1a;
}
.ig-tile-photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
}
.ig-tile-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.ig-tile-badge {
  position: absolute; top: 8px; right: 8px;
  color: white;
  font-size: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  z-index: 1;
}
.ig-tile:hover .ig-tile-overlay { opacity: 1; }
.ig-tile-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  gap: 24px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.ig-tile-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 16px;
  text-align: center;
  color: #fdfcfb;
}
.ig-tile-content::before {
  content: '';
  position: absolute; left: 50%; top: 22%;
  width: 32px; height: 1px;
  background: #ff6b35;
  transform: translateX(-50%);
}
.ig-tile-quote {
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  max-width: 92%;
}
.ig-tile-mark {
  position: absolute; bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 7px; letter-spacing: 2px;
  color: #ff6b35; font-weight: 600;
}
.ig-tile-content.press {
  background: #fdfcfb;
  color: #1a1a1a;
}
.ig-tile-content.press::before { display: none; }
.ig-tile-content.press .ig-tile-mark { color: #1a1a1a; }
.ig-tile-content.photo {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}
.ig-tile-content.photo::before { display: none; }
.ig-tile-photo-icon { font-size: 24px; opacity: 0.5; margin-bottom: 8px; }
.ig-tile-topic {
  font-family: Georgia, serif;
  font-size: 12px;
  color: white;
}
.ig-tile-badge {
  position: absolute; top: 8px; right: 8px;
  color: white;
  font-size: 14px;
}

/* Modal */
.ig-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.ig-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: white; font-size: 24px;
  cursor: pointer;
  padding: 8px;
  z-index: 2;
}
.ig-modal-prev, .ig-modal-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.4);
  border: none;
  color: #262626;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer; padding: 0;
  z-index: 2;
}
.ig-modal-prev { left: 16px; }
.ig-modal-next { right: 16px; }
.ig-modal-card {
  background: white;
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 405px;
  width: 100%; max-width: 1200px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
@media (max-width: 900px) {
  .ig-modal-card {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}
.ig-modal-image {
  position: relative;
  background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  min-height: 400px;
}
.ig-modal-image .image-area {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 5;
}
.ig-modal-photo {
  width: 100%;
  min-height: 300px;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
}
@media (max-width: 900px) {
  .ig-modal-photo { aspect-ratio: 1 / 1; min-height: 0; }
}
.ig-modal-photo::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.ig-photo-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.55);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
  max-width: 75%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}
.ig-photo-overlay {
  position: relative;
  z-index: 1;
  padding: 16px 18px 22px;
  color: white;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.ig-modal-side {
  display: flex; flex-direction: column;
  border-left: 1px solid #dbdbdb;
}
.ig-modal-header {
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid #efefef;
}
.ig-modal-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: white url('brand/dragonfly-logo-square.jpg') center / cover no-repeat;
  border: 2px solid white;
  position: relative;
  flex-shrink: 0;
}
.ig-modal-handle { font-weight: 600; font-size: 14px; }
.ig-modal-handle small { color: #8e8e8e; font-weight: 400; }
.ig-modal-more { margin-left: auto; font-size: 18px; cursor: pointer; }

.ig-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
}
.ig-modal-caption {
  display: flex; gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.ig-modal-caption .ava {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: white url('brand/dragonfly-logo-square.jpg') center / cover no-repeat;
  flex-shrink: 0;
  text-indent: -9999px;
  overflow: hidden;
}
.ig-modal-caption .body strong { font-weight: 600; margin-right: 4px; }
.ig-modal-caption .body { white-space: pre-wrap; }
.ig-modal-time {
  font-size: 10px; color: #8e8e8e;
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-top: 6px;
}
.ig-modal-hashtags {
  font-size: 14px;
  margin: 4px 0 16px;
  word-wrap: break-word;
  line-height: 1.6;
}
.ig-modal-hashtags .ht { color: #00376b; margin-right: 2px; }
.ig-modal-comments-link {
  font-size: 14px;
  color: #8e8e8e;
  margin-bottom: 8px;
}

.ig-modal-actions {
  border-top: 1px solid #efefef;
  padding: 6px 14px 8px;
}
.ig-modal-action-row {
  display: flex; gap: 16px;
  font-size: 24px;
  margin-bottom: 8px;
}
.ig-modal-action-row .save { margin-left: auto; }
.ig-modal-likes { font-weight: 600; font-size: 14px; }
.ig-modal-time-bottom {
  font-size: 10px; color: #8e8e8e;
  text-transform: uppercase; letter-spacing: 0.4px;
  padding: 4px 0;
}
.ig-modal-comment-bar {
  border-top: 1px solid #efefef;
  display: flex;
  padding: 8px 14px;
  align-items: center;
}
.ig-modal-comment-bar input {
  flex: 1; border: none; outline: none;
  font: inherit;
}
.ig-modal-comment-bar .post-btn {
  color: #0095f6; font-weight: 600;
  background: none; border: none; cursor: pointer; opacity: 0.4;
}

/* Carousel dots in modal */
.ig-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px;
  z-index: 1;
}
.ig-carousel-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.ig-carousel-dots span.on { background: white; }
.ig-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none; border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  color: #262626;
}
.ig-carousel-arrow.prev { left: 12px; }
.ig-carousel-arrow.next { right: 12px; }

/* Image area shared (re-declared so this file works standalone) */
.image-area {
  position: relative;
  background: #1a1a1a; color: #fdfcfb;
  padding: 32px 24px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  overflow: hidden;
}
.aspect-191 { aspect-ratio: 1.91 / 1; }
.aspect-45  { aspect-ratio: 4 / 5; }
.aspect-11  { aspect-ratio: 1 / 1; }

.tile-bg::before {
  content: '';
  position: absolute; left: 50%; top: 22%;
  width: 56px; height: 1px; background: #ff6b35;
  transform: translateX(-50%);
}
.tile-quote {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px; line-height: 1.45;
  font-weight: 500;
  max-width: 90%;
}
.aspect-45 .tile-quote { font-size: 26px; }
.tile-mark {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center;
  font-size: 9px; letter-spacing: 3px; color: #ff6b35;
  font-weight: 600;
}
.tile-attr {
  position: absolute; bottom: 16px; right: 16px;
  font-size: 11px; color: #888; font-style: italic;
}
.carousel-cover { background: #0f0f10; }
.carousel-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,107,53,0.95); color: white;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
}
.press-bg { background: #fdfcfb; color: #1a1a1a; }
.press-bg::before { display: none; }
.press-label {
  font-size: 10px; letter-spacing: 3px; color: #ff6b35;
  margin-bottom: 14px; font-weight: 700;
}
.press-content {
  font-family: Georgia, serif;
  font-size: 14px; line-height: 1.5;
  white-space: pre-line;
  max-width: 92%;
}
.press-bg .tile-mark { color: #1a1a1a; }
.photo-bg {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a 70%);
  color: #aaa;
}
.photo-bg::before { display: none; }
.photo-icon { font-size: 36px; opacity: 0.4; margin-bottom: 12px; }
.photo-topic { font-family: Georgia, serif; font-size: 17px; color: #fff; max-width: 90%; }
.photo-note { font-size: 11px; color: #888; margin-top: 10px; font-style: italic; max-width: 80%; }
