/* ===========================
   General Page
   =========================== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #333;
}

/* ===========================
   Trending Section
   =========================== */
.trending-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.trending-section h2 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #222;
}

.trending-section small {
  font-size: 0.8em;
  color: #888;
}

/* Responsive Grid */
.trending-section .trending-grid {
  display: grid;
  grid-template-columns: 1fr; /* default: mobile */
  gap: 20px;
}
@media (min-width: 600px) {
  .trending-section .trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .trending-section .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trending-section .trending-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trending-section .trending-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.trending-section .trending-card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.trending-section .trending-card-body {
  padding: 12px 14px;
}

.trending-section .trending-cat {
  font-size: 0.8em;
  font-weight: bold;
  color: #ff4081;
  display: inline-block;
  margin-bottom: 5px;
}

/* Title hover underline effect (Trending) */
.trending-section .trending-card-body h3 a {
  color: #222;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.trending-section .trending-card-body h3 a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #ff4081;
  transition: width 0.3s ease;
}
.trending-section .trending-card-body h3 a:hover::after {
  width: 100%;
}

.trending-section .trending-card-body p {
  font-size: 0.9em;
  color: #555;
}
.trending-section .trending-muted {
  color: #999;
  font-size: 0.9em;
}

/* Trending Header */
.trending-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 2px solid #eee;
}

.trending-header img.trending-icon {
  width: 44px;   /* same as category icons */
  height: 44px;
  object-fit: contain;
}

.trending-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #222;
}

/* ===== Trending Section - More Button ===== */
.trending-more-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}



/* ===========================
   Latest by Category (Matches page alignment)
   =========================== */
   .category-block {
    padding: 40px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .category-container {
    max-width: 1200px;   /* same as trending/social */
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Header row (icon + title) */
  .cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
  }
  
  .cat-header img {
    width: 44px;
    height: 44px;
    object-fit: contain;
  }
  
  .cat-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #222;
  }
  
  /* Grid of posts */
  .latest-grid {
    display: grid;
    grid-template-columns: 1fr;  /* mobile */
    gap: 16px;
  }
  
  @media (min-width: 600px) {
    .latest-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 900px) {
    .latest-grid { grid-template-columns: repeat(4, 1fr); } /* up to 4 */
  }
  
  /* Cards */
  .card.small {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
  }
  
  .card.small:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
  }
  
  .card.small img {
    width: 100%;
    height: 180px;          /* match Trending */
    object-fit: cover;
    display: block;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .card-body h4 {
    font-size: 16px;
    margin: 6px 0 8px;
    color: #111;
  }
  
  .card-body p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.45;
  }
  
  .subcat {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
  }
  
  /* Link underline animation inside cards */
  .card.small a {
    text-decoration: none; /* remove underline */
    color: inherit;
    position: relative;
  }
  
  .card.small a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #7b2ff7, #f107a3, #ff512f);
    transition: width 0.3s ease;
  }
  
  .card.small a:hover::after {
    width: 100%;
  }
  
  /* More button */
  .more-wrap {
    margin-top: 14px;
    text-align: right;
  }
  
  .more-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    color: #fff; /* Always white text */
    background: linear-gradient(90deg, #7b2ff7, #f107a3, #ff512f); 
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  
  .more-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
  }
  
  /* On small screens, keep the button visible and natural */
  @media (max-width: 600px) {
    .more-wrap { text-align: left; }
  }

    /* Animated underline for latest posts titles */
  .latest-grid .card-body h4 a {
      text-decoration: none;
      color: inherit;
      position: relative;
      display: inline-block;
    }
    
    .latest-grid .card-body h4 a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -3px;
      width: 0%;
      height: 2px;
      background: linear-gradient(90deg, #7b2ff7, #f107a3, #ff512f);
      transition: width 0.3s ease;
    }
    
    .latest-grid .card-body h4 a:hover::after {
      width: 100%;
    }
    

  /* Wrap each card + subcategory */
  .post-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }
    
    /* Subcategory pill below card */
    .subcat-below a {
      display: inline-block;
      padding: 4px 12px;
      font-size: 13px;
      font-weight: 600;
      color: #fff;
      background: linear-gradient(90deg,blue, green);
      border-radius: 20px;
      text-decoration: none;
      transition: background 0.3s ease, transform 0.2s ease;
    }
    
    .subcat-below a:hover {
      background: linear-gradient(90deg,green,blue);
      transform: translateY(-2px);
    }
    

    