/* Hero Section Animations */

/* Animasi untuk peta - posisi sesuai gambar 2 */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30%) translateX(0%) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(40%) translateX(0%) rotate(-5deg);
    }
}

#peta-indonesia {
    animation: fadeIn 1.2s ease-out 0.5s forwards;
}

/* Animasi gerakan untuk peta */
@keyframes floating {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(5px) rotate(-1deg);
    }
}

.floating-map {
    animation: floating 4s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* Elemen bulat animasi */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

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

/* Animasi alternatif untuk dekorasi bulat */
@keyframes float-alt {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(0) translateX(10px);
    }
    75% {
        transform: translateY(10px) translateX(5px);
    }
}

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

/* Animasi pulsing lambat */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.25;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

/* Gradient text yang modern */
.gradient-text {
    background: linear-gradient(to right, #8a2be2, #4b0082);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.gradient-text::after {
    content: '';
    display: none;
}

/* Efek sprinkle pada headline */
.sprinkle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.headline-word {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInWord 0.5s forwards;
}

@keyframes fadeInWord {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.headline-word:nth-child(1) { animation-delay: 0.1s; }
.headline-word:nth-child(2) { animation-delay: 0.3s; }
.headline-word:nth-child(3) { animation-delay: 0.5s; }
.headline-word:nth-child(4) { animation-delay: 0.7s; }
.headline-word:nth-child(5) { animation-delay: 0.9s; }
.headline-word:nth-child(6) { animation-delay: 1.1s; }

/* Grid lines */
.grid-lines {
    background-image: linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
                     linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Efek sparkle untuk sprinkle */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tombol eksplor dengan efek neon */
.btn-masuk {
    background: linear-gradient(45deg, #8a70d6, #6b46c1);
    color: white;
    font-weight: bold;
    padding: 12px 28px;
    border-radius: 30px;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4); 
    overflow: hidden;
    z-index: 30;
}

.btn-masuk::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8a70d6, #6b46c1, #8a70d6);
    z-index: -1;
    border-radius: 32px;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-masuk:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(107, 70, 193, 0.6);
}

.btn-masuk:hover::before {
    opacity: 0.7;
}

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

.btn-masuk:hover::after {
    left: 100%;
}

/* Platform Introduction Section */
/* Background pattern grid */
.bg-pattern-grid {
    background-image: linear-gradient(to right, rgba(139, 92, 246, 0.05) 1px, transparent 1px),
                     linear-gradient(to bottom, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Floating shape animations */
.floating-shape {
    animation: float 8s ease-in-out infinite;
}

.floating-shape-reverse {
    animation: floatReverse 10s ease-in-out infinite;
}

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

@keyframes floatReverse {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(20px) rotate(-8deg);
    }
}

/* Shimmer background effect */
.bg-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.1), rgba(255,255,255,0));
    background-size: 200% 100%;
    animation: shimmer 4s infinite;
}

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

/* Icon pulse effect */
.icon-pulse {
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255,255,255,0.2));
    }
    50% {
        transform: scale(1.07);
        filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
    }
}

/* Logo glow effect */
.logo-glow {
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.3));
    transition: all 0.5s ease;
}

.logo-container:hover .logo-glow {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}

/* Float animations with different delays */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

/* Feature cards staggered animation */
.feature-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpIn 0.8s forwards;
    animation-delay: var(--delay);
}

@keyframes fadeUpIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale-in animation for checkmarks */
.scale-in {
    animation: scaleIn 0.5s 0.3s forwards;
    transform: scale(0);
    opacity: 0;
}

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

/* Highlight line animation */
.with-highlight {
    position: relative;
    z-index: 1;
}

.highlight-line {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 8px;
    width: 0;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.2));
    z-index: -1;
    border-radius: 4px;
    animation: lineGrow 1.5s 0.5s forwards;
}

@keyframes lineGrow {
    to {
        width: 100%;
    }
}

/* Particles container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.2);
    animation: float 15s infinite linear;
}

/* Common Label Style untuk Platform Kami, Tim Kami, dan Pertanyaan Umum */
.label-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: #f3f0ff;
    color: #6b46c1;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(107, 70, 193, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transform: translateY(0);
    position: relative;
    overflow: hidden;
}

.label-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(107, 70, 193, 0.2);
}

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

.label-badge:hover::before {
    left: 100%;
}

.label-badge span {
    margin: 0 0.25rem;
    display: inline-block;
    animation: twinkle 1.5s infinite;
}

.label-badge span:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Additional decorations for platform section */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
    animation: floatAround 15s infinite ease-in-out;
}

.deco-square {
    position: absolute;
    opacity: 0.08;
    z-index: 0;
    animation: rotateSlow 20s infinite linear;
}

.deco-triangle {
    position: absolute;
    opacity: 0.07;
    z-index: 0;
    animation: floatAround 17s infinite ease-in-out;
}

.deco-dots {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(139, 92, 246, 0.3) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.2;
    z-index: 0;
    animation: fadeInOut 10s infinite alternate;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -10px);
    }
    50% {
        transform: translate(0, -20px);
    }
    75% {
        transform: translate(-10px, -10px);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.25;
    }
}

/* Enhanced FAQ Styles */
.faq-item {
    border-left: 4px solid transparent;
    transition: all 0.4s ease;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.75rem;
}

.faq-item:hover {
    border-left-color: #8A70D6;
    transform: translateX(5px);
}

.faq-item.active {
    border-left-color: #6B46C1;
    box-shadow: 0 10px 25px -5px rgba(107, 70, 193, 0.15), 0 8px 10px -6px rgba(107, 70, 193, 0.1);
}

.faq-question {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.faq-question::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.05), transparent);
    z-index: -1;
    transition: width 0.4s ease;
}

.faq-item:hover .faq-question::after {
    width: 100%;
}

.faq-item.active .faq-question::after {
    width: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #6B46C1;
}

/* UPDATED: FAQ answer dengan max-height dan scrollable */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Fixed height for scrollable behavior */
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
    opacity: 1;
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Add custom scrollbar for FAQ answers */
.faq-item.active .faq-answer::-webkit-scrollbar {
    width: 6px;
}

.faq-item.active .faq-answer::-webkit-scrollbar-track {
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
}

.faq-item.active .faq-answer::-webkit-scrollbar-thumb {
    background-color: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

.faq-item.active .faq-answer::-webkit-scrollbar-thumb:hover {
    background-color: rgba(139, 92, 246, 0.5);
}

.faq-answer p {
    position: relative;
    padding-left: 1rem;
    border-left: 2px dashed rgba(139, 92, 246, 0.3);
    margin-left: 0.5rem;
    animation: slideDown 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.faq-item.active .faq-answer p {
    animation: slideDown 0.5s ease 0.1s forwards;
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Section Styles */
/* Base styles */
.profile-section {
    position: relative;
    overflow: hidden;
}

/* Profile carousel container dengan ukuran tetap */
.profile-carousel-container {
    width: 100%;
    position: relative;
    aspect-ratio: 1/1;  /* Aspect ratio yang sama */
    max-width: 400px;
}

.profile-carousel {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 1000ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.carousel-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

/* Carousel indicators */
.carousel-indicator {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.carousel-indicator.active {
    opacity: 1;
    transform: scale(1.2);
}

/* Social icons */
.social-icon {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.15);
    background-color: rgba(255, 255, 255, 0.3);
}

/* Animation untuk elemen-elemen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* UPDATED: Footer Styles dengan animasi tambahan */
/* Styling untuk footer dengan animasi yang ditingkatkan */
.footer-top {
    animation: fadeInUp 0.8s ease-out;
}

.footer-bottom {
    animation: fadeIn 1.2s ease-out;
}

.footer-text-fade {
    opacity: 0;
    animation: fadeIn 2s ease-out 0.3s forwards;
}

.footer-copyright {
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.8s forwards;
}

.footer-design {
    opacity: 0;
    animation: slideInRight 1s ease-out 0.8s forwards;
}

/* UPDATED: Animasi tambahan untuk footer */
/* Floating bubbles for footer */
.footer-bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    background-color: white;
    z-index: 1;
    animation: footerBubbleFloat 15s infinite ease-in-out;
}

@keyframes footerBubbleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
    }
    50% {
        transform: translateY(-30px) translateX(20px) scale(1);
    }
    75% {
        transform: translateY(-10px) translateX(5px) scale(0.9);
    }
}

/* Animated light rays for footer */
.footer-light-ray {
    position: absolute;
    height: 2px;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: 1;
    transform-origin: left center;
    animation: footerLightRay 8s infinite ease-in-out;
}

@keyframes footerLightRay {
    0%, 100% {
        transform: rotate(25deg) translateX(-100%) scaleX(1);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.2;
    }
    50% {
        transform: rotate(45deg) translateX(100%) scaleX(2);
        opacity: 0.3;
    }
}

/* Animasi waves untuk footer */
.footer-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    animation: footerWave 12s infinite linear;
}

.footer-wave:nth-child(2) {
    bottom: 10px;
    opacity: 0.1;
    animation: footerWave 10s infinite linear;
    animation-delay: 2s;
}

.footer-wave:nth-child(3) {
    bottom: 20px;
    opacity: 0.07;
    animation: footerWave 8s infinite linear;
    animation-delay: 4s;
}

@keyframes footerWave {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100vw 0;
    }
}

/* Animasi untuk logo */
.logo-pulse {
    animation: pulse 5s infinite;
}

/* Gradient text untuk Adhit */
.text-gradient {
    background: linear-gradient(90deg, #f9c5d1, #9795ef);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
    animation: shimmer 3s infinite;
}

/* Animasi shapes */
.shape-animation {
    animation: morphing 15s linear infinite alternate;
}

.shape-animation-reverse {
    animation: morphingReverse 18s linear infinite alternate;
}

/* Light beam effect */
.light-beam {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0) 100%);
    z-index: 15;
    transform: skewX(-20deg);
    animation: lightBeamMove 8s ease-in-out infinite;
}

/* UPDATED: Improved footer particles */
.footer-particle {
    position: absolute;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    width: 4px;
    height: 4px;
    animation: footerParticleFloat 12s infinite linear;
}

@keyframes footerParticleFloat {
    0% {
        transform: translateY(100%) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--x-end, 50px));
        opacity: 0;
    }
}

/* Additional Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255,255,255,0.2));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255,255,255,0.2));
    }
}

@keyframes morphing {
    0% {
        transform: rotate(0) scale(1);
    }
    50% {
        transform: rotate(5deg) scale(1.05);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes morphingReverse {
    0% {
        transform: rotate(0) scale(1);
    }
    50% {
        transform: rotate(-5deg) scale(1.08);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes lightBeamMove {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-carousel-container {
        max-width: 320px;
    }
    
    /* Adjust FAQ max height on mobile */
    .faq-item.active .faq-answer {
        max-height: 250px;
    }
}