/* Custom styles for UC Davis Pediatric Critical Care */

/* Ensure all text has proper contrast */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Custom selection color */
::selection {
    background-color: rgba(255, 107, 74, 0.3);
    color: white;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #FF6B4A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(17, 17, 17, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Card hover effects */
.group:hover .group-hover\:bg-coral-500\/20 {
    background-color: rgba(255, 107, 74, 0.2);
}

/* Subtle gradient for hero overlay */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(17, 17, 17, 0.4) 100%);
    pointer-events: none;
}

/* Ensure form inputs have proper text color */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Animation for mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* Print styles */
@media print {
    nav, button, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
