.hero {
  position: relative;
  height: 410px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  position: absolute;
  width: 430px;
  height: 430px;
  content: "";
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  filter: blur(4px);
}

.hero::before {
  top: -260px;
  left: -80px;
}

.hero::after {
  right: -100px;
  bottom: -330px;
}

.hero-logo {
  position: absolute;
  inset: 62px 0 0;
  z-index: 2;
  width: min(720px, 65vw);
  height: 340px;
  margin: auto;
  background: url("../images/logo-touming.png") center / contain no-repeat;
}

.weather-card {
  position: fixed;
  top: 100px;
  left: 10px;
  z-index: 40;
  display: grid;
  width: 164px;
  height: 91px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  backdrop-filter: blur(12px);
  transition: opacity 0.25s, transform 0.25s;
}

.weather-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

.weather-location {
  font-size: 15px;
}

.weather-temperature {
  font-size: 20px;
  font-weight: 800;
}

.weather-condition {
  font-size: 12px;
  opacity: 0.9;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 10px;
}

.intro-card {
  min-height: 88px;
  padding: 13px 20px;
  background: #f3f3f3;
  border-radius: 15px;
  text-align: center;
}

.intro-card h2 {
  margin: 0 0 4px;
  font-size: 1.5em;
}

.intro-card p {
  margin: 0;
  color: #5b6472;
  font-size: 14px;
}

.intro-card-skeleton,
.notice-card-skeleton {
  overflow: hidden;
  color: transparent;
  user-select: none;
}

.nav-data-state,
.footer-data-state {
  color: var(--muted);
  font-size: 13px;
}

.nav-data-state {
  padding: 10px 14px;
  white-space: nowrap;
}

.feature-layout {
  display: grid;
  grid-template-columns: 866fr 426fr;
  gap: 8px;
  height: 450px;
  margin-top: 30px;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.carousel-track,
.carousel-slide {
  width: 100%;
  height: 100%;
}

.carousel-data-state,
.carousel-image-error {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 28px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #52627a;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.86) 0 6%, transparent 7%),
    linear-gradient(135deg, #e8f4ff, #f8edf4);
  text-align: center;
}

.carousel-data-state > span,
.carousel-image-error > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  font-size: 23px;
  font-weight: 800;
}

.carousel-data-state strong,
.carousel-image-error strong {
  color: var(--ink);
  font-size: 17px;
}

.carousel-data-state p {
  max-width: 520px;
  margin: 0;
  font-size: 13px;
}

.carousel-data-state.is-error > span {
  color: var(--danger);
}

.carousel-image-error {
  position: absolute;
  inset: 0;
}

.carousel-image-error[hidden] {
  display: none;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  padding: 17px 20px;
  color: #fff;
  border-radius: 14px;
}

.carousel-caption h2,
.carousel-caption p {
  margin: 0;
}

.carousel-caption p {
  font-size: 14px;
  opacity: 0.86;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.45);
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.carousel-control:hover {
  background: rgba(15, 23, 42, 0.78);
}

.carousel-prev {
  left: 16px;
}

.carousel-next {
  right: 16px;
}

.notice-stack {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.notice-card {
  display: grid;
  align-content: center;
  padding: 22px 26px;
  background: linear-gradient(135deg, #fff, #f7f9fc);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border 0.2s, transform 0.2s, box-shadow 0.2s;
}

.notice-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(40, 55, 82, 0.08);
  transform: translateX(-3px);
}

.notice-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.home-data-state {
  display: grid;
  min-height: 160px;
  padding: 26px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed #b8c7da;
  border-radius: 20px;
  text-align: center;
}

.intro-grid > .home-data-state,
.news-grid > .home-data-state {
  grid-column: 1 / -1;
}

.intro-grid > .home-data-state {
  min-height: 88px;
}

.notice-stack > .home-data-state {
  height: 100%;
  grid-row: 1 / -1;
}

.news-grid > .home-data-state {
  min-height: 260px;
}

.home-data-state-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 800;
}

.home-data-state strong {
  color: var(--ink);
  font-size: 16px;
}

.home-data-state p {
  max-width: 520px;
  margin: 0;
  font-size: 13px;
}

.home-data-state.is-error .home-data-state-icon {
  color: var(--danger);
  background: #fef2f2;
}

.content-section {
  margin-top: 60px;
}

.news-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.news-card {
  display: flex;
  height: 400px;
  padding: 22px;
  overflow: hidden;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(40, 55, 82, 0.06);
}

.news-card .category {
  align-self: flex-start;
  padding: 4px 10px;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.news-card h3 {
  max-height: 4.5em;
  margin: 18px 0 10px;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card p {
  max-height: 8.25em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.news-card .news-meta {
  margin-top: auto;
  padding: 20px 0 14px;
  color: #94a3b8;
  font-size: 12px;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.blog-card {
  position: relative;
  display: grid;
  grid-template-rows: 150px 150px 30px;
  height: 330px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(40, 55, 82, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-blog-empty {
  display: grid;
  min-height: 330px;
  padding: 34px;
  grid-column: span 3;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed #b8c7da;
  border-radius: 22px;
  text-align: center;
}

.home-blog-empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 4px;
  place-items: center;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 16px;
  font-size: 23px;
  font-weight: 800;
}

.home-blog-empty strong {
  color: var(--ink);
  font-size: 17px;
}

.home-blog-empty p {
  max-width: 520px;
  margin: 0 0 6px;
  font-size: 13px;
}

.home-blog-error .home-blog-empty-icon {
  color: var(--danger);
  background: #fef2f2;
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.home-blog-cover-placeholder {
  display: grid;
  width: 100%;
  height: 150px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #32506f;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.75) 0 7%, transparent 8%),
    linear-gradient(135deg, #dff5f4, #e6efff 52%, #f7e6ed);
}

.home-blog-cover-placeholder b {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  font-size: 24px;
}

.home-blog-cover-placeholder small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.blog-summary {
  display: -webkit-box;
  margin: 0;
  padding: 16px 18px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.blog-card h3 {
  margin: 0;
  padding: 0 18px;
  overflow: hidden;
  font-size: 16px;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-card {
  display: grid;
  height: 330px;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, #eef7ff, #faedf3);
  border: 1px dashed #94a3b8;
  border-radius: 22px;
  font-size: 24px;
  font-weight: 800;
}

.more-card span {
  display: block;
  font-size: 46px;
  font-weight: 400;
}

@media (max-width: 1100px) {

  .news-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-blog-empty {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .hero {
    height: 360px;
  }

  .hero-logo {
    top: 55px;
    width: 80vw;
    height: 300px;
  }

  .weather-card {
    position: absolute;
    top: 84px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .carousel {
    height: 390px;
  }

  .notice-stack {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: none;
  }
}

@media (max-width: 640px) {
  .hero {
    height: 330px;
  }

  .hero-logo {
    top: 80px;
    width: 92vw;
    height: 250px;
  }

  .weather-card {
    top: 78px;
    width: 148px;
  }

  .carousel {
    height: 300px;
  }

  .notice-stack,
  .news-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    height: 330px;
  }

  .news-card h3 {
    max-height: 3em;
    -webkit-line-clamp: 2;
  }

  .news-card p {
    max-height: 6.6em;
    -webkit-line-clamp: 4;
  }
}
