/* ==========================================================================
   HealthSpire - Modern Animations & UI Enhancements
   ========================================================================== */

/* ===== Root Variables ===== */
:root {
    --hs-primary: #0ea5e9;
    --hs-primary-dark: #0284c7;
    --hs-primary-light: #38bdf8;
    --hs-accent: #06b6d4;
    --hs-accent-dark: #0891b2;
    --hs-dark: #1a2332;
    --hs-gray: #64748b;
    --hs-light: #f8fafc;
    --hs-white: #ffffff;
    --hs-shadow: 0 10px 40px rgba(14, 165, 233, 0.1);
    --hs-shadow-hover: 0 20px 60px rgba(14, 165, 233, 0.2);
    --hs-radius: 16px;
    --hs-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* ===== Fade In Up Animation ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

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

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

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Animation Classes ===== */
.hs-animate-up {
    animation: fadeInUp 0.8s ease forwards;
}

.hs-animate-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.hs-animate-right {
    animation: fadeInRight 0.8s ease forwards;
}

.hs-animate-scale {
    animation: scaleIn 0.6s ease forwards;
}

.hs-float {
    animation: float 4s ease-in-out infinite;
}

/* ===== Scroll-triggered animations ===== */
.hs-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hs-reveal.hs-visible {
    opacity: 1;
    transform: translateY(0);
}

.hs-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hs-reveal-left.hs-visible {
    opacity: 1;
    transform: translateX(0);
}

.hs-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hs-reveal-right.hs-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Hero Section Enhancement ===== */
.elementor-widget-heading h1,
.elementor-widget-heading h2 {
    text-shadow: 0 2px 20px rgba(14, 165, 233, 0.15);
}

/* Gradient text */
.hs-gradient-text {
    background: linear-gradient(135deg, var(--hs-primary) 0%, var(--hs-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    background-size: 200% 200%;
}

/* ===== Card Hover Effects ===== */
.elementor-widget-icon-box,
.elementor-widget-image-box,
.hs-feature-card {
    transition: var(--hs-transition);
    border-radius: var(--hs-radius);
}

.elementor-widget-icon-box:hover,
.elementor-widget-image-box:hover,
.hs-feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hs-shadow-hover);
}

/* Icon box hover - icon color change */
.elementor-widget-icon-box .elementor-icon-box-icon .elementor-icon {
    transition: var(--hs-transition);
}

.elementor-widget-icon-box:hover .elementor-icon-box-icon .elementor-icon {
    transform: scale(1.15) rotate(5deg);
}

/* ===== Button Enhancements ===== */
.elementor-button {
    position: relative;
    overflow: hidden;
    transition: var(--hs-transition);
}

.elementor-button::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, height 0.6s;
}

.elementor-button:hover::before {
    width: 300px;
    height: 300px;
}

.elementor-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

/* ===== Section Background Patterns ===== */
.hs-pattern-bg {
    position: relative;
}

.hs-pattern-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(0, 180, 216, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== Stats Counter Animation ===== */
.hs-counter {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--hs-primary) 0%, var(--hs-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Testimonial Cards ===== */
.hs-testimonial-card {
    background: var(--hs-white);
    border-radius: var(--hs-radius);
    padding: 2rem;
    box-shadow: var(--hs-shadow);
    transition: var(--hs-transition);
    position: relative;
    overflow: hidden;
}

.hs-testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    color: var(--hs-primary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

.hs-testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hs-shadow-hover);
}

/* ===== Feature List with Icons ===== */
.hs-feature-list {
    list-style: none;
    padding: 0;
}

.hs-feature-list li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--hs-transition);
}

.hs-feature-list li:hover {
    padding-left: 8px;
}

.hs-feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-light));
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== Pricing Cards ===== */
.hs-pricing-card {
    background: var(--hs-white);
    border-radius: var(--hs-radius);
    padding: 2.5rem;
    box-shadow: var(--hs-shadow);
    transition: var(--hs-transition);
    position: relative;
    overflow: hidden;
}

.hs-pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hs-shadow-hover);
}

.hs-pricing-card.featured {
    border: 2px solid var(--hs-primary);
    transform: scale(1.05);
}

.hs-pricing-card.featured::after {
    content: 'POPULAR';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--hs-primary);
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
}

/* ===== Navigation Enhancement ===== */
.elementor-location-header {
    transition: all 0.3s ease;
}

.elementor-location-header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Mobile Menu Animation ===== */
@media (max-width: 768px) {
    .elementor-nav-menu--dropdown {
        animation: fadeInUp 0.3s ease;
    }
}

/* ===== Loading Skeleton ===== */
.hs-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== Scroll Progress Bar ===== */
.hs-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hs-primary), var(--hs-accent));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
}

/* ===== Back to Top Button ===== */
.hs-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--hs-transition);
    z-index: 9998;
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.3);
}

.hs-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.hs-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

/* ===== WhatsApp Float Button ===== */
.hs-whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    transition: var(--hs-transition);
    animation: pulse 2s infinite;
}

.hs-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
}

/* ===== Module Cards Grid ===== */
.hs-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.hs-module-card {
    background: white;
    border-radius: var(--hs-radius);
    padding: 2rem;
    box-shadow: var(--hs-shadow);
    transition: var(--hs-transition);
    text-align: center;
}

.hs-module-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hs-shadow-hover);
}

.hs-module-card .hs-module-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--hs-primary), var(--hs-accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    transition: var(--hs-transition);
}

.hs-module-card:hover .hs-module-icon {
    transform: rotate(10deg) scale(1.1);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hs-module-grid {
        grid-template-columns: 1fr;
    }

    .hs-pricing-card.featured {
        transform: none;
    }

    .hs-counter {
        font-size: 2rem;
    }
}
