/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22c55e, #2563eb);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #16a34a, #1d4ed8);
}

/* Modal Scrollbar - Thin and Subtle */
#enquiryModal ::-webkit-scrollbar {
    width: 5px;
}

#enquiryModal ::-webkit-scrollbar-track {
    background: transparent;
}

#enquiryModal ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#enquiryModal ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 197, 94, 0.8);
    }
}

/* Gradient Animation for Hero Sections */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-overlay {
    background: linear-gradient(270deg, rgba(34, 197, 94, 0.9), rgba(37, 99, 235, 0.85), rgba(16, 185, 129, 0.9));
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Scroll Animate - Visible by default, subtle animation on scroll */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animate-fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Background */
.parallax-bg {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Hero Section Gradient Overlays */
.gradient-overlay {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(37, 99, 235, 0.85) 100%);
}

.gradient-overlay-dark {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* CTA Buttons */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Icon Boxes */
.icon-box {
    position: relative;
    overflow: hidden;
}

.icon-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.icon-box:hover::after {
    opacity: 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #22c55e 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Hover Effects */
.image-hover-zoom {
    overflow: hidden;
}

.image-hover-zoom img {
    transition: transform 0.5s ease;
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Stats Counter */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, #22c55e, #2563eb) 1;
}

/* Timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #22c55e, #2563eb);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #22c55e;
}

/* Section Dividers */
.section-divider {
    height: 4px;
    width: 80px;
    background: linear-gradient(to right, #22c55e, #2563eb);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Floating Labels - Enhanced Form */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #22c55e;
}

/* Modal Backdrop Blur */
#enquiryModal {
    backdrop-filter: blur(8px);
    animation: modalBackdropFadeIn 0.3s ease-out;
    transition: opacity 0.3s ease-out;
    opacity: 0;
}

#enquiryModal:not(.hidden) {
    opacity: 1;
}

/* Modal Container Animation */
.modal-container {
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Form Input Focus Effects */
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.12);
}

.form-field {
    transition: all 0.2s ease;
}

.form-field label {
    font-size: 0.75rem;
    line-height: 1.25;
}

.form-field input,
.form-field textarea,
.form-field select {
    font-size: 0.875rem;
}

/* Modal Scrollbar Enhancement */
#enquiryModal .overflow-y-auto::-webkit-scrollbar {
    width: 5px;
}

#enquiryModal .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

#enquiryModal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22c55e, #2563eb);
    border-radius: 10px;
}

#enquiryModal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #16a34a, #1d4ed8);
}

/* Card Shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive Typography */
.text-responsive-xl {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.text-responsive-lg {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.text-responsive-md {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

/* Hero Background Pattern */
.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Testimonial Cards */
.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    position: relative;
    padding: 2rem;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: rgba(34, 197, 94, 0.2);
    font-family: Georgia, serif;
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #22c55e, transparent);
}

.process-step:last-child::after {
    display: none;
}

/* Feature Icon Background */
.feature-icon {
    background: linear-gradient(135deg, #22c55e 0%, #2563eb 100%);
    -webkit-mask: var(--icon-svg);
    mask: var(--icon-svg);
}

/* Hover Underline Effect */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #22c55e, #2563eb);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Grid Auto-fit */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Accessibility Improvements */
.focus-visible:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #22c55e;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .text-responsive-xl {
        line-height: 1.2;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
}

/* High Performance Transforms */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Intersection Observer Fade */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bottom Navigation Bar - Mobile Only */
@media (max-width: 767px) {
    body {
        padding-bottom: 60px; /* Space for bottom nav */
    }
}

/* Bottom Nav Animation */
.bottom-nav-item {
    transition: all 0.2s ease-in-out;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Hero Section Font Size Adjustments - Improved Viewport Fit */
section h1.text-4xl {
    font-size: 2rem !important; /* Reduced from 2.25rem */
}

@media (min-width: 768px) {
    section h1.md\:text-6xl {
        font-size: 3rem !important; /* Reduced from 3.75rem */
    }
}

section p.text-xl {
    font-size: 1.125rem !important; /* Reduced from 1.25rem */
}

@media (min-width: 768px) {
    section p.md\:text-2xl {
        font-size: 1.375rem !important; /* Reduced from 1.5rem */
    }
}

/* Floating Buttons - Consistent Sizing and Positioning */
/* Back to Top Button - Positioned to avoid overlap */
#backToTop {
    bottom: 150px !important; /* Moved up to avoid overlap */
    width: 3rem !important; /* 48px - consistent size */
    height: 3rem !important;
}

/* WhatsApp Floating Button - Adjusted size */
a[href^="https://wa.me"].fixed {
    width: 3rem !important; /* 48px - reduced from 64px */
    height: 3rem !important;
}

a[href^="https://wa.me"].fixed i {
    font-size: 1.5rem !important; /* Reduced icon size */
}

/* Call Floating Button - Adjusted size */
a[href^="tel:"].fixed {
    width: 3rem !important; /* 48px - matched to other buttons */
    height: 3rem !important;
    bottom: 90px !important; /* Adjusted spacing */
}

a[href^="tel:"].fixed i {
    font-size: 1.25rem !important; /* Adjusted icon size */
}

/* Modal Professional Shadow - Enhanced */
.modal-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 
                0 0 0 1px rgba(0, 0, 0, 0.05),
                0 10px 30px rgba(34, 197, 94, 0.1) !important;
}

/* Fix SVG Wave Divider - Remove Gap/Border */
section svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border: none !important;
    outline: none !important;
}

section svg path {
    stroke: none !important;
    border: none !important;
}

section .absolute.bottom-0 {
    line-height: 0 !important;
}

section.relative {
    border-bottom: none !important;
}

/* Hide wave divider on mobile devices */
@media (max-width: 767px) {
    section .absolute.bottom-0 {
        display: none !important;
    }
}
