/* Container */
.blogs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    margin-bottom: 60px;
}

/* Individual blog card */
.blog-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 calc(30% - 20px);
    max-width: calc(30% - 20px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Hover effect */
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Blog image */
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.blog-card img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Post tag on hover */
.blog-card .post-tag {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 171, 107, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.blog-card:hover .post-tag {
    display: inline-block;
}

/* Card content */
.blog-content {
    padding: 15px;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.blog-meta {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.6);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .blog-card { flex: 1 1 calc(45% - 20px); max-width: calc(45% - 20px); }
}
@media (max-width: 800px) {
    .blog-card { flex: 1 1 calc(100% - 20px); max-width: calc(100% - 20px); }
}

.blog-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.blog-modal-content {
  background: #fff;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  animation: fadeIn 0.4s ease;
}
.blog-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Page Header */
.blog-header {
  text-align: center;
  padding: 60px 20px;
}
.blog-header h1 {
  font-size: 3rem;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 1px;
}
.blog-header p {
  margin-top: 10px;
  font-size: 1.2rem;
  opacity: 0.9;
}



/* Modal */
.blog-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.blog-modal-content {
  background: #fff;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  animation: fadeIn 0.4s ease;
}

.blog-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Blog Content in Modal */
#blog-modal-body h1 {
  margin-top: 0;
}
#blog-modal-body p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: #333;
}


/* Modal Container */
#blog-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* toggled by JS */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

/* Modal Content Box */
#blog-modal-body {
  background: #fff;
  max-width: 800px;
  width: 100%;
  padding: 2.5rem 3rem;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Close Button */
.blog-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}
.blog-modal-close:hover {
  color: #000;
}

/* Title */
#blog-modal-body h1 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: #222;
}


#blog-modal-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  text-align: left;
  color: #222;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}




/* Paragraphs */
#blog-modal-body p {
  margin: 1rem 0;
  font-size: 1rem;
}

/* Emphasized quote at top */
#blog-modal-body p em {
  display: block;
  text-align: center;
  font-size: 1.1rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Subheadings (References) */
#blog-modal-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  text-align: left;
  color: #222;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

/* References List */
#blog-modal-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 0 0;
}

#blog-modal-body ul li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: #444;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  #blog-modal-body {
    padding: 1.5rem;
  }
  #blog-modal-body h1 {
    font-size: 1.6rem;
  }
}
