/**
 * Display Posts with Category Filter - Complete Styles
 * Version: 1.0.0
 */

/* CSS Reset and Base Styles */
.dpcf-container * {
  box-sizing: border-box;
}

/* Main Container */
.dpcf-container {
  
}

/* Filters Section */
.dpcf-filters {
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Search Wrapper */
.dpcf-search-wrapper {
  display: flex;
  max-width: 450px;
  width: 100%;
  border: 2px solid #02163A !important;
  border-radius: 50px;
  padding: 5px;
}
.dpcf-search-input {
  font-size: 18px;
  font-weight: 400;
  flex: 1;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
  outline: none;
  padding: 0 25px 0 10px !important;
  background: transparent !important;
  border: 0 none !important;
}
.dpcf-search-input:focus {
  outline: none;
}
.dpcf-search-input::placeholder {
  color: rgba(18, 18, 18, 0.30);
  font-style: italic;
}
.dpcf-search-button {
  background-color: #659FFF;
  color: white;
  border: 0 none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 40px;
  height: 40px;
  justify-content: center;
}
.dpcf-search-button:hover {
  background-color: #000000;
}

/* Category Filter Buttons */
.dpcf-category-wrapper {
}
.dpcf-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.dpcf-category-btn {
  color: #02163A;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  -webkit-transition: all 0.3s ease 0s;
  -moz-transition: all 0.3s ease 0s;
  transition: all 0.3s ease 0s;
  position: relative;
  border: 2px solid #659FFF;
  background: transparent;
  padding: 21px;
  border-radius: 100px;
  display: block;
  min-width: 100px;
}
.dpcf-category-btn:hover,
.dpcf-category-btn.dpcf-category-active {
  background-color: #FED766;
  border-color: #FED766;
}
.dpcf-category-count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}
.dpcf-category-active .dpcf-category-count {
  opacity: 0.9;
}

/* Loading Spinner */
.dpcf-loading {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.dpcf-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  animation: dpcf-spin 1s linear infinite;
}

@keyframes dpcf-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dpcf-loading p {
  margin: 0;
  font-size: 16px;
  font-style: italic;
}

/* Posts Grid */
.dpcf-posts-grid {
  display: grid;
  gap: 80px 40px;
  margin-bottom: 40px;
}

/* Grid Columns */
.dpcf-posts-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}
.dpcf-posts-grid[data-columns="2"] {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}
.dpcf-posts-grid[data-columns="3"] {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.dpcf-posts-grid[data-columns="4"] {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Individual Post Item */
.dpcf-post-item {
  border-radius: 16px;
  overflow: hidden;
  -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -moz-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Post Thumbnail */
.dpcf-post-thumbnail {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #659FFF;
  border-radius: 30px;
  margin-bottom: 20px;
}
.dpcf-thumbnail-link {
  display: block;
  width: 100%;
  height: 100%;
}
.dpcf-no-thumbnail__img {
  max-width: 55px;
  margin: 0 auto;
}
.dpcf-no-thumbnail .dpcf-thumbnail-link {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpcf-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.dpcf-post-item:hover .dpcf-thumbnail-img {
  transform: scale(1.08);
}
.dpcf-no-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Post Content */
.dpcf-category-badge {
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.60) 100%), #FED766;
    border-radius: 100px;
    padding: 6px 16px;
    color: #02163A;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
}

.dpcf-post-title {
  margin: 0;
  font-weight: 600;
  line-height: 140%;
  min-height: 100px;
  color: #02163A;
  font-size: 20px;
  padding-bottom: 0;
}
.dpcf-post-title a {
  text-decoration: none;
}

/* Post Meta */
.dpcf-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #6c757d;
}
.dpcf-post-date,
.dpcf-post-categories {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Icons */
.dpcf-icon-calendar:before {
  content: "📅";
  font-style: normal;
}
.dpcf-icon-tag:before {
  content: "🏷️";
  font-style: normal;
}

/* Post Excerpt */
.dpcf-post-excerpt {
  color: #555;
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 15px;
}

/* Read More Link */
.dpcf-read-more {
  display: inline-block;
  color: #C32535;
  font-weight: 700;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.7px;
}
.dpcf-read-more:hover {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.7px;
}

/* Load More Button */
.dpcf-load-more-wrapper {
  margin-top: 0;
  display: flex;
  justify-content: center;
}
.dpcf-load-more-btn {
  padding: 19px 24px;
  background: #C32535;
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.dpcf-load-more-btn:hover {
  background-color: #000000;
}
.dpcf-load-more-btn img {
  transform: rotate(90deg);
}
.dpcf-load-more-btn span {
  position: relative;
  z-index: 1;
}

/* No Posts Found */
.dpcf-no-posts {
  text-align: center;
  padding: 80px 20px;
  color: #6c757d;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}
.dpcf-no-posts p {
  font-size: 18px;
  margin: 0;
  font-style: italic;
}

/* Error Messages */
.dpcf-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}
.dpcf-error p {
    margin: 0;
}

/* Animation Classes */
@keyframes dpcf-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dpcf-post-item {
  animation: dpcf-fadeIn 0.6s ease-out;
}

@media screen and (max-width: 1220px) {
  .dpcf-filters {
    flex-wrap: wrap;
  }
  .dpcf-category-wrapper {
    width: 100%;
    margin-bottom: 20px;
  }
  .dpcf-search-wrapper {
    max-width: 100%;
  }
  .dpcf-category-buttons {
    justify-content: center;
  }
}

@media screen and (max-width: 980px) {
  .dpcf-post-title {
    min-height: 100%;
  }
}

@media screen and (max-width: 480px) {
  .dpcf-category-buttons {
    gap: 15px;
  }
  .dpcf-search-input {
    font-size: 14px;
  }
  .dpcf-search-button {
    padding: 14px 14px;
    font-size: 14px;
  }
  .dpcf-search-button img {
    display: none;
  }
  .featured-post__timestamp {
    gap: 0 !important;
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 375px) {
  .dpcf-category-buttons {
    flex-wrap: wrap;
  }
  .dpcf-category-btn {
    width: 100%;
  }
  .dpcf-posts-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  }
  .dpcf-search-button span {
    display: none;
  }
   .dpcf-search-button img {
    display: block;
  }
  .dpcf-search-button {
    padding: 14px 25px;
  }
  .dpcf-posts-grid {
    gap: 40px 40px;
  }
}