/* ============================================
   Castro DDS — Custom Styles
   Plum + Amber · Bold Editorial
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5fb;
}
::-webkit-scrollbar-thumb {
    background: #ce93c8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855a0;
}

/* Selection color */
::selection {
    background: #D4A017;
    color: #2a0a2c;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 245, 251, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #2a0a2c;
}

#navbar.scrolled .nav-logo-sub {
    color: #7B2D8E;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #5c1f64;
}

#navbar.scrolled .nav-link:hover {
    color: #D4A017;
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

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

.mobile-link {
    position: relative;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #D4A017;
    padding-left: 8px;
}

/* ============================================
   Hero floating cards
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D8E, #D4A017);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* ============================================
   Scroll reveal animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Fallback: ensure content is always visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Form styles
   ============================================ */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.1);
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .service-card {
        padding: 2rem !important;
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar,
    #mobileMenu,
    .animate-float,
    .animate-float-delayed {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
    }
}
