/* Custom styles for JEMBARA RISET DAN MEDIA website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Advanced Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 8s ease-in-out infinite 2s;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideInUp 0.8s ease-out forwards;
}

.animate-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #eff6ff 4%, #dbeafe 25%, #eff6ff 36%);
    background-size: 1000px 100%;
}

.animate-gradient {
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

/* Animation Delays */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-800 { animation-delay: 0.8s; }

/* Enhanced Hover Effects */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Interactive Button Effects */
.btn-interactive {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-interactive:hover::before {
    left: 100%;
}

.btn-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Enhanced Cards */
.card-enhanced {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-enhanced:hover::before {
    transform: scaleX(1);
}

.card-enhanced:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Text Animations */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* Enhanced Navigation */
.nav-enhanced {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.nav-item {
    position: relative;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: all 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
    left: 0;
}

/* Form Enhancements */
.form-enhanced input,
.form-enhanced textarea,
.form-enhanced select {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-enhanced input:focus,
.form-enhanced textarea:focus,
.form-enhanced select:focus {
    border-color: #3B82F6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation-duration: 0.6s;
    }

    .card-enhanced:hover {
        transform: translateY(-8px) scale(1.01);
    }

    .btn-interactive:hover {
        transform: translateY(-1px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Advanced 3D Effects */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s ease;
}

.magnetic:hover {
    transform: translate(0, -2px);
}

/* Morphing Buttons */
.btn-morph {
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-morph::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: width 0.6s;
}

.btn-morph:hover::before {
    width: 100%;
}

.btn-morph:hover {
    border-radius: 15px;
    transform: scale(1.05);
}

/* Liquid Loading */
.liquid-loader {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3B82F6, #8B5CF6);
    position: relative;
    overflow: hidden;
}

.liquid-loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255,255,255,0.3);
    border-radius: 40%;
    transform: translate(-50%, -50%);
    animation: liquidWave 2s infinite ease-in-out;
}

@keyframes liquidWave {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
    font-size: 4em;
    letter-spacing: 0.5em;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
        transform: skew(0.85deg);
    }
    5% {
        clip: rect(70px, 9999px, 43px, 0);
        transform: skew(0.4deg);
    }
    10% {
        clip: rect(69px, 9999px, 59px, 0);
        transform: skew(0.7deg);
    }
    15% {
        clip: rect(25px, 9999px, 99px, 0);
        transform: skew(0.1deg);
    }
    20% {
        clip: rect(90px, 9999px, 78px, 0);
        transform: skew(0.2deg);
    }
    25% {
        clip: rect(65px, 9999px, 50px, 0);
        transform: skew(0.4deg);
    }
    30% {
        clip: rect(26px, 9999px, 42px, 0);
        transform: skew(0.7deg);
    }
    35% {
        clip: rect(58px, 9999px, 84px, 0);
        transform: skew(0.1deg);
    }
    40% {
        clip: rect(95px, 9999px, 66px, 0);
        transform: skew(0.3deg);
    }
    45% {
        clip: rect(71px, 9999px, 17px, 0);
        transform: skew(0.8deg);
    }
    50% {
        clip: rect(2px, 9999px, 61px, 0);
        transform: skew(0.5deg);
    }
    55% {
        clip: rect(39px, 9999px, 6px, 0);
        transform: skew(0.2deg);
    }
    60% {
        clip: rect(37px, 9999px, 99px, 0);
        transform: skew(0.4deg);
    }
    65% {
        clip: rect(91px, 9999px, 74px, 0);
        transform: skew(0.9deg);
    }
    70% {
        clip: rect(40px, 9999px, 92px, 0);
        transform: skew(0.6deg);
    }
    75% {
        clip: rect(58px, 9999px, 88px, 0);
        transform: skew(0.3deg);
    }
    80% {
        clip: rect(91px, 9999px, 81px, 0);
        transform: skew(0.7deg);
    }
    85% {
        clip: rect(33px, 9999px, 47px, 0);
        transform: skew(0.1deg);
    }
    90% {
        clip: rect(50px, 9999px, 40px, 0);
        transform: skew(0.5deg);
    }
    95% {
        clip: rect(68px, 9999px, 14px, 0);
        transform: skew(0.8deg);
    }
    100% {
        clip: rect(46px, 9999px, 23px, 0);
        transform: skew(0.2deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
        transform: skew(0.15deg);
    }
    5% {
        clip: rect(52px, 9999px, 74px, 0);
        transform: skew(0.05deg);
    }
    10% {
        clip: rect(79px, 9999px, 85px, 0);
        transform: skew(0.35deg);
    }
    15% {
        clip: rect(17px, 9999px, 93px, 0);
        transform: skew(0.25deg);
    }
    20% {
        clip: rect(63px, 9999px, 59px, 0);
        transform: skew(0.45deg);
    }
    25% {
        clip: rect(12px, 9999px, 86px, 0);
        transform: skew(0.35deg);
    }
    30% {
        clip: rect(98px, 9999px, 23px, 0);
        transform: skew(0.15deg);
    }
    35% {
        clip: rect(44px, 9999px, 56px, 0);
        transform: skew(0.25deg);
    }
    40% {
        clip: rect(34px, 9999px, 71px, 0);
        transform: skew(0.05deg);
    }
    45% {
        clip: rect(88px, 9999px, 19px, 0);
        transform: skew(0.45deg);
    }
    50% {
        clip: rect(53px, 9999px, 82px, 0);
        transform: skew(0.35deg);
    }
    55% {
        clip: rect(25px, 9999px, 67px, 0);
        transform: skew(0.15deg);
    }
    60% {
        clip: rect(76px, 9999px, 38px, 0);
        transform: skew(0.25deg);
    }
    65% {
        clip: rect(89px, 9999px, 14px, 0);
        transform: skew(0.05deg);
    }
    70% {
        clip: rect(41px, 9999px, 95px, 0);
        transform: skew(0.45deg);
    }
    75% {
        clip: rect(18px, 9999px, 72px, 0);
        transform: skew(0.35deg);
    }
    80% {
        clip: rect(56px, 9999px, 29px, 0);
        transform: skew(0.15deg);
    }
    85% {
        clip: rect(83px, 9999px, 64px, 0);
        transform: skew(0.25deg);
    }
    90% {
        clip: rect(47px, 9999px, 91px, 0);
        transform: skew(0.05deg);
    }
    95% {
        clip: rect(72px, 9999px, 35px, 0);
        transform: skew(0.45deg);
    }
    100% {
        clip: rect(28px, 9999px, 87px, 0);
        transform: skew(0.35deg);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }
    10% {
        transform: skew(2deg);
    }
    20% {
        transform: skew(-2deg);
    }
    30% {
        transform: skew(1deg);
    }
    40% {
        transform: skew(-1deg);
    }
    50% {
        transform: skew(0deg);
    }
    60% {
        transform: skew(2deg);
    }
    70% {
        transform: skew(-2deg);
    }
    80% {
        transform: skew(1deg);
    }
    90% {
        transform: skew(-1deg);
    }
    100% {
        transform: skew(0deg);
    }
}

/* Neon Glow Effect */
.neon-text {
    color: #fff;
    text-shadow:
        0 0 5px #00fff9,
        0 0 10px #00fff9,
        0 0 15px #00fff9,
        0 0 20px #00fff9,
        0 0 35px #00fff9,
        0 0 40px #00fff9;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 5px #00fff9,
            0 0 10px #00fff9,
            0 0 15px #00fff9,
            0 0 20px #00fff9,
            0 0 35px #00fff9,
            0 0 40px #00fff9;
    }
    20%, 24%, 55% {        
        text-shadow: none;
    }
}

/* Particle System Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 6s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid orange;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange; }
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Neumorphism Effect */
.neomorphism {
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: 
        9px 9px 16px #a3b1c6,
        -9px -9px 16px #ffffff;
    transition: all 0.3s ease;
}

.neomorphism:hover {
    box-shadow: 
        inset 9px 9px 16px #a3b1c6,
        inset -9px -9px 16px #ffffff;
}

/* Text Reveal Animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: text-reveal-animation 2s ease-in-out;
}

@keyframes text-reveal-animation {
    0% {
        width: 0;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0;
        left: 100%;
    }
}

/* Staggered Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: stagger-item 0.8s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes stagger-item {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial Carousel Styles */
.testimonial-carousel-container {
    overflow: hidden;
}

.testimonial-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .testimonial-slide {
        width: 50%;
    }
}

@media (min-width: 1024px) {
    .testimonial-slide {
        width: 33.333333%;
    }
}

.testimonial-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot:hover {
    transform: scale(1.2);
}

/* Chat Widget Positioning */
.chat-widget {
    z-index: 9999;
}

/* Print Styles */
@media print {
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-float,
    .animate-float-delayed,
    .neon-text,
    .glitch,
    .typewriter {
        animation: none !important;
    }
}