/* Custom CSS for Bangalore RO Services */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Ensure container responsiveness */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Fix header positioning */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Gallery hover effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f4f6;
}

.gallery-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

/* Lightbox styles */
#lightbox {
    backdrop-filter: blur(5px);
}

/* Custom button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Hero section parallax effect */
.hero-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Ensure hero section is properly sized */
#home {
    min-height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fix image loading and sizing */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Service cards proper sizing */
.service-card {
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

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

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* WhatsApp float button animation */
.whatsapp-float {
    animation: pulse 2s infinite;
}

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

/* Mobile menu transition */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Reviews section styling */
.review-card {
    transition: all 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

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

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1.25rem;
    }
}

/* Form validation styles */
.form-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.form-success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading states */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Fade-in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Service area hover effects */
.service-area-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-area-item:hover {
    background-color: #dbeafe;
    transform: translateY(-2px);
}

/* Header shadow on scroll */
.header-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Contact section styling */
.contact-info-item {
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    transform: translateX(10px);
}

/* Footer styling improvements */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #60a5fa;
}

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

/* Additional utility classes for better styling */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

/* Grid responsiveness improvements */
@media (max-width: 640px) {
    .grid {
        gap: 1rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Form styling improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Section spacing fixes */
section {
    padding: 4rem 0;
}

/* Mobile menu improvements */
#mobile-menu {
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Ensure proper text rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix any potential layout shifts */
.fixed {
    position: fixed !important;
}

.relative {
    position: relative !important;
}

.absolute {
    position: absolute !important;
}

/* Button hover states */
.bg-blue-600:hover {
    background-color: #1d4ed8 !important;
}

.bg-green-500:hover {
    background-color: #059669 !important;
}

.bg-orange-500:hover {
    background-color: #d97706 !important;
}

/* Mobile bottom action bar */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* Add space for fixed bottom bar */
    }
}

/* Scroll to top button */
#scroll-to-top {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile action buttons */
.mobile-action-bar a {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Hide scroll to top on mobile when action bar is visible */
@media (max-width: 768px) {
    #scroll-to-top {
        bottom: 100px; /* Move above the mobile action bar */
    }
}
