/**
 * Visual Effects - CSS for all visual effect widgets
 * Parallax, Scroll Reveal, Animated Counter, Gradient Text, Floating Cards
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   PARALLAX SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-parallax-section {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.h2pro-parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    z-index: 0;
}

.h2pro-parallax-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.h2pro-parallax-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 60px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-scroll-reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.h2pro-scroll-reveal.is-visible {
    opacity: 1;
}

/* Fade Variants */
.h2pro-scroll-reveal.reveal-fade-up {
    transform: translateY(60px);
}

.h2pro-scroll-reveal.reveal-fade-up.is-visible {
    transform: translateY(0);
}

.h2pro-scroll-reveal.reveal-fade-down {
    transform: translateY(-60px);
}

.h2pro-scroll-reveal.reveal-fade-down.is-visible {
    transform: translateY(0);
}

.h2pro-scroll-reveal.reveal-fade-left {
    transform: translateX(-60px);
}

.h2pro-scroll-reveal.reveal-fade-left.is-visible {
    transform: translateX(0);
}

.h2pro-scroll-reveal.reveal-fade-right {
    transform: translateX(60px);
}

.h2pro-scroll-reveal.reveal-fade-right.is-visible {
    transform: translateX(0);
}

/* Zoom Variants */
.h2pro-scroll-reveal.reveal-zoom-in {
    transform: scale(0.8);
}

.h2pro-scroll-reveal.reveal-zoom-in.is-visible {
    transform: scale(1);
}

.h2pro-scroll-reveal.reveal-zoom-out {
    transform: scale(1.2);
}

.h2pro-scroll-reveal.reveal-zoom-out.is-visible {
    transform: scale(1);
}

/* Flip Variants */
.h2pro-scroll-reveal.reveal-flip-up {
    transform: perspective(1000px) rotateX(90deg);
    transform-origin: bottom;
}

.h2pro-scroll-reveal.reveal-flip-up.is-visible {
    transform: perspective(1000px) rotateX(0);
}

.h2pro-scroll-reveal.reveal-flip-left {
    transform: perspective(1000px) rotateY(-90deg);
    transform-origin: right;
}

.h2pro-scroll-reveal.reveal-flip-left.is-visible {
    transform: perspective(1000px) rotateY(0);
}

/* Slide + Rotate */
.h2pro-scroll-reveal.reveal-slide-rotate {
    transform: translateX(-100px) rotate(-10deg);
}

.h2pro-scroll-reveal.reveal-slide-rotate.is-visible {
    transform: translateX(0) rotate(0);
}

/* Blur In */
.h2pro-scroll-reveal.reveal-blur {
    filter: blur(20px);
    transform: scale(0.9);
}

.h2pro-scroll-reveal.reveal-blur.is-visible {
    filter: blur(0);
    transform: scale(1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATED COUNTER
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-counter-wrapper {
    text-align: center;
    padding: 20px;
}

.h2pro-counter-icon {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #72BE44 0%, #8BDF58 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.h2pro-counter-number {
    font-family: 'Geologica', sans-serif;
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #0E1B2D 0%, #1a3a5f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.h2pro-counter-suffix {
    font-size: 0.5em;
    vertical-align: super;
}

.h2pro-counter-prefix {
    font-size: 0.5em;
    vertical-align: super;
}

.h2pro-counter-title {
    font-family: 'Geologica', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #0E1B2D;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.h2pro-counter-description {
    font-size: 14px;
    color: #666;
    max-width: 250px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATED GRADIENT TEXT
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-gradient-text {
    font-family: 'Geologica', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    display: inline-block;
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Presets */
.h2pro-gradient-text.gradient-green {
    background-image: linear-gradient(135deg, #72BE44 0%, #8BDF58 50%, #72BE44 100%);
}

.h2pro-gradient-text.gradient-ocean {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
}

.h2pro-gradient-text.gradient-sunset {
    background-image: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f093fb 100%);
}

.h2pro-gradient-text.gradient-gold {
    background-image: linear-gradient(135deg, #f5af19 0%, #f12711 50%, #f5af19 100%);
}

.h2pro-gradient-text.gradient-cyber {
    background-image: linear-gradient(135deg, #00f5ff 0%, #ff00ff 50%, #00f5ff 100%);
}

.h2pro-gradient-text.gradient-nature {
    background-image: linear-gradient(135deg, #11998e 0%, #38ef7d 50%, #11998e 100%);
}

.h2pro-gradient-text.gradient-midnight {
    background-image: linear-gradient(135deg, #0E1B2D 0%, #1a3a5f 50%, #0E1B2D 100%);
}

/* Animation Types */
.h2pro-gradient-text.animate-flow {
    animation: gradientFlow 3s ease infinite;
}

.h2pro-gradient-text.animate-pulse {
    animation: gradientPulse 2s ease-in-out infinite;
}

.h2pro-gradient-text.animate-shimmer {
    animation: gradientShimmer 2.5s linear infinite;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

@keyframes gradientPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes gradientShimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FLOATING CARD
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-floating-card-wrapper {
    perspective: 1000px;
}

.h2pro-floating-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

/* Floating Animation */
.h2pro-floating-card.animate-float {
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }

    25% {
        transform: translateY(-10px) rotateX(2deg) rotateY(-2deg);
    }

    50% {
        transform: translateY(-5px) rotateX(-1deg) rotateY(1deg);
    }

    75% {
        transform: translateY(-15px) rotateX(1deg) rotateY(-1deg);
    }
}

/* Glow Effect */
.h2pro-floating-card.has-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #72BE44, #8BDF58, #72BE44);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(15px);
}

.h2pro-floating-card.has-glow:hover::before {
    opacity: 0.6;
}

/* 3D Tilt on Hover */
.h2pro-floating-card.tilt-on-hover:hover {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Card Content Layers (3D effect) */
.h2pro-floating-card .card-layer-1 {
    transform: translateZ(20px);
}

.h2pro-floating-card .card-layer-2 {
    transform: translateZ(40px);
}

.h2pro-floating-card .card-layer-3 {
    transform: translateZ(60px);
}

/* Card Header */
.h2pro-floating-card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 28px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #72BE44 0%, #8BDF58 100%);
    color: #0E1B2D;
    box-shadow: 0 8px 20px rgba(114, 190, 68, 0.3);
    transition: transform 0.4s ease;
}

.h2pro-floating-card:hover .h2pro-floating-card-icon {
    transform: translateY(-5px) scale(1.05);
}

.h2pro-floating-card-title {
    font-family: 'Geologica', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #0E1B2D;
    margin-bottom: 12px;
}

.h2pro-floating-card-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* Card Variants */
.h2pro-floating-card.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.h2pro-floating-card.card-dark {
    background: linear-gradient(135deg, #0E1B2D 0%, #1a3a5f 100%);
}

.h2pro-floating-card.card-dark .h2pro-floating-card-title {
    color: #fff;
}

.h2pro-floating-card.card-dark .h2pro-floating-card-description {
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATED SEPARATOR / DIVIDER
   ═══════════════════════════════════════════════════════════════════════════════ */

.h2pro-separator {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.h2pro-separator-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #72BE44, transparent);
    transform: scaleX(0);
    transition: transform 1s ease;
}

.h2pro-separator-line.is-visible {
    transform: scaleX(1);
}

/* Wave Separator */
.h2pro-separator-wave {
    width: 100%;
}

.h2pro-separator-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

.h2pro-separator-wave path {
    fill: currentColor;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Delay Classes */
.delay-100 {
    transition-delay: 100ms !important;
    animation-delay: 100ms !important;
}

.delay-200 {
    transition-delay: 200ms !important;
    animation-delay: 200ms !important;
}

.delay-300 {
    transition-delay: 300ms !important;
    animation-delay: 300ms !important;
}

.delay-400 {
    transition-delay: 400ms !important;
    animation-delay: 400ms !important;
}

.delay-500 {
    transition-delay: 500ms !important;
    animation-delay: 500ms !important;
}

.delay-600 {
    transition-delay: 600ms !important;
    animation-delay: 600ms !important;
}

.delay-700 {
    transition-delay: 700ms !important;
    animation-delay: 700ms !important;
}

.delay-800 {
    transition-delay: 800ms !important;
    animation-delay: 800ms !important;
}

.delay-900 {
    transition-delay: 900ms !important;
    animation-delay: 900ms !important;
}

.delay-1000 {
    transition-delay: 1000ms !important;
    animation-delay: 1000ms !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATED MAP
   ═══════════════════════════════════════════════════════════════════════════ */

.h2pro-animated-map-wrapper {
    width: 100%;
    max-width: 840px;
    /* SVG native width */
    margin: 0 auto;
    position: relative;
    /* Maintain aspect ratio */
    aspect-ratio: 840 / 420;
}

.h2pro-animated-map-wrapper.tilt-on-hover {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.h2pro-animated-map {
    width: 100%;
    height: 100%;
    position: relative;
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
}

.h2pro-map-base {
    position: absolute;
    inset: 0;
    background-color: #e5e5e5;
    /* Fallback default */
    z-index: 1;
}

.h2pro-map-shimmer {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Angled gradient, softer opacity, slight blur */
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
    background-size: 200% 100%;
    animation: mapShimmer 8s infinite ease-in-out;
    mix-blend-mode: overlay;
    filter: blur(5px);
}

@keyframes mapShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAP BACKGROUND EXTENSION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Crucial: Ensure the parent Elementor section is relative so absolute bg stays inside */
.elementor-section.h2pro-has-map-bg-yes,
.elementor-container.h2pro-has-map-bg-yes,
.e-con.h2pro-has-map-bg-yes,
/* Catch generic elementor wrappers just in case */
.elementor-element.h2pro-has-map-bg-yes {
    position: relative !important;
    overflow: hidden !important;
    /* Clip any overflow */
}

.h2pro-section-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content but check Elementor z-indexes */
    pointer-events: none;
    overflow: hidden;
    mask-repeat: no-repeat;
    mask-size: cover;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    -webkit-mask-position: center;
}

/* Adjust map styles when used as background */
.h2pro-section-map-bg .h2pro-map-base {
    background-color: #e5e5e5;
}

.h2pro-section-map-bg .h2pro-map-shimmer {
    /* Angled gradient for more dynamic look */
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
    background-size: 200% 100%;
    /* Slower default speed for premium feel, 'ease-in-out' for smoother wave */
    animation: mapShimmer 8s infinite ease-in-out;
    mix-blend-mode: overlay;
    filter: blur(5px);
    /* Soften the edges of the light beam */
}

/* Ensure container has visibility */
.h2pro-section-map-bg {
    display: block !important;
    min-height: 100%;
    min-width: 100%;
}