/* Colour palette 

Main Blue:     #5c8ecb
Offwhite:      #f0f0ef
White:         #ffffff
Black:         #191818
Dark Grey:     #505053
Light Grey:    #9d9fa4
*/

* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif, Arial, Helvetica, sans-serif
}


body {
  font-family: 'Poppins';
  margin: 0;
  background: #f0f0ef;
}

.factblocked-nav {
  top: 0;
  position: sticky;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  height: 70px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 999;
  margin: 0;
}

/* Sections */
.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}

/* Logo */
.nav-logo {
  width: 180px;
  cursor: pointer;
}

/* Center nav icons */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  color: #505053;
  cursor: pointer;
  padding: 10px 30px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  text-decoration: none;
}

.nav-icon:hover {
  transition: .3s ease;
  background-color: #f0f0ef;
  color: #5c8ecb;
}

.nav-icon.active {
  color: #5c8ecb;
}


.nav-icon::before {
  content: attr(data-tooltip);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);

  background-color: #5c8ecb;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.nav-icon:hover::before,
.nav-icon.active::before {
  opacity: 1;
}

.profile-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  color: #505053;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  text-decoration: none;
}

.logo {
  width: 240px;
  margin-right: 45px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-user-icon img {
  width: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.online {
  position: relative;
}

.online::after {
  content: '';
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #41db51;
  position: absolute;
  top: 0;
  right: 0;
}

.nav-gap {
  margin: 25px;
  font-style: italic;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  color: #5c8ecb;
}

/* Profile Page */

.cover-img {
  width: 80%;
  border-radius: 6px;
  margin-bottom: 14px;
  background-image: url('/images/picture/factblocked-slogan.png');
  background-size: cover;
  background-position: center;
  aspect-ratio: 16/9;
}


.write-post-container {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  color: #505053;
  box-sizing: border-box;
}

.user-profile {
  display: flex;
  align-items: center;
}

.user-profile img {
  width: 45px;
  border-radius: 50%;
  margin-right: 10px;
}

.user-profile p {
  margin-bottom: -5px;
  font-weight: 500;
  font-size: 16px;
  color: #191818;
}

.user-profile small {
  font-size: 12px;
  color: #9d9fa4;
}

.post-input-container {
  padding-top: 20px;
}

.post-input-container textarea {
  width: 100%;
  border: 0;
  outline: 0;
  border-bottom: 1px solid #ccc;
  background: transparent;
  resize: none;
}

.add-post-links {
  display: flex;
  margin-top: 10px;
}

.add-post-links a {
  text-decoration: none;
  display: flex;
  align-items: center;
  color: #505053;
  margin-right: 30px;
  font-size: 13px;
}

.add-post-links a img {
  width: 30px;
  margin-right: 10px;
}

.post-container {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  color: #505053;
  margin: 20px 0;
  box-sizing: border-box;
}

.user-profile span {
  font-size: 13px;
  color: #9d9fa4;
}

.post-text {
  color: #9d9fa4;
  margin: 15px 0;
  font-size: 15px;
}

.post-text span {
  color: #505053;
  font-weight: 500;
}

.post-text a {
  color: #5c8ecb;
  text-decoration: none;
}

.post-img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 5px;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.post-img:hover {
  transform: scale(0.99);
  opacity: 70%;
  cursor: pointer;
}

.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-icons {
  display: flex;
  gap: 15px;
  font-family: sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.activity-icons div {
  display: flex;
  align-items: center;
  margin-right: 25px;
}

.activity-icons .count {
  display: inline-block;
  width: 24px; 
  text-align: right; 
}

.activity-icons img {
  width: 26px;
  margin-right: 5px;
  transition: filter 0.3s;
}


.post-profile-icon {
  display: flex;
  align-items: center;
}

.post-profile-icon img {
  width: 30px;
  border-radius: 50%;
  margin-right: 5px;
}

.hover-text {
  color: #191818;
  transition: color .3s ease;
}

.hover-text:hover {
  color: #5c8ecb;
  font-weight: 500;
  transition: color .3s ease;
}

/*--------------------------------------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------- Profile Page ---------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------------------------------*/


.profile-container {
  width: 75%;
  margin: auto;
  color: #191818;
}

.cover-img {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: 6px;
  margin-bottom: 14px;
  object-fit: cover;
  object-position: center 75%
}

.profile-details {
  background-color: #fff;
  padding: 20px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}


.pd-row {
  display: flex;
  align-items: flex-start;
}

.pd-image {
  width: 100px;
  margin-right: 20px;
  border-radius: 6px;
}

.pd-row div h4 {
  font-size: 25px;
  font-weight: 600;
}

.pd-row div p {
  font-size: 13px;
}

.pd-row div img {
  width: 25px;
  border-radius: 50%;
  margin-top: 12px;
}


.profile-info {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
}

.info-col {
  display: flex;
  flex-direction: column;
  width: 35%;
  margin-right: 25px;
}

.post-col {
  display: flex;
  flex-direction: column;
  width: 65%;
}

.profile-intro {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.profile-intro h4,
.profile-photo h4 {
  color: #191818;
  font-size: 18px;
  font-weight: 600;
}

.profile-photo {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.source-link {
  color: #191818;
  transition: color .3s ease;
  cursor: pointer;
}

.source-link:hover {
  color: #5c8ecb;
  /* color when hovered */
}

.intro-text {
  color: #505053;
  text-align: left;
  margin: 10px 0;
}

.title-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.photo-box {
  display: grid;
  grid-template-columns: 50% 50%;
  /* grid-template-columns: repeat (3, auto); */
  grid-gap: 10px;
  margin-top: 15px;
}

.photo-box div img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-box div img:hover {
  transform: scale(0.97);
  opacity: 70%;
  cursor: pointer;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

.close {
  position: absolute;
  top: 30px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.modal-arrow,
.modal-close {
  position: absolute;
  cursor: pointer;
}

.modal-close {
  top: 30px;
  right: 35px;
}

.left-arrow {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.right-arrow {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.modal-arrow svg,
.modal-close svg {
  fill: none;
  stroke: white;
  stroke-width: 2;
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.modal-arrow:hover svg,
.modal-close:hover svg {
  opacity: 1;
}

.modal-arrow,
.modal-close,
.modal-arrow svg,
.modal-close svg {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-arrow,
.modal-close {
  user-select: none;
}



/*--------------------------------------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------- Mobile View ---------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------------------------------*/



@media (max-width: 900px) {

  .add-post-links a img {
    width: 2rem;
    margin-right: 10px;
  }


  .nav-center {
    display: none;
  }

  .profile-photo {
    display: none;
  }

  .cover-img {
    grid-area: cover;
  }

  .profile-details {
    flex-wrap: wrap;
  }

  .add-post-links {
    align-items: center;
  }

  nav {
    flex-wrap: wrap;
  }

  .logo {
    width: 110px;
    margin-right: 20px;
  }

  .nav-left ul li img {
    width: 20px;
    margin: 0 8px;
  }

  nav-user-icon img {
    width: 30px;
  }

  .nav-user-icon {
    margin-left: 0;
  }


  .nav-profile-mobile {
    display: none;
  }

  .profile-info {
    flex-direction: column;
  }

  .profile-container {
    width: 90%;
  }

  .info-col {
    width: 100%;
  }

  .post-col {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .dropdown-menu {
    display: none;
  }

  .nav-profile-desktop {
    display: none;
  }

  .profile-icon:hover {
    transition: .3s ease;
    background-color: #f0f0ef;
    color: #5c8ecb;
  }

  .profile-icon.active {
    color: #5c8ecb;
  }

  .profile-icon::before {
    content: attr(data-tooltip);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);

    background-color: #5c8ecb;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
  }

  .profile-icon:hover::before,
  .profile-icon.active::before {
    opacity: 1;
  }
}

.dropdown-menu {
  display: none;
  position: sticky;
  top: 5.5rem;
  width: 100%;
  z-index: 1;
  border-bottom: 1px solid #9d9fa4;
  height: calc(100vh - 4rem);
  background-color: #ffffff
}

.dropdown-menu-item {
  display: flex;
  padding: 2rem 2rem 2rem 2rem;
  border-bottom: 1px solid #9d9fa4;
  color: #5c8ecb;
  text-decoration: none;
  font-weight: 600;
}

.dropdown-menu-item:last-of-type {
  border: none;
}

#close-icon {
  display: none;
}