/* Custom styles for North Hills Auto Radiator */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0A1628;
}

::-webkit-scrollbar-thumb {
    background: #162A45;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1F3A5C;
}

/* Selection color */
::selection {
    background: rgba(110, 231, 183, 0.3);
    color: #F0FFF8;
}

/* Base animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 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; }
}

/* Fallback: ensure content is always visible if JS is disabled */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Hero specific */
#hero {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(5, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6EE7B7, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

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

/* Custom 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='%236EE7B7' 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;
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* Pulse animation for live indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #6EE7B7;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #6EE7B7 0%, #34D399 50%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Decorative line animation */
.service-card .w-8.h-px {
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form transitions */
#form-success {
    animation: fadeIn 0.4s ease forwards;
}

/* Print styles */
@media print {
    header, footer, #contact-form, #form-success {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* 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;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-white/50 {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .text-white/40 {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #6EE7B7;
    outline-offset: 2px;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}
