/* Blog Styles */
/* IMPORTANT: Do not modify any global elements like header, footer, or body padding. 
   These are controlled by global.css and should remain consistent across the site. */
:root {
  --primary-color: #9c24ff;
  --secondary-color: #42b72a;
  --text-color: #1c1e21;
  --light-gray: #f0f2f5;
  --border-radius: 12px;
}

/* Blog Hero Section */
.blog-hero {
  /* background: linear-gradient(135deg, var(--primary-color), #e33fc4); */
  background-color: #9c24ff;
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
}

.blog-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.blog-hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out;
}

/* Featured Posts Section */
.featured-posts {
  padding: 60px 0;
  /* font-family: 'Poppins', sans-serif; */
}

.featured-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 30px;
}

.featured-row-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  height: 500px;
}

.featured-row-2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.featured-main-card,
.featured-tall-card {
  position: relative;
  overflow: hidden;
}

.featured-small-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform: translateY(0);
  background: white;
  border-radius: 8px;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.featured-main-card .card-image,
.featured-tall-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-small-card .card-image-wrapper {
  height: 200px;
}

.featured-small-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-small-card:hover .card-image {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    transparent 100%
  );
  color: white;
}

.card-category {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  /* border-radius: 20px; */
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-main-card .card-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.featured-tall-card .card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.featured-small-card .card-content {
  padding: 20px;
  background: white;
  transform: translateY(0);
  transition: all 0.3s ease;
}

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

.featured-small-card .card-category {
  background: var(--light-gray);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.featured-small-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 12px 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.featured-small-card:hover .card-title {
  color: var(--primary-color);
}

.card-meta {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.featured-small-card .card-meta {
  color: #65676b;
}

/* Latest Posts Section */
.latest-posts {
  padding: 4rem 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 2rem;
}

.post-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform: translateY(0);
  background: white;
  border-radius: 8px;
}

.post-card .card-image-wrapper {
  height: 200px;
  overflow: hidden;
}

.post-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.post-card:hover .card-image {
  transform: scale(1.05);
}

.post-card .card-content {
  padding: 20px;
  background: white;
}

.post-card .card-category {
  display: inline-block;
  background: var(--light-gray);
  color: var(--primary-color);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.post-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 12px 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card:hover .card-title {
  color: var(--primary-color);
}

.post-card .card-meta {
  color: #65676b;
  font-size: 0.9rem;
}

/* Category colors */
.post-card .card-category.education {
  background: var(--light-gray);
  color: #28a745;
}

.post-card .card-category.healthcare {
  background: var(--light-gray);
  color: #dc3545;
}

.post-card .card-category.technology {
  background: var(--light-gray);
  color: #007bff;
}

.post-card .card-category.innovation {
  background: var(--light-gray);
  color: #9c24ff;
}

.post-card .card-category.ai {
  background: var(--light-gray);
  color: #330084;
}

/* Load More Button */
.load-more {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background-color: #9c24ff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.load-more-btn:hover {
  background-color: #5800a1;
}

/* Blog Container - Do not use for header elements */
.blog-hero .container,
.featured-posts .container,
.latest-posts .container,
.categories-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-color);
}

.posts-row {
  display: grid;
  gap: 30px;
  margin-bottom: 30px;
}

.posts-row:nth-child(4n+1) {
  grid-template-columns: repeat(3, 1fr);
}
.posts-row:nth-child(4n+2) {
  grid-template-columns: repeat(2, 1fr);
}
.posts-row:nth-child(4n+3) {
  grid-template-columns: repeat(4, 1fr);
}
.posts-row:nth-child(4n) {
  grid-template-columns: repeat(3, 1fr);
}

.posts-row .post-card {
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  outline: none;
}
.posts-row .post-card:focus {
  box-shadow: 0 0 0 3px var(--primary-color);
}

.posts-row .post-card:hover {
  box-shadow: 0 8px 32px rgba(24,119,242,0.12);
  transform: translateY(-4px) scale(1.03);
}

/* Categories Section */
.categories-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.categories-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.category-card {
  background: white;
  padding: 35px 25px;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover {
  transform: translateY(-5px);
  background: white;
}

.category-card:hover::after {
  opacity: 1;
}

.category-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
  background: var(--light-gray);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-color);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
}

.category-card p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

