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

    body {
      background-color: #f4f4f4;
      color: #333;
      line-height: 1.6;
    }
    ::-webkit-scrollbar {
    display: none;
}
.animated_input {
  position: relative;
  width: 100%;
}
header h1 img {
  height: 50px;  /* keeps it compact */
  width: auto;   /* preserves aspect ratio */
  object-fit: contain;
}

@media (max-width: 768px) {
  header h1 img {
    height: 40px; /* smaller for tablets */
  }
}

@media (max-width: 480px) {
  header h1 img {
    height: 35px; /* smaller for phones */
  }
}
.animated_input input {
  width: 100%;
  padding: 12px 12px 12px 60px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.animated_input label {
  position: absolute;
  left: 60px;
  top: 30%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #888;
  pointer-events: none;
  transition: all 0.3s ease;
  line-height: 1;
}


.animated_input input:focus + label,
.animated_input input:not(:placeholder-shown) + label {
  top: 5px;
  font-size: 12px;
  color: #3565d1;
  transform: translateY(0);
  background: #fff;
  padding: 0 4px;
}

.fade-out label {
  opacity: 0;
  transform: translateY(-150%);
  transition: all 0.3s ease;
}

.fade-in label {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}


  .main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: black;
  padding: 12px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  top: 0;
  z-index: 999;
}

.logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.search_bar {
  display: flex;
  align-items: center;
}

.search_bar input {
  padding: 8px 12px;
  border: none;
  border-radius: 5px 0 0 5px;
  outline: none;
  background: #fff;
  font-size: 14px;
  width: 220px;
  transition: all 0.3s ease;
}

.search_bar input:focus {
  width: 260px;
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.search_bar button {
  background: #ff9800;
  border: none;
  padding: 8px 16px;
  color: #fff;
  font-size: 14px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  transition: 0.3s ease;
}

.search_bar button:hover {
  background: #e68a00;
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
  .search_bar input {
    width: 100%;
  }
}


    

.hot_topics {
  position: sticky;
  top: 0;
  background: #fff; /* White background so text stays visible */
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.topic_links {
  /* width: 50%; */
  display: flex;
  overflow-x: auto;
  gap: 15px;
  flex: 1;
  scrollbar-width: auto;
  scroll-behavior: smooth;
}

@media (max-width: 500px){
  .topic_links {
  width: 100%;
  display: flex;
  overflow-x: auto;
  gap: 15px;
  flex: 0 0 auto;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.right_nav{
  width: 100%;
}
.subscribe_btn {
  width: 50%;
}
.topic_dropdown {
  width: 50%;
}

}
.topic_links::-webkit-scrollbar {
  height: 6px;
}
.topic_links::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.topic_links a {
  flex: 0 0 auto;
  color: #333;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  background: #fff;
  transition: background 0.3s, color 0.3s;
}

.topic_links a:hover {
  background-color: #5b86e5;
  color: white;
}

.subscribe_btn {
  background: red;
  color: white;
  padding: 13px 20px;
  border: none;
  font-size: 15px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.subscribe_btn:hover {
  background: rgb(186, 0, 0);
}

.dropdown_wrapper {
  /* max-width: 250px; */
  width: 100%;
}

.topic_dropdown {
  width: 100%;
  font-size: 15px;
  padding: 13px 20px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  font-weight: 600;
  transition: 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.topic_dropdown:focus {
  outline: none;
  border-color: #5b86e5;
  box-shadow: 0 0 8px rgba(91, 134, 229, 0.3);
}
.right_nav {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  gap: 15px;
}
  
.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.main_grid_posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog_box {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.blog_box img {
  width: 100%;
  height: auto;
  display: block;
}

.blog_box .content {
  padding: 1rem;
}

.blog_box h3 {
  margin: 0 0 0.5rem;
}

.blog_box p {
  margin-bottom: 1rem;
  color: #555;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar_post {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar_post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.sidebar_post img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.sidebar_post .text h4 {
  margin: 0;
  font-size: 1rem;
}

.sidebar_post .text p {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: #777;
}

/* ✅ Media Query for Mobile Devices */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .main_grid_posts {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar_post {
    flex-direction: row;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .main_grid_posts ,.grid_posts {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  } 

  .blog_box .content {
    padding: 0.5rem !important;
  }
  .blog_box .content a{
    margin-top: 0 !important;
  }

  .blog_box h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.3rem !important;
  }

  .blog_box p {
    font-size: 0.75rem !important;
    margin-bottom: 0.5rem;
  }

  .blog_box a {
    font-size: 0.75rem !important;
  }

  .blog_box img {
    height: 120px !important;
    object-fit: cover;
  }
}




    .grid_posts {
      max-width: 1200px;
      margin: 0 auto 2rem auto;
      padding: 1rem 1rem;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1.5rem;
    }

    .blog_box {
      background: white;
      border-radius: 10px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .blog_box img {
      width: 100%;
      height: 180px;
      object-fit: cover;
    }

    .blog_box .content {
      padding: 1rem;
    }

    .blog_box .content h3 {
      font-size: 1.2rem;
      margin-bottom: 0.5rem;
    }

    .blog_box .content p {
      font-size: 0.9rem;
      color: #666;
    }

    .blog_box .content a {
      display: inline-block;
      margin-top: 0.5rem;
      color: #4a90e2;
      text-decoration: none;
      font-weight: bold;
    }

.footer {
  background-color: #292a2a;

  color: #f0f0f0;
  padding: 20px 20px 0px;
  font-family: Arial, sans-serif;
}

.footer_container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  gap: 20px;
}

.footer_section {
  flex: 1 1 250px;
}

.footer_section h3 {
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 5px;
}

.footer_section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 5px;
}




.footer_section ul li a {
  color: #ccc;
  text-decoration: none;
  display: block;
  /* margin: 8px 0; */
  transition: 0.3s;
}

.footer_section ul li a:hover {
  color: #fff;
}

.footer_section p a {
  color: #ccc;
  text-decoration: none;
}

.footer_section p a:hover {
  color: #fff;
}

.social_icons a {
  color: white;
  margin-right: 15px;
  font-size: 1.4rem;
  transition: color 0.3s;
}

.social_icons a:hover {
  color: #ffffff;
}

.footer_bottom {
  text-align: center;
  /* margin-top: 10px; */
  border-top: 1px solid #333;
  /* padding-top: 15px; */
  font-size: 14px;
}