/* Custom CSS for additional styling and animations */

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

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

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

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1s ease-in-out;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

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

/* Fix for Customer Service comparison section layout */
.customer-service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    justify-items: center;
}

@media (min-width: 1024px) {
    .customer-service-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Pricing Matrix Styles */
.home-size-card.selected,
.brand-card.selected,
.package-card.selected {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.home-size-card:hover,
.brand-card:hover,
.package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pricing-step {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pricing-step.active {
    opacity: 1;
    pointer-events: auto;
}

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

::-webkit-scrollbar-thumb {
    background: #1E40AF;
    border-radius: 4px;
}

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

/* Focus states for accessibility */
.keyboard-navigation *:focus {
    outline: 2px solid #EA580C;
    outline-offset: 2px;
}

/* Screen reader only content */
.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\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Service card enhancements */
#services .grid > div {
    transition: all 0.3s ease;
    cursor: pointer;
}

#services .grid > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Emergency banner pulse effect */
.emergency-banner {
    animation: pulse-orange 2s ease-in-out infinite;
}

@keyframes pulse-orange {
    0%, 100% {
        background-color: #EA580C;
    }
    50% {
        background-color: #DC2626;
    }
}

/* Modal animations */
#ai-chat-modal {
    backdrop-filter: blur(4px);
}

#ai-chat-modal > div {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Form enhancements */
form input:focus,
form select:focus,
form textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    border-color: #1E40AF;
}

/* Button hover effects */
button,
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* CTA button special effects */
.cta-button {
    background: linear-gradient(45deg, #EA580C, #DC2626);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Image lazy loading placeholder */
img.lazy {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    .no-print,
    header,
    footer,
    #ai-chat-modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .hero-text {
        font-size: 2rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .bg-gray-50 {
        background: white;
    }
    
    .text-gray-600 {
        color: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.glass-effect {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.gradient-text {
    background: linear-gradient(45deg, #1E40AF, #EA580C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Service area styling */
.service-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

/* Contact form improvements */
.form-group {
    position: relative;
}

.form-label {
    transition: all 0.3s ease;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-20px) scale(0.8);
    color: #1E40AF;
}

/* Loading skeleton for future use */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.skeleton-heading {
    height: 2rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* Intersection observer fade-in */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom checkbox and radio styles */
.custom-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #1E40AF;
    border-radius: 0.25rem;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background-color: #1E40AF;
}

.custom-checkbox:checked::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
}

/* Responsive text scaling */
@media (max-width: 640px) {
    .responsive-text-4xl {
        font-size: 2rem;
    }
    
    .responsive-text-2xl {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-text-4xl {
        font-size: 2.25rem;
    }
    
    .responsive-text-2xl {
        font-size: 1.875rem;
    }
}

@media (min-width: 1024px) {
    .responsive-text-4xl {
        font-size: 3rem;
    }
    
    .responsive-text-2xl {
        font-size: 2.25rem;
    }
}
