/* Custom styles for Duluth Diabetes Center */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5EEF8;
}
::-webkit-scrollbar-thumb {
    background: #6B2D5B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5C264F;
}

/* Selection color */
::selection {
    background: #D4A574;
    color: #1A0B17;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #D4A574;
    outline-offset: 2px;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4A574;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations - progressive enhancement */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(107, 45, 91, 0.1);
}
.navbar-scrolled .nav-link {
    color: #3E1936 !important;
}
.navbar-scrolled .font-serif.text-lg {
    color: #3E1936 !important;
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* Card hover effects */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(107, 45, 91, 0.1);
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #F5EEF8 0%, #EAD7EE 100%);
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, #contact-form, .reveal-up, .reveal-left, .reveal-right {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    .bg-gradient-to-br {
        background: #6B2D5B !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Accessibility: high contrast mode support */
@media (forced-colors: active) {
    .bg-plum-600,
    .bg-plum-800,
    .bg-plum-900,
    .bg-plum-950 {
        border: 1px solid ButtonText;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif.text-4xl,
    .font-serif.text-5xl {
        line-height: 1.2;
    }
}

/* Loading animation for images */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
img[loading="lazy"] {
    background: linear-gradient(90deg, #F5EEF8 25%, #EAD7EE 50%, #F5EEF8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
img[loading="lazy"].loaded {
    animation: none;
    background: none;
}
