/* Custom animations and styles for Neuro Care Solutions */

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

/* Brain Logo Animations */
.brain-logo-container {
    display: inline-block;
}

.brain-logo {
    transition: transform 0.3s ease-in-out;
}

.brain-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.brain-path {
    animation: brainPulse 3s ease-in-out infinite;
}

.brain-neuron {
    animation: neuronFlicker 2s ease-in-out infinite;
}

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

@keyframes neuronFlicker {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Animated Brain at Top */
.animated-brain-container {
    animation: floatBrain 6s ease-in-out infinite;
}

.animated-brain {
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.3));
}

.brain-main {
    animation: brainMainPulse 4s ease-in-out infinite;
}

.neuron {
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.pulse-1 {
    animation-name: neuronPulse1;
    animation-delay: 0s;
}

.pulse-2 {
    animation-name: neuronPulse2;
    animation-delay: 0.7s;
}

.pulse-3 {
    animation-name: neuronPulse3;
    animation-delay: 1.4s;
}

.connection {
    animation: connectionFlow 3s ease-in-out infinite;
}

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

@keyframes brainMainPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes neuronPulse1 {
    0%, 100% {
        r: 3;
        opacity: 0.8;
    }
    50% {
        r: 4;
        opacity: 1;
    }
}

@keyframes neuronPulse2 {
    0%, 100% {
        r: 2.5;
        opacity: 0.6;
    }
    50% {
        r: 3.5;
        opacity: 1;
    }
}

@keyframes neuronPulse3 {
    0%, 100% {
        r: 3;
        opacity: 0.8;
    }
    50% {
        r: 4;
        opacity: 1;
    }
}

@keyframes connectionFlow {
    0%, 100% {
        opacity: 0.3;
        stroke-width: 1;
    }
    50% {
        opacity: 0.8;
        stroke-width: 2;
    }
}

/* Understanding Brain Graphics */
.understanding-brain-graphics {
    margin: 2rem 0;
}

.brain-understanding-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brain-waves-animation {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.brain-wave {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: waveFlow 4s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
}

.wave-2 {
    animation-delay: 0.5s;
}

.wave-3 {
    animation-delay: 1s;
}

@keyframes waveFlow {
    0% {
        stroke-dashoffset: 300;
        opacity: 0;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: -300;
        opacity: 0;
    }
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

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

.animate-pulse-hover:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Custom gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Card hover effects */
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease-in-out;
}

/* Button hover effects */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease-in-out;
}

/* Hero section styling */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
    opacity: 0.5;
    z-index: -1;
}

/* Team section image styling */
.team-image {
    transition: transform 0.3s ease-in-out;
}

.team-image:hover {
    transform: scale(1.05);
}

/* Service icons */
.service-icon {
    transition: all 0.3s ease-in-out;
}

.service-icon:hover {
    transform: scale(1.1);
    color: #3b82f6;
}

/* Modal styling */
.modal-box {
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Contact form styling */
.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Navigation styling */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Footer styling */
.footer {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .animated-brain-container {
        top: 5px;
    }
    
    .animated-brain {
        width: 150px;
        height: 150px;
    }
    
    .brain-waves-animation svg {
        width: 250px;
        height: 80px;
    }
}

/* Loading animation for images */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Brain meter section styling */
#brain-meter {
    position: relative;
}

#brain-meter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="brain-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%233b82f6" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23brain-pattern)"/></svg>') repeat;
    opacity: 0.3;
    z-index: -1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .modal {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
}