:root {
  --color-gold: #9a7b35;
  --color-gold-hover: #7d6228;
  --color-bg: #f5f0eb;
}

body {
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* Header */
.site-header {
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 0.75rem 0;
}
.site-header .nav-link {
  color: #ccc;
  font-size: 0.9rem;
}
.site-header .nav-link:hover { color: #fff; }
.site-header .navbar-brand {
  text-decoration: none;
}
.site-header .navbar-brand:hover .brand-title { color: var(--color-gold); }

.brand-icon {
  width: 22px;
  height: 32px;
  opacity: 0.9;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.6rem;
  color: #999;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

/* Footer */
.site-footer {
  background-color: #1a1a1a;
  border-top: 1px solid #333;
  padding: 2rem 0 0;
  font-size: 0.85rem;
  color: #888;
}
.site-footer a { color: #888; text-decoration: none; }
.site-footer a:hover { color: var(--color-gold); }

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}
.footer-brand-sub {
  font-size: 0.6rem;
  color: #666;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}
.footer-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.4rem;
  color: #888;
}
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  margin-top: 1.5rem;
  padding: 0.85rem 0;
  font-size: 0.78rem;
  color: #555;
  text-align: center;
}

/* Gold buttons */
.btn-gold {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: #fff;
}
.btn-gold:hover {
  background-color: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  color: #fff;
}
.btn-outline-gold {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: transparent;
}
.btn-outline-gold:hover {
  background-color: var(--color-gold);
  color: #fff;
}

/* Hero wrapper with decorative images */
.hero-wrapper {
  position: relative;
  overflow: hidden;
}
.hero-deco {
  position: absolute;
  top: 0;
  pointer-events: none;
  opacity: 0.6;
  width: 200px;
}
.hero-deco-left {
  left: 0;
}
.hero-deco-right {
  right: 0;
}
@media (max-width: 767px) {
  .hero-deco { display: none; }
}

/* Hero */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 0;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #555;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 0.75rem;
  gap: 0;
  max-width: 200px;
}
.hero-divider span {
  display: block;
  height: 1px;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--color-gold));
}
.hero-divider::after {
  content: "✦";
  font-size: 0.7rem;
  color: var(--color-gold);
  padding: 0 0.5rem;
  line-height: 1;
}
.hero-divider span:last-child {
  background: linear-gradient(to left, transparent, var(--color-gold));
}
.hero-sub {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Search card */
.search-card {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 0.75rem;
  margin-bottom: 2rem;
}
.search-card .form-label {
  font-size: 0.875rem;
  color: #555;
  margin-bottom: 0.3rem;
}
.search-card .form-control,
.search-card .form-select {
  border-color: #d5cec5;
  background-color: #fdfaf7;
  font-size: 0.9rem;
}
.search-card .form-control:focus,
.search-card .form-select:focus {
  border-color: var(--color-gold);
  box-shadow: none;
}

/* Result cards */
.results-count {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.result-card {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s;
}
.result-card:hover {
  border-color: var(--color-gold);
}

.result-body {
  flex: 1;
  min-width: 0;
}

.result-meta-top {
  margin-bottom: 0.25rem;
}

.result-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  display: block;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-name:hover { color: var(--color-gold); }

.result-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #666;
}
.result-details span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.result-newspaper {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.3rem;
}

.result-action {
  flex-shrink: 0;
}

/* Type badges */
.type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-align: center;
}
.type-nekrolog {
  background-color: #f0ebe4;
  color: #6b5a3e;
}
.type-kondolencje {
  background-color: #eef0f7;
  color: #3a4a7a;
}

/* Sidebar */
.sidebar-card {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
  padding: 1.25rem;
}
.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.sidebar-divider {
  height: 2px;
  background: linear-gradient(to right, var(--color-gold), transparent);
  margin-bottom: 0.85rem;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #f0ebe4;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
}
.sidebar-name:hover { color: var(--color-gold); }
.sidebar-date {
  font-size: 0.75rem;
  color: #999;
}

/* Feature boxes */
.feature-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
}
.feature-box {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.feature-icon {
  flex-shrink: 0;
  line-height: 1;
}
.feature-icon img {
  display: block;
  opacity: 0.75;
  border-radius: 0.5rem;
}
.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
}
.feature-desc {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
}

/* Pagination */
.pagination .page-link {
  color: #444;
  border-color: #ddd;
  background-color: transparent;
  min-width: 2.2rem;
  text-align: center;
}
.pagination .page-item.active .page-link {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.pagination .page-link:hover {
  background-color: #f0ebe4;
  color: #1a1a1a;
  border-color: #ddd;
}

/* Detail page */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-back {
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.detail-back:hover { color: var(--color-gold); }
.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.detail-action-link {
  color: #555;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.detail-action-link:hover { color: var(--color-gold); }
.detail-action-sep { color: #ccc; }

.detail-card {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
}
.detail-main {
  padding: 2.5rem 2rem;
  border: 5px double #000;
}
@media (min-width: 768px) {
  .border-end-md {
    border-right: 1px solid #e0d9d0;
  }
}
.detail-hero {
  margin-bottom: 1.5rem;
}
.detail-graphic {
  max-height: 160px;
  width: auto;
  margin-bottom: 0.5rem;
}
.detail-cross {
  font-size: 1.8rem;
  color: #000;
  line-height: 1;
  margin-bottom: 0.1rem;
}
.detail-sp {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.5rem;
}
.detail-name {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}
.detail-age {
  font-size: 1.1rem;
  color: #555;
}
.detail-divider-gold {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
  margin: 1.25rem auto;
}
.detail-content {
  font-size: 0.975rem;
  color: #333;
  line-height: 1.8;
  padding: 0 1rem;
}
.detail-content a {
  color: var(--color-gold);
  text-decoration: underline;
}
.detail-content a:hover {
  color: var(--color-gold-hover);
}

.detail-meta {
  padding: 2rem 1.5rem 2rem 2rem;
  background: #fdfaf7;
  display: flex;
  flex-direction: column;
}
.detail-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0ebe4;
}
.detail-meta-item:last-child { border-bottom: none; }
.detail-meta-icon {
  font-size: 1.1rem;
  color: #bbb;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaa;
  margin-bottom: 0.15rem;
}
.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
}

.detail-candle-box {
  background: #fff;
  border: 1px solid #e0d9d0;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail-candle-icon {
  font-size: 2rem;
  color: var(--color-gold);
}
.detail-candle-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
}
.detail-candle-sub {
  font-size: 0.8rem;
  color: #888;
}
