/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  font-family: "Roboto", "Arial";
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0 20px;
}

/* Blog Container */
.blog-container {
  max-width: 800px;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

/* Blog Header */
.blog-header {
  text-align: left;
}

.blog-title {
  line-height: 43px;
  font-size: 2.3rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 10px;
}

.blog-author {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.author-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #6a11cb;
}

.author-info {
  text-align: left;
}

.author-name {
  font-weight: bold;
  color: #6a11cb;
}

.publish-date {
  font-size: 0.9rem;
  color: #777;
}

/* Separator */
.separator {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  margin: 20px 0;
}

/* Blog Content */
.blog-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

.blog-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-content pre {
  /* background: #f4f4f4; */
  padding: 10px;
  border-left: 4px solid #6a11cb;
  overflow-x: hidden; /*scroll bar hide*/
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  text-align: left;
}

.blog-content p i {
  font-family: "Yellowtail", serif;
  font-weight: 400;
  font-style: italic;
}

/* Navbar Styles */
.navbar {
  margin: 0;
  background: #091624;
  padding: 15px 0;
  color: white;
  position: sticky;
  top: 0;
  width: calc(100% + 40px);
  margin-left: -20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo Styles */
.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #ffda79;
}

/* Search Bar Styles */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 30px;
  padding: 5px 10px;
  width: 50%;
  max-width: 400px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1rem;
  padding: 5px;
  border-radius: 30px 0 0 30px;
}

.search-bar button {
  border: none;
  background: transparent;
  color: #091624;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 10px;
}

.search-bar button:hover {
  color: #2575fc;
}

/* Main Link Styles */
.main-link {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 15px;
  border-radius: 20px;
  transition: background 0.3s ease, color 0.3s ease;
}

.main-link:hover {
  background: white;
  color: #6a11cb;
}

/* Blog Actions Container */
.blog-author-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-actions,
.footer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Button Styles */

.share-button {
  background-color: #6a11cb;
  color: white;
  border: none;
  padding: 8px 15px;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s ease;
}

.share-button:hover {
  background-color: #2575fc;
}

.share-options {
  display: none;
  flex-direction: column;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  top: 100%;
  right: 0;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100px;
  font-size: 16px;
}

.share-options a,
.share-options button {
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  padding: 5px 0;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}

.share-options a:hover,
.share-options button:hover {
  color: #6a11cb;
}

.footer-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #6a11cb;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.hidden {
  opacity: 0;
  transform: translateY(20px);
}

#random-blogs-container {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

#random-blogs-container h2 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #222;
  margin-bottom: 20px;
}

#blog-posts-container {
  text-decoration: none;
}

#random-blogs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.blog-post h3 a {
  text-decoration: none;
}

.random-blog-card {
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
}

.random-blog-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.random-blog-card h3 {
  font-size: 1.2rem;
  font-weight: bold;
  color: #6a11cb;
  margin-bottom: 5px;
}

.random-blog-card a {
  text-decoration: none;
  color: #2575fc;
  font-size: 0.9rem;
  font-weight: bold;
}

.random-blog-card a:hover {
  text-decoration: underline;
}

.blog-section {
  /* margin: 50px auto; */
  width: 100%;
  text-align: center;
}

.blog-post {
  display: flex;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  overflow: hidden;
  /* width: calc(33%, 30); */
}

.blog-post img {
  width: 20%;
  height: auto;
  border-radius: 8px 8px 8px 8px;
  margin-right: 12px;
}

.blog-content {
  padding: 15px;
}

.blog-content h3 {
  margin-top: 0;
}
.blog-content h3 a {
  text-decoration: none;
}

.blog-content p {
  color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-bar {
    width: 50%;
  }

  .main-link {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    align-self: center;
  }

  .search-bar {
    align-self: center;
    width: 80%;
    margin: 10px 0;
  }

  .main-link {
    align-self: flex-end;
  }

  .blog-author-container {
    display: grid;
    justify-content: space-between;
    align-items: center;
  }
  #blogscontainer {
    width: 100%;
    margin: 20px 0;
  }

  .blog-post {
    display: block;
  }

  .blog-post img {
    width: 100%;
    border-radius: 8px;
  }
  .blog-content pre {
    white-space: pre-wrap; /* This will wrap the text inside <pre> */
    word-wrap: break-word;
  }
}
