/* ============================================
   Cooper and Thomas Oral Surgery — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(232, 115, 74, 0.2);
    color: #1a1a1a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #4f4f4f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e8734a;
}

/* Navigation */
.nav {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(13, 13, 13, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
#mobileMenu {
    max-height: 0;
}

#mobileMenu.open {
    max-height: 500px;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle-active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #e8734a, #d45a2f);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::after {
    width: 100%;
}

/* Scroll Reveal Animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Form Focus Styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Smooth anchor offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* Print Styles */
@media print {
    .nav, #menuToggle, .scroll-indicator {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
