Spaces:
Running
Running
/* Enhanced animations and visual effects for TN Medical Connect */ | |
/* Fade in animations */ | |
.fade-in { | |
opacity: 0; | |
animation: fadeIn 0.8s ease-in forwards; | |
} | |
.fade-in-up { | |
opacity: 0; | |
transform: translateY(20px); | |
animation: fadeInUp 0.8s ease-out forwards; | |
} | |
.fade-in-left { | |
opacity: 0; | |
transform: translateX(-20px); | |
animation: fadeInLeft 0.8s ease-out forwards; | |
} | |
.fade-in-right { | |
opacity: 0; | |
transform: translateX(20px); | |
animation: fadeInRight 0.8s ease-out forwards; | |
} | |
/* Staggered animations for multiple elements */ | |
.stagger-fade-in > * { | |
opacity: 0; | |
animation: fadeIn 0.5s ease-out forwards; | |
} | |
.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; } | |
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; } | |
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; } | |
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; } | |
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; } | |
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.6s; } | |
/* Pulse animation for attention-grabbing elements */ | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
/* Button hover effects */ | |
.btn-hover-effect { | |
transition: all 0.3s ease; | |
position: relative; | |
overflow: hidden; | |
z-index: 1; | |
} | |
.btn-hover-effect:after { | |
content: ''; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background-color: rgba(255, 255, 255, 0.1); | |
z-index: -2; | |
} | |
.btn-hover-effect:before { | |
content: ''; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
width: 0%; | |
height: 100%; | |
background-color: rgba(255, 255, 255, 0.2); | |
transition: all 0.3s; | |
z-index: -1; | |
} | |
.btn-hover-effect:hover:before { | |
width: 100%; | |
} | |
/* Grow on hover effect for cards */ | |
.grow-on-hover { | |
transition: all 0.3s ease; | |
} | |
.grow-on-hover:hover { | |
transform: scale(1.03); | |
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
} | |
/* Interactive card flipping effect */ | |
.flip-card { | |
perspective: 1000px; | |
background-color: transparent; | |
width: 100%; | |
height: 250px; | |
} | |
.flip-card-inner { | |
position: relative; | |
width: 100%; | |
height: 100%; | |
text-align: center; | |
transition: transform 0.6s; | |
transform-style: preserve-3d; | |
} | |
.flip-card:hover .flip-card-inner { | |
transform: rotateY(180deg); | |
} | |
.flip-card-front, .flip-card-back { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
backface-visibility: hidden; | |
border-radius: 0.5rem; | |
} | |
.flip-card-front { | |
background-color: #f0f9ff; | |
color: #1e40af; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
padding: 1.5rem; | |
} | |
.flip-card-back { | |
background-color: #1e40af; | |
color: white; | |
transform: rotateY(180deg); | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
padding: 1.5rem; | |
} | |
/* Progress bars with animation */ | |
.progress-bar { | |
height: 8px; | |
background-color: #e5e7eb; | |
border-radius: 4px; | |
overflow: hidden; | |
} | |
.progress-bar-fill { | |
height: 100%; | |
border-radius: 4px; | |
background-color: #38b2ac; | |
transition: width 1s ease-in-out; | |
} | |
/* Highlighted call-to-action with pulsing glow */ | |
.cta-highlight { | |
position: relative; | |
} | |
.cta-highlight::after { | |
content: ''; | |
position: absolute; | |
top: -5px; | |
left: -5px; | |
right: -5px; | |
bottom: -5px; | |
border-radius: inherit; | |
border: 2px solid #38b2ac; | |
animation: pulseBorder 2s infinite; | |
pointer-events: none; | |
} | |
/* Timeline design for sequential information */ | |
.timeline { | |
position: relative; | |
max-width: 1200px; | |
margin: 0 auto; | |
} | |
.timeline::after { | |
content: ''; | |
position: absolute; | |
width: 2px; | |
background-color: #38b2ac; | |
top: 0; | |
bottom: 0; | |
left: 50%; | |
margin-left: -1px; | |
} | |
.timeline-container { | |
padding: 10px 40px; | |
position: relative; | |
background-color: inherit; | |
width: calc(50% - 40px); | |
} | |
.timeline-container::after { | |
content: ''; | |
position: absolute; | |
width: 16px; | |
height: 16px; | |
right: -8px; | |
background-color: white; | |
border: 2px solid #38b2ac; | |
top: 15px; | |
border-radius: 50%; | |
z-index: 1; | |
} | |
.timeline-left { | |
left: 0; | |
} | |
.timeline-right { | |
left: 50%; | |
} | |
.timeline-left::after { | |
right: -8px; | |
} | |
.timeline-right::after { | |
left: -8px; | |
} | |
.timeline-content { | |
padding: 20px; | |
background-color: white; | |
position: relative; | |
border-radius: 6px; | |
box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |
} | |
/* Keyframes definitions */ | |
@keyframes fadeIn { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@keyframes fadeInUp { | |
from { | |
opacity: 0; | |
transform: translateY(20px); | |
} | |
to { | |
opacity: 1; | |
transform: translateY(0); | |
} | |
} | |
@keyframes fadeInLeft { | |
from { | |
opacity: 0; | |
transform: translateX(-20px); | |
} | |
to { | |
opacity: 1; | |
transform: translateX(0); | |
} | |
} | |
@keyframes fadeInRight { | |
from { | |
opacity: 0; | |
transform: translateX(20px); | |
} | |
to { | |
opacity: 1; | |
transform: translateX(0); | |
} | |
} | |
@keyframes pulse { | |
0% { | |
transform: scale(1); | |
} | |
50% { | |
transform: scale(1.05); | |
} | |
100% { | |
transform: scale(1); | |
} | |
} | |
@keyframes pulseBorder { | |
0% { | |
opacity: 0.7; | |
} | |
50% { | |
opacity: 0.3; | |
} | |
100% { | |
opacity: 0.7; | |
} | |
} | |
/* Modern toggle switch */ | |
.toggle-switch { | |
position: relative; | |
display: inline-block; | |
width: 52px; | |
height: 26px; | |
} | |
.toggle-switch input { | |
opacity: 0; | |
width: 0; | |
height: 0; | |
} | |
.toggle-slider { | |
position: absolute; | |
cursor: pointer; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background-color: #ccc; | |
transition: .4s; | |
border-radius: 26px; | |
} | |
.toggle-slider:before { | |
position: absolute; | |
content: ""; | |
height: 18px; | |
width: 18px; | |
left: 4px; | |
bottom: 4px; | |
background-color: white; | |
transition: .4s; | |
border-radius: 50%; | |
} | |
input:checked + .toggle-slider { | |
background-color: #38b2ac; | |
} | |
input:checked + .toggle-slider:before { | |
transform: translateX(26px); | |
} | |
/* Custom scrollbar */ | |
::-webkit-scrollbar { | |
width: 8px; | |
height: 8px; | |
} | |
::-webkit-scrollbar-track { | |
background: rgba(0,0,0,0.05); | |
border-radius: 10px; | |
} | |
::-webkit-scrollbar-thumb { | |
background: rgba(56, 178, 172, 0.5); | |
border-radius: 10px; | |
} | |
::-webkit-scrollbar-thumb:hover { | |
background: rgba(56, 178, 172, 0.7); | |
} | |
/* Dark mode styles */ | |
.dark-mode { | |
background-color: #121e2d; | |
color: #e5e7eb; | |
} | |
.dark-mode .bg-white { | |
background-color: #1f2937; | |
} | |
.dark-mode .text-gray-800 { | |
color: #f3f4f6; | |
} | |
.dark-mode .text-gray-600, | |
.dark-mode .text-gray-700 { | |
color: #d1d5db; | |
} | |
.dark-mode .border-gray-200, | |
.dark-mode .border-gray-100 { | |
border-color: #374151; | |
} | |
.dark-mode .bg-gray-50 { | |
background-color: #263240; | |
} | |
.dark-mode .bg-gray-100 { | |
background-color: #1f2937; | |
} | |
/* Testimonial carousel styles */ | |
.testimonial-carousel { | |
overflow: hidden; | |
position: relative; | |
} | |
.testimonial-track { | |
display: flex; | |
transition: transform 0.5s ease-in-out; | |
} | |
.testimonial-slide { | |
flex: 0 0 100%; | |
max-width: 100%; | |
padding: 20px; | |
box-sizing: border-box; | |
} | |
.testimonial-navigation { | |
display: flex; | |
justify-content: center; | |
margin-top: 20px; | |
} | |
.testimonial-dot { | |
width: 10px; | |
height: 10px; | |
border-radius: 50%; | |
background-color: #cbd5e0; | |
margin: 0 5px; | |
cursor: pointer; | |
} | |
.testimonial-dot.active { | |
background-color: #38b2ac; | |
} | |
/* Tooltip styles */ | |
.tooltip { | |
position: relative; | |
display: inline-block; | |
} | |
.tooltip .tooltip-text { | |
visibility: hidden; | |
width: 120px; | |
background-color: #1e40af; | |
color: #fff; | |
text-align: center; | |
border-radius: 6px; | |
padding: 5px; | |
position: absolute; | |
z-index: 1; | |
bottom: 125%; | |
left: 50%; | |
margin-left: -60px; | |
opacity: 0; | |
transition: opacity 0.3s; | |
} | |
.tooltip .tooltip-text::after { | |
content: ""; | |
position: absolute; | |
top: 100%; | |
left: 50%; | |
margin-left: -5px; | |
border-width: 5px; | |
border-style: solid; | |
border-color: #1e40af transparent transparent transparent; | |
} | |
.tooltip:hover .tooltip-text { | |
visibility: visible; | |
opacity: 1; | |
} | |
/* Interactive features for accessible UI */ | |
.focus-indicator:focus { | |
outline: none; | |
box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.5); | |
border-radius: 0.375rem; | |
} | |
/* Interactive stats counter */ | |
.counter-animation { | |
display: inline-block; | |
font-weight: bold; | |
} | |
/* === INTERSECTION-ACTIVATED ANIMATIONS === */ | |
/* Fade visibility when element comes into view */ | |
.fade-in, | |
.fade-in-up, | |
.fade-in-left, | |
.fade-in-right { | |
opacity: 0; | |
transform: translateY(20px); /* fallback default */ | |
transition: opacity 0.8s ease-out, transform 0.8s ease-out; | |
} | |
.visible { | |
opacity: 1 ; | |
transform: translateY(0) ; | |
} | |
/* Optional class if you want to use float-specific animation */ | |
.animate-float-in { | |
opacity: 0; | |
transform: translateY(15px); | |
animation: fadeInUp 0.8s ease-out forwards; | |
} | |
/* Delay utilities */ | |
.delay-100 { | |
animation-delay: 0.1s; | |
} | |
.delay-300 { | |
animation-delay: 0.3s; | |
} | |