/* ============================================
   Kidney Care Center - Hobbs | Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #fefdf8;
}

/* ============================================
   Navbar
   ============================================ */
.navbar-scrolled #navbar {
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #34d399, #10b981);
    transition: width 0.3s ease;
}

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

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

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #34d399;
    transition: width 0.3s ease;
}

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

/* Hamburger Animation */
#mobileMenuBtn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#mobileMenuBtn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#mobileMenuBtn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* ============================================
   Floating Cards Animation
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

.reveal[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

.reveal[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

.reveal[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

.reveal[data-reveal-delay="5"] {
    transition-delay: 0.5s;
}

.reveal[data-reveal-delay="6"] {
    transition-delay: 0.6s;
}

/* Reduced motion - content always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Progressive enhancement - JS adds animated state */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #059669, #047857);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #34d399, #059669);
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #111a15;
    color: #d1fae5;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(52, 211, 153, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* ============================================
   Back to Top
   ============================================ */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

#backToTop:not(.visible) {
    transform: translateY(10px);
}

#backToTop:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white !important;
        color: #1a1a1a !important;
    }
    
    nav, #backToTop, button {
        display: none !important;
    }
}
