body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.logo { 
    display: flex; 
    align-items: center; 
    text-decoration: none;
}
.logo-text {
    display: flex;
    flex-direction: row;
    gap: 5px;
    line-height: 1;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}
.logo img { 
    height: 55px; 
    width: auto; 
    margin-right: 8px;
    background-color: #fff;
}
.logo span { color: #f39c12; }

.nav-links { list-style: none; display: flex; }
.nav-links li { margin-left: 20px; }
.nav-links a { text-decoration: none; color: #333; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: #f39c12; }

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    z-index: 1000;
    border-radius: 4px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    display: block;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: #f39c12;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.hero {
    height: 100vh;
    background-size: cover;
    background-position: center 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 60px;
}

.page-content { 
    padding-top: 80px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.page-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; }

.btn {
    background: #f39c12;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* New styles for two-level structure on Areas page */
.area-category {
    margin-top: 3rem; /* Space between categories */
    text-align: left; /* Align text within category */
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.area-category h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.area-category .category-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.category-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background-color: #f0f0f0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.category-image.ready {
    opacity: 1;
}

.container { padding: 4rem 10%; text-align: center; }

.services { background: #f9f9f9; padding: 4rem 0; }

.services .container {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

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

.team-grid,
.services-flex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.team-grid .service-card,
.services-flex-grid .service-card {
    flex: 0 1 calc((100% - 40px) / 3); /* 3 columns with gap adjustment */
    max-width: calc((100% - 40px) / 3);
    min-width: 250px; /* Ensures cards don't get too narrow */
}

.services-flex-grid.flex-grid-4 .service-card {
    flex: 0 1 calc((100% - 60px) / 4); /* 4 columns with 20px gaps */
    max-width: calc((100% - 60px) / 4);
    min-width: 150px; /* Lowered to ensure 1x4 grid fits on smaller laptop screens */
}

.services-flex-grid.flex-grid-2 .service-card {
    flex: 0 1 calc((100% - 20px) / 2); /* 2 columns with 20px gap */
    max-width: calc((100% - 20px) / 2);
    min-width: 300px; /* Ensures a comfortable width before stacking */
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.service-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center; /* Center content within service cards */
    box-sizing: border-box; /* Ensure padding/border are included in width calculations */
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    background-color: #f0f0f0;
    animation: skeleton-loading 1.5s infinite linear alternate;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.service-card img.ready {
    opacity: 1;
}

@keyframes skeleton-loading {
    0% {
        background-color: #f0f0f0;
    }
    100% {
        background-color: #e0e0e0;
    }
}

#contact-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 2rem auto;
}

.mandatory-note {
    text-align: left;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #666;
}

.contact-details-section {
    margin-top: 3rem;
}

#contact-form input, #contact-form textarea {
    margin-bottom: 1rem;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

/* Scroll Reveal Animation Styles */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

footer { background: #2c3e50; color: #fff; text-align: center; padding: 2rem; }
footer p { margin: 0; }

/* Mobile Navigation Styling */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 10px;
}

@media screen and (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    .logo img {
        height: 45px; /* Slightly smaller logo for mobile header space */
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        height: 70vh; /* Adjust hero height to avoid excessive scrolling on mobile */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        margin: 10px 0;
    }

    .dropdown-content {
        position: relative;
        display: none;
        box-shadow: none;
    }

    /* Responsive Grid Adjustments */
    .service-grid, .grid-4, .grid-5, .project-grid {
        grid-template-columns: 1fr !important;
    }

    .service-card img,
    .category-image {
        height: auto;
        max-height: 400px;
        object-fit: contain; /* Ensures graphics like Pic4 are fully visible */
        width: 100%;
    }

    .team-grid .service-card,
    .services-flex-grid .service-card,
    .services-flex-grid.flex-grid-4 .service-card,
    .services-flex-grid.flex-grid-2 .service-card {
        flex: 1 1 100%; /* Full width on mobile for team cards */
        max-width: 100%;
    }

    .hero-content h1 { font-size: 2.2rem; padding: 0 10px; }
    .hero-content p { font-size: 1rem; padding: 0 15px; }

    /* Mobile-specific styles for contact details */
    .contact-details-section p {
        font-size: 1.1rem; /* Slightly larger font for readability */
        line-height: 1.8; /* More line height for better spacing */
        word-break: break-word; /* Ensure long emails/phones break correctly */
    }
    .contact-details-section p strong {
        display: block; /* Make the label appear on its own line for clarity */
        margin-bottom: 0.2em;
    }
    .contact-details-section p a {
        display: block; /* Display each phone/email link on a new line for better mobile UX */
        margin-bottom: 5px;
    }

    #contact-form input,
    #contact-form textarea {
        font-size: 1.1rem; /* Prevents auto-zoom on mobile and improves readability */
        color: #111; /* Strong contrast for user-entered text */
        border: 1px solid #999; /* More defined border for visibility on smaller screens */
    }

    /* Slightly less dramatic movement on small screens for scroll reveals */
    .reveal-on-scroll {
        transform: translateY(20px);
    }
}