/* ====================================
   Heritage Section - Blog-Style Grid
   ==================================== */

.heritage-container {
  width: 100%;
  max-width: 100%;
}

/* Thumbnail Grid */
.heritage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 0;
  opacity: 1;
  transition: opacity 0.09s ease;
}

.heritage-grid.is-hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

@media (max-width: 860px) {
  .heritage-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* Thumbnail Card */
.heritage-thumb {
  position: relative;
  cursor: pointer;
  background: radial-gradient(circle at top, rgba(255,255,255,0.06), rgba(10,10,10,0.96));
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  transition: border-color 0.09s, box-shadow 0.09s, transform 0.09s;
}

.heritage-thumb:hover {
  border-color: rgba(184,134,11,0.7);
  box-shadow: 0 0 20px rgba(184,134,11,0.5);
}

.heritage-thumb:hover .heritage-thumb-image {
  transform: scale(1.08);
}

.heritage-thumb-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.09s ease;
}

.heritage-thumb-title {
  padding: 10px 12px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.3;
}

/* Article View */
.heritage-article {
  display: none;
  opacity: 0;
  transition: opacity 0.09s ease;
}

.heritage-article.is-visible {
  display: block;
  opacity: 1;
}

.heritage-article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.heritage-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(20,20,20,0.8), rgba(10,10,10,0.9));
  border: 1px solid rgba(80,80,80,0.3);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all 0.09s ease;
  text-decoration: none;
}

.heritage-back-btn:hover {
  border-color: rgba(184,134,11,0.7);
  box-shadow: 0 0 16px rgba(184,134,11,0.6);
  color: rgba(255,255,255,0.95);
  transform: translateY(-1px);
}

.heritage-article-content {
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

.heritage-article-content h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.95);
}

.heritage-article-content h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 24px 0 12px;
  color: rgba(255,255,255,0.9);
}

.heritage-article-content p {
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* Inherit text color for all links in article content */
.heritage-article-content a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(184,134,11,0.4);
  transition: all 0.09s ease;
}

/* Hover state - gold accent */
.heritage-article-content a:hover {
  color: rgba(255,255,255,0.95);
  border-bottom-color: rgba(184,134,11,0.9);
}

.heritage-article-content img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Navigation Footer */
.heritage-article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  gap: 12px;
}

.heritage-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(20,20,20,0.8), rgba(10,10,10,0.9));
  border: 1px solid rgba(80,80,80,0.3);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all 0.09s ease;
  text-decoration: none;
}

.heritage-nav-btn:hover:not(:disabled) {
  border-color: rgba(184,134,11,0.7);
  box-shadow: 0 0 16px rgba(184,134,11,0.6);
  color: rgba(255,255,255,0.95);
  transform: translateY(-1px);
}

.heritage-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .heritage-article-nav {
    flex-direction: column;
  }
  
  .heritage-nav-btn {
    width: 100%;
    justify-content: center;
  }
}

.heritage-container {
  padding-bottom: 140px;
}