#csf-wrapper {
    margin: 20px 0;
    padding: 0px 27px 0px 27px;
}
#csf-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
#csf-form input,
#csf-form select,
#csf-form button {
    padding: 10px;
    font-size: 16px;
}
.csf-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
    gap: 20px;
}
.results-count {
    font-weight: bold;
    margin-bottom: 15px;
}
.csf-pagination {
    margin-top: 20px;
    text-align: center;
}
.csf-page-btn {
    margin: 0 3px;
    padding: 8px 12px;
    cursor: pointer;
}


/**/



.csf-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
    gap: 30px;
}

.csf-post-item {
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.csf-post-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.csf-post-item h2 {
    font-size: 18px;
    margin-top: 10px;
    color: #333;
}

.csf-post-item p {
    font-size: 14px;
    color: #666;
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    color: #0066cc;
}


/**/


.csf-post-item {
    background: #fff;
    padding: 12px;
    border: 1px solid #ccc;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    font-family: 'Georgia', serif;
    color: #333;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
}
.csf-post-item:hover {
    transform: scale(1.01);
}


.csf-post-item h2 {
    font-size: 18px;
    margin: 10px 0 5px;
    color: #222;
}

.post-uid {
    font-size: 14px;
    color: #777;
}

/* Hide excerpt and read more */
.csf-post-item p,
.read-more {
    display: none !important;
}


/**/

/* ========== Make Grid Responsive ========== */

/* Default: 4 items for large screens */
.csf-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* Tablet screens (up to 1024px) */
@media (max-width: 1024px) {
  .csf-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile screens (up to 768px) */
@media (max-width: 768px) {
  .csf-posts-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .csf-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .csf-filters select,
  .csf-filters input,
  .csf-filters button {
    width: 100%;
    font-size: 16px;
    padding: 10px;
  }

}




@media (max-width: 768px) {
  .csf-posts-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .csf-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .csf-filters select,
  .csf-filters input,
  .csf-filters button {
    width: 100% !important;
    font-size: 13px !important;      /* 👈 This is what you wanted */
    padding: 8px !important;/* 👈 This is what you wanted */
  }

  ::placeholder {
    font-size: 13px !important;      /* 👈 For placeholder text */
  }
}


#csf-wrapper {
    margin: 20px 0;

}
#csf-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
#csf-form input,
#csf-form select,
#csf-form button {
    padding: 10px;
    font-size: 16px;
}
.csf-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
    gap: 20px;
}
.results-count {
    font-weight: bold;
    margin-bottom: 15px;
}
.csf-pagination {
    margin-top: 20px;
    text-align: center;
}
.csf-page-btn {
    margin: 0 3px;
    padding: 8px 12px;
    cursor: pointer;
}


/**/



.csf-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
    gap: 30px;
}

.csf-post-item {
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: 0.3s;
}


.csf-post-item h2 {
    font-size: 18px;
    margin-top: 10px;
    color: #333;
}

.csf-post-item p {
    font-size: 14px;
    color: #666;
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    color: #0066cc;
}


/**/


.csf-post-item {
    background: #fff;
    padding: 12px;
    border: 1px solid #ccc;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    font-family: 'Georgia', serif;
    color: #333;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
}
.csf-post-item:hover {
    transform: scale(1.01);
}



.csf-post-item h2 {
    font-size: 18px;
    margin: 10px 0 5px;
    color: #222;
}

.post-uid {
    font-size: 14px;
    color: #777;
}

/* Hide excerpt and read more */
.csf-post-item p,
.read-more {
    display: none !important;
}


/**/

/* ========== Make Grid Responsive ========== */

/* Default: 4 items for large screens */
.csf-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* Tablet screens (up to 1024px) */
@media (max-width: 1024px) {
  .csf-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile screens (up to 768px) */
@media (max-width: 768px) {
  .csf-posts-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .csf-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .csf-filters select,
  .csf-filters input,
  .csf-filters button {
    width: 100%;
    font-size: 16px;
    padding: 10px;
  }

}




@media (max-width: 768px) {
  .csf-posts-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .csf-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .csf-filters select,
  .csf-filters input,
  .csf-filters button {
    width: 100% !important;
    font-size: 13px !important;      /* 👈 This is what you wanted */
    padding: 8px !important;          /* 👈 This is what you wanted */
  }

  ::placeholder {
    font-size: 13px !important;      /* 👈 For placeholder text */
  }
}


/**/



@media (max-width: 768px) {
 
  #csf-form{
    padding: 8px !important;
    font-size: 13px !important;
  }

 #csf-form input,
    #csf-form select,
    #csf-form button {
    padding: 8px;
    font-size: 13px !important;
    }
    
    
    #csf-wrapper {
    margin: 20px 0;
    padding: 0px 15px 0px 15px !important;
	}
}


@media (max-width: 425px) {

    #csf-wrapper {
        padding: 0px 12px 0px 12px !important;
	}
}


/* css for reset button */

#csf-form button {
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
}

#csf-reset-btn {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    color: #333;
    margin-left: 8px;
    transition: background 0.2s ease;
}

#csf-reset-btn:hover {
    background-color: #eaeaea;
}

/* pagination button responsiveness for tablets and mobiles */

/* Base pagination styles */
.csf-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.csf-pagination a,
.csf-pagination span {
  background-color: #b69850;
  color: white;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.csf-pagination a:hover,
.csf-pagination span.current {
  background-color: #8b753c;
  color: white;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .csf-pagination a,
  .csf-pagination span {
    font-size: 14px;
    padding: 6px 10px;
  }
}

@media screen and (max-width: 480px) {
  .csf-pagination {
    gap: 5px;
  }

  .csf-pagination a,
  .csf-pagination span {
    font-size: 13px;
    padding: 5px 8px;
  }
}


/* css to show full image */

.csf-thumb-wrapper {
  width: 100%;
  aspect-ratio: 1/1; /* optional: keeps square layout */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f8f8;
  padding: 10px;
  box-sizing: border-box;
}

.csf-full-image {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
}






.csf-thumb-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  padding: 10px;
}

.csf-full-image {
  width: 100%;
  height: auto;
  object-fit: contain !important;
  display: block;
}