/* SCHOOL SEASONAL EFFECTS */

.school-fx-layer {
    position: fixed;
    inset: 0;
    z-index: 9990;
    overflow: hidden;
    pointer-events: none;
}

.school-fx-item {
    position: absolute;
    top: -40px;
    pointer-events: none;
    user-select: none;
}

/* Nút chọn hiệu ứng */
.school-fx-toggle {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 9992;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    color: #fff;
    background: #08669e;
    border: 2px solid rgba(255,255,255,.9);
    border-radius: 50%;

    box-shadow: 0 5px 18px rgba(0,55,95,.25);
    cursor: pointer;

    font-size: 20px;

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.school-fx-toggle:hover {
    background: #075484;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 7px 22px rgba(0,55,95,.32);
}

.school-fx-toggle:focus {
    outline: 3px solid rgba(244,174,37,.35);
    outline-offset: 2px;
}

/* Sao */
.school-fx-star {
    color: #ffd85a;
    text-shadow:
        0 0 5px rgba(255,216,90,.8),
        0 0 12px rgba(255,194,40,.45);

    animation:
        schoolFxFall linear forwards,
        schoolFxTwinkle 1.3s ease-in-out infinite alternate;
}

/* Tuyết */
.school-fx-snow {
    color: #fff;

    text-shadow:
        0 0 4px rgba(120,190,235,.75),
        0 0 8px rgba(255,255,255,.8);

    animation:
        schoolFxFall linear forwards,
        schoolFxSway 2.6s ease-in-out infinite alternate;
}

/* Lá mùa thu */
.school-fx-leaf {
    animation:
        schoolFxFall linear forwards,
        schoolFxLeafSway 2.2s ease-in-out infinite alternate;
}

@keyframes schoolFxFall {
    from {
        transform: translate3d(0, -5vh, 0) rotate(0deg);
    }

    to {
        transform: translate3d(var(--fx-drift), 110vh, 0)
                   rotate(var(--fx-rotate));
    }
}

@keyframes schoolFxTwinkle {
    from {
        opacity: .35;
        filter: brightness(.85);
    }

    to {
        opacity: 1;
        filter: brightness(1.35);
    }
}

@keyframes schoolFxSway {
    from {
        margin-left: -12px;
    }

    to {
        margin-left: 12px;
    }
}

@keyframes schoolFxLeafSway {
    from {
        margin-left: -20px;
        filter: brightness(.9);
    }

    to {
        margin-left: 20px;
        filter: brightness(1.08);
    }
}

@media (max-width: 767px) {
    .school-fx-toggle {
        right: 12px;
        bottom: 16px;

        width: 40px;
        height: 40px;

        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .school-fx-layer {
        display: none !important;
    }
}

/* BACK TO TOP CENTER */
.school-back-to-top {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 9993;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: #08669e;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0,55,95,.30);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%,18px) scale(.85);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
}
.school-back-to-top::before {
  content: "\f106";
  font-family: FontAwesome;
  font-size: 30px;
  line-height: 1;
}
.school-back-to-top.is-visible {
  opacity: .96;
  visibility: visible;
  transform: translate(-50%,0) scale(1);
}
.school-back-to-top:hover {
  opacity: 1;
  background: #075183;
  transform: translate(-50%,-3px) scale(1.06);
}
@media (max-width:767px) {
  .school-back-to-top {
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
}
