/* ==========================================================================
   Social Feed - Coverflow style
   Latest Instagram & LinkedIn posts presented as a coverflow carousel.
   ========================================================================== */

.social-feed {
  position: relative;
  padding: 30px 0 90px;
  overflow: hidden;
  background:
    radial-gradient(1100px 320px at 50% -10%, rgba(91, 92, 240, 0.10), transparent 70%),
    radial-gradient(900px 260px at 100% 100%, rgba(236, 72, 153, 0.08), transparent 70%);
}


.social-feed .section-inner {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- Heading ---------- */
.social-feed-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 26px;
}

.social-feed-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #5b5cf0, #ec4899 55%, #f97316);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.social-feed-section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0 0 12px;
  color: #0f172a;
}

.social-feed-section-head p {
  margin: 0 auto;
  color: #5f6f87;
  font-size: 16px;
  line-height: 1.6;
  max-width: 620px;
}

/* ---------- Tabs ---------- */
.social-tabs-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 32px;
}

.social-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e8e6f2;
  box-shadow: 0 10px 30px rgba(39, 31, 80, 0.08);
}

.social-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  transition: transform 0.2s ease, background 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease;
}

.social-tab svg {
  width: 18px;
  height: 18px;
}

.social-tab:hover:not(.is-active) {
  color: #1e293b;
  background: rgba(91, 92, 240, 0.06);
}

.social-tab.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.social-tab[data-platform="instagram"].is-active {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 55%, #8b5cf6 100%);
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.32);
}

.social-tab[data-platform="linkedin"].is-active {
  background: #0a66c2;
  box-shadow: 0 10px 26px rgba(10, 102, 194, 0.32);
}

/* ---------- Panel ---------- */
.social-coverflow {
  display: none;
  position: relative;
  width: 100%;
  animation: socialFadeIn 0.35s ease both;
}

.social-coverflow.is-active {
  display: block;
}

@keyframes socialFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Stage (the coverflow lane) ---------- */
.social-cf-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-cf-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 500px;
  perspective: 1400px;
}

/* ---------- Card ---------- */
.social-cf-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 460px;
  margin: -230px 0 0 -160px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e8e6f2;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity, filter;
  transition:
    transform 0.45s cubic-bezier(.2,.7,.2,1),
    opacity   0.4s ease,
    filter    0.4s ease,
    box-shadow 0.4s ease;
}

/* ---------- Position states ---------- */
.social-cf-item[data-pos="0"] {
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 5;
  opacity: 1;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.social-cf-item[data-pos="-1"],
.social-cf-item[data-pos="1"] {
  opacity: 0.55;
  filter: blur(2.5px) grayscale(10%) brightness(0.96);
  z-index: 4;
}

.social-cf-item[data-pos="-1"] {
  transform: translate3d(-78%, 0, 0) scale(0.86);
}

.social-cf-item[data-pos="1"] {
  transform: translate3d(78%, 0, 0) scale(0.86);
}

.social-cf-item[data-pos="-2"],
.social-cf-item[data-pos="2"] {
  opacity: 0.28;
  filter: blur(5px) grayscale(20%) brightness(0.92);
  z-index: 3;
}

.social-cf-item[data-pos="-2"] {
  transform: translate3d(-140%, 0, 0) scale(0.72);
}

.social-cf-item[data-pos="2"] {
  transform: translate3d(140%, 0, 0) scale(0.72);
}

.social-cf-item:not([data-pos="-2"]):not([data-pos="-1"]):not([data-pos="0"]):not([data-pos="1"]):not([data-pos="2"]) {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(0.6);
  z-index: 1;
}

/* ---------- Card content ---------- */
.social-cf-media {
    position: relative;
    display: block;
    height: 240px;
    overflow: hidden;
    background: #f1f5f9;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.social-cf-item:not([data-pos="0"]) .social-cf-media {
    cursor: default;
}
.social-cf-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.55s ease;
}

.social-cf-item[data-pos="0"]:hover .social-cf-media img {
  transform: scale(1.04);
}

.social-cf-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.social-cf-badge svg {
  width: 16px;
  height: 16px;
}

.social-cf-item--instagram .social-cf-badge {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 55%, #8b5cf6 100%);
}

.social-cf-item--linkedin .social-cf-badge {
  background: #0a66c2;
}

.social-cf-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    cursor: default;
}


.social-cf-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-cf-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
  border: 1px solid #e8e6f2;
  flex-shrink: 0;
}

.social-cf-meta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.social-cf-handle {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.social-cf-date {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.social-cf-text {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.social-cf-engage {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #64748b;
  font-size: 13px;
}

.social-cf-engage span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-cf-engage svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-cf-item--instagram .social-cf-engage .icon-like {
  color: #ec4899;
  fill: rgba(236, 72, 153, 0.15);
}

.social-cf-item--linkedin .social-cf-engage .icon-like {
  color: #0a66c2;
  fill: rgba(10, 102, 194, 0.15);
}

/* CTA - only visible on the centred card to declutter side cards */
.social-cf-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: background 0.22s ease, color 0.22s ease, transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}

.social-cf-item[data-pos="0"] .social-cf-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.social-cf-item--instagram .social-cf-cta {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(249, 115, 22, 0.16));
  color: #be185d;
}

.social-cf-item--instagram .social-cf-cta:hover {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #ffffff;
}

.social-cf-item--linkedin .social-cf-cta {
  background: rgba(10, 102, 194, 0.12);
  color: #0a66c2;
}

.social-cf-item--linkedin .social-cf-cta:hover {
  background: #0a66c2;
  color: #ffffff;
}

/* ---------- Nav arrows ---------- */
.social-cf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 12px 28px rgba(15, 23, 42, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.social-cf-nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-cf-nav:hover {
  transform: translateY(-50%) scale(1.06);
  color: #0f172a;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.1),
    0 16px 36px rgba(91, 92, 240, 0.22);
}

.social-cf-nav:active {
  transform: translateY(-50%) scale(0.98);
}

.social-cf-nav:focus-visible {
  outline: 2px solid rgba(91, 92, 240, 0.45);
  outline-offset: 3px;
}

.social-cf-nav--prev { left: 14px; }
.social-cf-nav--next { right: 14px; }

/* ---------- Dots ---------- */
.social-cf-dots {
  margin: 22px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  max-width: 520px;
}

.social-cf-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, width 0.3s ease;
}

.social-cf-dot:hover {
  background: rgba(15, 23, 42, 0.32);
}

.social-coverflow[data-panel="instagram"] .social-cf-dot.is-active {
  background: linear-gradient(90deg, #ec4899, #f97316);
  width: 24px;
}

.social-coverflow[data-panel="linkedin"] .social-cf-dot.is-active {
  background: #0a66c2;
  width: 24px;
}

.social-cf-dot:focus-visible {
  outline: 2px solid rgba(91, 92, 240, 0.45);
  outline-offset: 3px;
}

/* ---------- Follow bar (kept from previous design) ---------- */
.social-followbar {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #475569;
  font-size: 14px;
}

.social-followbar strong {
  color: #0f172a;
  font-weight: 700;
}

.social-followbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease;
}

.social-followbar a svg {
  width: 16px;
  height: 16px;
}

.social-followbar .follow-instagram {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 55%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.28);
}

.social-followbar .follow-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.36);
}

.social-followbar .follow-linkedin {
  background: #0a66c2;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 102, 194, 0.28);
}

.social-followbar .follow-linkedin:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(10, 102, 194, 0.36);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .social-feed {
    padding: 20px 0 70px;
  }
  .social-cf-list {
    height: 480px;
  }
  .social-cf-item {
    width: 290px;
    height: 440px;
    margin: -220px 0 0 -145px;
  }
  .social-cf-item[data-pos="-1"] { transform: translate3d(-72%, 0, 0) scale(0.84); }
  .social-cf-item[data-pos="1"]  { transform: translate3d( 72%, 0, 0) scale(0.84); }
  .social-cf-item[data-pos="-2"] { transform: translate3d(-126%, 0, 0) scale(0.7); }
  .social-cf-item[data-pos="2"]  { transform: translate3d( 126%, 0, 0) scale(0.7); }
  .social-cf-nav { width: 46px; height: 46px; }
  .social-cf-media { height: 220px; }
}

@media (max-width: 560px) {
  .social-cf-list {
    height: 460px;
  }
  .social-cf-item {
    width: 250px;
    height: 420px;
    margin: -210px 0 0 -125px;
    border-radius: 18px;
  }
  .social-cf-media { height: 200px; }
  .social-cf-item[data-pos="-1"] { transform: translate3d(-66%, 0, 0) scale(0.8); }
  .social-cf-item[data-pos="1"]  { transform: translate3d( 66%, 0, 0) scale(0.8); }
  .social-cf-item[data-pos="-2"] { transform: translate3d(-108%, 0, 0) scale(0.64); opacity: 0.2; }
  .social-cf-item[data-pos="2"]  { transform: translate3d( 108%, 0, 0) scale(0.64); opacity: 0.2; }
  .social-cf-nav { width: 42px; height: 42px; }
  .social-cf-nav--prev { left: 6px; }
  .social-cf-nav--next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .social-cf-item {
    transition: opacity 0.2s ease, filter 0.2s ease;
  }
}
