/* Ninghai design polish - animations & micro-interactions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.feature-card, .news-card, .category-card, .teacher-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feature-card:hover, .news-card:hover, .category-card:hover, .teacher-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(10, 42, 85, 0.12); }
.btn { transition: transform 0.1s ease, background 0.2s ease; }
.btn:active { transform: translateY(1px); }
.gallery-tile svg { transition: transform 0.3s ease; }
.gallery-tile:hover svg { transform: scale(1.05); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 2px; }
.section-head h2 { letter-spacing: 0.5px; }
.hero-content { animation: heroRise 0.7s ease both; }
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.category-card:hover { transform: translateY(0); }
/* Forum hot-rank numbers */
.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-top {
  color: #fff;
  background: linear-gradient(135deg, #c9a45c, #e0b96f);
}
.rank-normal { color: #6b7a90; background: #eef2f8; }
.reply-preview { font-weight: 400; color: #26354a; }
/* Forum nav emphasis */
.main-nav a.nav-forum { font-weight: 700; color: #0e3a6e; }
.main-nav a.nav-forum.active { color: #0e3a6e; }
/* ===== Mobile enhancement (added, does not break base styles) ===== */
@media (max-width: 700px) {
  /* Prevent horizontal overflow on tables & wide cards */
  .card, .table-wrap { overflow-x: auto; }
  .card { padding: 18px 16px; }

  /* Bigger tap targets for touch */
  .btn { padding: 12px 20px; font-size: 15px; }
  .action-btn { padding: 10px 18px; font-size: 14px; }
  .action-btn.static { padding: 10px 18px; }

  /* Forum category card: stack icon and text on narrow screens */
  .category-card { flex-direction: column; text-align: center; gap: 10px; }
  .category-stats { flex-direction: row; gap: 12px; }

  /* Post rows: give title room, let meta wrap below */
  .post-row { gap: 8px; padding: 12px 14px; }
  .post-row .post-meta { width: 100%; margin-top: 2px; }

  /* Navigation: roomier tap targets */
  .main-nav a { padding: 12px 14px; font-size: 15px; }

  /* Messages conversation bubbles fill better on small screens */
  .conv-msg { max-width: 88%; }

  /* Hero spacing tightens a bit */
  .hero { padding: 64px 0 68px; }
  .hero-motto { gap: 10px; }
}
/* =====================================================================
   Enhanced premium styling (task ②⑤) — appended; does not alter base rules
   ===================================================================== */

/* 1) Frosted-glass cards over the light background */
.card,
.feature-card,
.news-card,
.category-card,
.teacher-card,
.honor-card,
.gallery-tile {
  background: rgba(255 255 255 / 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

/* 2) Thin golden accent line under the sticky header */
.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 28%, #F4DDB0 50%, var(--gold) 72%, transparent 100%);
  pointer-events: none;
}

/* 3) Soft halo glow at the top corners of the hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 22% 18%, rgba(201, 164, 96, 0.30), transparent 62%),
    radial-gradient(52% 45% at 82% 6%, rgba(255, 255, 240, 0.18), transparent 55%);
}

/* 4) Primary buttons: gradient + diagonal light sheen sweeping across on hover */
.btn-primary {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, var(--navy-800) 32%, var(--navy-600) 100%);
  transition: transform 0.1s ease, background 0.2s ease;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -75%;
  width: 45%;
  background: linear-gradient(115deg, transparent 33%, rgba(255, 255, 245, 0.38) 50%, transparent 66%);
  transform: skewX(-22deg);
  pointer-events: none;
  transition: left 0.6s ease;
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, var(--navy-700) 32%, var(--navy-500) 100%);
}
.btn-primary:hover::after { left: 145%; }

/* 5) School motto: gradient lettering (gold → ice blue) that stays legible on the navy hero */
.hero-motto {
  background: linear-gradient(105deg, #F7E4B5 0%, var(--gold) 40%, #9CC6F2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 6) Section headings: refined letterspacing; “more” links nudge right on hover */
.section-head h2 { letter-spacing: 1px; }
.more-link {
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}
.more-link:hover { transform: translateX(5px); }
