/* Nine To Pipe Co. Custom Styles */

/* Custom CSS Variables */
:root {
    --primary-teal: #2c5f5d;
    --secondary-teal: #3a7572;
    --primary-navy: #0B1E46;
    --secondary-navy: #0B1E46;
    --accent-orange: #c0592b;
    --emergency-red: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f5f4f0;
    --bg-cream: #ede8df;
}

/* Custom Font Loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

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

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 95, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 95, 93, 0.4);
}

.btn-emergency {
    background: linear-gradient(135deg, var(--emergency-red), #b91c1c);
    animation: pulse-emergency 2s infinite;
}

@keyframes pulse-emergency {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hero Section Enhancements */
.hero-bg {
    background: linear-gradient(135deg, #1a3c3c 0%, #2c5f5d 50%, #0a1a1a 100%);
    position: relative;
    overflow: hidden;
    min-height: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: none !important;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 2px, transparent 2px);
    background-size: 50px 50px, 80px 80px, 30px 30px;
    opacity: 0.4;
    z-index: 1;
}

.hero-bg .container {
    position: relative;
    z-index: 2;
}

/* Enhanced Hero Text */
.hero-text {
    font-size: 2.8em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: none !important;
}

.hero-subtitle {
    font-size: 1.4em;
    font-weight: 500;
    color: #f0f9ff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    animation: none !important;
}

/* Enhanced Logo Styles */
.enhanced-logo {
    width: 150px;
    height: auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 15px;
    transition: all 0.3s ease;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.enhanced-logo:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 60px rgba(255, 255, 255, 0.6);
}

/* Navigation Logo Enhancement */
.nav-logo {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.nav-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

/* Footer Logo Enhancement - Same shadow styling as nav logo */
.enhanced-footer-logo {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.enhanced-footer-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoGlow {
    from {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
    }
    to {
        box-shadow: 0 0 25px rgba(255, 255, 255, 1), 0 0 50px rgba(255, 255, 255, 0.6);
    }
}

/* Enhanced Buttons */
.hero-buttons {
    animation: none !important;
}

/* Services Section Animation */
.services-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.services-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
}

.slide {
    display: none;
    animation: fadeIn 0.8s ease-in-out;
}

.slide.active {
    display: block;
}

.slide img {
    transition: transform 0.3s ease;
}

.slideshow-container:hover .slide img {
    transform: scale(1.02);
}

/* Slideshow Navigation Buttons */
.prev, .next {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
}

/* Dots indicators */
.dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.2);
}

.dot:hover {
    transform: scale(1.1);
}

/* Slideshow responsive design */
@media (max-width: 768px) {
    .slide img {
        height: 250px;
    }
    
    .slide .absolute {
        bottom: 2px;
        left: 2px;
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .slide h3 {
        font-size: 1rem;
    }
    
    .prev, .next {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .slide img {
        height: 200px;
    }
    
    .prev, .next {
        width: 35px;
        height: 35px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* Lightbox Styles */
.lightbox-overlay {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.lightbox-container {
    animation: slideInUp 0.3s ease;
}

.lightbox-close {
    z-index: 100;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(220, 38, 38, 0.8);
    transform: scale(1.1);
}

#lightboxImage {
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-prev, .lightbox-next {
    transition: all 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
    transform: translateY(-50%) scale(1.2);
}

.lightbox-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

/* Remove all caption text from photo galleries/lightboxes */
.lightbox-info,
#lightboxTitle,
#lightboxDescription,
#lightboxCounter {
    display: none !important;
}

/* Lightbox responsive design */
@media (max-width: 768px) {
    .lightbox-container {
        padding: 10px;
    }
    
    #lightboxImage {
        max-height: 70vh;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        font-size: 18px;
    }
    
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-info {
        padding: 15px;
    }
    
    #lightboxTitle {
        font-size: 18px;
    }
    
    #lightboxDescription {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-info {
        padding: 10px;
        font-size: 11px;
    }
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: #0B1E46;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Emergency Banner Animation */
.emergency-banner {
    background: linear-gradient(90deg, var(--emergency-red), #ef4444, var(--emergency-red));
    background-size: 200% 100%;
    animation: emergency-glow 3s ease-in-out infinite;
}

@keyframes emergency-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Transparent Header Styles */
header {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.15) 15%, 
        rgba(11, 30, 70, 0.85) 40%, 
        rgba(11, 30, 70, 0.9) 70%, 
        rgba(11, 30, 70, 0.95) 100%) !important;
    background-size: 200% 200%;
    animation: diamond-shift 8s ease-in-out infinite;
    transition: all 0.3s ease;
}

header:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 15%, 
        rgba(11, 30, 70, 0.9) 40%, 
        rgba(11, 30, 70, 0.95) 70%, 
        rgba(11, 30, 70, 1) 100%) !important;
    background-size: 200% 200%;
}

@keyframes diamond-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

.group:hover .group-hover\:rotate-180 {
    transform: rotate(180deg);
}

/* Dropdown positioning and animation */
nav .group > div {
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

nav .group:hover > div {
    transform: translateY(0);
}

/* Dropdown item hover effects - only apply to dropdown items, not main nav links */
nav .group > div a:hover {
    background-color: rgba(56, 178, 172, 0.1);
    color: #2c5f5d;
    transform: translateX(5px);
}

/* Form Enhancements */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: var(--secondary-teal);
    box-shadow: 0 0 0 3px rgba(58, 117, 114, 0.1);
    outline: none;
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--secondary-teal);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Contact Info Icons */
.contact-icon {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
    transition: all 0.3s ease;
}

.contact-icon:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 20px rgba(44, 95, 93, 0.3);
}

/* Loading Animation for HouseCall Pro Widget */
.booking-widget-placeholder {
    position: relative;
    min-height: 400px;
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Menu Animation */
.mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-20px);
    opacity: 0;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-teal);
    transform: translateY(-3px);
}

/* Emergency Call Button Styles */
.emergency-call-btn {
    background: linear-gradient(135deg, var(--emergency-red), #b91c1c);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    animation: emergency-pulse 3s infinite;
}

@keyframes emergency-pulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6);
    }
}

/* Logo Styles */
.logo-img {
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Service Card Enhancements */
.service-card-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--secondary-teal);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.2em !important;
    }
    
    .hero-subtitle {
        font-size: 1.1em !important;
    }
    
    .enhanced-logo {
        width: 120px !important;
    }
    
    .service-grid {
        grid-template-columns: 1fr !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Mobile dropdown adjustments */
    nav .group > div {
        position: static;
        box-shadow: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

@media (max-width: 640px) {
    .hero-text {
        font-size: 1.8em !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1em !important;
    }
    
    .enhanced-logo {
        width: 100px !important;
        padding: 10px !important;
    }
    
    .nav-logo {
        height: 60px !important;
    }
    
    .section-padding {
        padding: 3rem 1rem !important;
    }
    
    .emergency-banner {
        font-size: 0.875rem;
    }
    
    /* Reduce animation intensity on mobile */
    .hero-bg {
        animation: fadeIn 0.8s ease-in;
    }
    
    .hero-text, .hero-subtitle, .hero-buttons {
        animation-duration: 0.6s;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .bg-blue-900,
    .bg-blue-600,
    .bg-red-600 {
        color: black !important;
        background: white !important;
        border: 1px solid black !important;
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.focus-ring:focus {
    outline: 2px solid var(--secondary-teal);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid currentColor;
    }
    
    .btn-primary,
    .btn-emergency {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-teal);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-teal);
}

/* Utility Classes */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-plumber {
    box-shadow: 0 10px 25px rgba(44, 95, 93, 0.1);
}

.border-plumber {
    border-color: var(--secondary-teal);
}

.text-plumber-teal {
    color: var(--secondary-teal);
}

.bg-plumber-teal {
    background-color: var(--primary-teal);
}

/* Custom Blue Color Overrides */
.bg-blue-900,
.hover\:bg-blue-800:hover {
    background-color: #0B1E46 !important;
}

/* Specific footer styling */
footer.bg-blue-900 {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 15%, 
        #0B1E46 40%, 
        #0B1E46 70%, 
        #0B1E46 100%) !important;
    background-size: 200% 200%;
    animation: diamond-shift 8s ease-in-out infinite;
}

.bg-blue-600 {
    background-color: #0B1E46 !important;
}

.bg-blue-200 {
    background-color: rgba(11, 30, 70, 0.2) !important;
}

.bg-blue-50 {
    background-color: rgba(11, 30, 70, 0.05) !important;
}

.text-blue-900 {
    color: #0B1E46 !important;
}

.text-blue-200 {
    color: white !important;
}

.border-blue-200 {
    border-color: rgba(11, 30, 70, 0.2) !important;
}

.border-blue-700 {
    border-color: rgba(11, 30, 70, 0.8) !important;
}

.hover\:bg-blue-50:hover {
    background-color: rgba(11, 30, 70, 0.05) !important;
}

.hover\:text-blue-900:hover {
    color: #0B1E46 !important;
}

/* Footer Specific Styles */
footer .text-blue-200 {
    color: white !important;
}

footer .text-blue-200 p {
    color: white !important;
}

footer .text-blue-200 p:hover {
    color: #c0592b !important;
}

footer ul.text-blue-200 li {
    color: white !important;
}

footer ul.text-blue-200 li a {
    color: white !important;
    transition: color 0.3s ease;
}

footer ul.text-blue-200 li a:hover {
    color: #c0592b !important;
}

footer .text-center.text-blue-200 {
    color: white !important;
}

footer .text-center.text-blue-200 a {
    color: white !important;
    transition: color 0.3s ease;
}

footer .text-center.text-blue-200 a:hover {
    color: #c0592b !important;
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
} 

/* Housecall Pro Booking Button - Global Style */
.hcp-button {
    background-color: #f97316 !important; /* orange-500 */
    color: #ffffff !important;
    border-color: #f97316 !important;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.hcp-button:hover {
    background-color: #fb923c !important; /* orange-400 */
}

/* Preserve layout for header/nav CTA */
header .hcp-button,
nav .hcp-button {
    display: inline-flex;
    width: auto;
    margin: 0;
}

/* Keep mobile menu buttons full width */
.mobile-menu .hcp-button {
    width: 100% !important;
    display: block;
    margin: 0;
}

/* Icon spacing inside booking buttons */
.hcp-button i {
    margin-right: 0.5rem;
}