/* Custom styles for Newtec Windows & Doors */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060B1C;
}
::-webkit-scrollbar-thumb {
    background: #142E58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #48BB78;
}

/* Hero geometric animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(12deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-15px) rotate(-6deg); }
}
@keyframes float3 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-geo:nth-child(1) { animation: float1 8s ease-in-out infinite; }
.hero-geo:nth-child(2) { animation: float2 6s ease-in-out infinite; }
.hero-geo:nth-child(3) { animation: float1 10s ease-in-out infinite; }
.hero-geo:nth-child(4) { animation: float2 7s ease-in-out infinite; }

/* Service card hover */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #48BB78, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 3px 3px 0 0;
}
.service-card:hover::before {
    opacity: 1;
}

/* Gallery items */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}
.gallery-item:hover::after {
    border-color: rgba(72, 187, 120, 0.3);
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* Navbar background on scroll */
.navbar-scrolled {
    background: rgba(6, 11, 28, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Selection color */
::selection {
    background: rgba(72, 187, 120, 0.3);
    color: white;
}

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

/* Prefers 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;
    }
}
