/* =========================================================
   China Atlas: province-level album system
   ========================================================= */

.china-hero,
.album-page-hero {
  position: relative;
  margin: 2.5rem 0 2rem;
  padding: 3.2rem 2.4rem;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(111, 151, 118, 0.20), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(214, 168, 79, 0.18), transparent 30%),
    radial-gradient(circle at 80% 85%, rgba(89, 125, 170, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(246,250,245,0.84));
  border: 1px solid rgba(52, 80, 60, 0.10);
  box-shadow: 0 28px 90px rgba(40, 60, 50, 0.12);
}

.china-hero::before,
.album-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.26) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  pointer-events: none;
}

.china-hero-content,
.album-page-hero > * {
  position: relative;
  z-index: 1;
}

.china-hero h1,
.album-page-hero h1 {
  margin: 0.7rem 0 0.6rem;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.china-hero p,
.album-page-hero p {
  max-width: 900px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted, #647089);
}

.china-subtitle {
  font-size: 1.18rem !important;
  font-weight: 650;
  color: #35523a !important;
  margin-bottom: 0.8rem;
}

.china-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.china-stats div,
.china-search-panel,
.china-album-card,
.photo-item,
.album-empty-state {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(40, 60, 50, 0.10);
  box-shadow: 0 16px 48px rgba(40, 60, 50, 0.08);
}

.china-stats div {
  padding: 1.2rem;
  border-radius: 20px;
}

.china-stats strong {
  display: block;
  font-size: 1.8rem;
  color: #18223c;
}

.china-stats span,
.china-album-location,
.china-album-intro,
.photo-item-caption p,
.lightbox-text p {
  color: #647089;
}

.china-search-panel {
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  border-radius: 24px;
}

#album-search {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(40, 60, 50, 0.12);
  background: rgba(255,255,255,0.92);
  font-size: 1rem;
  outline: none;
}

#album-search:focus {
  border-color: rgba(38, 75, 139, 0.35);
  box-shadow: 0 0 0 4px rgba(38, 75, 139, 0.08);
}

.china-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.china-filter {
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(40, 60, 50, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: #35523a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.china-filter:hover,
.china-filter.active {
  background: linear-gradient(90deg, rgba(38,75,139,0.12), rgba(111,151,118,0.16));
  transform: translateY(-1px);
}

.china-album-grid,
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3.5rem;
}

.china-album-card,
.photo-item {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.china-album-card:not(.is-waiting):hover,
.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(40, 50, 80, 0.14);
}

.china-album-card.is-waiting {
  opacity: 0.80;
}

.china-album-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.china-album-cover img,
.waiting-cover,
.photo-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.china-album-cover img,
.waiting-cover {
  height: 215px;
}

.photo-item img {
  height: 250px;
}

.waiting-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(237,242,238,0.95), rgba(248,248,248,0.95)),
    repeating-linear-gradient(45deg, rgba(111,151,118,0.08), rgba(111,151,118,0.08) 8px, transparent 8px, transparent 18px);
  color: #6f7a71;
  font-size: 1.06rem;
  font-weight: 650;
}

.china-album-info,
.photo-item-caption {
  padding: 1.1rem 1.2rem 1.3rem;
}

.china-album-level {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(111, 151, 118, 0.12);
  color: #35523a;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.china-album-info h2,
.photo-item-caption h3 {
  margin-bottom: 0.35rem;
}

.china-album-info h2 {
  font-size: 1.25rem;
}

.china-album-location {
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}

.china-album-intro,
.photo-item-caption p {
  line-height: 1.65;
  font-size: 0.95rem;
}

.china-album-meta,
.album-back-link {
  color: #264b8b;
  font-weight: 650;
}

.china-album-meta {
  margin-top: 0.8rem;
}

.china-album-meta.waiting {
  color: #888;
}

.album-back-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
}

.china-empty-results,
.album-empty-state {
  display: none;
  margin: 2rem 0 3rem;
  padding: 2.4rem;
  text-align: center;
  border-radius: 20px;
  color: #6f7a71;
}

.album-empty-state {
  display: block;
  grid-column: 1 / -1;
  border-style: dashed;
}

.photo-item {
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(8, 12, 18, 0.78);
  z-index: 9999;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 1000px;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
}

.lightbox-content img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #111;
  display: block;
}

.lightbox-text {
  padding: 1.2rem 1.4rem 1.5rem;
}

.lightbox-text h2 {
  margin-bottom: 0.45rem;
  font-size: 1.35rem;
}

.lightbox-text p {
  margin: 0;
  line-height: 1.7;
}

.ai-desc-btn {
  margin-top: 1rem;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 12px;
  background: #264b8b;
  color: #fff;
  cursor: pointer;
  font-weight: 650;
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(0,0,0,0.45);
  cursor: pointer;
}

@media (max-width: 1100px) {
  .china-album-grid,
  .photo-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .china-hero,
  .album-page-hero {
    padding: 2.2rem 1.5rem;
  }

  .china-stats,
  .china-album-grid,
  .photo-gallery-grid {
    grid-template-columns: 1fr;
  }

  .china-album-cover img,
  .waiting-cover,
  .photo-item img {
    height: 220px;
  }
}
