/* ============================================
   Dr. Peter Evans DPM — Custom Styles
   Classic & Elegant Podiatric Practice
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(212, 168, 67, 0.3);
    color: #2a1332;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2a1332;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4A843;
}

/* --- Navbar Transition --- */
.nav-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #3d3730 !important;
}

#navbar.scrolled .menu-line {
    background-color: #3d3730 !important;
}

/* --- Hero Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 67, 0.2); }
    50% { box-shadow: 0 0 40px rgba(212, 168, 67, 0.4); }
}

.animate-bounce-slow {
    animation: float 3s ease-in-out infinite;
}

/* --- 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, #5B2C6F, #D4A843);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Mobile Menu --- */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.active {
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Mobile Menu Button --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
}

/* --- Decorative Divider --- */
.divider-accent {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.divider-accent::before,
.divider-accent::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4A843, transparent);
}

/* --- Print Styles --- */
@media print {
    header, footer, #contact, .service-card::before {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}

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

/* --- Select Arrow --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4A843' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
