.community-header-action {
  .all-member-count {
    border: 1px solid var(--black_50);
    border-radius: 4px;
    padding: 6.5px 12px;
  }

  .filter-badge {
    background-color: var(--brand_color_50);
    color: var(--black_700);
    padding: 0.3rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
  }
}

.community-wrapper {
  padding-top: 70px;
  padding-bottom: 70px;

  .community-card {
    position: relative;
    @include glass-card;
    border-radius: var(--radius-xl);
    padding: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: var(--glass-border);
    background: var(--glass-bg);
    overflow: hidden;
    margin-bottom: 0;

    &:hover {
      transform: translateY(-8px);
      box-shadow: var(--long_shadow);
      background: var(--glass-bg-hover);

      .card-image img {
        transform: scale(1.1);
      }

      .card-overlay {
        opacity: 1;
        visibility: visible;
      }

      .join-btn {
        transform: translateY(0);
      }
    }

    .card-image {
      position: relative;
      border-radius: var(--radius-lg);
      overflow: hidden;
      aspect-ratio: 16/11;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
      }

      .badge-days {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        color: #fff;
        padding: 6px 14px;
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 600;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.2);

        i {
          font-size: 10px;
          color: var(--brand_color_400);
        }
      }

      .card-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 3;
      }

      .join-btn {
        background: var(--brand_color);
        color: #fff;
        padding: 10px 24px;
        border-radius: var(--radius-full);
        font-weight: 600;
        font-size: 14px;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 4px 15px rgba(244, 25, 109, 0.3);

        &:hover {
          background: #fff;
          color: var(--brand_color);
          box-shadow: 0 8px 25px rgba(244, 25, 109, 0.4);
        }
      }
    }

    .card-body {
      padding: 20px 8px 8px;

      .card-title {
        font-size: 19px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.4;

        a {
          color: var(--black_800);
          transition: color 0.3s ease;

          &:hover {
            color: var(--brand_color);
          }
        }
      }

      .card-text {
        font-size: 14px;
        color: var(--black_500);
        margin-bottom: 18px;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      .card-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 15px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);

        .group-type {
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 13px;
          color: var(--black_500);
          font-weight: 500;

          i {
            color: var(--brand_color);
            font-size: 14px;
          }
        }

        .avatar-group {
          display: flex;
          align-items: center;

          .avatars {
            display: flex;
            align-items: center;

            a {
              width: 30px;
              height: 30px;
              border-radius: 50%;
              border: 2px solid #fff;
              margin-left: -10px;
              transition: all 0.3s ease;
              position: relative;
              overflow: hidden;

              &:first-child {
                margin-left: 0;
              }

              &:hover {
                z-index: 10;
                transform: translateY(-4px);
              }

              img {
                width: 100%;
                height: 100%;
                object-fit: cover;
              }
            }
          }

          .avatar-count {
            width: 30px;
            height: 30px;
            background: var(--gradient-primary);
            color: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: 700;
            border: 2px solid #fff;
            margin-left: -10px;
            box-shadow: 0 4px 10px rgba(244, 25, 109, 0.2);
            cursor: pointer;
          }
        }
      }
    }
  }
}

.avatar-group {
  display: flex;
  align-items: center;

  a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    display: block;

    &+a {
      margin-left: -12px;
    }

    &:hover {
      transform: translateY(-5px) scale(1.1);
      z-index: 5;
      border-color: var(--brand_color);
      box-shadow: 0 8px 20px rgba(var(--brand_color_rgb), 0.2);
    }

    img {
      border-radius: 50%;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .badge-avatar,
  .avatar-count {
    background: var(--gradient-primary);
    color: #fff;
    margin-left: -10px;
    height: 34px;
    width: 34px;
    line-height: normal;
    text-align: center;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(244, 25, 109, 0.25);
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;

    &:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 15px rgba(244, 25, 109, 0.35);
      color: #fff;
    }
  }
}

.tooltip {
  &.show {
    opacity: 1;
  }

  .tooltip-inner {
    background-color: var(--brand_color_25);
    color: var(--black_900);
  }

  .tooltip-arrow::before {
    border-top-color: var(--brand_color_25);
  }
}

.community-cover-area {
  position: relative;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding-top: 88px;

  .cover-photo-comp {
    width: calc(100% + 140px);
    height: 300px;
    overflow: hidden;
    border-radius:12px;
    transform: translateX(-70px);

    img {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }

  .community-title {
    font-size: 2rem;
    margin-bottom: 4px;
  }

  .group-stats {
    display: flex;
    gap: 24px;
    align-items: center;

    .stat-item {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--black_500);
      font-size: 0.9rem;

      .stat-item i {
        color: var(--brand_color_800);
      }
    }
  }

  .group-actions {
    display: flex;
    gap: 12px;
    align-items: center;

    .join-btn {
      color: white;
      border: none;
      font-weight: 600;
      padding: 7px 18px;

      &:hover {
        transform: translateY(-2px);
      }

      i {
        font-size: 12px;
        margin-right: 2px;
      }
    }

    .dropdown {
      position: relative;
    }

    .dropdown-btn {
      width: 38px;
      height: 38px;
      border: 0;
      border-radius: 4px;
      background: rgb(228, 230, 234);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease-in-out;
      color: var(--black_900);

      &::after {
        display: none;
      }

      &:hover {
        background: rgb(216, 218, 223);
      }
    }

    .dropdown-menu {
      background: #ffffff;
      border: 1px solid #dadde1;
      border-radius: 6px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
      min-width: 150px;
      z-index: 1000;
      padding: 0;
      opacity: 0;
      visibility: hidden;

      &.show {
        opacity: 1;
        visibility: visible;
      }
    }

    .dropdown-item {
      display: block;
      padding: 8px 16px;
      color: var(--black_400);
      text-decoration: none;
      transition: all 0.3s ease-in-out;
      border-bottom: 1px solid #dadde1;

      &:last-child {
        border-bottom: none;
      }

      &:hover {
        background: #f2f3f5;
      }
    }
  }

  /* Navigation Tabs Container */
  .community-tabbar {
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    padding: 0 20px;
    margin-top: -30px;
    z-index: 2;
    position: relative;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.03);
  }

  .nav-tabs {
    display: flex;
    align-items: center;
    border-bottom: none !important;
    gap: 10px;
    padding: 15px 0;
    border-top: none;
    margin-top: 0;

    /* Search Box Styles */
    .search-container {
      margin-left: auto;

      .search-box {
        position: relative;

        i {
          position: absolute;
          left: 15px;
          top: 50%;
          transform: translateY(-50%);
          color: $black_400;
          pointer-events: none;
        }

        input {
          padding: 10px 20px 10px 45px;
          border-radius: 50px;
          border: 1px solid #eee;
          background: #f8f9fa;
          width: 250px;
          outline: none;
          transition: all 0.3s ease;
          font-size: 14px;

          &:focus {
            background: #fff;
            border-color: $brand_color;
            box-shadow: 0 0 0 4px rgba($brand_color, 0.1);
            width: 280px;
          }
        }
      }
    }
  }

  /* Individual Tab Styles */
  .nav-tab {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: $black_500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    img {
      width: 18px;
      height: 18px;
      transition: all 0.3s ease;
      opacity: 0.6;
    }

    &:hover {
      color: $brand_color;
      background: rgba($brand_color, 0.05);

      img {
        opacity: 1;
        transform: scale(1.1) rotate(5deg);
        filter: brightness(0) saturate(100%) invert(34%) sepia(87%) saturate(3061%) hue-rotate(326deg) brightness(97%) contrast(93%);
      }
    }

    &.active {
      background: $brand_color;
      color: #fff;
      box-shadow: 0 4px 15px rgba($brand_color, 0.25);

      img {
        opacity: 1;
        filter: brightness(0) invert(1);
      }
    }
  }

}

.community-details-area {

  /* Sidebar */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .sidebar-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black_900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .member-count-badge {
    background: #e4e6ea;
    color: var(--black_800);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
  }

  /* About Card */
  .about-content p {
    color: var(--black_400);
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .about-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .stat {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #65676b;
    font-size: 0.9rem;
  }

  .stat i {
    width: 16px;
    color: $brand_color_800;
  }

  /* Members Card */
  .members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;

    .member-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px;
      border-radius: 6px;
      transition: background 0.2s ease;
      cursor: pointer;

      &:hover {
        background: #f0f2f5;
      }
    }

    .member-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      overflow: hidden;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .stat {
      margin-left: auto;
      font-size: 12px;
      color: var(--black_300);
    }

    .member-info h4 {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--black_900);
      margin-bottom: 0;
    }

    .member-role {
      font-size: 0.8rem;
      color: var(--black_400);
    }
  }

  .see-all-btn {
    width: 100%;
    background: var(--brand_color_25);
    padding: 6px;
    border-radius: 6px;
    color: var(--brand_color);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 1px solid var(--brand_color_100);

    &:hover {
      background: var(--brand_color_100);
    }
  }

  /* Activity Card */
  .activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }

  .activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e4e6ea;
    color: #65676b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .activity-content {
    display: flex;
    flex-direction: column;

    p {
      color: var(--black_700);
      font-size: 0.9rem;
      margin-bottom: 2px;

      a {
        color: var(--black_700);
      }
    }
  }

  .activity-time {
    color: #65676b;
    font-size: 0.8rem;
  }

  /* Post Creator */
  .post-creator {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease-in-out;

    .post-input-container {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }

    .user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .post-input {
      flex: 1;

      textarea {
        width: 100%;
        border: none;
        outline: none;
        resize: none;
        font-family: inherit;
        font-size: 1rem;
        color: var(--black_400);
        background: #f0f2f5;
        border-radius: 8px;
        padding: 16px;
        transition: all 0.03s ease-in-out;

        &:focus {
          background: #fff;
          box-shadow: 0 0 0 1px var(--black_400);
        }
      }
    }

    .post-actions {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid var(--black_50);
      padding-top: 14px;
      flex-wrap: wrap;
      gap: 10px;

      .theme-btn {
        padding: 8px 18px;
        cursor: pointer;

        i {
          font-size: 13px;
        }

        &:disabled {
          background: var(--black_100);
          cursor: not-allowed;
          transform: none;
        }
      }
    }

    .post-options {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;

      .post-option {
        background: none;
        border: none;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        padding: 6px 12px;
        border-radius: 8px;
        color: var(--black_400);
        cursor: pointer;
        transition: all 0.3s ease-in-out;

        i {
          font-size: 12px;
        }

        &:hover {
          background: var(--brand_color_25);
          color: var(--brand_color_800);
        }
      }
    }
  }

  .posts-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .post-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: box-shadow 0.2s ease;

    &:hover {
      box-shadow: var(--long_shadow);
    }

    .post-header {
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .post-author {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .post-author-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .post-author-info h6 {
      font-weight: 600;
      color: #1c1e21;
      margin-bottom: 0;
    }

    .post-meta {
      color: #65676b;
      font-size: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .post-options {
      background: none;
      border: none;
      color: #65676b;
      cursor: pointer;
      padding: 4px 10.5px;
      border-radius: 50%;
      transition: background 0.2s ease;

      &:hover {
        background: #f0f2f5;
      }
    }

    .post-content {
      padding: 0 20px 16px;
    }

    .post-text {
      color: #1c1e21;
      line-height: 1.6;
      margin-bottom: 12px;
    }

    .post-image {
      width: 100%;
      max-height: 400px;
      object-fit: cover;
      border-radius: 8px;
    }

    .post-footer {
      padding: 12px 20px;
      border-top: 1px solid #e4e6ea;
      background: #fafbfc;
    }

    .post-actions-bar {
      display: flex;
      align-items: center;
      justify-content: space-around;
    }

    .post-action {
      background: none;
      border: none;
      color: #65676b;
      cursor: pointer;
      padding: 4px 16px;
      border-radius: 6px;
      font-size: 14px;
      display: flex;
      align-items: center;
      gap: 5px;
      font-weight: 500;
      transition: all 0.2s ease;
      flex: 1;
      justify-content: center;

      i {
        font-size: 12px;
      }

      .action-count {
        font-size: 12px;
        font-weight: 600;
        opacity: 0.75;
      }

      &:hover {
        background: #e4e6ea;
      }

      &.liked {
        color: #e74c3c;

        &:hover {
          background: rgba(231, 76, 60, 0.1);
        }
      }
    }
  }

  /* Replies Section */
  .replies-section {
    border-top: 1px solid #e4e6ea;
    background: #f8f9fa;

    .replies-toggle {
      width: 100%;
      background: none;
      border: none;
      font-size: 14px;
      padding: 8px 20px;
      color: #65676b;
      cursor: pointer;
      text-align: left;
      font-weight: 500;
      transition: background 0.2s ease;

      &.shown {
        i {
          transform: rotate(180deg);
        }
      }

      i {
        font-size: 12px;
      }

      &:hover {
        background: #e4e6ea;
      }
    }

    .replies-list {
      padding: 0 20px 12px;
      display: none;

      &.show {
        display: block;
      }
    }

    .replies-list .reply-item {
      display: flex;
      gap: 10px;
      margin-bottom: 12px;
      padding: 8px 0;
    }

    .reply-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
    }

    .reply-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .reply-content {
      flex: 1;
      background: white;
      border-radius: 8px;
      padding: 8px 12px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .reply-author {
      font-weight: 600;
      color: #1c1e21;
      font-size: 0.9rem;
      margin-bottom: 2px;
    }

    .reply-text {
      color: #1c1e21;
      font-size: 0.9rem;
      line-height: 1.4;
    }

    .reply-meta {
      color: #65676b;
      font-size: 0.8rem;
      margin-top: 4px;
      display: flex;
      gap: 12px;
    }

    .reply-meta button {
      background: none;
      border: none;
      color: inherit;
      cursor: pointer;
      font-size: inherit;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  .friends-tab {
    .match-member-widget-two {
      padding: 8px;

      h5 {
        margin-top: 9px;
        font-size: 16px;
        margin-bottom: 6px;
        justify-content: center;
      }

      p {
        font-weight: 500;
        text-align: center;
        margin-bottom: 6px;

        .fa-mars {
          color: #00afff;
        }

        .fa-venus {
          color: #a650ff;
        }
      }

      .img-box .actv_status {
        padding: 5px 10px;
        top: 8px;
        left: 8px;
        font-size: 14px;
      }

      .badge-icon {
        img {
          width: 16px;
        }
      }
    }
  }

  .tab-media {
    .single-media-video {
      height: 100%;
      position: relative;
      overflow: hidden;
      z-index: 1;
      display: inline-block;
      border-radius: 4px;

      &:hover {
        img {
          transform: scale(1.1);
        }
      }

      &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(#000, 0.2);
        border-radius: 4px;
        z-index: 1;
      }

      .timestamp {
        position: absolute;
        right: 12px;
        bottom: 12px;
        z-index: 2;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        color: #fff;
      }

      img {
        min-height: 100%;
        width: 100%;
        border-radius: 4px;
        transition: all 0.2s ease-in-out;
      }
    }

    .single-media-img {
      height: 100%;
      display: inline-block;

      img {
        min-height: 100%;
        width: 100%;
        border-radius: 4px;
      }
    }
  }

  .events-tab {
    .single-event-widget {
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
      border-radius: 8px;
      background-color: #fff;
      overflow: hidden;

      .event-body {
        padding: 16px;
      }

      h5 {
        font-weight: 600;
        transition: all 0.3s ease-in-out;

        &:hover {
          color: var(--brand_color);
        }
      }

      .meta {
        font-size: 14px;
        color: var(--black_500);
        font-weight: 400;
        margin-bottom: 12px;

        i {
          margin-right: 6px;
        }
      }

      .event-action {
        display: flex;
        gap: 16px;
        align-items: center;
        margin-top: 16px;
      }

      .theme-btn-outline {
        padding: 6px 26px;
        flex: 1;
        text-align: center;
      }

      .share-btn {
        font-size: 14px;
        padding: 6px 11px;
        background-color: var(--brand_color_25);
        border-radius: 4px;
        color: var(--brand_color);

        &:hover {
          background-color: var(--brand_color);
          color: #fff;
        }
      }
    }
  }
}