/* Custom Styles for Caligor Medical */

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

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

::-webkit-scrollbar-track {
    background: #0F1419;
}

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

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

/* Selection Color */
::selection {
    background: #C06C4B;
    color: #F5EDE6;
}

/* Body */
body {
    overflow-x: hidden;
}

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(15, 20, 25, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(192, 108, 75, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
}

.service-card:hover::before {
    opacity: 1;
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Back to Top Button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Fade In Animations (Progressive Enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default state - always visible for accessibility */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

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

/* Print Styles */
@media print {
    #navbar,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-caligor-dark,
    .bg-caligor-deep {
        background: white !important;
    }
    
    .text-caligor-sand-light,
    .text-caligor-sand {
        color: black !important;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .service-card,
    .rounded-2xl,
    .rounded-full {
        border: 2px solid ButtonText;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Loading State for Form */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Image Loading Placeholder */
img {
    background: linear-gradient(90deg, #1A232E 25%, #2C3E50 50%, #1A232E 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Aspect Ratio Utilities */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Utility for text gradient */
.text-gradient {
    background: linear-gradient(135deg, #C06C4B 0%, #C9A84C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
