/* Responsive Design Fixes */

/* General fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for main content */
main {
    width: 100%;
    overflow-x: hidden;
}

section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Project image fixes */
.project-image {
    width: 100%;
    height: auto;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 250px;
}

/* Improved responsive grid for services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: var(--max-width);
}

/* Improved responsive grid for projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: var(--max-width);
}

/* Testimonials fixes */
.testimonials-slider {
    width: 100%;
    max-width: 800px;
}

.testimonial-card {
    width: 100%;
    box-sizing: border-box;
}

/* Burger menu improvements */
.burger-menu {
    cursor: pointer;
    z-index: 1001;
}

.burger-menu div {
    transition: all 0.3s ease;
}

/* Ensure line animations work properly */
.line1-active, .line2-active, .line3-active {
    transition: all 0.3s ease;
}

/* Medium-sized devices */
@media screen and (max-width: 1024px) {
    .navbar {
        width: 100%;
        padding: 1rem 2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-text {
        width: 100%;
    }

    .services-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-container {
        flex-direction: column;
        gap: 3rem;
    }

    .contact-form, .contact-info {
        width: 100%;
    }
}

/* Better mobile navigation */
@media screen and (max-width: 768px) {
    .navbar {
        width: 100%;
        padding: 1rem;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 70px;
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        width: 100%;
        text-align: center;
        transform: translateX(100%);
        transition: transform 0.5s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 1000;
    }

    .cta-container {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .cta-button, .secondary-button {
        width: 100%;
        text-align: center;
    }

    .services-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-form, .contact-info {
        width: 100%;
    }

    .values {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    /* Fix for testimonial images */
    .imgprojet1, .imgprojet2, .imgprojet3 {
        width: 50px;
        height: 50px;
    }
}

/* Small screen adjustments */
@media screen and (max-width: 480px) {
    .titlesite {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .about-text h3, .contact-info h3 {
        font-size: 1.5rem;
    }

    .service-card, .project-card, .testimonial-card {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input, .form-group textarea {
        padding: 0.8rem;
    }

    .submit-button {
        width: 100%;
    }

    .footer-content {
        gap: 1rem;
    }
}

/* Footer improvements */
footer {
    width: 100%;
    overflow: hidden;
}

.footer-content {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Fix for spacing on mobile */
@media screen and (max-width: 768px) {
    section {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .footer-social {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Extra small screen adjustments */
@media screen and (max-width: 360px) {
    html {
        font-size: 10px;
    }

    .titlesite {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .service-card, .project-card, .testimonial-card {
        padding: 0.8rem;
    }

    .footer-content {
        padding: 0 0.5rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }
}
