/* Nha Khoa Bé Ngoan - 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: #e6b23c; }

/* ---------- 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; }
}

/* ---------- Bé Ngoan: màu thương hiệu cho mùa lễ ---------- */
.season-ribbon--noel {
  background: var(--coral-bright);
  color: #3A1B0E;
  border-bottom-color: rgba(35, 51, 59, .16);
}
.season-ribbon--noel .season-ribbon-text { color: #3A1B0E; }
.season-ribbon--noel .season-ribbon-icon { color: #3A1B0E; }
.season-ribbon--noel .season-ribbon-days { border-color: rgba(35, 51, 59, .34); color: #3A1B0E; }
.season-ribbon--noel .season-ribbon-link { color: #3A1B0E; }
.season-ribbon--noel .season-ribbon-link:hover { color: #6B2A11; }

.season-ribbon--tet {
  background: var(--ink);
  color: var(--cream);
  border-bottom-color: rgba(255, 201, 74, .38);
}
.season-ribbon--tet .season-ribbon-text { color: rgba(255, 248, 238, .94); }
.season-ribbon--tet .season-ribbon-icon,
.season-ribbon--tet .season-ribbon-days,
.season-ribbon--tet .season-ribbon-link { color: var(--gold-bright); }
.season-ribbon--tet .season-ribbon-days { border-color: rgba(255, 201, 74, .5); }
.season-ribbon--tet .season-ribbon-link:hover { color: var(--cream); }

/* Noel: cành thông teal, quả cam, tuyết trắng */
.season-noel .fx-branch svg [stroke="#1c4f43"] { stroke: var(--teal); }
.season-noel .fx-branch svg [fill="#1c4f43"] { fill: var(--teal); }
.season-noel .fx-branch svg [fill="#2b6355"] { fill: var(--teal-bright); }
.season-noel .fx-branch svg [fill="#b23a2f"] { fill: var(--coral-bright); }
.season-noel .fx-branch svg [fill="#e08b80"] { fill: #FFD3C6; }
.season-noel .fx-branch svg [fill="#c3a05c"] { fill: var(--gold-bright); }
.season-noel .fx-branch svg [fill="#f0dcae"] { fill: #FFF3D2; }

/* Tết: mai vàng giữ nguyên, lồng đèn đổi teal */
.season-tet .fx-orn svg [fill="#b23a2f"] { fill: var(--teal-bright); }
.season-tet .fx-orn svg [stroke="#e6b23c"] { stroke: var(--gold-bright); }
.season-tet .fx-branch svg [fill="#e6b23c"] { fill: var(--gold-bright); }
.season-tet .fx-branch svg [fill="#3f6b4a"] { fill: var(--teal); }

/* ông già tuyết nhỏ, vẽ tay bằng SVG nhúng */
.season-fx--noel::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 78px;
  height: 96px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2080%2096'%3E%3Cg%20fill%3D'none'%20stroke%3D'%2323333B'%20stroke-width%3D'2'%20stroke-linejoin%3D'round'%20stroke-linecap%3D'round'%3E%3Cpath%20d%3D'M29%2084h8v9h-8zM43%2084h8v9h-8z'%20fill%3D'%2323333B'%20stroke%3D'none'%2F%3E%3Cpath%20d%3D'M24%2056c-3%205-4%2012-4%2019%200%208%205%2013%2020%2013s20-5%2020-13c0-7-1-14-4-19-4%205-9%208-16%208s-12-3-16-8z'%20fill%3D'%23FF7A59'%2F%3E%3Cpath%20d%3D'M21%2070h38'%20stroke%3D'%23FFF8EE'%20stroke-width%3D'5'%2F%3E%3Crect%20x%3D'36'%20y%3D'66'%20width%3D'8'%20height%3D'9'%20rx%3D'1.5'%20fill%3D'%23FFC94A'%20stroke-width%3D'1.6'%2F%3E%3Ccircle%20cx%3D'40'%20cy%3D'36'%20r%3D'13'%20fill%3D'%23FFDCB8'%2F%3E%3Cpath%20d%3D'M27%2038c1%2010%206%2016%2013%2016s12-6%2013-16c-3%204-7%206-13%206s-10-2-13-6z'%20fill%3D'%23FFF8EE'%2F%3E%3Cpath%20d%3D'M26%2024c2-9%207-13%2014-13s12%204%2014%2013c-4-4-8-6-14-6s-10%202-14%206z'%20fill%3D'%23FF7A59'%2F%3E%3Cpath%20d%3D'M40%208v9'%2F%3E%3Crect%20x%3D'21'%20y%3D'20'%20width%3D'38'%20height%3D'6'%20rx%3D'3'%20fill%3D'%23FFF8EE'%2F%3E%3Ccircle%20cx%3D'40'%20cy%3D'4.5'%20r%3D'3.6'%20fill%3D'%23FFF8EE'%2F%3E%3Ccircle%20cx%3D'35'%20cy%3D'34'%20r%3D'1.5'%20fill%3D'%2323333B'%20stroke%3D'none'%2F%3E%3Ccircle%20cx%3D'45'%20cy%3D'34'%20r%3D'1.5'%20fill%3D'%2323333B'%20stroke%3D'none'%2F%3E%3Ccircle%20cx%3D'40'%20cy%3D'38.6'%20r%3D'2.2'%20fill%3D'%23FF7A59'%20stroke%3D'none'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
  opacity: .95;
}

@media (max-width: 1379px) {
  .season-fx--noel::after { display: none; }
}
