/* ==== Category PAGE STYLES ==== */

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; 

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fafafa;
  color: #333;
}
h1, h2, h3, .category-card h3, .post-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

.breadcrumbs {
  font-size: 0.9rem;
  padding-left: 0;
  max-width: 1200px;
}
.breadcrumbs a {
    text-decoration: none;
    color: #333;
    margin-right: 5px;
}

.breadcrumbs span {
    color: #555;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  display: flex;
  flex-wrap: wrap; 
  gap: 20px;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Left/main content - 75% */
.main-content {
  flex: 3;
  display: flex;
  flex-direction: column;
}

/* Each post card */
.post-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 18px 20px;
  border-top: 0.5px solid #b8b8b8;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  cursor: default;
  margin-bottom: 20px;
}

.post-image img {
  width: 180px;
  height: 120px;
  max-width: 100%; /* ✅ responsive safeguard */
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.post-details {
  flex: 1;
}

.post-card:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.post-card h3 {
  margin: 0 0 8px 0;
} 

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .post-card {
    flex-direction: column;
  }
  .post-image img {
    width: 100%;
    height: auto;
  }
}


.post-title a {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease-in-out;
}

.post-title a:hover {
  color: #656565ff;
  
  transform: scale(1.05);
}

/* Author below title */
.post-author {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: #444;
  margin-top: -6px;
  margin-bottom: 12px;
}
.post-content{
font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  color: #444;

}
/* Sidebar - 25% */
.sidebar {
  flex: 1;
  min-width: 0;   
  position: sticky;
  top: 20px;
  height: fit-content;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
}
.heading-h2 {
    margin-top:30px;
    text-align:left;
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: thin;
    background: #fdfdfd;
}

.sidebar h3, .sidebar h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  margin: 0 0 15px;
  display: block;
}
.sidebar h3 {
  border-bottom: 2px solid #2196f3;
  padding-bottom: 8px;
}

/* Filter author */
.filter-author {
  margin-bottom: 30px;
  position: relative;
}

.filter-author label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Roboto', sans-serif;
  color: #444;
}

.filter-author select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #ccc;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  background-color: #fff;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-author select:focus {
  border-color: #2196f3;
  box-shadow: 0 0 6px rgba(33, 150, 243, 0.5);
  outline: none;
}

.filter-author::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Featured posts list */

/* === Featured & Trending Common Styles === */
.featured-list a, 
.trending-list a {
  display: flex;              /* better alignment control */
  align-items: center;               /* vertically center icon & text */
  gap: 6px;                          /* equal spacing instead of margin-right */
  margin-bottom: 10px;
  color: #0077cc;
  text-decoration: none;
  font-family: 'Arial', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease, transform 0.3s ease-in-out;
}

.featured-list a:hover, 
.trending-list a:hover {
  text-decoration: underline;
  color: #0b7cd5;
  transform: translateX(3px);        /* subtle horizontal slide instead of scale */
}

/* === Trending Icon Styling === */
.trending-list a i.fa-fire-alt {
  color: #ff5722;
  font-size: 1rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.featured-list a i.fa-newspaper {
  color: #888888; 
}
.trending-list a:hover i.fa-fire-alt {
  color: #ff3300;
  text-shadow: 0 0 6px #ff6600;
}

/* Responsive for smaller screens */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
    margin: 30px auto;
  }

  .main-content, .sidebar {
    flex: unset;
    width: 100%;
  }

  .sidebar {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .post-title a {
    font-size: 1.6rem;
  }
  .sidebar h3 {
    font-size: 1.1rem;
  }
  .filter-author select {
    padding: 9px 12px;
  }
}
@media (max-width: 768px) {
  .sidebar { position: static; }
}

/* ==== Contribute Sidebar Section ==== */
.contribute-sidebar {
  background: #f9f9f9;
  padding: 25px 20px;
  margin-top: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #e5e5e5;
}

.contribute-sidebar h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #222;
  margin-bottom: 10px;
}

.contribute-sidebar p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.contribute-sidebar .contribute-btn {
  background: #111;
  color: #fff;
  padding: 10px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  transition: 0.3s;
  display: inline-block;
}

.contribute-sidebar .contribute-btn:hover {
  background: #333;
}
