* {
  padding: 0;
  margin: 0;
}

/* cover image */
.cover,
.heroCover,
.content-container {
  height: 100vh;
}

.cover {
  background-image: url("../imgs/readers-feedback-bg-mobile.webp");
  background-color: #fffcf5;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  overflow: hidden;
}

.cover-postcards {
  background-image: url("../imgs/readers-feedback-bg-mobile.webp");
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  z-index: -1;
}

.heroCover {
  background-image: url("../imgs/envelope-mobile.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.content-container {
  position: relative;
  z-index: 20;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.zbonline30-globe {
  width: 120%;
}

.zbonline30-logo {
  width: 55vw;
  padding-bottom: 1em;
}

.header {
  position: absolute;
  width: 100%;
}

.title {
  font-size: 2rem;
  font-weight: 800;
}

.standfirst {
  width: 80%;
  margin: auto;
}

body.theme-light .publish .date {
  border: none;
}

.postcards {
  height: auto;
  position: relative;
  margin: 0 auto;
}

/* Swiper and Postcard Styles */
.postcard-swiper {
  max-width: 800px;
  margin: 0 auto;
}
.swiper-container {
  width: 90%;
  max-width: 90%;
}

.swiper-slide {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.postcard {
  background: #fffcf5;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  width: 90%;
  max-width: 800px;
  min-height: 480px;
  padding: 1rem;
  position: relative;
}

.postcard-content,
.postcard-meta {
  padding: 1rem;
  width: 100%;
}

.postcard-content {
  border-top: 1px dashed #ccc;
  height: 480px;
}

.postcard-meta {
  text-align: center;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
}

.stamp {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.stamp img {
  width: 100px;
  max-width: 100%;
}

.recipient-info p {
  margin: 10px 0;
}

.recipient-info p {
  text-align: left;
}

.recipient-info a {
  font-weight: 600;
  color: var(--theme-ui-colors-black);
}

.recipient-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.letter-article {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* --- Navigation and Pagination Styles --- */
.swiper-button-prev,
.swiper-button-next {
  position: static; /* Base position */
  width: 30px;
  height: 30px;
  background-color: #9a2c2c;
  border-radius: 50%;
  margin: 0;
  background-size: 32%;
  background-repeat: no-repeat;
  background-position: center;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  color: white;
  font-size: 1rem;
  font-weight: bold;
}

.swiper-pagination {
  position: absolute !important;
  color: #333;
  margin: auto;
  top: auto;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.swiper-button-prev {
  background-image: url("../imgs/arrow-prev.webp");
}

.swiper-button-next {
  background-image: url("../imgs/arrow-next.webp");
}

/* --- Mobile Navigation Layout (Default) --- */
.swiper-navigation-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  padding: 1em;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 2px 10px;
}

.nav-button-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.postcard p {
  font-size: 1rem;
  line-height: 1.6rem;
  text-align: left;
}

.tag {
  margin: 2em auto;
  width: 80%;
}
@media (min-width: 431px) and (max-width: 600px) {
  .heroCover {
    background-image: url("../imgs/envelope-tablet.webp");
    background-size: 130%;
  }

  .zbonline30-globe {
    width: 80vw !important;
  }
}

@media (min-width: 600px) and (max-width: 768px) {
  .cover {
    background-image: url("../imgs/readers-feedback-bg.webp");
  }

  .heroCover {
    background-image: url("../imgs/envelope-tablet.webp");
  }

  .zbonline30-globe {
    width: 70vw !important;
  }

  .zbonline30-logo {
    width: 50vw !important;
    padding-bottom: 2em;
  }

  .postcard {
    flex-direction: column-reverse;
    justify-content: start;
  }

  .postcard-content,
  .postcard-meta {
    width: 100%;
    border: none;
    padding: 0.5rem;
  }

  .postcard-meta {
    display: flex;
    flex-direction: row-reverse;
  }

  .stamp img {
    width: 130px;
  }

  .postcard-content {
    border-top: 1px dashed #ccc;
    overflow: hidden;
    overflow-y: scroll;
  }
}

/* --- Desktop Navigation Layout --- */
@media (min-width: 1024px) and (orientation: portrait) {
  .zbonline30-globe {
    width: 80vw !important;
  }

  h1 {
    font-size: 3.5rem !important;
  }
}

@media (min-width: 1024px) and (orientation: landscape) {
  h1 {
    font-size: 3.5rem !important;
  }
}

@media (min-width: 800px) and (orientation: portrait) {
  .heroCover {
    background-image: url("../imgs/envelope-tablet.webp") !important;
    background-size: 140%;
  }

  .zbonline30-globe {
    width: 80% !important;
  }

  .zbonline30-logo {
    width: 65vw !important;
  }

  h1 {
    font-size: 3.5rem !important;
  }

  .standfirst {
    font-size: 1.3rem !important;
    width: 100% !important;
  }
}

@media (min-width: 768px) and (orientation: portrait) {
  .heroCover {
    background-size: 150%;
  }

  .zbonline30-globe {
    width: 90% !important;
  }

  .zbonline30-logo {
    width: 50vw !important;
  }
}

@media (min-width: 769px) {
  .cover {
    background-image: url("../imgs/readers-feedback-bg.webp");
  }

  .heroCover {
    background-image: url("../imgs/envelopes.webp");
  }

  .zbonline30-globe {
    z-index: -1;
    width: 55%;
  }

  .zbonline30-logo {
    width: 35vw;
    padding-bottom: 3em;
  }

  .header {
    width: 60%;
  }

  .title {
    font-size: 3.5rem;
  }

  .standfirst {
    width: 60%;
  }

  .main-container {
    position: relative;
  }

  .postcards {
    padding: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
  }

  .swiper-navigation-panel {
    position: absolute;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 0;
    background: none;
    padding: 0px 1rem;
    margin: auto;
    height: 100vh;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: none;
  }

  /* Hide text labels on desktop */
  .nav-button-wrapper span {
    display: none;
  }

  .nav-button-wrapper p {
    font-size: 0.9rem;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
  }

  #prev-wrapper,
  #next-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .swiper-pagination {
    top: 1em !important;
    font-size: 1.2rem;
  }

  .postcard {
    flex-direction: row;
  }

  .postcard-content {
    width: 70%;
    border-right: 1px dashed rgb(204, 204, 204);
    border-top: none;
    align-content: center;
    overflow-y: scroll;
    height: auto;
  }

  .postcard-meta {
    width: 35%;
    text-align: center;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
  }

  .stamp {
    display: flex;
    justify-content: flex-end;
  }

  .stamp img {
    width: 130px;
  }
}

@media (min-width: 1280px) {
  #prev-wrapper {
    left: -2em;
  }

  #next-wrapper {
    right: -2em;
  }
}
