* {
  box-sizing: border-box;
}

/* Header Information for Trending Posts */
.post-info h1, h2, h3, h4, h5, h6 {
  font-family: 'Candal', serif;
  color: #fbf9f9;
  margin: 5px;
}

.socials a {
  color: white;
}

.post-info a {
  margin: 5px;
  color: black;
}

.post-slider {
  position: relative;
}

.post-slider .slider-title {
  text-align: center;
  margin: 10px auto;
}

/*Next & Previous Buttons */
.post-slider .next {
  position: absolute;
  top: 50%;
  right: 30px;
  font-size: 2em;
  color: rgb(249, 251, 251);
  cursor: pointer;
}

.post-slider .prev {
  position: absolute;
  top: 50%;
  left: 30px;
  font-size: 2em;
  color: rgb(248, 250, 250);
  cursor: pointer;
}

/* Images */
.post-slider .post-wrapper {
  width: 84%;
  height: 350px;
  margin: 0 auto;
  overflow: hidden;
  padding: 10px 0;
}

.post-slider .post-wrapper .post {
  display: inline-block;
  background: #fcfdfe;
  width: 300px;
  height: 330px;
  margin: 0 10px;
  border-radius: 5px;
  box-shadow: 1rem 1rem 1rem -1rem #433737;
}

.post-slider .post-wrapper .post a{
  display: block;
}

.post-slider .post-wrapper .post .slider-image {
  width: 100%;
  height: 200px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.post-slider .post-wrapper .post .post-info {
  height: 130px;
  padding: 0 5px;
}

.page-wrapper a:hover {
  color: rgb(89, 89, 243);
}

/* Recent Posts Layout*/
.content {
  width: 90%;
  margin: 30px auto;
}

.content .main-content {
  width: 70%;
  float: left;
}

.content .main-content.single{
  background: white;
  padding: 20px 50px;
  font-size: 1.1em;
  border-radius: 5px;
}

.content .main-content.single .post-title{
  text-align: center;
  margin-bottom: 40px;
}

.content .main-content .recent-post-title {
  margin: 20px 0 20px 10px;
  font-size: 28px;
  font-weight: bold;
  color: #222;
  clear: both;
}

.content .main-content .post {
  width: 95%;
  margin: 20px auto;
  border-radius: 5px;
  background: white;
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.content .popular .post{
  border-top: 1px solid white;
  margin-top: 10px;
  padding-top: 10px;
}

.content .popular .post a {
  color: black;
  font-size: 15px;
  display: block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.content .popular .post a:hover {
  transform: translateX(10px);
  color: rgb(89, 89, 243) !important;
}

.content .popular .post img{
  height: 60px;
  width: 75px;
  float: left;
  margin-right: 10px;
}

.content .main-content .post .post-image {
  width: 40%;
  max-height: 270px;
  object-fit: cover;
  border-radius: 5px;
}

.content .main-content .post .post-preview {
  width: 60%;
  display: flex;
  flex-direction: column;
  position: relative;
  display: block;
}
.content .main-content .post .post-preview a{
  display: block;
}

.post-meta {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.post-meta i {
  margin-right: 5px;
  color: #888;
}

.post-meta span {
  margin-right: 15px;
}

.preview-text {
  margin: 10px 0;
  color: #333;
  overflow-wrap: break-word;
  padding-bottom: 40px; /* ensures room for the button */
}

/* Button Layout */
.btn.read-more {
  position: absolute;
  bottom: 10px;
  right: 10px;
  border: 2px solid #4151e3;
  background: transparent;
  color: #4151e3 !important;
  padding: .5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
}

.btn.read-more:hover {
  background: rgb(57, 136, 220);
  color: white !important;
  transition: 0.25s;
}

/* Sidebar Info */
.content .sidebar {
  width: 30%;
  float: left;
  height: 300px;
}

.content .sidebar.single{
  padding: 0px 10px;
}

.content .sidebar .section{
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.content .sidebar .section.search{
  margin-top: 73.1px;
}

.content .sidebar .section .section-title{
  margin: 10px 0px 10px 0px;
}

.text-input{
  padding: .7rem 1rem;
  display: block;
  width: 100%;
  border-radius: 5px;
  outline: none;
  line-height: 1.5rem;
  font-size: 1.2em;
}

/* Topics */

.content .sidebar .section.topics ul{
  margin: 0px;
  padding: 0px;
  list-style: none;
  border-top: 1px solid #e0e0e0;
}

.content .sidebar .section.topics ul li a{
  border-bottom: 1px solid #e0e0e0;
  display: block;
  padding: 15px 0px 15px 0px;
  transition: all 0.3s;
}

.content .sidebar .section.topics ul li a:hover{
  padding-left: 10px;
  transition: all 0.3s;
  color: rgb(89, 89, 243) !important;
}

.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

.post-preview h2 {
  font-size: 24px;
  margin: 0 0 10px;
  line-height: 1.3;
  font-weight: 700;
}

.post-preview h2 a {
  color: #1c1c1c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-preview h2 a:hover {
  color: #4151e3;
  text-decoration: underline;
}

@media (max-width: 768px) {
  /* Wrap both sections vertically instead of side-by-side */
  .content {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
    gap: 30px;
  }

  /* Recent Posts Section */
  .content .main-content {
    width: 100%;
    float: none;
  }

  .content .main-content.single {
    padding: 20px;
    font-size: 1em;
  }

  .content .main-content .recent-post-title {
    font-size: 24px;
    margin: 0 0 20px;
  }

  .content .main-content .post {
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 15px;
  }

  .content .main-content .post .post-image {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
  }

  .content .main-content .post .post-preview {
    width: 100%;
    position: relative;
  }

  .post-preview h2 {
    font-size: 20px;
  }

  .preview-text {
    font-size: 15px;
    padding-bottom: 50px;
  }

  .btn.read-more {
    position: static;
    margin-top: 10px;
    display: inline-block;
  }

  /* Sidebar Section */
  .content .sidebar {
    width: 100%;
    float: none;
    height: auto;
    padding: 0;
  }

  .content .sidebar.single {
    padding: 0;
  }

  .content .sidebar .section {
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
  }

  .content .sidebar .section .section-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .content .sidebar .section.search {
    margin-top: 0;
  }

  .text-input {
    font-size: 1em;
    padding: 10px;
  }

  .content .sidebar .section.topics ul li a {
    padding: 12px 0;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .content .main-content.single {
    padding: 15px;
  }

  .post-preview h2 {
    font-size: 18px;
  }

  .btn.read-more {
    font-size: 0.9em;
    padding: 0.4rem 0.8rem;
  }

  .text-input {
    font-size: 1em;
  }

  .content .sidebar .section {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .btn.read-more {
    display: inline-block;
    font-size: 0.9em;
    padding: 0.4rem 0.9rem;
    margin: 10px auto 0 auto; /* Center horizontally */
    position: static; /* Remove absolute positioning */
    width: auto;
    max-width: 200px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .btn.read-more {
    font-size: 0.85em;
    padding: 0.35rem 0.8rem;
  }
}
