@font-face {
  font-family: 'Trajan';
  src: local('Trajan Pro'), local('Trajan'), serif;
}

* {
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eff3f7 0%, #f8fafc 100%);
  color: #1f2a36;
  font-family: 'Trajan', serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #063970;
}

a:hover {
  color: #052c55;
}

.art-main {
  padding: 28px 36px 36px;
  font-family: 'Trajan', serif;
  max-width: 1180px;
  margin: 24px auto;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.art-main h1 {
  margin: 0 0 18px;
  color: #063970;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.2rem);
  border-bottom: 2px solid #d4af37;
  padding-bottom: 10px;
}

.art-search-wrap {
  margin: 0 0 18px;
}

#artSearch {
  width: 100%;
  max-width: 520px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.98rem;
  border: 1px solid #d9e0e8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#artSearch:focus {
  outline: none;
  border-color: #063970;
  box-shadow: 0 0 0 3px rgba(6, 57, 112, 0.12);
}

.art-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.art-tag-button {
  border: 1px solid rgba(6, 57, 112, 0.18);
  border-radius: 999px;
  background: #f8fbff;
  color: #063970;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.art-tag-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(6, 57, 112, 0.08);
}

.art-tag-button.art-active {
  background: #063970;
  color: #ffffff;
  border-color: #063970;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.art-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e7edf4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.art-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.art-card img {
  width: 100%;
  height: 178px;
  object-fit: cover;
  display: block;
}

.art-card .art-content {
  padding: 16px 16px 18px;
}

.art-card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.35;
  color: #063970;
}

.art-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.65;
  font-size: 0.95rem;
}

.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 0.82rem;
}

.art-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.art-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.art-chip {
  font-size: 0.75rem;
  border: 1px solid #d7e1ea;
  padding: 4px 9px;
  border-radius: 999px;
  color: #334155;
  background: #f8fafc;
}

.art-empty-state {
  text-align: center;
  grid-column: 1 / -1;
  color: #6b7280;
  padding: 18px 0 8px;
}

.art-detail-main {
  max-width: min(920px, calc(100% - 32px));
  margin: 24px auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  min-height: calc(100vh - 100px);
}

.art-detail-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e6eaef;
  border-top: 3px solid #d4af37;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 26px;
  margin-bottom: 18px;
}

.art-hero {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.art-hero-text h1 {
  margin: 0 0 10px;
  color: #063970;
  border: 0;
  border-bottom: 2px solid #d4af37;
  padding: 0 0 8px;
  line-height: 1.25;
}

#articleMeta.art-meta {
  color: #8a6b14;
  font-weight: 600;
}

.art-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #e6eaef;
  background: #f8fafc;
}

.art-summary {
  margin: 0;
  color: #475569;
  line-height: 1.75;
  font-size: 1rem;
}

.art-body p {
  line-height: 1.9;
  color: #334155;
  font-size: 1rem;
  margin: 0 0 14px;
}

.art-body h2,
.art-body h3 {
  color: #063970;
  margin-top: 24px;
  margin-bottom: 10px;
}

.art-body ul {
  margin: 0 0 14px 20px;
  color: #334155;
  line-height: 1.8;
}

.art-body li {
  margin-bottom: 6px;
}

.art-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  background: #063970;
  border: 1px solid #052c55;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 12px;
  margin-bottom: 12px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.art-back:hover {
  background: #052c55;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b7280;
  font-size: 0.9rem;
  gap: 12px;
}

@media (max-width: 900px) {
  .art-main {
    padding: 24px;
  }

  .art-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .art-main {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 15px;
  }

  .art-detail-main {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .art-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
  }

  .art-card img {
    height: 160px;
  }

  .art-detail-card {
    border-radius: 0;
    box-shadow: none;
    padding: 18px 16px 22px;
  }

  .art-hero {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .art-main {
    padding: 14px 12px;
  }

  .art-tag-filters {
    gap: 8px;
  }

  .art-tag-button {
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  .art-card img {
    height: 180px;
  }

  .art-card h2 {
    font-size: 1.05rem;
  }
}
