/* ============================================
   Classic Construction Roofing Division
   Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1342;
}
::-webkit-scrollbar-thumb {
    background: #f5a623;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ffd866;
}

/* Selection color */
::selection {
    background: #f5a623;
    color: #0d1342;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 19, 66, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Mobile menu animations */
.menu-line {
    transition: all 0.3s ease;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero-badge {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0); }
}

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* ============================================
   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, #1a237e, #f5a623);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Scroll-triggered animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .animate-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .animate-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #1a237e;
    color: #fff;
}

/* ============================================
   Mobile menu link hover
   ============================================ */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f5a623;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    nav, #contact, footer, .animate-on-scroll {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
