/* Post Layouts - Custom Styles */
:root {
  --hp-primary-color: #66cc00;
  --hp-text-dark: #333;
  --hp-text-muted: #666;
  --hp-bg-light: #f5f5f5;
  --hp-border-color: #ddd;
}

.hp-posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

.hp-main-title {
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--hp-text-dark);
}

/* Grid Layout */
.hp-section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #333;
}

.hp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.hp-grid-item {
  overflow: hidden;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-grid-item:hover {
  background-color: #aaa;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hp-image-link {
  display: block;
  overflow: hidden;
  margin-bottom: 15px;
}

.hp-featured-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.hp-posts-container .hp-grid .hp-featured-image {
  aspect-ratio: 5 / 3;
}

.hp-grid-item:hover .hp-featured-image {
  transform: scale(1.05);
}

.hp-grid-meta {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.hp-logo-box {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hp-author-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px; /* Matches the previous SVG's feel */
}

.hp-divider {
  width: 1.5px;
  height: 25px;
  background-color: #333;
  margin: 0 15px;
}

.hp-grid-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hp-text-dark);
  line-height: 1.4;
}

.hp-grid-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.hp-grid-title a:hover {
  color: var(--hp-primary-color);
}

/* List Layout */
.hp-list-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Slider Layout */
/* Slider Layout with Swiper.js */
.hp-slider-wrapper.swiper {
  position: relative;
  margin-bottom: 30px;
  overflow: hidden;
  width: 100%;
}

.hp-slider-wrapper .hp-image-container {
  position: relative;
  overflow: hidden;
  height: 480px; /* Fixed height for uniformity */
  background-color: #eee;
}

.hp-slider-wrapper .hp-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Swiper Navigation Arrows */
.hp-slider-wrapper .swiper-button-prev,
.hp-slider-wrapper .swiper-button-next {
  background: rgba(0, 0, 0, 0.4);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.hp-slider-wrapper .swiper-button-prev::after,
.hp-slider-wrapper .swiper-button-next::after {
  font-size: 20px;
  font-weight: bold;
}

.hp-slider-wrapper:hover .swiper-button-prev,
.hp-slider-wrapper:hover .swiper-button-next {
  opacity: 1;
  visibility: visible;
}

.hp-slider-wrapper .swiper-button-prev:hover,
.hp-slider-wrapper .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.hp-slider-wrapper .hp-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-date-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  backdrop-filter: blur(5px);
}

.hp-date-badge .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.hp-date-badge .month-year {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 5px;
}

.hp-featured-title-bar {
  background: #7e8387;
  color: #fff;
  padding: 15px 20px;
  margin-top: -5px;
  position: relative;
}

.hp-featured-title-bar:before {
  content: "";
  position: absolute;
  top: -14px; /* Height of the triangle */
  left: 25px; /* Align with date badge center-ish */
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid #7e8387;
}

.hp-featured-title-bar h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
}

.hp-featured-title-bar a {
  color: inherit;
  text-decoration: none;
}

.hp-list-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hp-list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 0px solid transparent;
}

.hp-list-item .hp-date-badge {
  position: relative;
  background: #888;
  color: #fff;
  padding: 8px 12px;
  min-width: 80px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hp-list-item .hp-date-badge:not(.hp-date-placeholder):after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #888; /* Match default badge color */
}

.hp-date-placeholder {
  visibility: hidden;
  height: 1px; /* Keep some space but don't show */
}

.hp-list-item:nth-child(odd) .hp-date-badge:not(.hp-date-placeholder) {
  background: #7e8387;
}

.hp-list-item:nth-child(odd) .hp-date-badge:not(.hp-date-placeholder):after {
  border-left-color: #7e8387; /* Match odd badge color */
}

.hp-list-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hp-list-item-content h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #444;
  text-transform: uppercase;
}

.hp-list-item-content a {
  text-decoration: none;
  color: inherit;
}

.hp-list-item-content a:hover {
  color: var(--hp-primary-color);
}

/* View All Button */
.hp-view-all-wrapper {
  text-align: center;
  margin-top: 40px;
}

.hp-view-all {
  display: block;
  width: 100%;
  background: #f1f3f4;
  color: #333;
  padding: 15px 60px;
  text-decoration: none;
  font-weight: 500;
  text-transform: lowercase;
  font-size: 1.5rem;
  transition: background 0.2s;
}

.hp-view-all:hover {
  background: #7e8387;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .hp-grid {
    grid-template-columns: 1fr;
  }

  .hp-main-title {
    font-size: 1.8rem;
  }

  .hp-list-item {
    flex-direction: row;
    align-items: flex-start;
  }
}
