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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Prevent horizontal scroll on all containers */
.container,
.max-w-7xl,
.mx-auto {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix grid and flex containers on mobile */
@media (max-width: 768px) {
    .grid {
        overflow-x: hidden;
    }

    .flex {
        flex-wrap: wrap;
    }

    /* Ensure SVG doesn't cause overflow */
    svg {
        max-width: 100%;
        height: auto;
    }

    /* Fix any wide elements */
    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    /* Hero section mobile optimizations - FIT IN VIEWPORT */
    .hero-section {
        min-height: auto !important;
        padding-top: 80px !important;
        /* Reduced from 100px */
        padding-bottom: 20px !important;
        /* Reduced significantly */
    }

    /* Mobile typography adjustments */
    h1 {
        line-height: 1.2 !important;
        word-wrap: break-word;
        font-size: 1.75rem !important;
        /* Smaller on mobile */
        margin-bottom: 1rem !important;
        /* Reduced spacing */
    }

    /* Reduce paragraph spacing */
    .hero-section p {
        margin-bottom: 0.75rem !important;
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }

    /* Button adjustments for mobile */
    .btn-primary {
        width: 100% !important;
        text-align: center;
        margin: 0 auto;
        padding: 0.625rem 1rem !important;
        /* Reduced padding */
        display: block !important;
        font-size: 0.875rem !important;
    }

    /* Hero section mobile adjustments */
    .hero-section .order-2 {
        text-align: center;
    }

    /* Force center the hero image on mobile */
    @media (max-width: 768px) {
        .hero-section .order-1 {
            justify-content: center !important;
            text-align: center;
        }

        .hero-section .order-1>div {
            margin: 0 auto;
            text-align: center;
        }

        .hero-section svg {
            margin: 0 auto;
            display: block;
        }
    }

    /* Ensure button containers have proper spacing */
    .text-center {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Grid adjustments */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem !important;
        /* Reduced from 2rem */
    }

    /* Spacing adjustments */
    .py-24 {
        padding-top: 2rem !important;
        /* Further reduced */
        padding-bottom: 2rem !important;
    }

    .mb-8 {
        margin-bottom: 0.75rem !important;
        /* Reduced */
    }

    .mb-10 {
        margin-bottom: 1rem !important;
        /* Reduced */
    }

    .mb-6 {
        margin-bottom: 0.75rem !important;
    }

    /* Image optimization for mobile - SMALLER */
    #object1 {
        max-height: 180px !important;
        /* Reduced from 250px */
        width: auto;
        transform: none !important;
    }

    /* Optimize all images for mobile */
    .project-card img {
        max-height: 150px;
        object-fit: contain;
    }

    /* Logo section optimization */
    .grid.grid-cols-2.md\:grid-cols-4 img {
        max-height: 40px;
    }
}

.btn-primary {
    background-color: #2d8a74;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-primary:hover {
    background-color: #236b5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 167, 141, 0.3);
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #39a78d;
}

.testimonial-card {
    /* overflow-y: scroll; */
}

.project-card,
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 4K Display Optimizations */
@media (min-width: 2560px) {
    .max-w-7xl {
        max-width: 120rem;
        /* Increase from 80rem to 120rem for 4K */
    }

    /* Better spacing for large screens */
    .py-20 {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    .py-24 {
        padding-top: 10rem;
        padding-bottom: 10rem;
    }

    /* Improve text sizing for 4K */
    .text-5xl {
        font-size: 4rem;
    }

    .text-6xl {
        font-size: 5rem;
    }

    /* Better grid layouts for 4K */
    .grid.md\:grid-cols-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3rem;
    }

    .grid.md\:grid-cols-3 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3rem;
    }

    /* Testimonials layout for 4K */
    #testimonials-container.grid.md\:grid-cols-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}
