/*
 * user.css — Template Anak Cassiopeia (ADTEC Miri)
 * Semua gaya tersuai yang berasal dari reka bentuk asal.
 * Lokasi: media/templates/site/<nama_template_anak>/css/user.css
 */

        /* Diperkemas: Tambahan Font Tulisan Tangan 'Kalam' untuk gaya Memori */
        @import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');
        
        body { background-color: #F8FAFC; overflow-x: hidden; }
        
        /* Kelas utiliti untuk fon tulisan tangan */
        .font-handwriting { font-family: 'Kalam', cursive; }
        
        /* Hilangkan scrollbar untuk marquee dan tabs scrollable */
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* WIDGET 1: Expandable FAB (Speed Dial) */
        .fab-wrapper {
            position: fixed;
            right: 16px;
            bottom: 24px;
            z-index: 90;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 12px;
        }
        @media (min-width: 768px) {
            .fab-wrapper { right: 24px; bottom: 32px; }
        }
        
        .fab-items {
            display: flex;
            flex-direction: column;
            gap: 12px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px) scale(0.9);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
            transform-origin: bottom right;
        }
        
        .fab-wrapper.active .fab-items {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }
        @media (hover: hover) and (pointer: fine) {
            .fab-wrapper:hover .fab-items {
                opacity: 1;
                visibility: visible;
                transform: translateY(0) scale(1);
                pointer-events: auto;
            }
            .fab-wrapper:hover .fab-main {
                transform: rotate(135deg);
                background: #1D478E;
            }
        }

        .fab-btn {
            width: 48px;
            height: 48px;
            border-radius: 24px;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1D478E;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
            position: relative;
            cursor: pointer;
        }
        .fab-btn:hover { transform: scale(1.1); }
        .fab-whatsapp:hover { background: #25D366; color: white; }
        .fab-apply:hover { background: #F9B116; color: white; }
        
        .fab-text {
            position: absolute;
            right: 60px;
            background: white;
            color: #1D478E;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            opacity: 0;
            visibility: hidden;
            transform: translateX(10px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
        }
        .fab-btn:hover .fab-text {
            opacity: 1;
            visibility: visible;
            transform: translateX(0);
        }

        .fab-main {
            width: 56px;
            height: 56px;
            border-radius: 28px;
            background: #F9B116;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            box-shadow: 0 10px 25px rgba(249, 177, 22, 0.5);
            cursor: pointer;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
        }
        .fab-wrapper.active .fab-main {
            transform: rotate(135deg); 
            background: #1D478E;
        }

        /* Glassmorphism utilities */
        .glass {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        }

        /* Modern Tabs */
        .tab-content { display: none; }
        .tab-content.active { 
            display: block; 
            animation: tabEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
        }
        
        @keyframes tabEnter {
            0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(8px); }
            100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
        }
        
        /* Image hover zoom - Ditambah fallback bg-color dan text-transparent jika gambar gagal diload */
        .img-hover-zoom { overflow: hidden; border-radius: 1.5rem; background-color: #f1f5f9; }
        .img-hover-zoom img { transition: transform 0.7s ease; color: transparent; }
        .img-hover-zoom:hover img { transform: scale(1.05); }

        /* MESH TRIANGLE ANIMATION */
        #particles-js {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 10;
        }

        /* Logo Slider Animasi */
        @keyframes scroll-logos {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        .logo-slider-track {
            display: flex;
            width: max-content;
            animation: scroll-logos 30s linear infinite;
        }
        .logo-slider-track:hover {
            animation-play-state: paused;
        }
        
        /* Swiper Custom Styles */
        .swiper-button-next::after, .swiper-button-prev::after {
            font-size: 1.2rem !important;
            font-weight: bold;
        }
        
        .swiper-pagination-bullet {
            width: 8px !important;
            height: 8px !important;
            background: #94a3b8 !important;
            opacity: 0.5 !important;
            transition: all 0.3s ease;
            margin: 0 4px !important;
        }
        @media (min-width: 768px) {
            .swiper-pagination-bullet { width: 10px !important; height: 10px !important; margin: 0 6px !important; }
        }
        .swiper-pagination-bullet-active {
            background-color: #F9B116 !important;
            opacity: 1 !important;
            transform: scale(1.3);
        }
        
        .courseSwiper .swiper-pagination-bullet,
        .dlkmSwiper .swiper-pagination-bullet {
            width: 24px !important;
            height: 24px !important;
            text-align: center;
            line-height: 24px;
            font-size: 11px;
            font-weight: bold;
            color: #1D478E;
            opacity: 1 !important;
            background: #E2E8F0 !important;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0 5px !important;
        }
        @media (min-width: 768px) {
            .courseSwiper .swiper-pagination-bullet,
            .dlkmSwiper .swiper-pagination-bullet { width: 28px !important; height: 28px !important; line-height: 28px; font-size: 12px; }
        }
        .courseSwiper .swiper-pagination-bullet-active,
        .dlkmSwiper .swiper-pagination-bullet-active {
            color: #fff !important;
            background-color: #F9B116 !important;
            transform: none !important;
            box-shadow: 0 4px 8px rgba(249, 177, 22, 0.4);
        }

        /* 🍎 APPLE-STYLE SMOOTH REVEAL ANIMATIONS 🍎 */
        .reveal-up {
            opacity: 0;
            transform: translateY(40px);
            transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); 
            will-change: opacity, transform;
        }
        .reveal-up.reveal-visible {
            opacity: 1;
            transform: translateY(0);
        }
        .delay-100 { transition-delay: 100ms; }
        .delay-200 { transition-delay: 200ms; }
        .delay-300 { transition-delay: 300ms; }
        .delay-400 { transition-delay: 400ms; }
        .delay-500 { transition-delay: 500ms; }

        /* 🎬 CINEMATIC HERO CROSSFADE ANIMATION 🎬 */
        .cinematic-slide {
            position: absolute;
            inset: 0;
            opacity: 0;
            visibility: hidden;
            transition: opacity 1.2s ease-in-out, visibility 1.2s;
        }
        .cinematic-slide.cinematic-active {
            opacity: 1;
            visibility: visible;
        }
        .cinematic-slide.cinematic-exit {
            opacity: 0;
            visibility: hidden;
        }

        /* 🌟 KINETIC TYPOGRAPHY ANIMATION 🌟 */
        .kinetic-text {
            display: inline-block;
            opacity: 0;
            transition: all 1s cubic-bezier(0.25, 1, 0.2, 1);
            will-change: transform, opacity;
        }
        
        .k-from-left { transform: translateX(-150px) rotate(-8deg); }
        .k-from-right { transform: translateX(150px) rotate(8deg); }
        .k-from-top { transform: translateY(-100px) scale(1.1); }
        .k-from-bottom { transform: translateY(100px) scale(0.9); }
        .k-pop { transform: scale(0) translateY(50px) rotate(-5deg); }

        .cinematic-active .kinetic-text {
            opacity: 1;
            transform: translate(0) scale(1) rotate(0deg);
        }

        .cinematic-exit .kinetic-text {
            opacity: 0;
            transform: scale(1.2) translateY(-40px) rotate(3deg);
            transition: all 0.6s ease-in;
        }

        .k-d1 { transition-delay: 0.1s; }
        .k-d2 { transition-delay: 0.3s; }
        .k-d3 { transition-delay: 0.5s; }

        .cinematic-desc {
            opacity: 0;
            transform: translateY(20px);
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .cinematic-active .cinematic-desc {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0.7s; 
        }
        .cinematic-exit .cinematic-desc {
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.8s ease-in;
        }

        /* Imej Sisi Lebar Skrin */
        .cinematic-image-wrapper {
            opacity: 0;
            transform: scale(0.95) translateX(20px);
            transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s ease-in-out;
            will-change: transform, opacity;
        }
        .cinematic-active .cinematic-image-wrapper {
            opacity: 1;
            transform: scale(1) translateX(0);
            transition-delay: 0.2s;
        }
        .cinematic-exit .cinematic-image-wrapper {
            opacity: 0;
            transform: scale(1.05) translateX(20px);
            transition: transform 1.2s ease-in-out, opacity 1s ease-in-out;
        }
        
        @keyframes ken-burns {
            0% { transform: scale(1); }
            100% { transform: scale(1.1); }
        }
        .cinematic-active .ken-burns-img {
            animation: ken-burns 8s ease-out forwards;
            will-change: transform;
        }

        .hero-image-mask {
            -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
            mask-image: linear-gradient(to right, transparent 0%, black 30%);
        }

        .animate-text-shine {
            transform: scale(1.08);
        }
        
        .logo-glow-effect {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
            cursor: pointer;
        }
        .logo-glow-effect:hover {
            filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
            transform: scale(1.08);
        }

        /* ANIMASI MEGA MENU */
        .dropdown-animate {
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .group:hover .dropdown-animate {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        /* =========================================
           ANIMASI GALERI GAMBAR INFINITE SCROLL
           ========================================= */
        @keyframes scroll-left {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        @keyframes scroll-right {
            0% { transform: translateX(-50%); }
            100% { transform: translateX(0); }
        }
        /* Layout asal: width max-content, scroll animation digate oleh class .scrolling */
        .gallery-track-left,
        .gallery-track-right {
            display: flex;
            width: max-content;
            padding: 20px 0;
        }
        .gallery-track-left.scrolling {
            animation: scroll-left 40s linear infinite;
        }
        .gallery-track-right.scrolling {
            animation: scroll-right 40s linear infinite;
        }
        /* Kabus tepi putih lembut dengan animasi nafas */
        .fog-edge {
            animation: fog-breathe 6s ease-in-out infinite;
            will-change: opacity;
        }
        .fog-edge-right {
            animation-delay: 3s;
        }
        @keyframes fog-breathe {
            0%, 100% { opacity: 0.65; }
            50%      { opacity: 1; }
        }

        /* =========================================
           STAT CELLS - dalam satu glass container
           Separator: gradient halus di hujung, tebal di tengah
           ========================================= */
        .stat-cell {
            position: relative;
            padding: 1.25rem 0.75rem;
            text-align: center;
            cursor: default;
        }
        /* Desktop: separator vertikal antara lajur */
        @media (min-width: 768px) {
            .stat-cell:not(:first-child)::before {
                content: '';
                position: absolute;
                left: 0;
                top: 18%;
                bottom: 18%;
                width: 1px;
                background: linear-gradient(to bottom,
                    transparent 0%,
                    rgba(255,255,255,0.08) 20%,
                    rgba(255,255,255,0.22) 50%,
                    rgba(255,255,255,0.08) 80%,
                    transparent 100%);
            }
        }
        /* Mobile: separator horizontal antara baris (cell 3 & 4 = row 2) */
        @media (max-width: 767px) {
            .stat-cell:nth-child(3)::before,
            .stat-cell:nth-child(4)::before {
                content: '';
                position: absolute;
                top: 0;
                left: 18%;
                right: 18%;
                height: 1px;
                background: linear-gradient(to right,
                    transparent 0%,
                    rgba(255,255,255,0.08) 20%,
                    rgba(255,255,255,0.22) 50%,
                    rgba(255,255,255,0.08) 80%,
                    transparent 100%);
            }
        }
        .stat-icon-bg {
            width: 44px;
            height: 44px;
            border-radius: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 0.625rem;
            color: white;
            font-size: 1.1rem;
            box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.3);
            transition: box-shadow 0.4s ease;
            animation: none;
            cursor: pointer;
        }
        /* Dock breathing effect - sync dengan counter */
        .stat-cell:hover .stat-icon-bg {
            animation: icon-breathe 1.6s ease-in-out infinite;
            box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.45);
        }
        @keyframes icon-breathe {
            0%, 100% { transform: translateY(-4px) scale(1.25); }
            50%      { transform: translateY(-8px) scale(1.4);  }
        }
        .stat-number {
            font-size: 1.6rem;
            font-weight: 900;
            line-height: 1;
            margin-bottom: 0.375rem;
            font-variant-numeric: tabular-nums;
            transition: transform 0.4s ease;
            animation: none;
        }
        @media (min-width: 768px) {
            .stat-number { font-size: 2.2rem; }
        }
        /* Breathing effect bila hover cell */
        .stat-cell:hover .stat-number {
            animation: number-breathe 1.6s ease-in-out infinite;
        }
        @keyframes number-breathe {
            0%, 100% { transform: scale(1);    filter: brightness(1); }
            50%      { transform: scale(1.08); filter: brightness(1.25); }
        }
        @media (min-width: 768px) {
            .stat-cell { padding: 1.75rem 1rem; }
            .stat-icon-bg { width: 52px; height: 52px; font-size: 1.35rem; }
            .stat-number { font-size: 2.2rem; }
        }
        .stat-label {
            color: rgba(255, 255, 255, 0.65);
            font-size: 0.62rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }
        @media (min-width: 768px) {
            .stat-label { font-size: 0.72rem; }
        }

        .stat-glow-wrap {
            position: relative;
        }
        .stat-glow-wrap::before {
            content: '';
            position: absolute;
            inset: -18px;
            border-radius: 2.5rem;
            background:
                radial-gradient(circle at 12% 12%, rgba(249, 177, 22, 0.26), transparent 34%),
                radial-gradient(circle at 88% 88%, rgba(59, 130, 246, 0.22), transparent 36%);
            filter: blur(18px);
            opacity: 0.78;
            animation: stat-ambient-glow 5.8s ease-in-out infinite;
            pointer-events: none;
        }
        .stat-shine-card {
            position: relative;
            isolation: isolate;
        }
        .stat-shine-card > * {
            position: relative;
            z-index: 2;
        }
        .stat-shine-card::after {
            content: '';
            position: absolute;
            pointer-events: none;
        }
        /* Cincin berkilau (ring shine) — teknik lapisan berputar fizikal.
           SESENDAangkan TIDAK bergantung pada @property, jadi kekal berfungsi
           walaupun CSS dimampat/digabung oleh Joomla atau plugin pengoptimum. */
        .stat-ring {
            position: absolute;
            inset: 0;
            z-index: 3;
            border-radius: inherit;
            padding: 2px;
            overflow: hidden;
            pointer-events: none;
            opacity: 0.88;
            -webkit-mask:
                linear-gradient(#000 0 0) content-box,
                linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
            mask:
                linear-gradient(#000 0 0) content-box,
                linear-gradient(#000 0 0);
            mask-composite: exclude;
        }
        .stat-ring::before {
            content: '';
            position: absolute;
            inset: -75%;
            background: conic-gradient(
                from 0deg,
                transparent 0deg,
                transparent 42deg,
                rgba(255,255,255,0.92) 54deg,
                rgba(249,177,22,0.85) 62deg,
                transparent 78deg,
                transparent 180deg,
                rgba(125,211,252,0.72) 218deg,
                rgba(255,255,255,0.86) 230deg,
                transparent 248deg,
                transparent 360deg
            );
            animation: stat-ring-rotate 4.8s linear infinite;
            will-change: transform;
        }
        .stat-shine-card::after {
            top: -35%;
            bottom: -35%;
            left: -45%;
            z-index: 1;
            width: 34%;
            border-radius: 999px;
            background: linear-gradient(105deg,
                transparent 0%,
                rgba(255,255,255,0.035) 24%,
                rgba(255,255,255,0.16) 50%,
                rgba(249,177,22,0.07) 62%,
                transparent 100%);
            filter: blur(12px);
            transform: translateX(-20%) rotate(12deg);
            animation: stat-sheen-sweep 4.8s ease-in-out infinite;
        }
        @keyframes stat-ring-rotate {
            to { transform: rotate(1turn); }
        }
        @keyframes stat-sheen-sweep {
            0%   { transform: translateX(-20%) rotate(12deg); opacity: 0; }
            18%  { opacity: 0.42; }
            48%  { opacity: 0.2; }
            68%  { transform: translateX(430%) rotate(12deg); opacity: 0; }
            100% { transform: translateX(430%) rotate(12deg); opacity: 0; }
        }
        @keyframes stat-ambient-glow {
            0%, 100% { opacity: 0.58; transform: scale(0.985); }
            50%      { opacity: 0.92; transform: scale(1.015); }
        }
        @media (prefers-reduced-motion: reduce) {
            .stat-glow-wrap::before,
            .stat-shine-card::after,
            .stat-ring::before {
                animation: none;
            }
        }

        .gallery-track-left.scrolling:hover,
        .gallery-track-right.scrolling:hover {
            animation-play-state: paused;
        }
        /* Wave lembut semasa scrolling - supaya gambar nampak "live" */
        .gallery-track-left.scrolling .gallery-item,
        .gallery-track-right.scrolling .gallery-item {
            animation: card-wave 3.2s ease-in-out infinite;
            animation-delay: var(--wave-delay, 0s);
        }
        .gallery-track-left.scrolling .gallery-item:hover,
        .gallery-track-right.scrolling .gallery-item:hover {
            animation-play-state: paused;
        }
        /* Gunakan property 'translate' (terpisah dari transform) supaya
           tidak ganggu rotation Polaroid sedia ada */
        @keyframes card-wave {
            0%, 100% { translate: 0 0; }
            50%      { translate: 0 -7px; }
        }

        /* =========================================
           STAGGER ENTRANCE - row atas dari kanan, row bawah dari kiri
           ========================================= */
        .gallery-item {
            opacity: 0;
            transition:
                opacity 0.5s ease-in,
                transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        /* Row atas (Track 1) — masuk dari KANAN */
        .gallery-track-left .gallery-item {
            transform: translateX(220px) rotate(15deg) scale(0.85);
        }
        /* Row bawah (Track 2) — masuk dari KIRI */
        .gallery-track-right .gallery-item {
            transform: translateX(-220px) rotate(-15deg) scale(0.85);
        }
        .gallery-item.g-in {
            opacity: 1;
        }
        .gallery-item.g-in[data-rot="-2"] { transform: translate(0) scale(1) rotate(-2deg); }
        .gallery-item.g-in[data-rot="-3"] { transform: translate(0) scale(1) rotate(-3deg); }
        .gallery-item.g-in[data-rot="-1"] { transform: translate(0) scale(1) rotate(-1deg); }
        .gallery-item.g-in[data-rot="1"]  { transform: translate(0) scale(1) rotate(1deg); }
        .gallery-item.g-in[data-rot="2"]  { transform: translate(0) scale(1) rotate(2deg); }
        .gallery-item.g-in[data-rot="3"]  { transform: translate(0) scale(1) rotate(3deg); }

        /* =========================================
           HERO CTA - OPTION 1 MODERN PILL (MOBILE SAHAJA)
           ========================================= */
        @media (max-width: 767px) {
            .hero-cta {
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                width: auto !important;
                max-width: none !important;
                padding: 10px 20px !important;
                border-radius: 50px !important;
                background: linear-gradient(135deg, #f6b338, #f59e0b) !important;
                color: #ffffff !important;
                box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3) !important;
                text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
                border: none !important;
                overflow: visible !important;
                position: relative !important;
                z-index: 30 !important;
                pointer-events: auto !important;
                -webkit-tap-highlight-color: transparent;
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
                font-size: 0.8rem !important;
                font-weight: 600 !important;
                letter-spacing: 0.5px !important;
                text-decoration: none !important;
                cursor: pointer !important;
            }
            /* Buang pseudo-elements */
            .hero-cta::before { display: none !important; }
            .hero-cta::after  { display: none !important; }
            /* Sembunyikan div overlay hover Tailwind */
            .hero-cta > div { display: none !important; }
            /* pointer-events:none pada children — semua tap pass ke <a> parent */
            .hero-cta > span {
                padding: 0 !important;
                margin: 0 !important;
                font-size: 0.8rem !important;
                font-weight: 600 !important;
                letter-spacing: 0.5px !important;
                gap: 6px !important;
                color: #ffffff !important;
                pointer-events: none !important;
            }
            .hero-cta i {
                font-size: 0.8rem !important;
                color: #ffffff !important;
                transition: transform 0.3s ease !important;
                margin-left: 6px !important;
                pointer-events: none !important;
            }
            .hero-cta:active {
                transform: scale(0.98) !important;
                box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3) !important;
            }
            .hero-cta:hover {
                box-shadow: 0 12px 24px rgba(245, 158, 11, 0.45) !important;
            }
            .hero-cta:active i,
            .hero-cta:hover i {
                transform: translateX(4px) !important;
            }
        }
