.community-section {
  padding: 60px 0 120px;
  background: var(--rsf-white);
  color: var(--rsf-dark);
}

.community-shell {
  width: min(1274px, calc(100% - 48px));
  margin: 0 auto;
}

.community-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 67px;
}

.community-title {
  margin: 0;
  background: var(--rsf-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--rsf-font);
  font-size: 68px;
  font-weight: 300;
  line-height: 1.5;
  text-transform: uppercase;
}

.community-title strong {
  font-weight: 700;
}

.community-copy p {
  width: min(1212px, 100%);
  margin: 0;
  color: var(--rsf-dark);
  font-size: 24.983px;
  font-weight: 400;
  line-height: 1.5;
}

.community-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28.885px;
  width: 100%;
  min-height: 623px;
  padding: 68px 64px;
  border-radius: 30px;
  background: rgba(86, 112, 135, 0.1);
}

.community-instagram {
  position: absolute;
  left: 50%;
  top: -24px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 30px;
  border-radius: 100px;
  background: var(--rsf-gradient);
  color: var(--rsf-blue-white);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  transform: translateX(-50%);
}

.community-instagram img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.community-card {
  position: relative;
  flex: 0 0 auto;
  height: 454.945px;
  overflow: hidden;
  background: var(--rsf-dark);
  color: var(--rsf-blue-white);
}

.community-card--chat {
  width: 363.956px;
}

.community-card--collage {
  width: 346.625px;
}

.community-card--save {
  width: 347.527px;
}

.community-card--chat::before,
.community-card--collage::before,
.community-card--save::before {
  content: "";
  position: absolute;
  inset: -35%;
  background:
    radial-gradient(circle at 16% 7%, rgba(74, 229, 212, 0.2), transparent 24%),
    radial-gradient(circle at 88% 80%, rgba(16, 151, 255, 0.18), transparent 31%);
  pointer-events: none;
}

.community-chat-top,
.community-chat-input {
  position: absolute;
  left: 0;
  z-index: 2;
  width: 100%;
  background: #f6f6f6;
}

.community-chat-top {
  top: 0;
  display: grid;
  grid-template-columns: 18px 36px 1fr 64px;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 7px 15px 5px;
  color: #000000;
  box-shadow: 0 0.258px 0 #a6a6aa;
}

.community-chat-back::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  border-left: 2px solid #3492f0;
  border-bottom: 2px solid #3492f0;
  transform: rotate(45deg);
}

.community-chat-avatar {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--rsf-dark) url("./assets/logo-rio-serra-fit-claro.svg") center / 23px auto no-repeat;
}

.community-chat-name {
  display: flex;
  flex-direction: column;
}

.community-chat-name strong {
  font-size: 12.524px;
  font-weight: 700;
  line-height: 1;
}

.community-chat-name small {
  color: #8e8e93;
  font-size: 9.393px;
  line-height: 1.4;
}

.community-chat-actions {
  justify-self: end;
  width: 52px;
  height: 18px;
  background:
    linear-gradient(#3492f0, #3492f0) 0 50% / 15px 1.6px no-repeat,
    linear-gradient(#3492f0, #3492f0) 23px 50% / 13px 1.6px no-repeat,
    linear-gradient(#3492f0, #3492f0) 45px 50% / 8px 1.6px no-repeat;
}

.community-chat-body {
  position: absolute;
  inset: 40px 0 48px;
  z-index: 1;
  padding: 19px 28px 0 35px;
  background:
    radial-gradient(circle at 5% 10%, rgba(52, 146, 240, 0.23), transparent 20%),
    radial-gradient(circle at 100% 100%, rgba(74, 229, 212, 0.08), transparent 30%);
}

.community-date {
  width: fit-content;
  margin: 0 auto 16px;
  padding: 3px 8px;
  border-radius: 6.262px;
  background: rgba(222, 245, 249, 0.8);
  color: var(--rsf-dark);
  font-size: 9.393px;
  line-height: 1.2;
}

.bubble {
  position: relative;
  width: fit-content;
  max-width: 242px;
  margin: 0 0 12px;
  padding: 9px 14px;
  border-radius: 10.793px;
  font-size: 13.634px;
  font-weight: 400;
  line-height: 15.622px;
}

.bubble strong {
  font-weight: 700;
}

.bubble--left {
  background: #3492f0;
  color: var(--rsf-blue-white);
}

.bubble--right {
  margin-left: auto;
  background: var(--rsf-blue-white);
  color: var(--rsf-dark);
  text-align: right;
}

.community-chat-input {
  bottom: 0;
  height: 48px;
  box-shadow: 0 -0.258px 0 #a6a6aa;
}

.community-chat-input::before {
  content: "";
  position: absolute;
  left: 46px;
  top: 8px;
  width: 221px;
  height: 31px;
  border: 0.391px solid rgba(142, 142, 147, 0.45);
  border-radius: 12.524px;
  background: #ffffff;
}

.community-chat-input::after {
  content: "+";
  position: absolute;
  left: 13px;
  top: 9px;
  color: #3492f0;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.community-collage-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0;
}

.community-collage-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-collage-grid .photo-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.community-collage-grid .photo-2 {
  grid-column: 2 / 4;
  grid-row: 1 / 2;
}

.community-collage-grid .photo-3 {
  grid-column: 4 / 5;
  grid-row: 1 / 3;
}

.community-collage-grid .photo-4 {
  grid-column: 1 / 2;
  grid-row: 3 / 5;
}

.community-collage-grid .photo-5 {
  grid-column: 2 / 4;
  grid-row: 4 / 6;
}

.community-collage-grid .photo-6 {
  grid-column: 4 / 5;
  grid-row: 4 / 6;
}

.community-collage-grid .photo-7 {
  grid-column: 1 / 2;
  grid-row: 5 / 6;
}

.community-collage-grid .photo-8 {
  grid-column: 4 / 5;
  grid-row: 3 / 4;
}

.community-card--collage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(7, 18, 29, 0.12), rgba(7, 18, 29, 0.68) 70%);
}

.community-card--collage h3 {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 166px;
  margin: 0;
  color: var(--rsf-blue-white);
  font-size: 20.513px;
  font-weight: 300;
  line-height: 23.078px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.community-card--collage h3 strong,
.community-card--collage h3 span {
  display: block;
}

.community-card--collage h3 strong {
  font-weight: 700;
}

.community-card--save {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.community-card--save::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(74, 229, 212, 0.7);
  border-radius: 48% 0 0 48%;
  transform: translate(55%, -12%) rotate(5deg);
}

.community-save-logo {
  position: relative;
  z-index: 1;
  width: 72px;
  margin-top: 90px;
}

.community-card--save h3 {
  position: relative;
  z-index: 1;
  margin: 28px 0 24px;
  background: var(--rsf-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 54.743px;
  font-weight: 500;
  line-height: 40.484px;
  letter-spacing: 5.474px;
}

.community-card--save h3 small {
  display: block;
  font-size: 39.258px;
  font-weight: 300;
  letter-spacing: 0;
}

.community-card--save h3::after {
  content: "";
  display: block;
  width: 206px;
  height: 1px;
  margin: 18px auto 0;
  background: #4ae5d4;
}

.community-card--save p {
  position: relative;
  z-index: 1;
  width: 220px;
  margin: 0 0 14px;
  color: var(--rsf-blue-white);
  font-size: 13.525px;
  line-height: 21.253px;
}

.community-card--save p strong {
  font-weight: 700;
}

.community-card--save time {
  position: relative;
  z-index: 1;
  min-width: 219px;
  padding: 2px 11px 3px;
  border: 0.595px solid #4ae5d4;
  border-radius: 999px;
  color: var(--rsf-blue-white);
  font-size: 14.282px;
  line-height: 19.638px;
}

@media (max-width: 1180px) {
  .community-section {
    padding: 86px 0 82px;
  }

  .community-copy {
    margin-bottom: 23px;
  }

  .community-title {
    font-size: 20px;
  }

  .community-copy p {
    font-size: 15px;
  }

  .community-visual {
    gap: 10.484px;
    min-height: 226.069px;
    padding: 40px 19.5px 29px;
    border-radius: 10.889px;
  }

  .community-instagram {
    top: -11px;
    gap: 1.815px;
    padding: 3.63px 10.889px;
    font-size: 6.53px;
  }

  .community-instagram img {
    width: 13.067px;
    height: 13.067px;
    flex-basis: 13.067px;
  }

  .community-card {
    height: 165.128px;
  }

  .community-card--chat {
    display: none;
  }

  .community-card--collage {
    width: 125.812px;
  }

  .community-card--save {
    width: 126.139px;
  }

  .community-card--collage h3 {
    width: 60px;
    font-size: 7.446px;
    line-height: 8.376px;
  }

  .community-save-logo {
    width: 26px;
    margin-top: 32px;
  }

  .community-card--save h3 {
    margin: 10px 0 9px;
    font-size: 19.87px;
    line-height: 14.694px;
    letter-spacing: 1.987px;
  }

  .community-card--save h3 small {
    font-size: 14.249px;
  }

  .community-card--save h3::after {
    width: 75px;
    margin-top: 7px;
  }

  .community-card--save p {
    width: 80px;
    margin-bottom: 5px;
    font-size: 4.909px;
    line-height: 7.714px;
  }

  .community-card--save time {
    min-width: 80px;
    padding: 1px 4px;
    border-width: 0.216px;
    font-size: 5.184px;
    line-height: 7.128px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .community-section {
    padding: 20px 0 40px;
  }
}
