/**
 * ContX Smart Animations
 * Version: 1.0.0
 */

/* === Fade-in-up on scroll === */
.contx-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.contx-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for children */
.contx-animate.delay-1 { transition-delay: 0.1s; }
.contx-animate.delay-2 { transition-delay: 0.2s; }
.contx-animate.delay-3 { transition-delay: 0.3s; }
.contx-animate.delay-4 { transition-delay: 0.4s; }

/* Counter numbers — glow on hover */
.elementor-counter .elementor-counter-number-wrapper {
    transition: text-shadow 0.3s ease;
}
.elementor-counter:hover .elementor-counter-number-wrapper {
    text-shadow: 0 0 20px rgba(38, 198, 218, 0.4);
}

/* Cards hover lift */
.elementor-widget-icon-box,
.elementor-widget-image-box {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}
.elementor-widget-icon-box:hover,
.elementor-widget-image-box:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px rgba(38, 198, 218, 0.15) !important;
}

/* Buttons — ripple effect on hover */
.elementor-button,
a.ast-custom-button,
.wc-proceed-to-checkout .checkout-button {
    position: relative;
    overflow: hidden;
}
.elementor-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.elementor-button:hover::after {
    width: 300px;
    height: 300px;
}

/* Header menu links — underline slide animation */
.main-header-menu .menu-item > .menu-link {
    position: relative !important;
}
.main-header-menu .menu-item > .menu-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #1565C0, #26C6DA) !important;
    transition: width 0.3s ease, left 0.3s ease !important;
}
.main-header-menu .menu-item > .menu-link:hover::after {
    width: 100% !important;
    left: 0 !important;
}

/* Smooth section top border glow */
.elementor-section:not(:first-child)::before,
.e-con:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(38, 198, 218, 0.2), transparent);
    pointer-events: none;
    z-index: 1;
}

/* Logo subtle hover glow */
.site-logo-img img,
.custom-logo {
    transition: filter 0.3s ease !important;
}
.site-logo-img:hover img,
.custom-logo-link:hover .custom-logo {
    filter: drop-shadow(0 0 8px rgba(38, 198, 218, 0.5)) !important;
}

/* ===========================
   HOME PAGE GRIDS (JS-injected)
   =========================== */

/* Stats grid — 4 columns */
.contx-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px 0 60px;
    text-align: center;
}

.contx-stat-box {
    padding: 20px;
    border: 1px solid rgba(38, 198, 218, 0.15);
    border-radius: 12px;
    background: rgba(11, 26, 46, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contx-stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(38, 198, 218, 0.15);
}

.contx-stat-box h2 {
    color: #26C6DA !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    line-height: 1 !important;
}

.contx-stat-box p {
    color: #FFFFFF !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
}

/* Services grid — 4 columns */
.contx-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 30px 0 60px;
}

.contx-service-card {
    background: rgba(11, 26, 46, 0.5);
    border: 1px solid rgba(38, 198, 218, 0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s ease;
}

.contx-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(38, 198, 218, 0.15);
    border-color: rgba(38, 198, 218, 0.4);
}

.contx-service-card h3 {
    font-size: 1.1rem !important;
    margin-bottom: 12px !important;
}

.contx-service-card p:first-child {
    font-size: 40px !important;
}

.contx-service-card a {
    color: #26C6DA !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Why choose us grid — 3 columns */
.contx-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 30px 0 60px;
}

.contx-why-card {
    background: rgba(11, 26, 46, 0.5);
    border: 1px solid rgba(38, 198, 218, 0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s ease;
}

.contx-why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(38, 198, 218, 0.15);
    border-color: rgba(38, 198, 218, 0.4);
}

.contx-why-card h4 {
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .contx-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .contx-stat-box h2 {
        font-size: 2rem !important;
    }

    .contx-services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contx-why-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .contx-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
