/* Chùa Việt · chuyển động trang chủ (15/11/2026, bổ sung cho hieu-ung.css).
   Chỉ trang trí, thuần CSS, chỉ đổi translate / scale / rotate / opacity / background-position để nhẹ máy.
   Dùng thuộc tính rời translate, scale, rotate (không dùng transform) để không đè hiệu ứng rê chuột và các lớp đang lật gương.
   Tự tắt khi hệ điều hành bật "giảm chuyển động" (style.css) hoặc người xem chọn Giảm chuyển động (.it-dong trong hieu-ung.css). */

/* ---------- 1. Cổng: chữ và nút ---------- */
@keyframes cd-vao{from{opacity:0;translate:0 26px}to{opacity:1;translate:0 0}}
@keyframes cd-anh-chu{0%,55%{background-position:160% 0,0 0}100%{background-position:-60% 0,0 0}}
@keyframes cd-luot-nut{0%,60%{background-position:170% 0,0 0}100%{background-position:-70% 0,0 0}}
@keyframes cd-tho-nut{0%,100%{box-shadow:inset 0 0 0 3px rgba(42,22,6,.55),inset 0 0 0 4px rgba(240,200,119,.55),0 10px 30px rgba(0,0,0,.45),0 0 26px rgba(233,160,60,.22)}50%{box-shadow:inset 0 0 0 3px rgba(42,22,6,.55),inset 0 0 0 4px rgba(240,200,119,.75),0 10px 30px rgba(0,0,0,.45),0 0 52px rgba(255,190,90,.55)}}
@keyframes cd-kim-cuong{0%,100%{scale:1;opacity:.85}50%{scale:1.22;opacity:1}}
@keyframes cd-mui{0%,100%{translate:0 0}50%{translate:5px 0}}
.trang-chu .cong h1{background:linear-gradient(100deg,transparent 42%,rgba(255,250,225,.92) 50%,transparent 58%) 160% 0/260% 100% no-repeat,linear-gradient(180deg,#fdebb6 10%,#e8b860 62%,#c8913f);-webkit-background-clip:text;background-clip:text;animation:cd-vao 1.1s cubic-bezier(.2,.7,.2,1) both,cd-anh-chu 8s ease-in-out 1.6s infinite}
.trang-chu .cong__chu p{animation:cd-vao 1.1s cubic-bezier(.2,.7,.2,1) .25s both}
.trang-chu .nut-lon{background:linear-gradient(110deg,transparent 38%,rgba(255,240,200,.38) 50%,transparent 62%) 170% 0/260% 100% no-repeat,linear-gradient(180deg,#b77a2a,#7e4a12);animation:cd-vao 1.1s cubic-bezier(.2,.7,.2,1) .5s both,cd-luot-nut 5.5s ease-in-out 2.4s infinite,cd-tho-nut 4s ease-in-out 2s infinite}
.trang-chu .nut-lon::before,.trang-chu .nut-lon::after{animation:cd-kim-cuong 2.6s ease-in-out infinite}
.trang-chu .nut-lon::after{animation-delay:1.3s}
.trang-chu .nut-lon .ic--mui{animation:cd-mui 1.8s ease-in-out infinite}

/* ---------- 2. Bốn ý: biểu tượng sáng lần lượt như sóng ---------- */
@keyframes cd-song-y{0%,70%,100%{translate:0 0;scale:1}35%{translate:0 -5px;scale:1.12}}
.trang-chu .bon-y li .ic{animation:cd-song-y 6s ease-in-out infinite}
.trang-chu .bon-y li:nth-child(2) .ic{animation-delay:.7s}
.trang-chu .bon-y li:nth-child(3) .ic{animation-delay:1.4s}
.trang-chu .bon-y li:nth-child(4) .ic{animation-delay:2.1s}
.trang-chu .bon-y li{animation:cd-vao .9s cubic-bezier(.2,.7,.2,1) .8s both}
.trang-chu .bon-y li:nth-child(2){animation-delay:.92s}
.trang-chu .bon-y li:nth-child(3){animation-delay:1.04s}
.trang-chu .bon-y li:nth-child(4){animation-delay:1.16s}

/* ---------- 3. Tiêu đề khu: hoa văn hai bên lấp lánh ---------- */
@keyframes cd-hoa-van{0%,100%{opacity:.55}50%{opacity:1}}
.trang-chu .tieu-de::before,.trang-chu .tieu-de::after,.trang-chu .hoat-dong-home h2::before,.trang-chu .hoat-dong-home h2::after{animation:cd-hoa-van 3.4s ease-in-out infinite}
.trang-chu .tieu-de::after,.trang-chu .hoat-dong-home h2::after{animation-delay:1.7s}

/* ---------- 4. Hành trình: ảnh "thở", mũi tên dẫn đường ---------- */
@keyframes cd-tho-anh{from{scale:1}to{scale:1.07}}
@keyframes cd-vong{0%{box-shadow:0 0 14px rgba(240,180,80,.35),0 0 0 0 rgba(246,217,143,.6)}80%,100%{box-shadow:0 0 14px rgba(240,180,80,.35),0 0 0 14px rgba(246,217,143,0)}}
.trang-chu .the-canh img{animation:cd-tho-anh 16s ease-in-out infinite alternate}
.trang-chu .hanh-trinh li:nth-child(3) .the-canh img{animation-delay:-6s}
.trang-chu .hanh-trinh li:nth-child(5) .the-canh img{animation-delay:-11s}
.trang-chu .mui-ten{animation:cd-vong 2.4s ease-out infinite}
.trang-chu .hanh-trinh li:nth-child(4).mui-ten{animation-delay:1.2s}
.trang-chu .mui-ten .ic{animation:cd-mui 1.6s ease-in-out infinite}
.trang-chu .hanh-trinh li:nth-child(4).mui-ten .ic{animation-delay:.8s}

/* ---------- 5. Lưới tu tập: biểu tượng bồng bềnh, vệt sáng lướt qua từng ô ---------- */
@keyframes cd-bong{0%,100%{translate:0 0}50%{translate:0 -4px}}
@keyframes cd-luot-o{0%,78%{translate:-130% 0;opacity:0}82%{opacity:1}100%{translate:230% 0;opacity:0}}
.trang-chu .o-luoi a{position:relative;overflow:hidden}
.trang-chu .o-luoi a::after{content:"";position:absolute;top:0;bottom:0;left:0;width:55%;pointer-events:none;background:linear-gradient(105deg,transparent,rgba(255,226,160,.16) 45%,rgba(255,240,205,.26) 50%,rgba(255,226,160,.16) 55%,transparent);translate:-130% 0;animation:cd-luot-o 9s ease-in-out infinite}
.trang-chu .o-luoi .ic{animation:cd-bong 4.5s ease-in-out infinite}
.trang-chu .o-luoi li:nth-child(1) a::after{animation-delay:0s}   .trang-chu .o-luoi li:nth-child(1) .ic{animation-delay:0s}
.trang-chu .o-luoi li:nth-child(2) a::after{animation-delay:.45s} .trang-chu .o-luoi li:nth-child(2) .ic{animation-delay:-.6s}
.trang-chu .o-luoi li:nth-child(3) a::after{animation-delay:.9s}  .trang-chu .o-luoi li:nth-child(3) .ic{animation-delay:-1.2s}
.trang-chu .o-luoi li:nth-child(4) a::after{animation-delay:1.35s}.trang-chu .o-luoi li:nth-child(4) .ic{animation-delay:-1.8s}
.trang-chu .o-luoi li:nth-child(5) a::after{animation-delay:1.8s} .trang-chu .o-luoi li:nth-child(5) .ic{animation-delay:-2.4s}
.trang-chu .o-luoi li:nth-child(6) a::after{animation-delay:2.25s}.trang-chu .o-luoi li:nth-child(6) .ic{animation-delay:-3s}
.trang-chu .o-luoi li:nth-child(7) a::after{animation-delay:2.7s} .trang-chu .o-luoi li:nth-child(7) .ic{animation-delay:-3.6s}
.trang-chu .o-luoi li:nth-child(8) a::after{animation-delay:3.15s}.trang-chu .o-luoi li:nth-child(8) .ic{animation-delay:-4.2s}

/* ---------- 6. Pháp thoại, lịch, sách ---------- */
@keyframes cd-phat{0%{box-shadow:0 0 0 0 rgba(248,223,166,.55)}75%,100%{box-shadow:0 0 0 16px rgba(248,223,166,0)}}
@keyframes cd-cham{0%{box-shadow:0 0 0 3px rgba(233,195,123,.18),0 0 0 0 rgba(240,207,138,.6)}80%,100%{box-shadow:0 0 0 3px rgba(233,195,123,.18),0 0 0 9px rgba(240,207,138,0)}}
@keyframes cd-sach{0%,100%{translate:0 0;rotate:0deg}50%{translate:0 -5px;rotate:-.6deg}}
@keyframes cd-sen-sach{0%,100%{scale:1;opacity:.92}50%{scale:1.07;opacity:1}}
.trang-chu .bai-phap__anh .phat{animation:cd-phat 2.2s ease-out infinite}
.trang-chu .lich li::before{animation:cd-cham 2.8s ease-out infinite}
.trang-chu .lich li:nth-child(2)::before{animation-delay:.9s}
.trang-chu .lich li:nth-child(3)::before{animation-delay:1.8s}
.trang-chu .lich__ngay .ic{animation:cd-bong 5s ease-in-out infinite}
.trang-chu .sach{animation:cd-sach 6s ease-in-out infinite}
.trang-chu .ke-sach li:nth-child(2) .sach{animation-delay:-2s}
.trang-chu .ke-sach li:nth-child(3) .sach{animation-delay:-4s}
.trang-chu .sach::after{animation:cd-sen-sach 4s ease-in-out infinite}
.trang-chu .o__dau h2 .ic{animation:cd-bong 5.5s ease-in-out infinite}

/* ---------- 7. Máy tính: cảnh sống động (cổng, tia nắng, mây, tượng, sen) ---------- */
@media(min-width:981px){
  @keyframes cd-cong{from{scale:1;translate:0 0}to{scale:1.07;translate:0 -1.2%}}
  @keyframes cd-tia{0%,100%{opacity:.28;rotate:-2deg}50%{opacity:.62;rotate:3deg}}
  .trang-chu .cong{overflow:clip}
  .trang-chu .cong__anh{transform-origin:50% 38%;will-change:scale,translate;animation:cd-cong 40s ease-in-out infinite alternate}
  /* tia nắng xiên từ góc trên phải, nơi mặt trời trong ảnh */
  .trang-chu .cong::before{content:"";position:absolute;z-index:0;right:-12%;top:-30%;width:75%;height:120%;pointer-events:none;transform-origin:88% 22%;will-change:opacity,rotate;
    background:conic-gradient(from 196deg at 88% 22%,transparent 0deg,rgba(255,214,140,.2) 5deg,transparent 11deg,rgba(255,224,160,.13) 17deg,transparent 24deg,rgba(255,206,120,.18) 31deg,transparent 39deg,rgba(255,224,160,.1) 46deg,transparent 54deg,transparent 360deg);
    -webkit-mask-image:radial-gradient(70% 70% at 88% 22%,#000 10%,transparent 78%);mask-image:radial-gradient(70% 70% at 88% 22%,#000 10%,transparent 78%);animation:cd-tia 11s ease-in-out infinite}
}
@media(min-width:1180px){
  /* mây chỉ trôi ra phía mép màn hình (phần thò ra bị cắt), không trôi vào trong kẻo hở khe sát mép */
  @keyframes cd-may-trai{0%,100%{translate:0 0}50%{translate:-13px -5px}}
  @keyframes cd-may-phai{0%,100%{translate:0 0}50%{translate:13px 6px}}
  @keyframes cd-tuong{0%,100%{translate:0 0}50%{translate:0 -7px}}
  @keyframes cd-sen{0%,100%{scale:1}50%{scale:1.05}}
  .trang-chu #hanh-trinh::before,.trang-chu .hoat-dong-home::before,.trang-chu .hai-cot::before{animation:cd-may-trai 18s ease-in-out infinite}
  .trang-chu #hanh-trinh::after,.trang-chu .hoat-dong-home::after,.trang-chu .ba-cot::after{animation:cd-may-phai 23s ease-in-out infinite}
  .trang-chu .ba-cot::before{animation:cd-may-phai 27s ease-in-out -9s infinite}
  .trang-chu #tu-tap::before{animation:cd-tuong 9s ease-in-out infinite}
  .trang-chu .hai-cot::after{transform-origin:70% 85%;animation:cd-sen 6.5s ease-in-out infinite}
}
@media(max-width:980px){
  @keyframes cd-sen-nho{0%,100%{scale:1}50%{scale:1.05}}
  .trang-chu .hai-cot::after{transform-origin:70% 85%;animation:cd-sen-nho 6.5s ease-in-out infinite}
}
