/* GENERAL RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #7a8a9e;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* BLOG WRAPPER */
.blog-wrapper {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 1rem;
}

/* POSTS CONTAINER */
.posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}

/* POST CARD */
.post-card {
  width: 45%;
  max-width: 520px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.post-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.3rem;
  color: #0d2b5a;
  margin-bottom: 0.6rem;
  transition: color 0.3s;
}

.post-card:hover .post-title {
  color: #0b2450;
}

.post-excerpt {
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.btn-blog {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background-color: #0d2b5a;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-blog:hover {
  background-color: #0b2450;
  transform: translateY(-2px);
}

.post-footer {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: #666;
  background-color: #f1f1f1;
}

/* SIDEBAR */
.sidebar {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 20px;
  height: fit-content;
}

/* FORM */
.form-container {
  background-color: #f9f9f9;
  border-radius: 5px;
  padding: 1.5rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.form-header {
  font-weight: bold;
  color: #0d2b5a;
  margin-bottom: 1rem;
  text-align: center;
}

form input,
form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s;
}

form input:focus,
form textarea:focus {
  border-color: #0d2b5a;
  outline: none;
}

form button {
  width: 100%;
  padding: 0.7rem;
  background-color: #0d2b5a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

form button:hover {
  background-color: #0b2450;
  transform: translateY(-2px);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.page-link {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background: #f1f1f1;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}

.page-link:hover {
  background: #0d2b5a;
  color: white;
}

.page-link.active {
  background: #0d2b5a;
  color: white;
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* RELATED BLOGS */
.related-blogs {
  margin: 3rem 0;
}

.related-cards {
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.related-card {
  flex: 0 0 220px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.related-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.related-card h3 {
  font-size: 0.9rem;
  margin: 10px;
  color: #0d2b5a;
}

.related-card p {
  font-size: 0.85rem;
  margin: 0 10px 10px 10px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1000px) {
  .post-card {
    width: 100%;
    max-width: 600px;
  }
  .sidebar {
    width: 90%;
    margin-top: 2rem;
    position: relative;
  }
}

@media (max-width: 650px) {
  .blog-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
  .posts-container {
    justify-content: center;
    gap: 1rem;
  }
  .post-card {
    width: 100%;
    max-width: 100%;
  }
  .post-img {
    height: 180px;
  }
  .sidebar {
    width: 95%;
    margin-top: 2rem;
    position: relative;
  }
  .related-cards {
    flex-wrap: wrap;
    overflow-x: hidden;
    justify-content: center;
  }
  .related-card {
    flex: 1 1 calc(50% - 10px);
    max-width: 45%;
    margin-bottom: 10px;
  }
  .related-card img {
    height: 100px;
    width: 100%;
  }
}

/* <pag1> */

.content-wrapper {
  margin-bottom: 3rem;
}

.related-blogs {
  margin: 3rem 0;
}

.sidebar {
  margin-top: 3rem;
}

/* Hero */
.hero {
  background-color: #f8f9fa;
  text-align: center;
  padding: 4rem 1rem;
}
.hero h1 {
  color: #0d2b5a;
  font-size: 2.2rem;
  font-weight: bold;
}
.divider {
  width: 50px;
  height: 5px;
  background-color: #0d2b5a;
  margin: 20px auto;
}
.text-muted {
  color: #6c757d;
  margin-top: 10px;
}

/* Main content layout */
.main-content {
  width: 100%;
  max-width: 1500px;
  margin: 2rem auto;
  display: flex;
  justify-content: space-evenly;
}
.content-wrapper {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.blog {
  max-width: 700px; /* optional, keeps it readable */
  margin-right: auto; /* aligns to left if space available */
  display: flex;
  flex-direction: column; /* stack image + text vertically */
  gap: 1rem; /* spacing between image and text */
  height: auto; /* make height match content */
}
.blog-img {
  width: 100%; /* full width of container */
  height: auto; /* maintain aspect ratio */
  border-radius: 5px;
}

.blog-text {
  line-height: 1.6; /* spacing between text lines */
}

/* Sidebar Form fixed at top-right corner */
.sidebar {
  position: -webkit-sticky;
  top: 20px; /* distance from top of the page */
  right: 20px; /* distance from right edge */
  width: 280px; /* form width */
  min-height: 800px; /* adjust height as needed */

  z-index: 1000; /* make sure it stays above other content */
}

.form-container {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1.5rem;
}

.form-header {
  font-weight: bold;
  color: #0d2b5a;
  margin-bottom: 1rem;
  text-align: center;
}

form input,
form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  width: 100%;
  padding: 0.7rem;
  background-color: #0d2b5a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

form button:hover {
  background-color: #0b2450;
}

/* Related Blogs Section */
.related-blogs {
  margin: 30px 0;
}

.related-blogs h2 {
  text-align: center;
  color: #0d2b5a;
  margin-bottom: 20px;
}

.blog-text a {
  color: #0a66c2;
}
.related-card {
  flex: 0 0 220px; /* slightly smaller cards */
  border: 1px solid #ddd;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  gap: 15px;
  flex-wrap: nowrap; /* keep in one line */
  overflow-x: auto; /* horizontal scroll if needed */
  padding-bottom: 10px;
}

.related-card img {
  width: 94%;
  height: 130px;
  object-fit: cover;
}

.related-card h3 {
  font-size: 0.55rem;
  margin: 8px 10px;
  color: #0d2b5a;
}

.related-card p {
  font-size: 0.5rem;
  margin: 0 10px 10px 10px;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.back-home-btn {
  display: inline-block;
  margin: 2rem auto;
  padding: 0.7rem 1.5rem;
  background-color: #0d2b5a;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.back-home-btn:hover {
  background-color: #0b2450;
}

/* Mobile Screens */
@media (max-width: 650px) {
  .main-content {
    display: flex;
    flex-direction: column;
  }

  .content-wrapper {
    order: 1; /* sabse pehle blog */
  }

  .related-blogs {
    order: 2; /* blog ke baad related blogs */
  }

  .sidebar {
    order: 3; /* sabse last sidebar */
    width: 95%;
    position: relative;
    margin-top: 2rem;
  }
}
@media (max-width: 650px) {
  .back-home-btn {
    display: block;
    width: fit-content;
    text-align: center;
  }
}

.social-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.social-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 20px;
  color: white;
  transition: 0.3s ease-in-out;
}

/* Colors */
.fb {
  background: #1877f2;
}
.yt {
  background: #ff0000;
}
.ig {
  background: #c13584;
}
.ln {
  background: #0a66c2;
}

/* Hover animation */
.social-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
