/* ===== ROOT VARIABLES ===== */
:root {
    --primary-blue: #2563eb;
    --primary-red: #dc2626;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #dc2626 100%);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    overflow-x: hidden;
}

/* ===== SMOOTH SCROLL ===== */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===== ANIMATIONS ===== */

/* Blob Animation */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* Moving Background Shapes */
@keyframes moveShape1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(100px, -50px) scale(1.05);
    }
    50% {
        transform: translate(50px, 100px) scale(0.95);
    }
    75% {
        transform: translate(-50px, 50px) scale(1.02);
    }
}

@keyframes moveShape2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-80px, 80px) rotate(120deg);
    }
    66% {
        transform: translate(80px, -80px) rotate(240deg);
    }
}

@keyframes moveShape3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(60px, -100px) scale(1.1);
    }
}

.moving-shape {
    opacity: 15%;
}

.shape-1 {
    animation: moveShape1 8s infinite ease-in-out;
}

.shape-2 {
    animation: moveShape2 10s infinite linear;
}

.shape-3 {
    animation: moveShape3 12s infinite ease-in-out;
}

@keyframes moveShapeSlow {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-50px) translateX(30px);
    }
}

.moving-shape-slow {
    animation: moveShapeSlow 6s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

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

/* Heartbeat SVG Animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    14% {
        transform: scale(1.05);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* EKG Wave Animation */
@keyframes ekgWave {
    0%, 100% {
        stroke-dashoffset: 1000;
    }
    50% {
        stroke-dashoffset: 0;
    }
}

.animate-ekg {
    stroke-dasharray: 1000;
    animation: ekgWave 2.5s infinite ease-in-out;
}

/* Pulse Ring Animation */
@keyframes pulseRing {
    0% {
        r: 20;
        opacity: 0.8;
    }
    100% {
        r: 60;
        opacity: 0;
    }
}

.pulse-ring {
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.5s;
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-shift {
    background: linear-gradient(270deg, #2563eb, #dc2626, #2563eb);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(0, 30px);
    }
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

.animation-delay-900 {
    animation-delay: 0.9s;
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate(-30px, 0);
    }
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}
}

/* Scroll Reveal Animation */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.in-view {
    animation: scrollReveal 0.8s ease-out forwards;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== NAVIGATION STYLES ===== */
nav {
    animation: slideDown 0.6s ease-out;
}

/* Header Sticky with Blur Effect */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#navbar.scrolled .nav-blur {
    opacity: 1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-text-primary,
#navbar.scrolled .nav-text-secondary {
    color: #1f2937 !important;
}

#navbar.scrolled .nav-btn-primary {
    color: #2563eb !important;
}

#navbar.scrolled .nav-btn-secondary {
    background: linear-gradient(135deg, #2563eb 0%, #dc2626 100%) !important;
}

.nav-link {
    position: relative;
    color: #374151;
    transition: all 0.3s ease;
    font-weight: 500;
    text-shadow: none;
    padding: 0.3rem .7rem;
    border-radius: 9999px;
    background-color: transparent;
}

#navbar.scrolled .nav-link {
    color: #374151;
    text-shadow: none;
}

.nav-link:hover {
    color: var(--primary-blue);
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-link.active {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.15);
    font-weight: 600;
}

#navbar.scrolled .nav-link.active {
    color: #1f2937;
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-text-primary {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.nav-text-secondary {
    color: #059669;
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-btn-primary {
    color: #2563eb;
    transition: color 0.3s ease;
}

.nav-btn-secondary {
    background: linear-gradient(135deg, #2563eb 0%, #dc2626 100%);
    transition: all 0.3s ease;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #f0f9ff;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

/* ===== SERVICE CARDS ===== */
.service-card {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
}

/* ===== KNOWLEDGE CARDS ===== */
.knowledge-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.knowledge-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

/* ===== BUTTONS ===== */
button {
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:active {
    transform: translateY(0);
}

/* Gradient Button */
.bg-gradient-to-r {
    background: var(--primary-gradient);
    background-size: 200% 200%;
    transition: background-position 0.3s ease;
}

.bg-gradient-to-r:hover {
    background-position: right center;
}

/* ===== FORM ELEMENTS ===== */
input,
select,
textarea {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ===== TEXT GRADIENT ===== */
.bg-clip-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== SCROLL ANIMATION TRIGGER ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
    }

    .scroll-reveal.in-view {
        opacity: 1;
        transform: translateY(0);
        animation: scrollReveal 0.8s ease-out forwards;
    }
}

/* ===== HOVER EFFECTS ===== */
a {
    transition: color 0.3s ease;
}

/* ===== SECTION ANIMATIONS ===== */
section {
    position: relative;
}

/* Hero Section Styles */
.h-96 {
    transition: transform 0.3s ease;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
    .fade-in-up,
    .fade-in-right,
    .scroll-reveal {
        animation-duration: 0.6s;
    }

    button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ===== STAGGER ANIMATION HELPER ===== */
.stagger-1 {
    animation-delay: 0s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.2s;
}

.stagger-4 {
    animation-delay: 0.3s;
}

.stagger-5 {
    animation-delay: 0.4s;
}

.stagger-6 {
    animation-delay: 0.5s;
}

/* ===== SMOOTH TRANSITIONS FOR ALL ===== */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Override for animations */
.animate-blob,
.fade-in-up,
.fade-in-right,
[class*='animation-delay'] {
    transition: none;
}

/* ===== GRADIENT BACKGROUNDS ===== */
.bg-gradient-to-br {
    background-image: linear-gradient(135deg, var(--tw-gradient-stops)) !important;
}

/* ===== HERO SECTION SPECIAL EFFECTS ===== */
.hero-glow {
    position: relative;
    z-index: 1;
}

.hero-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    z-index: -1;
    animation: glow 3s ease-in-out infinite;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-blue);
}

.testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    transform: translateY(-5px);
}

/* ===== ICON ANIMATIONS ===== */
.icon-animate {
    display: inline-block;
    transition: all 0.3s ease;
}

.icon-animate:hover {
    transform: scale(1.2) rotate(10deg);
}

/* ===== UNDERLINE ANIMATION ===== */
.underline-animate {
    position: relative;
    text-decoration: none;
}

.underline-animate::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* ===== BACKDROP BLUR ===== */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ===== SHIMMER LOADING ANIMATION ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

/* ===== SCALE UP ON SCROLL ===== */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-up {
    animation: scaleUp 0.8s ease-out forwards;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* ===== ACTIVE STATE FOR NAV ===== */
.nav-link.active {
    color: var(--primary-blue);
    font-weight: 700;
}

.nav-link.active::after {
    width: 100%;
}

/* ===== SECTION TITLE ANIMATION ===== */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ===== FEATURE CARDS WITH HOVER LIFT ===== */
.feature-card {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.2);
}

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

.feature-icon {
    transition: transform 0.3s ease;
}

/* ===== BOX SHADOW ANIMATIONS ===== */
.shadow-animate {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.shadow-animate:hover {
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.2);
}
