/* --- BLOG PAGE STYLES --- */

/* 1. Blog Hero Section */
.blog-hero {
  position: relative;
  width: 100%;
  height: 350px; /* Increased slightly for better desktop impact */
  min-height: 300px; /* Ensures it never gets too small */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Layer 1: The Image */
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Layer 2: The Dark Tint */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Layer 3: The Text */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  max-width: 900px;
  width: 100%;
}

.hero-content h1 {
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
}

/* 2. Blog Grid Container */
.blog-section {
  max-width: 1440px;
  margin: 80px auto;
  padding: 0 60px; /* Default desktop padding */
  width: 100%;
  box-sizing: border-box; /* Crucial for responsiveness */
}

.blog-grid {
  display: grid;
  /* Default: 4 Columns for large screens */
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* 3. Blog Card Design */
.blog-card {
  background-color: rgba(
    193,
    103,
    29,
    0.1
  ); /* Adjusted opacity for cleaner look */
  display: flex;
  flex-direction: column;
  border-radius: 8px; /* Added rounded corners for modern look */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensures all cards in a row are same height */
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Adds depth on hover */
}

.card-image img {
  width: 100%;
  height: 220px; /* Slightly taller for better aspect ratio */
  object-fit: cover;
  display: block;
  padding: 0; /* Removed padding for a flush, modern look */
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-date {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #c1671d; /* Matches your brand orange */
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-title {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.4;

  /* Limits title to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-excerpt {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;

  /* Limits excerpt to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  margin-top: auto;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #f75e45;
  text-transform: capitalize;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.read-more:hover {
  color: #d14029;
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* 1. Small Laptops / Large Tablets (Max Width: 1200px) */
/* Switch from 4 columns to 3 columns here */
@media (max-width: 1200px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .blog-section {
    padding: 0 40px; /* Reduce side padding */
  }
}

/* 2. Tablets (Max Width: 900px) */
/* Switch from 3 columns to 2 columns here */
@media (max-width: 900px) {
  .blog-hero {
    height: 300px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .blog-section {
    margin: 60px auto; /* Reduce vertical margin */
    padding: 0 30px;
  }
}

/* 3. Mobile Devices (Max Width: 600px) */
/* Switch to 1 column */
@media (max-width: 600px) {
  .blog-hero {
    height: 250px; /* Compact hero for mobile */
  }

  .hero-content h1 {
    font-size: 28px; /* Readable on small screens */
  }

  .blog-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 30px; /* More space between stacked cards */
  }

  .blog-section {
    margin: 40px auto;
    padding: 0 20px; /* CRITICAL: 60px was too much, 20px gives breathing room */
  }

  .card-image img {
    height: 200px; /* Adjust image height for mobile */
  }
}
