/* =====================================================================
   LMGI PREMIUM — HOME "STAGE" (Hero + Institutions)
   Visual-only. Same content, same images, same order.
   Loaded only on the home route, after lmgi-premium.css.
   ===================================================================== */

@property --lx-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
@keyframes lxSpin { to { --lx-angle: 360deg; } }
@keyframes lxBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes lxFloorMove { to { background-position: 0 72px, 0 0; } }
@keyframes lxCube { to { transform: rotateX(-24deg) rotateY(360deg); } }
@keyframes lxRingA { to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes lxRingB { to { transform: rotateY(70deg) rotateZ(-360deg); } }
@keyframes lxRingC { to { transform: rotateX(35deg) rotateY(45deg) rotateZ(360deg); } }
@keyframes lxHover3d { 0%, 100% { translate: 0 0; } 50% { translate: 0 -18px; } }

/* =====================================================================
   1. HERO BANNER — original design kept exactly; bouncy entrance only
   ===================================================================== */
@keyframes lmHeroPop {
    0%   { opacity: 0; transform: scale(0.94) translateY(26px); }
    55%  { opacity: 1; transform: scale(1.012) translateY(-5px); }
    78%  { transform: scale(0.997) translateY(2px); }
    100% { opacity: 1; transform: none; }
}
@keyframes lmPinDrop {
    0%   { opacity: 0; translate: 0 -42px; }
    55%  { opacity: 1; translate: 0 9px; }
    75%  { translate: 0 -4px; }
    90%  { translate: 0 1px; }
    100% { opacity: 1; translate: 0 0; }
}
html body #campus-kml-tour .campus-map-viewport { animation: lmHeroPop 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
html body #campus-kml-tour .campus-hd-badge-anchor { animation: lmPinDrop 0.95s ease-out both; }
html body #campus-kml-tour #hd-badge-0 { animation-delay: 0.75s; }
html body #campus-kml-tour #hd-badge-1 { animation-delay: 0.9s; }
html body #campus-kml-tour #hd-badge-2 { animation-delay: 1.05s; }
html body #campus-kml-tour #hd-badge-3 { animation-delay: 1.2s; }
html body #campus-kml-tour .campus-compass-badge { animation: lmPinDrop 0.95s ease-out 0.6s both; }
/* springy hover on the four institution cards (same look, bouncier motion) */
html body #campus-kml-tour .institution-modern-card { transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.3s ease !important; }
html body #campus-kml-tour .institution-modern-card .inst-square-thumb { transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) !important; }
html body #campus-kml-tour .institution-modern-card:hover .inst-square-thumb { transform: scale(1.06) rotate(-3deg); }

/* =====================================================================
   2. INSTITUTION CARDS — glass, animated gradient rim, 3D logo coin
   ===================================================================== */
html body #institutions-showcase .institution-modern-card:not(#lx) {
    border: 1.5px solid transparent !important;
    border-radius: 26px !important;
    background:
        linear-gradient(180deg, #FFFFFF 0%, #FFFBF6 100%) padding-box,
        conic-gradient(from var(--lx-angle), rgba(242, 106, 27, 0.15), rgba(242, 106, 27, 0.85), rgba(53, 88, 212, 0.75), rgba(255, 181, 71, 0.85), rgba(242, 106, 27, 0.15)) border-box !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 50px -22px rgba(10, 22, 51, 0.40),
        0 8px 18px -10px rgba(10, 22, 51, 0.18) !important;
    animation: lxSpin 7s linear infinite;
    transform-style: preserve-3d;
}
html body #institutions-showcase .institution-modern-card:not(#lx):hover {
    animation-duration: 2.2s;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 40px 70px -26px rgba(242, 106, 27, 0.55),
        0 14px 28px -12px rgba(10, 22, 51, 0.25) !important;
}

html body #institutions-showcase .institution-modern-card .inst-square-thumb {
    animation: lxBob 4.5s ease-in-out infinite;
    border-radius: 22px !important;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.9),
        0 0 0 5px rgba(242, 106, 27, 0.25),
        0 22px 30px -14px rgba(10, 22, 51, 0.55) !important;
    transition: rotate 0.8s var(--lx-spring), transform 0.6s var(--lx-spring-soft) !important;
}
html body #institutions-showcase .row > *:nth-child(3n+2) .inst-square-thumb { animation-delay: -1.5s; }
html body #institutions-showcase .row > *:nth-child(3n) .inst-square-thumb { animation-delay: -3s; }
html body #institutions-showcase .institution-modern-card:hover .inst-square-thumb { rotate: y -16deg; }

/* =====================================================================
   3. ANNOUNCEMENT BOARD — travelling gradient rim
   ===================================================================== */
html body .announcement-board-box:not(#lx) {
    border: 1.5px solid transparent !important;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        conic-gradient(from var(--lx-angle), rgba(242, 106, 27, 0.1), rgba(242, 106, 27, 0.9), rgba(53, 88, 212, 0.6), rgba(242, 106, 27, 0.1)) border-box !important;
    animation: lxSpin 6s linear infinite;
    box-shadow: 0 30px 60px -30px rgba(10, 22, 51, 0.35) !important;
}
html[data-theme="dark"] body .announcement-board-box:not(#lx) {
    background:
        linear-gradient(#0E1530, #0E1530) padding-box,
        conic-gradient(from var(--lx-angle), rgba(242, 106, 27, 0.1), rgba(242, 106, 27, 0.9), rgba(53, 88, 212, 0.6), rgba(242, 106, 27, 0.1)) border-box !important;
}

/* =====================================================================
   4. INSTITUTIONS SHOWCASE — "night stage" with CSS 3D objects
   ===================================================================== */
html body #institutions-showcase .lrn-cate-wrapper:not(#lx) {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    --lx-accent-ink: #FFA25C;
    background:
        radial-gradient(900px 420px at 50% -12%, rgba(242, 106, 27, 0.38), transparent 64%),
        radial-gradient(720px 520px at -6% 100%, rgba(53, 88, 212, 0.50), transparent 60%),
        radial-gradient(620px 420px at 106% 70%, rgba(255, 181, 71, 0.16), transparent 60%),
        linear-gradient(180deg, #0B1838 0%, #070D24 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 48px !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 70px 130px -50px rgba(10, 22, 51, 0.75) !important;
}
html body #institutions-showcase .lrn-cate-wrapper .left-dot,
html body #institutions-showcase .lrn-cate-wrapper .right-dot { opacity: 0.25 !important; }
html body #institutions-showcase .lrn-cate-wrapper .container { position: relative; z-index: 2; }

html body .lx-floor {
    position: absolute;
    left: -30%;
    right: -30%;
    bottom: -6%;
    pointer-events: none;
    background-size: 72px 72px;
    transform: perspective(620px) rotateX(66deg);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.6) 40%, transparent 90%);
    mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.6) 40%, transparent 90%);
    animation: lxFloorMove 5s linear infinite;
}
html body #institutions-showcase .lx-floor {
    height: 45%;
    background-image:
        linear-gradient(rgba(255, 154, 60, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 150, 255, 0.18) 1px, transparent 1px);
    z-index: 0;
}

html body #institutions-showcase .title:not(#lx),
html body #institutions-showcase .title:not(#lx) *:not(.lrn-gradient-splite):not(.lrn-gradient-splite *) {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}
html body #institutions-showcase .lrn-badge-gradient-1:not(#lx) {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 162, 92, 0.45) !important;
    box-shadow: 0 0 24px -6px rgba(242, 106, 27, 0.6) !important;
}
html body #institutions-showcase .lrn-badge-gradient-1:not(#lx) .lrn-badge-gradient-text {
    background: none !important;
    -webkit-text-fill-color: #FFC48E !important;
    color: #FFC48E !important;
}

html body #institutions-showcase .institution-modern-card:not(#lx) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)) padding-box,
        linear-gradient(#0C1634, #0C1634) padding-box,
        conic-gradient(from var(--lx-angle), rgba(255, 255, 255, 0.06), rgba(242, 106, 27, 0.9), rgba(120, 150, 255, 0.7), rgba(255, 181, 71, 0.9), rgba(255, 255, 255, 0.06)) border-box !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 30px 60px -28px rgba(0, 0, 0, 0.7) !important;
}
html body #institutions-showcase .institution-modern-card:not(#lx):hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 40px 80px -26px rgba(242, 106, 27, 0.55) !important;
}
html body #institutions-showcase .inst-card-title:not(#lx),
html body #institutions-showcase .inst-card-title:not(#lx) *:not([class]) { color: #FFFFFF !important; -webkit-text-fill-color: #FFFFFF !important; }
html body #institutions-showcase .inst-card-title:not(#lx) [class]:not(.lmgi-shortname) { color: #FFA25C !important; -webkit-text-fill-color: #FFA25C !important; background: none !important; }
html body #institutions-showcase .inst-card-title:not(#lx) .lmgi-shortname { -webkit-text-fill-color: #FFA25C !important; color: #FFA25C !important; background: none !important; }
html body #institutions-showcase .inst-card-tagline:not(#lx),
html body #institutions-showcase .inst-card-tagline:not(#lx) * { color: rgba(220, 226, 245, 0.74) !important; -webkit-text-fill-color: rgba(220, 226, 245, 0.74) !important; }
html body #institutions-showcase .inst-view-details-btn:not(#lx) {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 162, 92, 0.4) !important;
    color: #FFC48E !important;
    box-shadow: none !important;
}
html body #institutions-showcase .inst-view-details-btn:not(#lx) * { color: inherit !important; }
html body #institutions-showcase .inst-view-details-btn:not(#lx):hover {
    background: var(--lx-grad-brand) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: var(--lx-shadow-brand) !important;
}
html body #institutions-showcase .institution-modern-card .inst-square-thumb {
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.14),
        0 0 30px -4px rgba(242, 106, 27, 0.55),
        0 22px 30px -14px rgba(0, 0, 0, 0.8) !important;
}

/* ---- CSS 3D objects (decorative, injected) ---- */
html body .lx-3d {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    transform-style: preserve-3d;
    perspective: 900px;
    animation: lxHover3d 7s ease-in-out infinite;
}
html body .lx-3d * { transform-style: preserve-3d; }

html body .lx-cube { width: 96px; height: 96px; left: 7%; top: 70px; }
html body .lx-cube .lx-cube-in {
    position: absolute;
    inset: 0;
    animation: lxCube 16s linear infinite;
    transform: rotateX(-24deg) rotateY(0deg);
}
html body .lx-cube .lx-face {
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(255, 181, 71, 0.75);
    background: linear-gradient(135deg, rgba(255, 154, 60, 0.16), rgba(53, 88, 212, 0.10));
    box-shadow: 0 0 22px rgba(242, 106, 27, 0.35) inset;
    border-radius: 6px;
}
html body .lx-cube .lx-face:nth-child(1) { transform: translateZ(48px); }
html body .lx-cube .lx-face:nth-child(2) { transform: rotateY(180deg) translateZ(48px); }
html body .lx-cube .lx-face:nth-child(3) { transform: rotateY(90deg) translateZ(48px); }
html body .lx-cube .lx-face:nth-child(4) { transform: rotateY(-90deg) translateZ(48px); }
html body .lx-cube .lx-face:nth-child(5) { transform: rotateX(90deg) translateZ(48px); }
html body .lx-cube .lx-face:nth-child(6) { transform: rotateX(-90deg) translateZ(48px); }

html body .lx-gyro { width: 150px; height: 150px; right: 7%; top: 40px; animation-delay: -2s; }
html body .lx-gyro .lx-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(120, 150, 255, 0.7);
    box-shadow: 0 0 18px rgba(120, 150, 255, 0.45), 0 0 18px rgba(120, 150, 255, 0.25) inset;
}
html body .lx-gyro .lx-ring:nth-child(1) { animation: lxRingA 9s linear infinite; }
html body .lx-gyro .lx-ring:nth-child(2) { inset: 14px; border-color: rgba(255, 162, 92, 0.8); box-shadow: 0 0 18px rgba(242, 106, 27, 0.5); animation: lxRingB 7s linear infinite; }
html body .lx-gyro .lx-ring:nth-child(3) { inset: 30px; border-color: rgba(255, 255, 255, 0.55); animation: lxRingC 11s linear infinite; }
html body .lx-gyro .lx-core {
    position: absolute;
    inset: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFE0B8, #FF8A2A 45%, #A63C06 100%);
    box-shadow: 0 0 30px rgba(242, 106, 27, 0.8);
}

html body .lx-orb3d {
    width: 120px;
    height: 120px;
    left: -38px;
    bottom: -38px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #B9C8FF 14%, #3558D4 48%, #0A1633 100%);
    box-shadow: 0 30px 60px -10px rgba(53, 88, 212, 0.6), inset -10px -14px 30px rgba(0, 0, 0, 0.45);
    animation-delay: -4s;
    opacity: 0.9;
}
html body .lx-orb3d--sm {
    width: 54px;
    height: 54px;
    left: auto;
    right: 3%;
    bottom: auto;
    top: 230px;
    background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #FFD7A8 16%, #F26A1B 52%, #6E2504 100%);
    box-shadow: 0 20px 40px -8px rgba(242, 106, 27, 0.6), inset -6px -8px 16px rgba(0, 0, 0, 0.4);
    animation-delay: -1s;
}

html body .lx-anim,
html body .lx-tilt.lx-anim { transition: none !important; }

/* =====================================================================
   5. RESPONSIVE
   ===================================================================== */
@media (max-width: 991px) {
    html body .lx-cube { left: 4%; top: 30px; scale: 0.7; }
    html body .lx-gyro { right: 2%; top: 20px; scale: 0.65; }
    html body .lx-orb3d { scale: 0.6; }
}
@media (max-width: 767px) {
    html body #institutions-showcase .lrn-cate-wrapper:not(#lx) { border-radius: 30px !important; }
    html body .lx-cube { opacity: 0.5; }
    html body .lx-orb3d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html body #campus-kml-tour .campus-map-viewport,
    html body #campus-kml-tour .campus-hd-badge-anchor,
    html body #campus-kml-tour .campus-compass-badge,
    html body .lx-floor,
    html body .lx-3d,
    html body .lx-3d *,
    html body .institution-modern-card,
    html body .inst-square-thumb,
    html body .announcement-board-box { animation: none !important; }
}
