/* ============================================
   MEDICALAID LANDING PAGE - BRAND COLORS
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    position: relative;
}

/* ===== ANIMATED BACKGROUND BLOBS ===== */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: blobFloat 15s infinite ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #2a99d4, #79c1e7);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #00f673, #c7f6dd);
    bottom: -150px;
    left: -150px;
    animation-delay: 8s;
}

.blob-3 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #ffc427, #ffeebf);
    top: 40%;
    right: 30%;
    animation-delay: 16s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(30px, -40px) scale(1.2) rotate(5deg);
    }
    66% {
        transform: translate(-40px, 20px) scale(0.8) rotate(-5deg);
    }
}

/* Grid overlay pattern */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 153, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 153, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, transparent 10%, black 70%);
}

/* ===== HERO SECTION ===== */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

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

/* Hero Cards - Asymmetric Layout */
.hero-card {
    position: absolute;
    opacity: 0;
    animation: heroCardEntrance 1s ease-out forwards, floatCard 8s infinite ease-in-out 1s;
}

.card-1 {
    top: 8%;
    right: 8%;
    width: 320px;
}

.card-2 {
    top: 52%;
    right: 5%;
    animation-delay: 0.3s;
}

@keyframes heroCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Slow spin for decorative elements */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Hero Button Shine Effect */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* ===== NAVIGATION ===== */
.nav-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
    transform: translateY(-1px);
}

.nav-btn:active {
    transform: translateY(0);
}

/* ===== STATS CARDS ===== */
.stat-card {
    animation: fadeInUp 0.8s ease-out backwards;
    transition: transform 0.3s ease;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.5s;
}

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

.stat-card:hover {
    transform: translateY(-4px);
}

/* Counter numbers */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    animation: slideInBounce 0.8s ease-out backwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feature-card:hover {
    transform: translateY(-3px);
}

/* ===== FORM STYLING ===== */
input:focus {
    transform: scale(1.01);
}

#success-message {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a99d4, #79c1e7);
    border-radius: 10px;
    border: 2px solid #e2f0f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #79c1e7, #00f673);
}

/* ===== GRADIENT TEXT BACKGROUND CLIP ===== */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: rgba(42, 153, 212, 0.2);
    color: #022336;
}

::-moz-selection {
    background: rgba(42, 153, 212, 0.2);
    color: #022336;
}

/* ===== HOVER EFFECTS ===== */
.hero-btn:hover {
    box-shadow: 0 20px 60px rgba(42, 153, 212, 0.4);
}

footer a:hover {
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .hero-card {
        display: none;
    }

    .bg-blob {
        width: 300px !important;
        height: 300px !important;
    }
}

@media (max-width: 768px) {
    .bg-blob {
        width: 200px !important;
        height: 200px !important;
        opacity: 0.1;
    }

    .grid-overlay {
        background-size: 40px 40px;
    }
}

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

    .bg-blob,
    .hero-card {
        animation: none !important;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #2a99d4;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .bg-blob {
        display: none;
    }

    .grid-overlay {
        opacity: 0.5;
    }

    button,
    .stat-card > div,
    .feature-card > div {
        border-width: 2px !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white !important;
    }

    .bg-blob,
    .grid-overlay,
    nav,
    footer,
    button {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ===== LOADING STATES ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Pattern background animation */
@keyframes patternShift {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(15px, 15px);
    }
}

.animate-pattern-shift {
    animation: patternShift 20s ease-in-out infinite;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.bg-blob,
.hero-card,
.stat-card,
.feature-card {
    will-change: transform;
}

/* Force GPU acceleration for smooth animations */
.hero-btn,
.nav-btn,
.stat-card,
.feature-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== BUTTON STATES ===== */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.98);
}

/* CTA Button Pulse Effect */
.hero-btn:hover,
.nav-cta:hover {
    animation: buttonPulse 1.5s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

/* Stats Counter Wobble on Hover */
.stat-card:hover .counter {
    animation: numberWobble 0.6s ease-in-out;
}

@keyframes numberWobble {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-2deg);
    }
    75% {
        transform: rotate(2deg);
    }
}

/* ===== BRAND COLOR SOLID BACKGROUNDS ===== */
.bg-primary {
    background: #2a99d4;
}

.bg-secondary {
    background: #022336;
}

.bg-gold {
    background: #ffc427;
}

.bg-green {
    background: #00f673;
}

/* ===== SECTION ANIMATIONS ===== */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* First section visible immediately */
section:first-of-type {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SHADOW UTILITIES ===== */
.shadow-primary {
    box-shadow: 0 10px 40px rgba(42, 153, 212, 0.3);
}

.shadow-primary-lg {
    box-shadow: 0 20px 60px rgba(42, 153, 212, 0.4);
}

.shadow-green {
    box-shadow: 0 10px 40px rgba(0, 246, 115, 0.3);
}

.shadow-green-lg {
    box-shadow: 0 20px 60px rgba(0, 246, 115, 0.4);
}

.shadow-gold {
    box-shadow: 0 10px 40px rgba(255, 196, 39, 0.3);
}

.shadow-gold-lg {
    box-shadow: 0 20px 60px rgba(255, 196, 39, 0.4);
}

/* ===== BORDER GLOW ON HOVER ===== */
.stat-card:hover .counter,
.feature-card:hover h3 {
    filter: drop-shadow(0 0 8px currentColor);
    transition: filter 0.2s ease;
}

/* Icon Glow Effects */
.stat-card:hover svg,
.feature-card:hover svg,
.hero-card:hover svg {
    filter: drop-shadow(0 0 6px currentColor);
    transition: filter 0.2s ease;
}

/* Enhanced Border Contrast */
.border-3 {
    border-width: 3px;
}

/* Section Background Contrasts */
section:nth-child(odd) {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

section:nth-child(even) {
    background: #ffffff;
}

/* ===== CARD BORDER ANIMATION ===== */
@keyframes borderPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.45;
    }
}

.feature-card:hover > div,
.stat-card:hover > div {
    animation: borderPulse 3s ease-in-out infinite;
}

/* ===== BADGE ANIMATIONS ===== */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.inline-block span {
    animation: badgePulse 3s ease-in-out infinite;
}

/* ===== BENEFIT ITEM ANIMATIONS ===== */
.benefit-item {
    opacity: 0;
    animation: benefitSlideIn 0.6s ease-out forwards;
}

.benefit-item:nth-child(1) {
    animation-delay: 0.2s;
}

.benefit-item:nth-child(2) {
    animation-delay: 0.4s;
}

.benefit-item:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes benefitSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.benefit-item svg {
    transition: transform 0.3s ease;
}

.benefit-item:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* ===== TEXT ANIMATIONS ===== */
h1 span {
    transition: color 0.3s ease;
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Z-INDEX LAYERS ===== */
.bg-blob,
.grid-overlay {
    z-index: 0;
}

nav {
    z-index: 50;
}

.hero-card {
    z-index: 5;
}

/* ===== ROTATION UTILITIES ===== */
.rotate-slight-left {
    transform: rotate(-3deg);
}

.rotate-slight-right {
    transform: rotate(5deg);
}

/* ===== ASYMMETRIC CARD ENTRANCE ===== */
@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    70% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
