/* General Fix for Blank Space */
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
  
}

/* Blog Section */
.update-area {
  height: 80vh;
  background: url("images/tower.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.update-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 0 5%; /* Adjusted padding for responsiveness */
  color: white;
  font-size: 1.6rem; /* Using rem for scalability */
}

.update-container h1 {
  color: white;
  font-size: 3.4rem; /* Responsive font size */
}

.update-title {
  text-transform: uppercase;
  margin-top: 1em;
  font-size: 2.5rem; /* Responsive font size */
}

.update-title p {
  text-transform: uppercase;
  margin-top: 1em;
  font-size: 1.25rem;
}
h1 {
  text-align: center;
  margin: 7rem 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem); /* Responsive font size */
  color: #2c3e50;
}

/* Blog Container */
#blog-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

@supports (grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))) {
  #blog-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      flex-wrap: initial;
  }
}

/* Post Card */
.post-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

/* Post Image */
.post-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9; /* Maintain proportions */
  object-fit: cover;
  border-bottom: 3px solid #3498db;
}

/* Post Content */
.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1b73cc;
}

.post-date {
  font-size: 0.9rem;
  color: #df6329;
  margin-bottom: 0.5rem;
  margin-left: 1rem;
}

.post-content div {
  color: #34495e;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.post-author {
  font-style: italic;
  color: #857d11;
  margin:1rem;
}

.post-categories {
  display: inline-block;
  background: #0d59e63d;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin:0.1rem 0.8rem;
}
.read-more{
  color: #3498db;
  


}

/* Loading and Error States */
.loading {
  text-align: center;
  font-size: 1.2rem;
  color: #7f8c8d;
  padding: 2rem;
  grid-column: 1 / -1;
}

.error {
  color: #e74c3c;
  padding: 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

/* Responsive Design */
@media (max-width: 768px) {
  #blog-container {
      grid-template-columns: 1fr;
      padding: 0;
  }

  h1 {
      font-size: 2rem;
  }

  .post-image {
      height: auto;
  }

  .post-content {
      padding: 1rem;
  }
}

@media (max-width: 480px) {

  .post-title {
      font-size: 1.3rem;
  }

  .post-date {
      font-size: 0.8rem;
  }
}

/* Ultra-Small Phones (Galaxy Fold, etc.) */
@media (max-width: 330px) {
  .post-title {
      font-size: 1.2rem;
  }
  .post-content div {
      font-size: 0.95rem;
  }
}

/* Large Desktops (4K+) */
@media (min-width: 1600px) {
  #blog-container {
      grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* Touch Target Sizing for Mobile */
.post-categories,
.post-author {
  min-height: 44px; /* Minimum touch target size */
  display: inline-flex;
  align-items: center;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Smooth transitions for dynamic content */
[data-aos] {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (max-width: 1250px) {
  

  .update-container h1 {
    font-size: 3rem;
  }

  .update-container {
    font-size: 1.4rem;
  }
}

/* For tablets and medium devices */
@media (max-width: 768px) {


  .update-container h1 {
    font-size: 2.8rem;
  }

  .update-container {
    font-size: 1.2rem;
  }
}

/* For mobile devices */
@media (max-width: 550px) {
 

  .update-container h1 {
    font-size: 2.4rem;
  }

  .update-container {
    font-size: 1rem;
  }
}

/* Smaller Mobile Screens (max-width: 400px) */
@media (max-width: 400px) {
  .update-container h1 {
    font-size: 2rem;
  }

  .update-container {
    font-size: 0.9rem;
  }
}
