/* Engemont Hydro - Custom Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation Styles */
nav {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

nav:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger:hover svg {
    color: #2563eb;
    transition: color 0.3s ease;
}

/* Hero Section */
header {
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.3) 0%, rgba(30, 144, 255, 0.1) 100%);
    pointer-events: none;
}

/* Animation for hero text */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    animation: fadeInUp 0.8s ease-out;
}

header p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

header .flex {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Service Cards */
.hover\:-translate-y-2:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Portfolio Grid */
#portfolio-grid {
    display: grid;
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.portfolio-text {
    text-align: center;
    color: white;
}

.portfolio-text h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.portfolio-text p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Scroll to top button */
#scrollToTop {
    z-index: 40;
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* Performance Optimizations */
img {
    loading: lazy;
}

/* Smooth transitions */
a {
    transition: all 0.3s ease;
}

button {
    transition: all 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1f2937;
        color: #f3f4f6;
    }

    nav {
        background-color: #111827;
    }

    section {
        background-color: #1f2937;
    }
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.125rem;
    }
}

/* Focus states for accessibility */
button:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Print styles */
@media print {
    nav,
    #scrollToTop {
        display: none;
    }

    header {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Performance: 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;
    }
}
