@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #F5F1E8;
  --primary-color: #2C3E50;
  --accent-color: #8B5A2B;
  --text-color: #333333;
  --light-text: #666666;
  --border-color: #E8E4DB;
  --white: #FFFFFF;
  --shadow: 0 2px 10px rgba(44, 62, 80, 0.1);
  --shadow-hover: 0 8px 25px rgba(44, 62, 80, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(245, 241, 232, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 28px;
  margin-right: 10px;
}

.logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.search-box {
  position: relative;
}

.search-input {
  padding: 8px 30px 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--white);
  font-size: 14px;
  width: 200px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  width: 250px;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-color);
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-links {
  list-style: none;
}

.mobile-nav-links li {
  margin-bottom: 15px;
}

.mobile-nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 500;
}

/* Hero Slider */
.hero-section {
  margin-top: 70px;
  position: relative;
  height: 500px;
  overflow: hidden;
}

.slider {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.3));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 100px;
}

.slide-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 48px;
  color: var(--white);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.slide-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.slide-btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease 0.4s both;
  width: fit-content;
}

.slide-btn:hover {
  background: #6B4423;
  transform: translateY(-2px);
}

.slider-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--white);
  transform: scale(1.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Overview Section */
.overview-section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
}

.overview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.overview-card {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.overview-card h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 22px;
}

.overview-card p {
  color: var(--light-text);
  line-height: 1.8;
  margin-bottom: 15px;
}

.overview-list {
  list-style: none;
}

.overview-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  padding-left: 25px;
}

.overview-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Featured Heritages */
.featured-section {
  padding: 60px 0;
  background: var(--white);
}

.heritages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.heritage-card {
  background: var(--bg-color);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.heritage-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.heritage-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.heritage-card:hover img {
  transform: scale(1.05);
}

.heritage-card-content {
  padding: 20px;
}

.heritage-card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.heritage-card-level {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  color: var(--white);
  margin-bottom: 10px;
}

.heritage-card-description {
  color: var(--light-text);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quick Entries */
.quick-entries-section {
  padding: 60px 0;
}

.quick-entries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.entries-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.entries-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  margin-right: 15px;
}

.region-grid, .type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.region-btn, .type-btn {
  padding: 12px 25px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  color: var(--primary-color);
}

.region-btn:hover, .type-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.type-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* News Section */
.news-section {
  padding: 60px 0;
  background: var(--white);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--bg-color);
  padding: 25px;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.news-date {
  color: var(--accent-color);
  font-size: 12px;
  margin-bottom: 10px;
}

.news-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-summary {
  color: var(--light-text);
  font-size: 14px;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 50px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-section h4 {
  margin-bottom: 20px;
  font-family: 'Noto Serif SC', serif;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* Category Page */
.category-header {
  margin-top: 70px;
  padding: 40px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #34495E 100%);
  color: var(--white);
}

.category-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 36px;
  margin-bottom: 10px;
}

.category-breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.category-breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.category-breadcrumb a:hover {
  color: var(--white);
}

.filter-bar {
  padding: 20px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
}

.filters {
  display: flex;
  gap: 30px;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.filter-btn:hover {
  border-color: var(--primary-color);
}

.sort-select {
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--white);
  font-size: 14px;
  color: var(--primary-color);
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Detail Page */
.detail-hero {
  margin-top: 70px;
  position: relative;
  height: 400px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(44, 62, 80, 0.6), rgba(44, 62, 80, 0.8));
}

.detail-header {
  position: absolute;
  bottom: 30px;
  left: 50px;
  color: var(--white);
}

.detail-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 42px;
  margin-bottom: 15px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-content {
  padding: 50px 0;
}

.detail-section {
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.detail-section h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
}

.detail-section p {
  color: var(--light-text);
  line-height: 1.8;
  font-size: 16px;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inheritors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.inheritor-card {
  text-align: center;
}

.inheritor-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid var(--border-color);
}

.inheritor-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.inheritor-meta {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 10px;
}

.inheritor-achievement {
  font-size: 13px;
  color: var(--accent-color);
}

.activities-list {
  list-style: none;
}

.activities-list li {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 20px;
}

.activities-list li:last-child {
  border-bottom: none;
}

.activity-icon {
  font-size: 24px;
  color: var(--accent-color);
}

.activity-content {
  flex: 1;
}

.activity-content h4 {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.activity-content p {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 3px;
}

.related-section {
  padding: 30px 0;
}

.related-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 25px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-card-title {
  padding: 15px;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: var(--primary-color);
}

/* Image Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: var(--white);
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: var(--white);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Search Results */
.search-results {
  padding: 30px 0;
}

.search-term {
  color: var(--accent-color);
  font-weight: 600;
}

.results-count {
  color: var(--light-text);
  margin-bottom: 30px;
}

.no-results {
  text-align: center;
  padding: 50px;
  color: var(--light-text);
}

.no-results h3 {
  font-family: 'Noto Serif SC', serif;
  margin-bottom: 15px;
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  padding: 50px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1199px) {
  .heritages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .header-content {
    padding: 12px 15px;
  }
  
  .nav-links {
    display: none;
  }
  
  .search-box {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .slide-title {
    font-size: 32px;
  }
  
  .slide-description {
    font-size: 16px;
  }
  
  .slide-overlay {
    padding: 0 50px;
  }
  
  .overview-content {
    grid-template-columns: 1fr;
  }
  
  .inheritance-section {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-wrap: wrap;
  }
  
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: 350px;
  }
  
  .slide-title {
    font-size: 24px;
  }
  
  .slide-description {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .slide-overlay {
    padding: 0 20px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .overview-card {
    padding: 20px;
  }
  
  .heritages-grid {
    grid-template-columns: 1fr;
  }
  
  .news-list {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 30px;
  }
  
  .category-title {
    font-size: 28px;
  }
  
  .detail-title {
    font-size: 28px;
  }
  
  .detail-header {
    left: 20px;
    bottom: 20px;
  }
  
  .detail-section {
    padding: 20px;
  }
  
  .gallery-container {
    grid-template-columns: 1fr;
  }
  
  .inheritors-grid {
    grid-template-columns: 1fr;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .activities-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 16px;
  }
  
  .hero-section {
    height: 280px;
  }
  
  .slide-title {
    font-size: 20px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
}