/* =====================================================
   CS Blog Filter — Stylesheet
   Plugin: CS Blog Filter | Shortcode: [cs_blog_filter]
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; }

.cs-wrap {
  font-family: 'Inter', sans-serif;
  width: 100%;
  color: #fff;
}

/* ===== FILTER BAR ===== */
.cs-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 28px;
}

/* SEARCH */
.cs-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.cs-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    pointer-events: none;
    color: white;
}
.cs-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.cs-search-input::placeholder { color: rgba(255,255,255,0.38); }
.cs-search-input:focus {
  border-color: #4caf50;
  background: rgba(255,255,255,0.1);
}
input#cs-search::placeholder {
    padding: 3%;
    color:white;
}
input#cs-search{
	padding-left:8%;
}
/* CLEAR FILTERS */
.cs-clear-btn {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 13px 12px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.cs-clear-btn.visible { display: flex; }
.cs-clear-btn:hover { background: rgba(255,255,255,0.15); }

/* SORT */
.cs-sort-wrap { position: relative; display: flex; align-items: center; }
.cs-sort-select {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  letter-spacing: 0.05em;
  outline: none;
  text-transform: uppercase;
}
.cs-sort-select option { background: #1c1c1c; color: #fff; }
.cs-sort-select:focus { border-color: #4caf50; }
.cs-sort-arrow {
  position: absolute;
  right: 9px;
  pointer-events: none;
  color: rgba(255,255,255,0.55);
}

/* SPACER */
.cs-spacer { flex: 1; }

/* VIEW TOGGLE */
.cs-view-toggle {
  display: flex;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
}
.cs-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s;
}
.cs-view-btn + .cs-view-btn { border-left: 1.5px solid rgba(255,255,255,0.2); }
.cs-view-btn.active { background: #3a8c3a; color: #fff; }
.cs-view-btn:hover:not(.active) { background: rgba(255,255,255,0.1); color: #fff; }
.cs-view-btn svg { width: 15px; height: 15px; display: block; }

/* ===== FEATURED POST — content LEFT, image RIGHT ===== */
.cs-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
  min-height: 300px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.cs-featured:hover { opacity: 0.92; }

.cs-featured-content {
  order: 1;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.cs-featured-img-wrap {
  order: 2;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.cs-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cs-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 13px;
}
.cs-featured-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #2e7d2e;
  border-radius: 3px;
  padding: 4px 10px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  width: fit-content;
}
.cs-featured-cat {
  font-size: 10px;
  font-weight: 700;
  color: #5dc85d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.cs-featured-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 12px;
  text-decoration: none;
}
.cs-featured-excerpt {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
  line-height: 1.6;
  margin-bottom: 16px;
}
.cs-featured-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ===== SAVE / BOOKMARK BUTTON ===== */
.cs-save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.cs-save-btn:hover { background: rgba(0,0,0,0.75); }
.cs-save-btn.saved { color: #5dc85d; background: rgba(0,0,0,0.75); }
.cs-save-btn svg { display: block; width: 13px; height: 13px; flex-shrink: 0; }

/* ===== GRID / LIST CARDS ===== */
.cs-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cs-posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-card {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.cs-card:hover { transform: translateY(-3px); }
.cs-card-img-wrap {
  position: relative;
  height: 160px;
  background: #2a2a2a;
  overflow: hidden;
  flex-shrink: 0;
}
.cs-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cs-card-img-wrap .cs-img-placeholder { min-height: 160px; }
.cs-card-img-wrap .cs-save-btn { top: 8px; right: 8px; }
.cs-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cs-card-cat {
  font-size: 10px;
  font-weight: 700;
  color: #5dc85d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.cs-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 8px;
  flex: 1;
}
.cs-card-excerpt {
  font-size: 12px;
  color: rgba(255,255,255,0.48);
  line-height: 1.5;
  margin-bottom: 10px;
}
.cs-card-meta { font-size: 11px; color: rgba(255,255,255,0.38); }

/* ===== NO RESULTS ===== */
.cs-no-results {
  text-align: center;
  color: rgba(255,255,255,0.38);
  font-size: 14px;
  padding: 50px 0;
  display: none;
  width: 100%;
}

/* ===== LOADING ===== */
.cs-loading {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 50px 0;
}
.cs-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: #5dc85d;
  border-radius: 50%;
  animation: cs-spin 0.7s linear infinite;
  margin-bottom: 10px;
}
@keyframes cs-spin { to { transform: rotate(360deg); } }

/* ===== LOAD MORE ===== */
.cs-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.cs-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.22);
  border-radius: 5px;
  padding: 11px 28px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s;
}
.cs-load-more-btn:hover { border-color: #5dc85d; background: rgba(93,200,93,0.08); }
.cs-load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cs-featured { grid-template-columns: 1fr; }
  .cs-featured-img-wrap { order: 1; min-height: 200px; }
  .cs-featured-content { order: 2; }
  .cs-posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .cs-posts-grid { grid-template-columns: 1fr; }
  .cs-featured-title { font-size: 19px; }
}