/* Responsive Styles */

/* Fix for horizontal scrolling on all devices */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Large devices (laptops/desktops, up to 1200px) */
@media only screen and (max-width: 1200px) {
    .services-container,
    .projects-container {
        width: 95%;
    }
    
    .about-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .about-image {
        width: 100%;
        max-width: 100%;
    }
    
    .category-detail {
        flex-direction: column;
    }
    
    .category-image {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .category-description {
        padding: 0;
    }
}

/* Medium devices (tablets, up to 992px) */
@media only screen and (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .service-card {
        min-width: 250px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .instagram-section {
        padding: 70px 0;
    }
    
    .instagram-handle {
        font-size: 2.2rem;
    }
    
    .services-container {
        flex-direction: column;
    }
    
    .service-item {
        height: 60vh;
    }
    
    .where-we-work .section-title, 
    .where-we-work .work-description {
        width: 90%;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-left, .footer-center, .footer-right {
        align-items: center;
        text-align: center;
    }
    
    .footer-address h3:after,
    .footer-contact h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Small devices (landscape phones, up to 768px) */
@media only screen and (max-width: 768px) {
    .nav-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .services-container {
        flex-direction: column;
    }
    
    .service-item {
        height: 60vh;
        width: 100%;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero-content {
        padding: 0 30px 60px 30px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .contact {
        padding: 60px 0;
    }
    
    #contact-form {
        width: 90%;
    }

    .instagram-section {
        padding: 60px 0;
    }
    
    .instagram-container {
        padding: 0 15px;
    }
    
    .instagram-handle {
        font-size: 2rem;
    }
    
    .instagram-label {
        font-size: 0.8rem;
    }
    
    .about-container {
        width: 95%;
    }
    
    .about {
        padding: 80px 0;
    }
    
    .category-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        width: 100%;
    }
    
    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
        margin: 0 5px;
    }

    /* Responsive styles for Project Categories Menu */
    .project-categories {
        padding: 50px 0;
    }
    
    .category-menu {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-separator {
        display: none;
    }
    
    .category-item {
        font-size: 1.2rem;
        padding: 12px 20px;
        text-align: center;
        width: 80%;
        transition: background-color 0.3s ease, color 0.3s ease;
        border-bottom: 2px solid transparent;
    }
    
    .category-item:hover,
    .category-item:focus {
        border-bottom: 2px solid var(--primary-color);
        background-color: rgba(28, 63, 96, 0.05);
    }
    
    .category-image-preview {
        height: 300px;
        margin-top: 20px;
    }
    
    .category-image-preview img {
        /* Keep images sleek with no border-radius */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    
    .category-detail {
        min-height: auto;
    }
    
    .category-content {
        min-height: auto;
    }
    
    .category-image {
        height: 300px;
    }
    
    .category-image img {
        height: 100%;
    }

    /* Improve tab navigation on mobile */
    .about-tabs {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .tab-item {
        margin: 5px 15px;
        font-size: 1rem;
    }
    
    .tab-content {
        padding: 20px 10px;
    }
    
    .tab-content img,
    .tab-content video {
        margin: 10px 0;
    }
}

/* Extra small devices (phones, up to 576px) */
@media only screen and (max-width: 576px) {
    .hero {
        height: 60vh;
    }
    
    .hero-content {
        padding: 0 20px 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }

    .instagram-section {
        padding: 50px 0;
    }
    
    .instagram-handle {
        font-size: 1.8rem;
    }
    
    .instagram-gallery {
        gap: 10px;
    }
    
    .navbar {
        padding: 25px 5%;
    }
    
    .navbar.scrolled {
        padding: 15px 5%;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .menu-toggle {
        left: 15px;
    }
    
    .quote-button {
        right: 15px;
    }
    
    .cta-button.nav-cta {
        padding: 8px 15px;
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .category-tab {
        font-size: 0.85rem;
        padding: 12px 15px;
    }
    
    .category-description h3 {
        font-size: 1.7rem;
    }

    /* Responsive styles for Project Categories Menu */
    .project-categories {
        padding: 40px 0;
    }
    
    .category-item {
        width: 90%;
        font-size: 1.1rem;
        padding: 10px 15px;
    }
    
    .category-image-preview {
        height: 200px;
        margin-top: 15px;
    }
}

/* Media Queries for Hero Section */
@media (max-width: 1024px) {
    .hero-content {
        bottom: 60px;
        left: 60px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        bottom: 40px;
        left: 40px;
        max-width: 80%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        bottom: 30px;
        left: 30px;
        max-width: 85%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Center team members in About page - UPDATED to left align */
.team-members {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.team-member-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.team-member-photo {
    height: 400px; /* Fixed height for all photos */
    width: 300px; /* Fixed width for all photos */
}

/* Center Where We Work carousel */
.locations-gallery {
    margin: 0 auto;
    padding-left: max(15px, calc(50% - 600px));
    padding-right: 15px;
    justify-content: center;
}

/* Remove content from Partners tab */
#partners .certifications-grid,
#partners .partners-grid {
    display: none;
}

#partners .certifications-section p,
#partners .partners-section p {
    display: none;
}