/* Instagram-style social media project page (see includes/social-feed-layout.php) */
.sfeed {
  --sf-ink: #fff;
  --sf-dim: rgba(255, 255, 255, 0.7);
  --sf-glass: rgba(34, 26, 22, 0.72);
  --sf-line: rgba(255, 255, 255, 0.12);
  --sf-card: #1e1916;
  position: relative;
  isolation: isolate;
  padding: 140px 0 90px;
  color: var(--sf-ink);
  font-family: var(--site-font-family, "Gilroy", Helvetica, Arial, sans-serif);
  overflow: hidden;
}

/* blurred, warm copy of the hero photo behind everything, like the reference */
.sfeed__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sfeed-bg) center / cover no-repeat;
  filter: blur(60px) saturate(1.2) brightness(0.55);
  transform: scale(1.2);
}

.sfeed__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 15, 17, 0) 0%, rgba(14, 15, 17, 0.4) 55%, #0e0f11 100%);
}

.sfeed__wrap {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}

.sfeed svg,
.sfeed__box svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- top panel: hero + profile ---------- */
.sfeed__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sf-glass);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sfeed__hero {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.sfeed__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  animation: sfeed-zoom 14s ease-out both;
}

.sfeed__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 8, 6, 0.55) 0%, rgba(10, 8, 6, 0) 22%),
    linear-gradient(90deg, rgba(10, 8, 6, 0.65) 0%, rgba(10, 8, 6, 0.15) 60%),
    linear-gradient(0deg, rgba(10, 8, 6, 0.85) 0%, rgba(10, 8, 6, 0) 40%);
}

@keyframes sfeed-zoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.sfeed__hero-top,
.sfeed__hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
}

.sfeed__brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sfeed__icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  transition: background-color 0.2s ease;
}

.sfeed__icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.sfeed__hero-copy {
  padding: 0 26px;
}

.sfeed__title {
  max-width: 640px;
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  animation: sfeed-up 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.sfeed__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  animation: sfeed-up 0.8s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.sfeed__chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--sf-dim);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sfeed__chip:hover {
  color: #fff;
}

.sfeed__chip-dot {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 16px;
}

.sfeed__chip-dot--ring::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

@keyframes sfeed-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.sfeed__hero-bar {
  border-top: 1px solid var(--sf-line);
  background: rgba(20, 16, 14, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sfeed__faces {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sfeed__faces img,
.sfeed__faces-more {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.sfeed__faces-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

.sfeed__where {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sf-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sfeed__where-pin {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 15px;
  color: #fff;
}

/* profile column */
.sfeed__side {
  display: flex;
  flex-direction: column;
  padding: 34px 0 22px;
  border-left: 1px solid var(--sf-line);
}

.sfeed__profile {
  margin: 0 26px 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sf-line);
  text-align: center;
}

.sfeed__avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.sfeed__name {
  margin: 0 0 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.sfeed__role {
  margin: 0;
  color: var(--sf-dim);
  font-size: 14px;
}

.sfeed__label {
  margin: 0 26px 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sfeed__menu {
  display: flex;
  flex-direction: column;
}

.sfeed__menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sfeed__menu-item svg {
  font-size: 17px;
  flex: 0 0 auto;
}

.sfeed__menu-item span {
  flex: 1 1 auto;
}

.sfeed__menu-item em {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.sfeed__menu-item:hover,
.sfeed__menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}

.sfeed__menu-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sfeed__follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  margin: auto 26px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.sfeed__follow svg {
  font-size: 17px;
}

.sfeed__follow:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ---------- about ---------- */
.sfeed__about {
  max-width: 820px;
  margin: 46px auto 0;
  color: var(--sf-dim);
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

.sfeed__about p {
  margin: 0 0 12px;
}

/* ---------- reels strip ---------- */
.sfeed__reels {
  margin-top: 56px;
  scroll-margin-top: 110px;
}

.sfeed__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sfeed__row-title {
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
}

.sfeed__row-nav {
  display: flex;
  gap: 10px;
}

.sfeed__round {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sfeed__round:hover,
.sfeed__round:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  outline: none;
}

.sfeed__reel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 5 * 18px) / 5.5);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.sfeed__reel-track::-webkit-scrollbar {
  display: none;
}

.sfeed__reel {
  position: relative;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sf-card);
  scroll-snap-align: start;
  cursor: pointer;
}

.sfeed__reel img,
.sfeed__reel iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.sfeed__reel img {
  transition: transform 0.5s ease;
}

.sfeed__reel:hover img {
  transform: scale(1.05);
}

.sfeed__reel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
}

.sfeed__reel.is-playing::after,
.sfeed__reel.is-playing .sfeed__play,
.sfeed__reel.is-playing .sfeed__reel-title {
  display: none;
}

.sfeed__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 22px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.sfeed__reel:hover .sfeed__play {
  background: rgba(0, 0, 0, 0.65);
  transform: translate(-50%, -50%) scale(1.08);
}

.sfeed__reel-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

/* ---------- post grid ---------- */
.sfeed__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  margin-top: 56px;
  scroll-margin-top: 110px;
}

.sfeed__card {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sf-card);
  color: #fff;
  text-align: left;
  cursor: pointer;
  animation: sfeed-up 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sfeed__card--wide {
  grid-column: span 2;
  /* two 4:5 columns plus the gap ≈ 33:20, so it matches its neighbours and a row of only wide cards keeps its height */
  aspect-ratio: 33 / 20;
}

.sfeed__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sfeed__card:hover img,
.sfeed__card:focus-visible img {
  transform: scale(1.06);
}

.sfeed__card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sfeed__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 42%), linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 22%);
  pointer-events: none;
}

.sfeed__badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sfeed__badge svg {
  font-size: 15px;
}

.sfeed__card-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sfeed__card-title {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.15;
}

.sfeed__card-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sfeed__card.is-hidden {
  display: none;
}

.sfeed__footnote {
  margin: 60px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  text-align: center;
}

/* ---------- lightbox ---------- */
.sfeed__box {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  font-family: var(--site-font-family, "Gilroy", Helvetica, Arial, sans-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 60px 20px;
  background: rgba(8, 7, 6, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sfeed__box[hidden] {
  display: none;
}

.sfeed__box-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sfeed__box-fig img {
  max-width: min(86vw, 640px);
  max-height: calc(100vh - 170px);
  border-radius: 12px;
  object-fit: contain;
  animation: sfeed-up 0.35s ease both;
}

.sfeed__box-fig figcaption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: #fff;
  font-size: 16px;
}

.sfeed__box-fig em {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-style: normal;
}

.sfeed__box-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.sfeed__box.is-single .sfeed__box-prev,
.sfeed__box.is-single .sfeed__box-next {
  visibility: hidden;
}

/* ---------- smaller screens ---------- */
@media (max-width: 991px) {
  .sfeed__panel {
    grid-template-columns: 1fr;
  }

  .sfeed__side {
    border-left: 0;
    border-top: 1px solid var(--sf-line);
  }

  .sfeed__menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px;
  }

  .sfeed__menu-item {
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
  }

  .sfeed__follow {
    margin-top: 18px;
  }

  .sfeed__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sfeed__reel-track {
    grid-auto-columns: calc((100% - 3 * 18px) / 3.4);
  }
}

@media (max-width: 767px) {
  .sfeed {
    padding: 100px 0 60px;
  }

  .sfeed__wrap {
    width: calc(100% - 32px);
  }

  .sfeed__hero {
    min-height: 460px;
  }

  .sfeed__hero-top,
  .sfeed__hero-bar {
    padding: 16px 18px;
  }

  .sfeed__hero-copy {
    padding: 0 18px;
  }

  .sfeed__title {
    font-size: 36px;
  }

  .sfeed__chip {
    font-size: 16px;
  }

  .sfeed__faces img:nth-child(n + 3) {
    display: none;
  }

  .sfeed__about {
    font-size: 15px;
    text-align: left;
  }

  .sfeed__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .sfeed__card-title {
    font-size: 16px;
  }

  .sfeed__card--wide {
    aspect-ratio: 16 / 10;
  }

  .sfeed__reel-track {
    grid-auto-columns: 46%;
    gap: 12px;
  }

  .sfeed__box-prev,
  .sfeed__box-next {
    position: absolute;
    bottom: 20px;
  }

  .sfeed__box-prev {
    left: calc(50% - 56px);
  }

  .sfeed__box-next {
    right: calc(50% - 56px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sfeed__hero-img,
  .sfeed__title,
  .sfeed__chips,
  .sfeed__card,
  .sfeed__box-fig img {
    animation: none;
  }

  .sfeed__card img,
  .sfeed__reel img {
    transition: none;
  }
}

/* client details panel (replaces the old Browse filters) */
.sfeed__details {
  display: flex;
  flex-direction: column;
  margin: 0 0 18px;
}

.sfeed__detail {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 10px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sfeed__detail:last-child {
  border-bottom: 0;
}

.sfeed__detail svg {
  grid-row: span 2;
  margin-top: 3px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
}

.sfeed__detail dt {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sfeed__detail dd {
  margin: 2px 0 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 991px) {
  .sfeed__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sfeed__detail {
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .sfeed__details {
    grid-template-columns: 1fr;
  }
}

/* self-hosted reels (e.g. AABYARI): video in the viewer + caption under it */
.sfeed__box-fig video {
  /* keeps the clip's own shape: landscape reels go wide, vertical reels go tall */
  width: auto;
  height: auto;
  max-width: min(90vw, 1000px);
  max-height: calc(100vh - 220px);
  border-radius: 12px;
  background: #000;
  animation: sfeed-up 0.35s ease both;
}

.sfeed__box-fig video[hidden],
.sfeed__box-fig img[hidden],
.sfeed__box-caption[hidden] {
  display: none;
}

.sfeed__box-caption {
  max-width: min(90vw, 720px);
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
