* {
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: rgb(240, 242, 245);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
  overflow-y: scroll;
}

/* NAVIGATION BAR */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  width: 100%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.logo img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  padding: 10px 20px;
  position: relative;
  top: 20px;
}

/* ICONS */
.icons ul {
  display: flex;
  white-space: nowrap;
  overflow: hidden;
}

.icons ul li {
  list-style: none;
  margin: 0 2rem;
  justify-content: center;
}

.icons ul li img {
  height: 25px;
  width: 25px;
}

.icons ul li img:hover {
  background-color: rgba(228, 230, 235, 0.6);
  border-radius: 2px;
}

/* SIDEMENU */
.sidemenu {
  display: flex;
}

.sidemenu li {
  list-style: none;
  margin: 0 8px;
  background: rgba(0, 0, 0, 0.068);
  border-radius: 50%;
  padding: 10px;
}

.sidemenu li:hover {
  cursor: pointer;
  background-color: rgba(228, 230, 235, 0.6);
}

.sidemenu li img {
  height: 23px;
  width: 23px;
}

/* REMOVE NAV SEARCH BAR */
.searchbar input {
  display: none !important;
}

/* SEARCH ICON FOR MOBILE */
.nav-search-icon {
  display: none;
  font-size: 22px;
  color: #555;
  cursor: pointer;
  margin-right: 10px;
}

/* TOPBAR CENTER INPUT */
div input {
  background-color: rgba(0, 0, 0, 0.068);
}

/* LAYOUT SECTIONS */
.section1 {
  display: flex;
  height: 100vh;
  justify-content: space-between;
  align-items: center;
  margin: 10px 10px;
}

.leftsection {
  width: 20%;
  height: 90vh;
  overflow-y: auto;
  text-align: left;
  position: fixed;
  bottom: 10px;
  scrollbar-width: none;
}

.leftsection ol li {
  list-style: none;
  display: flex;
  flex-direction: row;
  margin: 20px 10px;
}

.leftsection ol li:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.068);
}

.leftsection img {
  height: 35px;
  width: 35px;
  border-radius: 15px;
}

.leftsection span {
  position: relative;
  top: 8px;
  left: 20px;
  font-size: 1rem;
  font-weight: 600;
}

.rightsection {
  width: 25%;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  position: fixed;
  left: 75%;
  top: 10%;
}

.rightsection span {
  position: relative;
  top: 15px;
  left: 15px;
  font-weight: 600;
  color: grey;
}

.sponsored-container {
  height: 40%;
  width: 70%;
  margin: 25px 20px;
}

.image img {
  height: 30%;
  width: 65%;
  border: 0.5px solid grey;
  border-radius: 10px;
}

.sponsored1 {
  height: 55%;
  width: 110%;
}

.sponsored1:hover {
  background-color: rgba(0, 0, 0, 0.068);
}

.sponsored1 p {
  width: 40%;
  position: relative;
  top: -6.5rem;
  left: 12.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: black;
}

.sponsored2 {
  height: 50%;
  width: 110%;
  position: relative;
  top: 1rem;
}

.sponsored2:hover {
  background-color: rgba(0, 0, 0, 0.068);
}

.sponsored2 p {
  width: 40%;
  position: relative;
  top: -6.5rem;
  left: 12.5rem;
  font-size: 1rem;
  color: black;
  font-weight: 500;
}

#lable {
  width: 40%;
  position: relative;
  top: -6.3rem;
  left: 12.5rem;
  font-size: 12px;
  color: grey;
}

.rightsection ol li {
  list-style: none;
  display: flex;
  flex-direction: row;
  margin: 20px 15px;
}

.rightsection ol li:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.068);
}

.rightsection ol img {
  height: 35px;
  width: 35px;
}

.rightsection span {
  position: relative;
  top: 8px;
  left: 20px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.rightsection ol span {
  color: black;
}

/* CENTER SECTION */
.centersection {
  width: 55%;
  height: 100%;
  position: relative;
  left: 20%;
  top: 10%;
}

/* TOPBAR CREATE POST BOX */
.topbar {
  height: 3.6rem;
  width: 80%;
  background-color: #fff;
  margin: 10px 85px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.topbar-content img {
  height: 40px;
  width: 40px;
  position: relative;
  top: 7px;
  left: 15px;
  border-radius: 35px;
}

.topbar-content input {
  height: 2.3rem;
  width: 28rem;
  padding-left: 15px;
  font-size: 1rem;
  position: relative;
  bottom: 8px;
  left: 20px;
  border: none;
  border-radius: 20px;
  outline: none;
}

.topbar-content input::placeholder {
  position: relative;
  left: 10px;
  top: 2px;
  font-size: 1rem;
}

#side-img {
  height: 25px;
  width: 25px;
  position: relative;
  top: 2px;
  left: 40px;
  margin-left: 5px;
}

/* STORIES */
.stories-container {
  display: flex;
  gap: 10px;
}

.story {
  height: 12rem;
  width: 7rem;
  background-color: rgba(0, 0, 0, 0.068);
  margin: 12px 1.2rem;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.story img {
  width: 100%;
  height: 80%;
  object-fit: cover;
  border-radius: 15px;
}

.story span {
  position: relative;
  left: 2.5rem;
}

/* FEED CONTENT */
.feed-content {
  width: 90%;
  background-color: #fff;
  border-radius: 12px;
  position: relative;
  margin-top: 1.5rem;
  left: 2rem;
  top: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.top-content img {
  height: 35px;
  width: 35px;
  position: relative;
  top: 15px;
  left: 15px;
}

.top-content {
  display: flex;
  justify-content: space-between;
}

.top-content span {
  position: relative;
  top: 4px;
  left: 1.2rem;
}

.icons i {
  position: relative;
  top: 20px;
  right: 25px;
  font-size: 1.15rem;
  color: gray;
}

.card-image img {
  margin-top: 1.5rem;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.bottom-icon {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.8rem 0;
  border-top: 1px solid #ddd;
  margin-top: 0.5rem;
}

.bottom-icon i {
  font-size: 1rem;
  color: gray;
  cursor: pointer;
}

.bottom-icon i span {
  margin-left: 7px;
  font-family:"Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  font-weight: 400;
}

.bottom-icon i:hover {
  background-color: rgba(0, 0, 0, 0.068);
}

/* ============================================
   TABLET VIEW (max-width: 1024px)
============================================ */
@media screen and (max-width: 1024px) {
  .leftsection { width: 22%; }
  .centersection { width: 55%; left: 22%; }
  .rightsection { width: 23%; left: 77%; }

  .topbar { width: 90%; margin-left: 5%; }
  .topbar-content input { width: 18rem; }

  .story { height: 10rem; width: 6rem; }
}

/* ============================================
   MOBILE VIEW (max-width: 768px)
============================================ */

@media screen and (max-width: 768px) {


  .leftsection, 
  .rightsection { 
    display: none; 
  }


 nav .icons ul {
  display: flex;
  align-items: center;   
  justify-content: center; 
  height: 100%;
}

nav .icons ul li {
  display: flex;
  align-items: center;   
  justify-content: center;
}



  .logo img {
    height: 32px;
    width: 32px;
    margin: 0;
    padding: 0;
    position: static;
  }

  /* Show only 4 icons: Home, Reels, Friends, Marketplace */
  .icons ul li {
    display: none; /* hide all first */
  }

  .icons ul li:nth-child(1),
  .icons ul li:nth-child(2),
  .icons ul li:nth-child(3),
  .icons ul li:nth-child(4) {
    display: block !important;   /* show only 4 icons */
    margin: 0 10px;
  }

  /* Hide the top-right menu icons */
  .sidemenu { 
    display: none !important; 
  }

  /* SEARCH ICON (IF YOU WANT TO SHOW) */
  .nav-search-icon {
    display: block;
  }

  /* CENTER SECTION */
  .centersection {
    width: 100%;
    left: 0;
    top: 65px;
    padding: 0;
  }

  /* TOPBAR FIX (remove side icons) */
  #side-img {
    display: none !important;   /* hide image/video/smile icons */
  }

  .topbar-content input {
    width: 80%;
    left: 10px;
  }

  /* Stories scroll */
  .stories-container {
    width: 100%;
    overflow-x: auto;
    gap: 10px;
    padding-left: 10px;
  }

  .story {
    flex: 0 0 85px;
    height: 150px;
  }

  .feed-content {
    width: 95%;
    margin: 10px auto;
    left: 0;
    top: 0;
  }
}


/* ============================================
   EXTRA SMALL (max-width: 480px)
============================================ */
@media screen and (max-width: 480px) {

  nav {
    padding: 6px 10px;
  }

  /* Keep logo stable */
  .logo img {
    height: 30px;
    width: 30px;
    position: static;
    margin: 0;
    padding: 0;
  }

  /* Same 4 icons only */
  .icons ul li {
    display: none;
  }

  .icons ul li:nth-child(1),
  .icons ul li:nth-child(2),
  .icons ul li:nth-child(3),
  .icons ul li:nth-child(4) {
    display: block !important;
  }

  .story {
    flex: 0 0 80px;
    height: 135px;
  }

  .feed-content {
    width: 98%;
  }

  .bottom-icon i {
    font-size: 0.85rem;
  }
}
