/* Nexura Posts Widget - Cleaned CSS */

/* Main Grid Container */
.nexura-posts-grid {
  display: grid;
  gap: 24px;
}

/* Individual Post Item */
.nexura-post-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}


/* Post Thumbnail */
.nexura-post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  padding-top: 0 !important;
  /*height: 250px !important; */
  overflow: hidden;
}

.nexura-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay */
.nexura-post-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.nexura-post-title {
  color: #fff;
  font-size: 1.3rem;
  margin: 0;
  z-index: 3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.nexura-post-title a {
  color: inherit;
  text-decoration: none;
}


/* Content */
.nexura-post-content {
  padding: 20px;
  position: relative;
  z-index: 1;
}

.nexura-post-excerpt {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.6;
}

.nexura-post-meta {
  font-size: 14px;
  color: #999;
}

/* Responsive Columns (Elementor will output grid-template-columns via inline style) */
@media (max-width: 1024px) {
  .nexura-posts-grid {
    gap: 16px;
  }
  .nexura-post-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 767px) {
  .nexura-posts-grid {
    gap: 10px;
  }
  .nexura-post-title {
    font-size: 1rem;
  }
  .nexura-post-content {
    padding: 12px;
  }
  .nexura-post-thumbnail {
    aspect-ratio: 16/9;
  }
}

/* Accessibility */
.nexura-post-item:focus-within {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.nexura-post-overlay-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.nexura-post-overlay-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nexura-post-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  transition: background 0.3s;
}

.nexura-post-title {
  color: #fff;
  font-size: 1.3rem;
  margin: 0;
  z-index: 3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: color 0.3s;
}

/* Hover: overlay and text color change when hovering anywhere on the card */
.nexura-post-overlay-link:hover .nexura-post-overlay,
.nexura-post-overlay-link:focus .nexura-post-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 100%);
}

.nexura-post-overlay-link:hover .nexura-post-title,
.nexura-post-overlay-link:focus .nexura-post-title {
  color: #ffd700;
}

.nexura-post-overlay-link:hover .nexura-post-title,
.nexura-post-overlay-link:focus .nexura-post-title {
  color: var(--nexura-title-hover-color, #ffd700);
}