/* Post Switcher Block Styles */

.postSwitcher {
  position: relative;
  width: 100%;
  padding: 0;
  background: #007668;
  padding-top: 25px;
  padding-bottom: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.postSwitcher__container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  position: relative;
}

/* Vertical divider line in the center */
.postSwitcher__container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 110px;
  background: rgba(255, 255, 255, 1);
  border-radius: 1px;
}

/* Alternative thicker line option */
.postSwitcher__container::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 110px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 1);
}

.postSwitcher__item {
  flex: 1;
  max-width: 45%;
}

.postSwitcher__item--previous {
  text-align: left;
}

.postSwitcher__item--next {
  text-align: right;
}

.postSwitcher__link {
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.postSwitcher__direction {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.postSwitcher__item--previous .postSwitcher__direction {
  justify-content: flex-start;
}

.postSwitcher__item--next .postSwitcher__direction {
  justify-content: flex-end;
}

.postSwitcher__label {
  color: var(--Vit, #fff);
  font-family: "Asap", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.postSwitcher__content {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.postSwitcher__item--next .postSwitcher__content {
  flex-direction: row-reverse;
  text-align: left;
}

.postSwitcher__image {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  overflow: hidden;
}

.postSwitcher__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.postSwitcher__info {
  flex: 1;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.postSwitcher__title {
  color: #fff;
  font-family: "Asap", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0 0 8px 0;
  transition: color 0.3s ease;
}

.postSwitcher__item--next .postSwitcher__title {
  text-align: right;
}

.postSwitcher__date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: "Asap", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  margin-bottom: 8px;
}

.postSwitcher__item--next .postSwitcher__date {
  text-align: right;
  justify-content: flex-end;
}

.postSwitcher__excerpt {
  color: #fff;
  font-family: "Asap", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.postSwitcher__item--next .postSwitcher__excerpt {
  text-align: right;
}

.postSwitcher__placeholder {
  height: 120px;
  visibility: hidden;
}

/* Single item centering when only one navigation exists */
.postSwitcher__container:has(.postSwitcher__placeholder) {
  justify-content: center;
}

.postSwitcher__item:has(.postSwitcher__placeholder) {
  display: none;
}

/* Hide divider when only one item exists */
.postSwitcher__container:has(.postSwitcher__placeholder)::before,
.postSwitcher__container:has(.postSwitcher__placeholder)::after {
  display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .postSwitcher {
    margin: 40px 0;
  }

  .postSwitcher__container {
    flex-direction: column;
    gap: 30px;
  }

  /* Hide divider on mobile since items stack vertically */
  .postSwitcher__container::before,
  .postSwitcher__container::after {
    display: none;
  }

  .postSwitcher__item {
    max-width: 100%;
  }

  .postSwitcher__item--next {
    text-align: left;
  }

  .postSwitcher__item--next .postSwitcher__direction {
    justify-content: flex-start;
    flex-direction: row-reverse;
  }

  .postSwitcher__item--next .postSwitcher__content {
    flex-direction: row;
    text-align: left;
  }

  .postSwitcher__link {
    padding: 16px;
  }

  .postSwitcher__image {
    width: 80px;
    height: 60px;
  }

  .postSwitcher__title {
    font-size: 16px;
  }

  .postSwitcher__label {
    font-size: 13px;
  }

  .postSwitcher__excerpt {
    font-size: 13px;
  }

  .postSwitcher__date {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .postSwitcher {
    margin: 30px 0;
  }

  .postSwitcher__container {
    gap: 20px;
  }

  .postSwitcher__link {
    padding: 14px;
  }

  .postSwitcher__content {
    flex-direction: column;
    gap: 10px;
  }

  .postSwitcher__item--next .postSwitcher__content {
    flex-direction: column;
  }

  .postSwitcher__image {
    width: 100%;
    height: 120px;
    align-self: stretch;
  }

  .postSwitcher__info {
    min-height: auto;
  }

  .postSwitcher__title {
    font-size: 15px;
  }

  .postSwitcher__label {
    font-size: 12px;
  }

  .postSwitcher__excerpt {
    font-size: 12px;
    -webkit-line-clamp: 3;
  }

  .postSwitcher__date {
    font-size: 12px;
  }

  .postSwitcher__date svg {
    width: 14px;
    height: 14px;
  }
}

/* Enhanced hover effects */
@media (hover: hover) {
  .postSwitcher__link:hover .postSwitcher__direction svg {
    transform: scale(1.1);
  }

  .postSwitcher__item--previous
    .postSwitcher__link:hover
    .postSwitcher__direction
    svg {
    transform: scale(1.1) translateX(-2px);
  }

  .postSwitcher__item--next
    .postSwitcher__link:hover
    .postSwitcher__direction
    svg {
    transform: scale(1.1) translateX(2px);
  }
}

/* Accessibility improvements */
.postSwitcher__link:focus {
  outline: 2px solid var(--Orange, #eb5a37);
  outline-offset: 2px;
}

.postSwitcher__link:focus:not(:focus-visible) {
  outline: none;
}

/* Print styles */
@media print {
  .postSwitcher {
    display: none;
  }
}
