/* History cards styling */
.history-card {
  height: auto;
  min-height: 200px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 0.35s cubic-bezier(0.2, 1, 0.3, 1);
  cursor: pointer;
  padding: 0;
  animation: fadeIn 0.5s ease-in-out;
  
  /* Papery, parchment-like gradient with historical feel */
  background: linear-gradient(145deg, #3d2f1f 0%, #2a1810 50%, #1f1207 100%);
  border: 3px solid #8b6914;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(139, 105, 20, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.history-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(139, 105, 20, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Add a subtle paper texture overlay */
.history-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    radial-gradient(circle at 40% 40%, rgba(139, 105, 20, 0.03) 2px, transparent 2px);
  pointer-events: none;
  z-index: 1;
}

/* Add aged paper effect */
.history-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(139, 105, 20, 0.03) 0%,
    transparent 25%,
    transparent 75%,
    rgba(139, 105, 20, 0.03) 100%
  );
  pointer-events: none;
  border-radius: 9px;
  z-index: 1;
}

.history-image-container {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2a1810, #1f1207);
  border-bottom: 2px solid rgba(139, 105, 20, 0.4);
  z-index: 2;
}

.history-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: sepia(0.1) contrast(1.1) brightness(0.95);
}

.history-card:hover .history-image {
  transform: scale(1.03);
}

.history-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.history-content h3 {
  margin: 0 0 8px 0;
  color: #f4e4c1;
  font-size: 1.3em;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.history-content .description {
  margin: 8px 0 12px 0;
  color: #d4c4a1;
  font-size: 0.9em;
  line-height: 1.5;
  flex: 1;
}

.history-content .description.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-meta {
  margin-top: auto;
  border-top: 1px solid rgba(139, 105, 20, 0.3);
  padding-top: 10px;
}

.history-meta span {
  display: block;
  margin-bottom: 4px;
  color: #d4c4a1;
  font-size: 0.85em;
}

.history-meta span strong {
  color: #8b6914;
  font-weight: 600;
  margin-right: 6px;
}

.history-meta.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Location and time period styling */
.history-location,
.history-time-period {
  color: #b8a082;
  font-size: 0.8em;
  margin-top: 4px;
}

/* Animation for card appearance */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
