/* Custom styles for Central Oregon Clock */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #b83252;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Selection color */
::selection {
    background: #b83252;
    color: #FDF8F5;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-10px) rotate(var(--rotate, 0deg)); }
}
.floating-card {
    animation: float 4s ease-in-out infinite;
}
.floating-card:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 5s;
}
.floating-card:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 4.5s;
}

/* Clock tick animation for decorative element */
@keyframes tick {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(6deg); }
}
.clock-hand {
    transform-origin: 16px 16px;
    animation: tick 2s ease-in-out infinite;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Service card hover effect */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

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

/* Ensure proper aspect ratios for images */
img {
    max-width: 100%;
    height: auto;
}

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