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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

/* Color Variables - Matching the React app exactly */
:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(224, 71.4%, 4.1%);
    --primary: hsl(166, 62%, 36%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(210, 40%, 96%);
    --secondary-foreground: hsl(222.2, 84%, 4.9%);
    --accent: hsl(220, 70%, 50%);
    --accent-foreground: hsl(0, 0%, 100%);
    --border: hsl(214.3, 31.8%, 91.4%);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Typography */
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* Colors */
.text-primary { color: var(--primary); }
.text-foreground { color: var(--foreground); }
.text-gray-900 { color: var(--gray-900); }
.text-gray-800 { color: var(--gray-800); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-300 { color: var(--gray-300); }
.text-white { color: #ffffff; }

.bg-primary { background-color: var(--primary); }
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-background { background-color: var(--background); }

/* Primary color with opacity for button hover effects */
.hover\\:bg-opacity-90:hover {
    background-color: hsl(166, 62%, 36%, 0.9);
}

.bg-opacity-10 {
    background-color: hsl(166, 62%, 36%, 0.1);
}

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

.grid {
    display: grid;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Mobile first - single column by default */
.responsive-grid-2 {
    grid-template-columns: 1fr;
}

.responsive-grid-3 {
    grid-template-columns: 1fr;
}

.responsive-grid-4 {
    grid-template-columns: 1fr;
}

/* Medium screens and up */
@media (min-width: 768px) {
    .responsive-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .responsive-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .responsive-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Large screens and up */
@media (min-width: 1024px) {
    .responsive-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .responsive-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .responsive-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-x-8 > * + * {
    margin-left: 2rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

/* Padding and Margin */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

/* Position */
.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Sizing */
.w-full { width: 100%; }
.w-6 { width: 1.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }

.h-auto { height: auto; }
.h-6 { height: 1.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-64 { height: 16rem; }

.min-h-screen { min-height: 100vh; }

.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }

/* Borders */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }

.border-gray-200 { border-color: var(--gray-200); }
.border-gray-300 { border-color: var(--gray-300); }
.border-gray-700 { border-color: var(--gray-700); }
.border-primary { border-color: var(--primary); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Display */
.hidden { display: none; }
.block { display: block; }

/* Object Fit */
.object-cover { object-fit: cover; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color; }
.transition-all { transition-property: all; }
.transition-transform { transition-property: transform; }
.transition-opacity { transition-property: opacity; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Hover Effects */
.hover\\:bg-opacity-90:hover {
    background-color: rgba(20, 184, 166, 0.9);
}

.hover\\:text-primary:hover {
    color: var(--primary);
}

.hover\\:bg-primary:hover {
    background-color: var(--primary);
}

.hover\\:text-white:hover {
    color: #ffffff;
}

.hover\\:scale-105:hover {
    transform: scale(1.05);
}

.hover\\:bg-opacity-80:hover {
    background-color: rgba(20, 184, 166, 0.8);
}

/* Custom Components */
.logo-text {
    color: var(--primary);
    font-weight: 700;
}

/* Navigation Styles */
#navigation {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

#navigation.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gallery Item Hover Effect */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.gallery-overlay {
    background: linear-gradient(45deg, rgba(20, 184, 166, 0.8), rgba(59, 130, 246, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Form Styles */
input, select, textarea {
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Button Styles */
button, .btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
}

/* Background Opacity */
.bg-opacity-10 {
    background-color: rgba(20, 184, 166, 0.1);
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up.delay-100 { animation-delay: 0.1s; }
.fade-in-up.delay-200 { animation-delay: 0.2s; }
.fade-in-up.delay-300 { animation-delay: 0.3s; }
.fade-in-up.delay-400 { animation-delay: 0.4s; }
.fade-in-up.delay-500 { animation-delay: 0.5s; }
.fade-in-up.delay-600 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Background Gradient */
.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #ffffff, #f9fafb);
}

/* Group Hover Effects */
.group:hover .group-hover\\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Responsive Design */
@media (min-width: 768px) {
    .md\:flex { display: flex !important; }
    .md\:hidden { display: none !important; }
    .md-col-span-2 { grid-column: span 2; }
    
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation - Tailwind-style responsive classes */
    .hidden.md\:flex {
        display: flex !important;
    }
    
    .md\:hidden {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .lg-text-6xl { font-size: 3.75rem; line-height: 1; }
}

/* Base mobile styles for Tailwind-like classes */
.hidden {
    display: none;
}

.md\:hidden {
    display: block; /* Show on mobile, hide on md+ */
}

.hidden.md\:flex {
    display: none; /* Hide on mobile, show as flex on md+ */
}

/* Active navigation link */
.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Page loading state */
body.loaded .fade-in-up {
    animation-play-state: running;
}

/* Touch device optimizations */
.touch-device .service-card:hover {
    transform: none;
}

.touch-device .gallery-item:hover img {
    transform: none;
}

/* Print optimizations */
.printing .fixed {
    position: static;
}

.printing .shadow-lg,
.printing .shadow-2xl {
    box-shadow: none;
}

/* Footer column span for larger screens */
@media (min-width: 768px) {
    .footer-col-span-2 {
        grid-column: span 2;
    }
}

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

#mobile-menu.show {
    display: block;
}

/* Sticky Navigation Enhancement */
.sticky-nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

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

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

/* Accessibility */
a:focus, button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .fixed { position: static; }
    .shadow-lg, .shadow-2xl { box-shadow: none; }
    .bg-gradient-to-br { background: white; }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 { color: var(--gray-900); }
    .text-gray-300 { color: var(--gray-700); }
}

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

/* Additional Mobile Responsiveness */
@media (max-width: 767px) {
    .text-5xl { font-size: 2.5rem; }
    .text-6xl { font-size: 3rem; }
    .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
    .min-h-screen { min-height: auto; padding: 2rem 0; }
    
    .grid.lg\\:grid-cols-2,
    .grid.lg\\:grid-cols-3,
    .grid.lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
}

/* Enhanced accessibility */
.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;
}