/* Custom Styles for Midway Construction Inc. */

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #115e59;
}

/* Selection Color */
::selection {
    background: #0f766e;
    color: white;
}

/* Navbar Transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Service Card Hover Effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #0f766e, #14b8a6);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* Testimonial Quote Mark */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 80px;
    color: rgba(15, 118, 110, 0.1);
    line-height: 1;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger Children */
.stagger-children .scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .scroll-reveal:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .scroll-reveal:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .scroll-reveal:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .scroll-reveal:nth-child(5) { transition-delay: 0.5s; }
.stagger-children .scroll-reveal:nth-child(6) { transition-delay: 0.6s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card:hover {
        transform: none;
    }
    .service-card::before {
        height: 4px;
    }
    img {
        transition: none;
    }
}

/* Form Focus Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image Loading Placeholder */
img {
    background-color: #e2e8f0;
}

/* Print Styles */
@media print {
    nav, #contact-form, .scroll-indicator {
        display: none !important;
    }
    body {
        color: #000;
        background: white;
    }
    .bg-slate-900, .bg-teal-700 {
        background: #334155 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
