/* Nha Khoa Minh Khai - trang trí theo mùa (Noel / Tết)
   Chỉ dùng transform + opacity cho chuyển động. Không ảnh, không JS. */

/* ---------- dải ưu đãi ---------- */
.season-ribbon {
  position: relative;
  z-index: 2;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .005em;
  border-bottom: 1px solid rgba(195, 160, 92, .34);
}

.season-ribbon-in {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding-block: 7px;
}

.season-ribbon-icon {
  display: inline-flex;
  flex: none;
  color: var(--gold);
}

.season-ribbon-text {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(250, 246, 238, .92);
}

.season-ribbon-days {
  flex: none;
  padding: 2px 9px;
  border: 1px solid rgba(195, 160, 92, .45);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.season-ribbon-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding-left: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}

.season-ribbon-link:hover { color: var(--cream); }
.season-ribbon-link svg { transition: transform .2s var(--ease); }
.season-ribbon-link:hover svg { transform: translateX(2px); }

.season-ribbon--tet .season-ribbon-icon { color: #c7d5de; }

/* ---------- lớp trang trí ---------- */
.season-fx {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.season-fx .fx-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* tuyết */
.season-fx .snow { position: absolute; inset: 0; }

.season-fx .snow span {
  position: absolute;
  top: 0;
  left: var(--x, 50%);
  width: var(--sz, 4px);
  height: var(--sz, 4px);
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(28, 79, 67, .3), 0 0 5px rgba(28, 79, 67, .1);
  opacity: 0;
  animation: season-fall var(--dur, 10s) linear var(--dl, 0s) infinite;
}

@keyframes season-fall {
  0%   { transform: translate3d(0, -6vh, 0); opacity: 0; }
  12%  { opacity: .85; }
  86%  { opacity: .7; }
  100% { transform: translate3d(22px, 104vh, 0); opacity: 0; }
}

/* cành góc */
.season-fx .fx-branch {
  position: absolute;
  opacity: .9;
}

.season-fx .fx-branch--tr {
  top: 122px;
  right: 0;
  width: 165px;
  height: 165px;
}

.season-fx .fx-branch--bl {
  bottom: 0;
  left: 0;
  width: 160px;
  height: 136px;
  opacity: .95;
}


/* đồ trang trí Tết */
.season-fx .fx-orn { position: absolute; }
.season-fx .fx-orn--lantern-a { top: 196px; left: 16px; width: 52px; height: 78px; opacity: .92; }

/* chuyển động rất nhẹ, chỉ transform */
@keyframes season-sway {
  0%, 100% { transform: rotate(-.4deg); }
  50%      { transform: rotate(.55deg); }
}
.season-fx .fx-branch--tr { transform-origin: 100% 0; animation: season-sway 11s ease-in-out infinite; }
.season-fx .fx-orn--lantern-a { transform-origin: 50% 0; animation: season-sway 7.5s ease-in-out infinite; }
.season-fx .fx-branch--bl { transform-origin: 0 100%; animation: season-sway 13s ease-in-out infinite reverse; }

/* Hẹp hơn thì bỏ hết đồ trang trí để không đè nội dung */
@media (max-width: 1379px) {
  .season-fx .fx-branch,
  .season-fx .fx-orn { display: none; }
}

/* ---------- gọn lại trên mobile: chỉ giữ ribbon ---------- */
@media (max-width: 720px) {
  .season-ribbon { font-size: 12px; }
  .season-ribbon-in { gap: 8px; min-height: 38px; padding-block: 6px; align-items: center; }
  .season-ribbon-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
  }
  .season-ribbon-days { display: none; }
  .season-ribbon-link { font-size: 12px; padding-left: 8px; }

  .season-fx .snow,
  .season-fx .fx-branch,
  .season-fx .fx-orn { display: none; }
}

/* ---------- tôn trọng giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  .season-fx .snow { display: none; }
  .season-fx *,
  .season-ribbon,
  .season-ribbon * { animation: none !important; transition: none !important; }
}

/* ---------- Minh Khai: tông lạnh, ink + bạc, bỏ đỏ tươi ---------- */
.season-ribbon { --gold: #c7d5de; border-bottom-color: rgba(199, 213, 222, .4); }
.season-ribbon-days { border-color: rgba(199, 213, 222, .55); }
.season-ribbon--tet .season-ribbon-icon { color: #c7d5de; }
.season-ribbon-text { color: rgba(255, 255, 255, .9); }

.season-fx .snow span {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 5px 1px rgba(31, 110, 140, .22);
}

/* Đổi màu hình SVG có sẵn (presentation attribute thua khai báo CSS) */
.season-fx .fx-svg [stroke="#1c4f43"] { stroke: #22394d; }
.season-fx .fx-svg [stroke="#0a2a2b"] { stroke: #0b1f33; }
.season-fx .fx-svg [stroke="#c3a05c"] { stroke: #b9c9d4; }
.season-fx .fx-svg [stroke="#b23a2f"] { stroke: #c7d5de; }
.season-fx .fx-svg [fill="#1c4f43"] { fill: #22394d; }
.season-fx .fx-svg [fill="#2b6355"] { fill: #2e4b5e; }
.season-fx .fx-svg [fill="#3f6b4a"] { fill: #4a6a78; }
.season-fx .fx-svg [fill="#b23a2f"] { fill: #e8f0f4; }
.season-fx .fx-svg [fill="#e08b80"] { fill: #ffffff; }
.season-fx .fx-svg [fill="#c3a05c"] { fill: #b9c9d4; }
.season-fx .fx-svg [fill="#e6b23c"] { fill: #dbe6ec; }
.season-fx .fx-svg [fill="#f0dcae"] { fill: #ffffff; }

/* Hoa mai nằm trong <defs> nên CSS không ghi đè được màu fill của bản sao <use>;
   chuyển cả cành sang thang xám bạc cho hợp tông lạnh. */
html.season-tet .fx-branch--bl .fx-svg { filter: grayscale(1) brightness(1.06) contrast(.92); }


/* Tuyết mảnh hơn: gần như tan trên nền sáng, rõ trên nền ink */
@keyframes season-fall {
  0%   { transform: translate3d(0, -6vh, 0); opacity: 0; }
  12%  { opacity: .55; }
  86%  { opacity: .42; }
  100% { transform: translate3d(22px, 104vh, 0); opacity: 0; }
}
.season-ribbon [fill="#b23a2f"] { fill: #c7d5de; }
.season-fx .fx-branch--tr { opacity: .65; }
