/**
 * Custom Project Posts Shortcode Styles
 * Simple design for single shortcode usage
 */

/* =================================
   WRAPPER & SPLIDE LAYOUT
   ================================= */

.news-logo-shortcode__container {
  padding: 2rem 0;
}
.news-logo-shortcode__container .container {
  overflow: hidden;
}
.news-section__title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}

.tp-project-posts-wrapper {
  width: 100%;
  margin: 2rem 0;
}

.tp-project-posts-slider {
  position: relative;
}

.tp-project-posts-slider .splide {
  width: 100%;
  position: relative;
  visibility: visible !important;
}

.tp-project-posts-slider .splide__track {
  overflow: visible;
}

.tp-project-posts-slider .splide__list {
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-project-posts-slider .splide__slide {
  display: flex;
  align-items: stretch;
  height: auto;
}

/* Splide Navigation Styling */
.tp-project-posts-slider .splide__arrows {
  display: flex;
}

.tp-project-posts-slider .splide__arrow {
  width: 48px;
  height: 48px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: var(--tp-primary, #3b82f6);
  font-size: 18px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-project-posts-slider .splide__arrow:hover {
  background: var(--tp-primary, #3b82f6);
  color: white;
  transform: scale(1.05);
}

.tp-project-posts-slider .splide__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tp-project-posts-slider .splide__arrow--prev {
  left: -24px;
}

.tp-project-posts-slider .splide__arrow--next {
  right: -24px;
}

/* Splide Pagination */
.tp-project-posts-slider .splide__pagination {
  position: relative;
  bottom: -2rem;
  padding: 0;
  display: flex !important;
  justify-content: center;
  gap: 0.5rem;
}

.tp-project-posts-slider .splide__pagination__page {
  all: unset;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1 !important;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
}

.tp-project-posts-slider .splide__pagination__page.is-active {
  background: var(--tp-primary, #3b82f6) !important;
  transform: scale(1.2);
}

/* =================================
   PROJECT POST CARD DESIGN
   ================================= */

.tp-project-post-card {
  background: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1), 0 1px 1px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #f1f5f9;
}

.tp-project-post-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: #e2e8f0;
}

/* =================================
   POST IMAGE
   ================================= */

.tp-project-post-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f8fafc;
}

.tp-project-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.tp-project-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tp-project-post-card:hover .tp-project-post-image img {
  transform: scale(1.02);
}

/* =================================
   POST CONTENT
   ================================= */

.tp-project-post-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

/* =================================
   POST META
   ================================= */

.tp-project-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tp-project-post-date {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

.tp-project-post-category {
  font-size: 0.8125rem;
  color: var(--tp-primary, #3b82f6);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tp-project-post-category a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tp-project-post-category a:hover {
  color: var(--tp-primary, #3b82f6);
}

.tp-project-post-category i {
  font-size: 0.75rem;
}

/* =================================
   POST TITLE
   ================================= */

.tp-project-post-title {
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 600;
  color: #1e293b;
  margin: 0;

  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tp-project-post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tp-project-post-title a:hover {
  color: var(--tp-primary, #3b82f6);
}

/* =================================
   POST EXCERPT
   ================================= */

.tp-project-post-excerpt {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #64748b;
  flex-grow: 1;

  /* Limit to 3 lines */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* =================================
   POST FOOTER / READ MORE
   ================================= */

.tp-project-post-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.tp-project-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tp-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tp-project-read-more:hover {
  color: var(--tp-primary);
  gap: 0.75rem;
}

.tp-project-read-more i {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.tp-project-read-more:hover i {
  transform: translateX(4px);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

/* Tablet */
@media (max-width: 1024px) {
  .tp-project-posts-slider .splide__arrow--prev {
    left: -20px;
  }

  .tp-project-posts-slider .splide__arrow--next {
    right: -20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .news-logo-shortcode__container {
    padding: 1.5rem 0;
  }

  .news-section__title {
    margin-bottom: 1.8rem;
  }

  .tp-project-posts-wrapper {
    margin: 1.5rem 0;
  }

  .tp-project-post-content {
    padding: 1rem;
  }

  .tp-project-posts-slider .splide__arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .tp-project-posts-slider .splide__arrow--prev {
    left: -16px;
  }

  .tp-project-posts-slider .splide__arrow--next {
    right: -16px;
  }

  .tp-project-posts-slider .splide__pagination {
    bottom: -1rem;
  }
}

/* Very small mobile */
@media (max-width: 480px) {
  .tp-project-posts-slider .splide__pagination {
    bottom: -1rem;
  }
}

/* =================================
   SKELETON LOADING STYLES
   ================================= */

.tp-project-skeleton {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.tp-project-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.tp-project-skeleton-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tp-project-skeleton-image {
  height: 200px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.tp-project-skeleton-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tp-project-skeleton-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tp-project-skeleton-date {
  height: 12px;
  width: 60px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.tp-project-skeleton-category {
  height: 12px;
  width: 80px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.tp-project-skeleton-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tp-project-skeleton-title .tp-project-skeleton-line {
  height: 16px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.tp-project-skeleton-title .tp-project-skeleton-line.short {
  width: 75%;
}

.tp-project-skeleton-excerpt {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.tp-project-skeleton-excerpt .tp-project-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.tp-project-skeleton-excerpt .tp-project-skeleton-line.short {
  width: 60%;
}

.tp-project-skeleton-button {
  height: 18px;
  width: 80px;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-top: 0.5rem;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Skeleton responsive grid */
@media (max-width: 1200px) {
  .tp-project-skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .tp-project-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .tp-project-skeleton-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}