@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  background: #f3f2e9;
  color: #30261B;
  overflow: -moz-scrollbars-none;
  -ms-overflow-style: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
/*
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  */
}

p{
  font-size: 18px;
  font-weight: 600;
}

a{
  color: #c06300;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
a:hover{
  color: #793e00;
}

.blog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
  gap: 20px;
  max-width: 1000px;
  width: 100%;
  justify-content: center;
}

.blog-post {
  width: 100%;
  background: #fffded;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  position: relative;
  border: 2px solid transparent;
}

.blog-post.starred {
  border: 2px solid #c06300; /* Restore outline */
  box-shadow: 0 0 10px rgba(192, 99, 0, 0.5); /* Highlight effect */
}

/* Ensure images are properly sized */
.blog-post img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  width: 100%;
  height: auto;
  border-radius: 5px;
  align-items: center;
}

.blog-post h2
{
  margin-top: 10px;
  font-size: 28px;
  margin: 10px 0;
} 

.blog-post p
{
  font-size: 16px;
  color: #333;
  margin-top: 10px;
} 
.read-more {
  margin-top: 10px;
  display: block;
  margin-top: 10px;
  padding: 10px;
  background: #30261B;
  color: #fffded;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
}


.date {
  font-size: 14px;
  color: gray;
  margin-bottom: 10px;
}


.expanded-post {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 90vh;
  max-width: 90vw;
  background: #fffded;
  padding: 20px;
  overflow: auto;
  z-index: 1000;
  scrollbar-width: none;
  

  display: flex; /* Ensure content layout remains as before */
  flex-direction: column; 
  justify-content: flex-start; 
  align-items: center;

  box-shadow: 0px 10px 20px rgba(0, 0, 0, 1); /* Optional: Adds some depth */
}

/* Ensure text and content within the expanded post are properly aligned */
.expanded-post h2{
  text-align: left;
  font-size: 30x;
  width: 90%;
  padding-top: 30px;
  
  color: #c06300;
}

.expanded-post h3{
  text-align: left;
  width: 90%;
  padding-top: 30px;
  
  color: #c06300;
}

.expanded-post p {
  text-align: left;
  font-size: 18px;
  width: 90%;
}

/* Ensure Read More link doesn't appear */
.expanded-post .read-more {
  display: none;
}

.expanded-content img{
  width: 80%;
  max-width: 700px;
  height: auto;
  border-radius: 5px;
  align-items: center;
  align-self: center; 
}

.expanded-content img.img-half {
  width: 48%;
  max-width: 400px;
  height: auto;
  border-radius: 5px;
  display: inline-block;
  margin: 1%;
  vertical-align: top;
}

.expanded-content img.img-full {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: 5px;
  display: inline-block;
  margin: 1%;
  vertical-align: top;
}

.expanded-content {
  display: none;
}

.expanded-post .expanded-content {
  display: block !important;
  margin-top: 15px;
  font-size: 18px;
  color: #333;
  width: 90%;
  text-align: left;
  text-wrap: auto;
  align-items: center;
}


/* Overlay for background blur & darken effect */
.expanded-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Darkening effect */
  backdrop-filter: blur(5px); /* Blur effect */
  z-index: 900; /* Below the expanded post */
  display: none;
}



.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Darken effect */
  backdrop-filter: blur(5px); /* Blur effect */
  z-index: 999;
  display: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
  background: red;
  color: #fffded;
  padding: 5px 10px;
  border-radius: 5px;
}

/* Star icon styles */
.star {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 24px; /* Increased size */
  color: gray;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.star:hover {
  transform: scale(1.2);
}

.starred {
  color: #c06300; /* Change color when starred */
}

/* Highlight starred posts */
.blog-post.starred {
  border: 1px solid #c06300; /* Thicker border */
}

/* Star position for expanded post */
.expanded-post .star {
  position: absolute;
  transform: scale(1.5); /* Scale up for visibility */
  top: 20px;
  left: 30px;
}


/* Make sure the grid is responsive */
@media (max-width: 600px) {
  .blog-container {
    grid-template-columns: 1fr; /* Stack posts on small screens */
  }

  .expanded-content img.img-half {
    width: 100%;       /* Full width */
    margin: 5px 0;      /* Vertical spacing */
    display: block;     /* Stack images */
  }
  .expanded-content img.img-full {
    width: 100%;       /* Full width */
    margin: 5px 0;      /* Vertical spacing */
    display: block;     /* Stack images */
  }
}