:root {
    --dark-navy: #04305F;
    --strong-blue: #04427C;
    --sky-blue: #126CAE;
    --sky-blue-dark: #0e4d80;
    --light-blue: #1A8CD8;
    --eco-green: #089E77;
    --light-bg: #f9f9f9;
    --text-dark: #222;
    --text-light: #fff;
  }

  .blog-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
  }
  
  .blog-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
  }
  
  .blog-header p {
    color: var(--text-dark);
    font-size: 1.35rem;
  }

  /* Blog Grid Styles */
.blog-grid {
  padding: 4rem 2rem;
  background-color: #fff;
  text-align: center;
}

.blog-grid h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--strong-blue);
  font-family: 'HeadingFont', 'Segoe UI', Arial, sans-serif;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background: linear-gradient(-125deg, var(--light-blue), var(--sky-blue-dark));
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  min-height: 320px;
  padding: 1.2rem;
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px; /* Rounded corners */
  margin-bottom: 1rem;
  background: #eaeaea;
}

.blog-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: whitesmoke;
  text-align: left;
  position: relative;
  padding: 0;
}

.blog-card-content p {
  margin-bottom: 1.2rem;
  font-size: 1.08rem;
  line-height: 1.5;
  max-height: 9em;
  overflow: hidden;
  transition: max-height 0.3s ease;
  position: relative;
}

.blog-card-content p.expanded {
  max-height: 1000px;
  overflow: visible;
}

.blog-card-btn {
  margin-top: auto; /* Push button to bottom */
  align-self: flex-end; /* Align button to right */
  background: var(--eco-green);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.3s;
}

.blog-card-btn:hover {
  background: var(--sky-blue-dark);
}

.read-more-btn {
  display: inline-block;
  background: none;
  color: #888;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  padding: 0;
  align-self: flex-start;
}

.read-more-btn::after {
  content: " ...";
  color: #888;
  font-size: 1.1em;
}

/* Responsive for mobile */
@media (max-width: 700px) {
  .blog-cards {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .blog-card {
    flex-direction: column;
    min-height: 0;
  }
  .blog-card img {
    width: 100%;
    max-width: 100%;
    height: 160px;
    border-radius: 15px 15px 0 0;
  }
  .blog-card-content {
    padding: 1rem 0.7rem;
    text-align: left;
  }

  .read-more-btn {
    display: inline-block;
    background: none;
    color: #888;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    padding: 0;
  }
}