 /* Wrapper to mimic body styling without using global reset */
 .wrapper1 {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    padding: 20px;
    min-height: 100vh;
    color: #333;
    font-family: 'Poppins', sans-serif;
  }
  
  /* Main Container */
  .container1 {
    display: flex;
    max-width: 1200px;
    margin: auto;
    gap: 20px;
  }
  
  /* Blog Section */
  .blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    flex: 2;
  }
  
  .blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }
  
  .blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
  }
  
  .blog-content {
    padding: 20px;
  }
  
  .blog-content h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #222;
    transition: color 0.3s ease;
  }
  
  .blog-content h2:hover {
    color: #007bff;
  }
  
  .blog-content p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
  }
  
  .blog-content a {
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 8px 16px;
    border: 2px solid #007bff;
    border-radius: 25px;
  }
  
  .blog-content a:hover {
    background: #007bff;
    color: #fff;
  }
  
  /* Sidebar */
  .sidebar {
    background: #fff;
    padding: 10px 15px; /* Reduced padding for smaller height */
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    flex: 1;
    text-align: center;
    max-height: 300px;  /* Limit the height */
    overflow-y: auto;   /* Allow scroll if content overflows */
  }
  
  
  .sidebar h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #222;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
  }
  
  /* Categories */
  .categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
  }
  
  .category {
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .category:hover {
    background: #0056b3;
    transform: scale(1.05);
  }
  
  /* Related Topics Section */
  .related-topics {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
  
  .related-topics h3 {
    font-size: 24px;
    color: #222;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
  }
  
  .related-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .related-card {
    background: #f9f9f9;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  
  .related-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
  }
  
  .related-content {
    padding: 15px;
  }
  
  .related-content h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #222;
  }
  
  .related-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
  }
  
  .related-content a {
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 6px 12px;
    border: 2px solid #007bff;
    border-radius: 20px;
  }
  
  .related-content a:hover {
    background: #007bff;
    color: #fff;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .container {
      flex-direction: column;
    }
    
    .sidebar {
      margin-top: 20px;
    }
    
    .categories {
      flex-direction: column;
      align-items: center;
    }
  }