/* ===================================
   CONTACT SECTION ANIMATIONS
   Professional & Engaging Animations
   =================================== */

/* ===== SECTION ENTRANCE ANIMATIONS ===== */

/* Contact Section Title Animation */
#hubungi-kami h2 {
    opacity: 0;
    transform: translateY(30px);
    animation: contactTitleFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

#hubungi-kami > div > div:first-child p {
    opacity: 0;
    transform: translateY(20px);
    animation: contactSubtitleFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes contactTitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contactSubtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CONTACT CARDS STAGGERED ENTRANCE ===== */

/* Contact Cards Container */
#hubungi-kami a[href*="wa.me"],
#hubungi-kami a[href*="mailto"],
#hubungi-kami a[href*="instagram"],
#hubungi-kami a[href*="maps"] {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: contactCardSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered delays for each card */
#hubungi-kami a[href*="wa.me"] {
    animation-delay: 0.6s;
}

#hubungi-kami a[href*="mailto"] {
    animation-delay: 0.75s;
}

#hubungi-kami a[href*="instagram"] {
    animation-delay: 0.9s;
}

#hubungi-kami a[href*="maps"] {
    animation-delay: 1.05s;
}

@keyframes contactCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== ICON ANIMATIONS ===== */

/* Icon Container Pulse on Load */
#hubungi-kami a > div:first-child {
    animation: iconPulseIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes iconPulseIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Icon Hover Animation - Bounce & Glow */
#hubungi-kami a:hover > div:first-child {
    animation: iconBounceHover 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 12px 35px rgba(255, 212, 0, 0.5) !important;
}

@keyframes iconBounceHover {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    75% {
        transform: scale(1.15) rotate(-3deg);
    }
}

/* SVG Icon Hover Animation */
#hubungi-kami a:hover svg {
    animation: svgRotateScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes svgRotateScale {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ===== CARD HOVER EFFECTS ===== */

/* Card Lift & Glow on Hover */
#hubungi-kami a {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#hubungi-kami a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.1), transparent);
    transition: left 0.6s ease;
}

#hubungi-kami a:hover::before {
    left: 100%;
}

#hubungi-kami a:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 212, 0, 0.25) !important;
    border-color: rgba(255, 212, 0, 0.6) !important;
}

/* Text Slide Up on Hover */
#hubungi-kami a:hover h3 {
    transform: translateY(-2px);
    color: var(--gray-900);
    transition: all 0.3s ease;
}

#hubungi-kami a:hover p {
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* ===== CTA BANNER ANIMATION ===== */

/* CTA Banner (Yellow Box) */
#hubungi-kami > div > div:nth-child(2) > div:first-child > div:last-child {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: ctaBannerSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

@keyframes ctaBannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* CTA Banner Hover Effect */
#hubungi-kami > div > div:nth-child(2) > div:first-child > div:last-child {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#hubungi-kami > div > div:nth-child(2) > div:first-child > div:last-child:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 212, 0, 0.4);
}

/* CTA Button Animation */
#hubungi-kami a[style*="background: #25D366"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#hubungi-kami a[style*="background: #25D366"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#hubungi-kami a[style*="background: #25D366"]:hover::before {
    width: 300px;
    height: 300px;
}

#hubungi-kami a[style*="background: #25D366"]:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    background: #20c05c !important;
}

/* CTA Button Icon Bounce */
#hubungi-kami a[style*="background: #25D366"]:hover svg {
    animation: ctaIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ctaIconBounce {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ===== IMAGE SECTION ANIMATION ===== */

/* Contact Image Container */
#hubungi-kami > div > div:nth-child(2) > div:last-child {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    animation: imageSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes imageSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Image Hover Effect */
#hubungi-kami img[alt="Contact"] {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#hubungi-kami > div > div:nth-child(2) > div:last-child > div:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Response Badge Animation */
#hubungi-kami img[alt="Contact"] + div {
    animation: badgeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.4s backwards;
}

@keyframes badgeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge Icon Pulse */
#hubungi-kami img[alt="Contact"] + div > div:first-child {
    animation: badgeIconPulse 2s ease-in-out infinite;
}

@keyframes badgeIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ===== FLOATING ANIMATION FOR ICONS ===== */

/* Continuous Float for Icons */
#hubungi-kami a > div:first-child {
    animation: iconFloat 3s ease-in-out infinite;
}

#hubungi-kami a:nth-child(1) > div:first-child {
    animation-delay: 0s;
}

#hubungi-kami a:nth-child(2) > div:first-child {
    animation-delay: 0.5s;
}

#hubungi-kami a:nth-child(3) > div:first-child {
    animation-delay: 1s;
}

#hubungi-kami a:nth-child(4) > div:first-child {
    animation-delay: 1.5s;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===== SHIMMER EFFECT ON CARDS ===== */

#hubungi-kami a::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 212, 0, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    /* Reduce animation delays on mobile */
    #hubungi-kami a[href*="wa.me"] {
        animation-delay: 0.4s;
    }
    
    #hubungi-kami a[href*="mailto"] {
        animation-delay: 0.5s;
    }
    
    #hubungi-kami a[href*="instagram"] {
        animation-delay: 0.6s;
    }
    
    #hubungi-kami a[href*="maps"] {
        animation-delay: 0.7s;
    }
    
    /* Reduce hover effects on mobile */
    #hubungi-kami a:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* ===== ACCESSIBILITY - REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    #hubungi-kami *,
    #hubungi-kami *::before,
    #hubungi-kami *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
