/**
 * Rifnote Post Listings and Styles
 *
 * Styles for the [rifnote_featured_post] shortcode.
 */
.rifnote-hero {
  position: relative; /* For overlay positioning */
  width: 100%;
  height: 450px;
  overflow: hidden; /* This is crucial to clip the scaled background */
  border-radius: 10px;
  background-color: #333; /* Fallback background for the container */
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  margin-bottom: 1.5em;
}

.rifnote-hero.loading {
  cursor: wait;
  opacity: 0.8;
  transition: opacity 0.2s ease-in-out;
}

.rifnote-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth transition */
}

/* Add a subtle gradient overlay to ensure text is readable */
.rifnote-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
  z-index: 1; /* Sit below the text overlay */
}

.rifnote-hero:hover .rifnote-hero-background {
  transform: scale(1.05) rotate(1deg); /* Subtle zoom and rotate effect */
}

.rifnote-hero-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px; /* Added right for better spacing */
  color: #fff;
  z-index: 2; /* Ensure it's above the ::before pseudo-element */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  transition: bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rifnote-hero:hover .rifnote-hero-overlay {
  bottom: 25px; /* Lift the content slightly on hover */
}

.rifnote-hero-meta {
  flex-grow: 1;
}

.rifnote-hero-overlay .time {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 5px;
  display: block;
}

.rifnote-hero-overlay .title {
  font-size: 24px; /* Increased for more impact */
  font-weight: bold;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.rifnote-hero-overlay .title a {
  color: #fff;
  text-decoration: none;
}

.rifnote-hero-overlay .title a:hover {
  text-decoration: underline;
}

.rifnote-hero-overlay .excerpt {
  font-size: 14px;
  opacity: 0.9;
}

.rifnote-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Override reaction button styles for the hero context */
.rifnote-hero .rpls-reaction-wrapper {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-shrink: 0; /* Prevent the button from shrinking */
}

.rifnote-hero .rpls-reaction-button {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.rifnote-hero .rpls-reaction-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation Buttons */
.rpls-hero-nav {
  display: flex;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.rpls-hero-nav-button {
  background-color: transparent;
  border: none;
  color: #fff;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rpls-hero-nav-button.prev {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.rpls-hero-nav-button:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.rpls-hero-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}