/* ============================================
   Dr. Goran Tubic — Medical Practice Website
   Custom Styles & Animations
   ============================================ */

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0e1522;
}
::-webkit-scrollbar-thumb {
    background: #253450;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #304568;
}

/* --- Floating Card Animations --- */
.floating-card {
    animation: floatCard 4s ease-in-out infinite;
}

.floating-card-delayed {
    animation: floatCard 4s ease-in-out infinite;
    animation-delay: 2s;
}

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

/* --- Service Card Hover --- */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s ease,
                background-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* --- Testimonial Card --- */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Navbar Scroll State --- */
.navbar-scrolled {
    background: rgba(14, 21, 34, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(37, 52, 80, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Menu Animation --- */
.mobile-menu-open .mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-open .mobile-menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .mobile-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5px;
}

/* --- Selection Color --- */
::selection {
    background: rgba(201, 154, 30, 0.3);
    color: #f4f6fb;
}

/* --- Focus Visible --- */
:focus-visible {
    outline: 2px solid rgba(201, 154, 30, 0.5);
    outline-offset: 2px;
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .floating-card,
    .floating-card-delayed {
        display: none;
    }
}

/* --- Print styles --- */
@media print {
    nav, #contact, .floating-card, .floating-card-delayed {
        display: none;
    }
    body {
        background: white;
        color: #1a253a;
    }
}
