/* Custom styles for Gastroenterology Specialists */

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

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

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

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Selection color */
::selection {
    background-color: #10b981;
    color: white;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Animation for mobile menu */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Hover effects for cards */
.group:hover .group-hover\:bg-emerald-600 {
    background-color: #059669;
}

.group:hover .group-hover\:text-white {
    color: #ffffff;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Fade in animation for scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-emerald-100 {
        border-color: #047857;
    }
    
    .text-emerald-800\/60 {
        color: #064e3b;
    }
}

/* Dark mode support (if system preference is set) */
@media (prefers-color-scheme: dark) {
    /* These will be overridden by Tailwind's dark mode classes if needed */
}

/* Tablet and desktop optimizations */
@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
        line-height: 1.1;
    }
    
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Large desktop optimizations */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
    
    .grid-services {
        gap: 2rem;
    }
}

/* Accessibility: Focus visible */
:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Loading state for buttons */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift */
img, video, canvas, svg {
    display: block;
}

/* Better form styling */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* Smooth transitions for interactive elements */
a, button, input, select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}
