*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --red: #c4150b;
  --red-dk: #7a0c05;
  --black: #0d0d0d;
  --white: #ffffff;
  --green: #0b5e1a;
  --orbit-r: 220px;
  --card-w: 230px;
  --card-h: 300px;
  --duration: 14s;
  --social-lottie-offset: clamp(170px, 21vw, 250px);
  --social-lottie-scale: 1.02;
}

.social-media-section {
  background: #fff;
  padding: 0 5vw 44px;
  min-height: 560px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.social-media-section .sec-header h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.08;
}

.social-media-lottie-bg {
  position: absolute;
  top: var(--social-lottie-offset);
  left: 50%;
  width: min(860px, 98vw);
  height: min(860px, 98vw);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  transform: translateX(-50%) scale(var(--social-lottie-scale));
  transform-origin: top center;
}


.scene {
  position: relative;
  width: calc(var(--orbit-r) * 2 + var(--card-w) + 16px);
  height: calc(var(--orbit-r) * 2 + var(--card-h) + 16px);
  max-width: 100vw;
  max-height: 100vw;
  z-index: 2;
  margin-top: 0.5rem;
}


.card-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w);
  height: var(--card-h);
  margin-top: calc(var(--card-h) / -2);
  margin-left: calc(var(--card-w) / -2);
  transform-origin: center center;
  animation: orbit var(--duration) linear infinite;
  z-index: 3;
  /* Remove extra space between cards */
  margin-bottom: 0;
}

.card-wrap:nth-child(2) { animation-delay: calc(var(--duration) / -4 * 1); }
.card-wrap:nth-child(3) { animation-delay: calc(var(--duration) / -4 * 2); }
.card-wrap:nth-child(4) { animation-delay: calc(var(--duration) / -4 * 3); }
.card-wrap:nth-child(5) { animation-delay: calc(var(--duration) / -4 * 4); }

@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-r)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

.card {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: scale(1.06);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.68);
}

.card.fb { background: linear-gradient(150deg, #c4150b 0%, #7a0c05 100%); }
.card.ig { background: linear-gradient(150deg, #b51209 0%, #cc1a0d 70%, #e03010 100%); }
.card.x { background: linear-gradient(150deg, #0d0d0d 0%, #2a0704 55%, #c4150b 100%); }
.card.wa { background: linear-gradient(150deg, #060e06 0%, #0c2a10 60%, #0b5e1a 100%); }

.card-blur {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.card-blur svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 16px 18px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

.platform-icon svg {
  display: block;
  width: 30px;
  height: 30px;
}

.card-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 46px;
  line-height: 0.92;
  color: #fff;
  letter-spacing: 0.02em;
}

.card-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 10px;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.06;
  pointer-events: none;
  border-radius: 18px;
}

@media (max-width: 1200px) {
  :root {
    --orbit-r: 150px;
    --card-w: 165px;
    --card-h: 215px;
    --social-lottie-offset: clamp(140px, 24vw, 210px);
    --social-lottie-scale: 0.97;
  }
  .social-media-section {
    min-height: 360px;
    padding: 0 0 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --orbit-r: 30vw;
    --card-w: 30vw;
    --card-h: 40vw;
    --social-lottie-offset: clamp(115px, 27vw, 170px);
    --social-lottie-scale: 0.92;
  }
  .social-media-section {
    min-height: 88vw;
    padding: 0 0 5vw;
    margin-bottom: 0;
  }
  .scene {
    width: 100vw;
    height: 100vw;
  }
  .card-headline {
    font-size: clamp(24px, 7vw, 40px);
  }
  .brand {
    font-size: 8px;
    letter-spacing: 0.18em;
  }
  .platform-icon svg {
    width: 20px;
    height: 20px;
  }
  .card-sub {
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  :root {
    --orbit-r: 28vw;
    --card-w: 32vw;
    --card-h: 43vw;
  }

  .social-media-section {
    min-height: 94vw;
  }
  .brand {
    font-size: 8px;
    letter-spacing: 0.18em;
  }
  .platform-icon svg {
    width: 20px;
    height: 20px;
  }
  .card-sub {
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: 6px;
  }
}
