:root {
  --primary-green: #006837;
  --accent-orange: #e67e22;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-light: #f7fafc;

  /* Brand Social Colors */
  --instagram-pink: #e1306c;
  --tiktok-dark: #010101;
  --facebook-blue: #1877f2;
}

body {
  background-color: var(--bg-light);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
}

/* Container & Header Offset */
.blog-container {
  max-width: 1200px;
  margin: 40px auto 50px;
  padding: 0 20px;
}

.main-heading {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-green);
  margin-bottom: 20px;
  font-weight: 800;
}

.section-title {
  font-size: 1.8rem;
  border-left: 5px solid var(--primary-green);
  padding-left: 15px;
  margin-bottom: 30px;
  color: var(--text-dark);
}

/* --- FEATURED TOP GRID --- */
.featured-top {
  margin-bottom: 50px;
}

.label-red {
  display: inline-block;
  background: var(--accent-orange);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.blog-card-mini {
  position: relative;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}

.blog-card-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: white;
}

.card-overlay span {
  font-size: 0.75rem;
  opacity: 0.8;
}

.card-overlay h4 {
  margin: 5px 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.blog-card-mini:hover img {
  transform: scale(1.1);
}

/* --- MAIN LAYOUT --- */
.blog-layout {
  display: flex;
  gap: 40px;
}

.blog-main {
  flex: 2.2;
  /* Adjusted slightly to give sidebar breathing room */
}

.blog-sidebar {
  flex: 1;
  min-width: 320px;
}

/* --- BLOG GRID (Main Articles) --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.blog-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.blog-image {
  height: 200px;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.read-more-btn {
  display: inline-block;
  margin-top: 15px;
  color: var(--primary-green);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
}

.read-more-btn:hover {
  border-bottom-color: var(--primary-green);
}

/* --- SIDEBAR & SOCIAL INTERACTION SYSTEM --- */
.sidebar-box {
  background: white;
  padding: 25px;
  border-radius: 15px;
  position: sticky;
  top: 90px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Interactive Tabs */
.social-tab-header {
  display: flex;
  justify-content: space-between;
  background-color: #f1f5f9;
  padding: 5px;
  border-radius: 30px;
  margin: 15px 0;
}

.tab-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 10px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--text-dark);
}

/* Tab button active states */
.tab-btn.active {
  background-color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.tab-btn.active .fa-instagram {
  color: var(--instagram-pink);
}

.tab-btn.active .fa-tiktok {
  color: var(--tiktok-dark);
}

.tab-btn.active .fa-facebook-f {
  color: var(--facebook-blue);
}

/* Panes container */
.social-tab-content {
  margin-top: 15px;
}

.social-pane {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.social-pane.active {
  display: block;
}

/* Content Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Social Card Layout */
.social-post-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  background: #ffffff;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.post-header i {
  font-size: 1.25rem;
}

.instagram-color {
  color: var(--instagram-pink);
}

.facebook-color {
  color: var(--facebook-blue);
}

.post-media-placeholder {
  height: 180px;
  background-color: #edf2f7;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Ensure the image stretches and crops perfectly without distortion */
/* Ensure the image stretches, crops, and stays below the overlay */
.social-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
  position: relative;
  z-index: 1;
  /* Positioned below pseudo-elements */
}

.post-media-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
  z-index: 2;
  /* Forces overlay to sit directly on top of the image */
}

/* Ensure interactive overlays like "Likes" stay on the absolute top */
.media-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
  /* Topmost layer */
}

.post-caption {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
  margin: 12px 0;
}

/* Action Social Buttons */
.social-action-btn {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s, opacity 0.2s;
}

.social-action-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.instagram-btn {
  background-color: var(--instagram-pink);
}

.tiktok-btn {
  background-color: var(--tiktok-dark);
}

.facebook-btn {
  background-color: var(--facebook-blue);
}

/* Quick Links styling */
.featured-list {
  list-style: none;
  padding: 0;
}

.featured-list li {
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

.featured-list a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.2s;
}

.featured-list a:hover {
  color: var(--primary-green);
}

/* --- RESPONSIVE WORKFLOWS --- */
@media (max-width: 992px) {
  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-layout {
    flex-direction: column;
    gap: 30px;
  }

  .blog-sidebar {
    width: 100%;
    order: 2;
    /* Sidebar is cleanly pushed down in a stacking layout */
  }

  .sidebar-box {
    position: static;
    /* Unstick from mobile frame so page flows smoothly */
  }
}

@media (max-width: 600px) {
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .main-heading {
    font-size: 1.85rem;
  }

  .blog-container {
    margin-top: 20px;
    padding: 0 15px;
  }
}