/* Custom Styles for Braintree's Lawn & Window Services */

:root {
    --emerald-50: #f0fdf4;
    --emerald-500: #22c55e;
    --emerald-600: #16a34a;
    --emerald-700: #15803d;
    --emerald-900: #064e3b;
}

/* Typography - Professional Font Stack */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Enhanced animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: slideUp 0.6s ease-out forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }

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

.whatsapp-pulse {
    animation: pulse 2s infinite;
    position: relative;
}

/* WhatsApp notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: badgePulse 1.5s infinite;
}

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

/* Hover transitions */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card hover effects */
.card-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.1), transparent);
    transition: left 0.5s;
    z-index: 0;
}

.card-hover:hover::before {
    left: 100%;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.2);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(34, 197, 94, 0.1);
    border-top-color: #22c55e;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Logo styling with hover animation */
.logo-img {
    max-height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1) rotate(3deg);
    filter: brightness(1.1);
    cursor: pointer;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

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

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

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .mobile-menu {
        transition: max-height 0.3s ease-in-out;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
}

/* Accessibility improvements */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #22c55e;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown), 
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* FAQ accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.open {
    max-height: 1000px;
}

/* Before/After image comparison */
.before-after-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.image-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 100px;
    backdrop-filter: blur(8px);
}

.before-label {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.after-label {
    background: rgba(34, 197, 94, 0.95);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Service badge */
.service-badge {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Testimonial styles */
.testimonial {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

/* Map container - full size with no empty space */
.map-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: none;
}

/* Responsive map height */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }
}

/* Service checkbox styling */
.service-checkbox-label {
    transition: all 0.3s ease;
}

.service-checkbox-label:has(input:checked) {
    border-color: #22c55e !important;
    background-color: #f0fdf4;
}

.service-checkbox-label:hover {
    border-color: #86efac;
    background-color: #f0fdf4;
}

/* Price badge with glow animation */
.price-badge {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(34, 197, 94, 0.5); }
}

/* Trust badge animations */
.trust-badge svg {
    animation: rotateIn 0.6s ease-out;
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Gradient backgrounds */
.section-gradient {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #dcfce7 100%);
}

.hero-gradient {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}

/* Avatar circles for testimonials */
.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin: 0 auto 12px;
}

/* WhatsApp tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: 80px;
    bottom: 50%;
    transform: translateY(50%);
    background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 100;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #064e3b;
}

.whatsapp-float-wrapper {
    position: relative;
}

.whatsapp-float-wrapper:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(50%) translateX(-8px);
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Quick actions buttons */
.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
    color: #064e3b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-actions a:hover {
    background: #22c55e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Tooltip */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    margin-left: 6px;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #064e3b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    z-index: 1000;
    margin-bottom: 8px;
}

/* Social proof notification */
.social-proof-notification {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
    animation: slideInLeft 0.5s ease-out, slideOutLeft 0.5s ease-in 5s forwards;
    z-index: 50;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.social-proof-notification img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #22c55e;
}

/* Form validation states */
.input-valid {
    border-color: #22c55e !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%2322c55e'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.input-invalid {
    border-color: #ef4444 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%23ef4444'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Admin status badges */
.status-badge-pending { 
    background: #fef3c7; 
    color: #78350f; 
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-confirmed { 
    background: #d1fae5; 
    color: #064e3b;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-completed { 
    background: #dbeafe; 
    color: #1e3a8a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-cancelled { 
    background: #fee2e2; 
    color: #7f1d1d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Admin responsive table */
@media (max-width: 768px) {
    .responsive-table table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }
    
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        background: white;
    }
    
    .responsive-table td {
        text-align: left;
        padding: 8px 0;
        border: none;
    }
    
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 120px;
        color: #6b7280;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    z-index: 1000;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

