/* Custom Styles for RxEngage Marketing Site */

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

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

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) translateX(20px) rotate(1deg);
    }
    66% {
        transform: translateY(-20px) translateX(-10px) rotate(-1deg);
    }
}

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

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

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

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

/* Gradient text animation */
.animate-gradient {
    background-size: 300% 300%;
    animation: gradient 8s ease infinite;
}

.bg-300\% {
    background-size: 300% 300%;
}

/* Initial state for elements that will fade in */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* When element is ready to animate */
.fade-in-section.animate-fadeIn {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback for CSS animation */
.animate-fadeIn-keyframes {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

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

/* Navigation styles */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Hover effects for cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Feature icon hover */
.feature-icon {
    transition: all 0.3s ease;
}

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

/* Mobile menu styles */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Metric counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    display: inline-block;
}

/* Testimonial quote styling */
blockquote {
    position: relative;
}

/* Loading animation for async content */
.loading-shimmer {
    animation: shimmer 2s linear infinite;
    background: linear-gradient(to right, #f0f0f0 0%, #f8f8f8 20%, #f0f0f0 40%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* Card hover states */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(12px)) {
    .backdrop-blur-md {
        backdrop-filter: blur(12px);
    }
    .backdrop-blur-lg {
        backdrop-filter: blur(16px);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #0092ca, #e11d48);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #006d97, #be123c);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-7xl {
        font-size: 3rem;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
    
    .text-5xl {
        font-size: 2rem;
    }
    
    blockquote::before {
        font-size: 40px;
        top: -10px;
        left: -10px;
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
    
    .bg-rx-primary {
        background-color: transparent !important;
        color: black !important;
        border: 1px solid black;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

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

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0092ca;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-rx-gray-light {
        background-color: #f9f9f9;
    }
    
    .text-gray-600 {
        color: #333;
    }
    
    .border-rx-gray-medium {
        border-color: #666;
    }
}

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

/* Glass morphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Glow effects */
.glow {
    box-shadow: 0 0 20px rgba(0, 146, 202, 0.3);
}

.glow-lg {
    box-shadow: 0 0 40px rgba(0, 146, 202, 0.4);
}

/* Interactive elements */
.interactive {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive:hover {
    transform: translateY(-2px);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

/* Rose accent hover states */
.rose-accent-hover {
    transition: all 0.3s ease;
}

.rose-accent-hover:hover {
    border-color: rgb(225, 29, 72);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

/* Rose gradient text */
.text-gradient-rose {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Feature card decorations */
.feature-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

/* Modern input styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0092ca;
    box-shadow: 0 0 0 3px rgba(0, 146, 202, 0.1);
}

/* Overflow gradient masks */
.overflow-fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.overflow-fade-right {
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

/* Custom utilities */
.text-balance {
    text-wrap: balance;
}

.will-change-transform {
    will-change: transform;
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Product showcase styles */
.product-tab-content {
    transition: opacity 0.3s ease-in-out;
}

.product-tab-content:not(.active) {
    display: none;
}

/* Image loading optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Ensure screenshots look crisp */
.product-tab-content img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Lightbox image styles */
#lightbox img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Dark mode preparation (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}