/* New Color Variables for easy management */
:root {
    --dark-blue: #013a6b;
    --medium-blue: #0077b6; /* Vibrant mid-blue */
    --light-blue: #00b4d8; /* Aqua/Sky blue */
    --accent-green: #2a9d8f; /* Teal-like green */
    --text-dark: #333333;
    --text-medium: #555555;
    --white: #FFFFFF;
    --light-grey-bg: #fcfcfc; /* Slightly lighter body background */
}

/* General Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', sans-serif; line-height: 1.6; color: var(--text-dark); background-color: var(--light-grey-bg); }

/* Header & Footer */
header, footer { 
    background-color: var(--dark-blue); /* Solid dark blue */
    /* background: linear-gradient(to right, var(--dark-blue), #002c5c); /* Uncomment to try a subtle gradient */
    color: var(--white); 
    padding: 1.5rem; 
    text-align: center; 
}
header h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
header p { font-size: 1.1rem; }
footer p { font-size: 0.9rem; }

/* Navigation */
nav { 
    background-color: var(--medium-blue); /* Changed nav background */
    padding: 1rem; 
    text-align: center; 
}
nav a { 
    color: var(--white); 
    margin: 0 1rem; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 1.1rem; 
    transition: color 0.3s ease; 
}
nav a:hover { color: #d0e8f2; } /* Lighter hover color for nav links */

/* Hero Section */
.hero { 
    /* Main background image */
    background-image: url('https://via.placeholder.com/1200x400/013a6b/00b4d8?text=Modern+Water+Plant'); /* Ensure this URL is correct or use your own image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Ensure it doesn't repeat */
    position: relative; /* Needed for pseudo-element overlay */
    padding: 6rem 1rem; 
    text-align: center; 
    color: var(--white); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 350px; 
    z-index: 0; /* Changed to 0 as overlay will be z-index: 1 */
}

/* Add a semi-transparent gradient overlay to the hero for better text readability and branding */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Increased opacity for better contrast */
    background: linear-gradient(135deg, rgba(1, 58, 107, 0.85) 0%, rgba(0, 119, 182, 0.85) 100%); /* Changed to 0.85 */
    z-index: 1;
}

/* Ensure hero content (h1, p, button) is above the overlay */
.hero h1,
.hero p,
.hero .hero-button {
    z-index: 2; /* Place above the overlay (z-index: 1) */
    position: relative; /* Needed for z-index to work on these elements */
}

.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; text-shadow: 3px 3px 6px rgba(0,0,0,0.5); }
.hero p { font-size: 1.4rem; margin-bottom: 2rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }
.hero-button {
    background: var(--accent-green); /* Changed to accent green */
    color: var(--white);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.hero-button:hover {
    background-color: #248a7f; /* Slightly darker accent green */
    transform: translateY(-3px) scale(1.02); /* More noticeable lift and slight growth */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

/* Existing project card button: */
.project-card .btn-more-info:hover {
    background-color: #248a7f; /* Darker accent green */
    transform: translateY(-2px); /* Slight lift */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

/* General Section Styling */
.section { padding: 4rem 2rem; max-width: 1000px; margin: auto; }
.section h2 { 
    font-size: 2.4rem; 
    margin-bottom: 2rem; 
    color: var(--dark-blue); /* Changed heading color */
    text-align: center; 
    position: relative; 
    padding-bottom: 10px; 
}
.section h2::after { /* Underline effect for H2 */
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--medium-blue); /* Changed underline color */
    border-radius: 2px;
}

/* Service Cards */
.service-cards-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 2rem; 
    justify-content: center; 
    margin-top: 2rem;
}
.service-card {
    background-color: var(--white); 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    padding: 2rem; 
    flex: 1; 
    min-width: 280px; 
    max-width: 350px; 
    text-align: center; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.service-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); 
}
.service-card h3 {
    color: var(--medium-blue); /* Changed heading color */
    margin-bottom: 1rem;
    font-size: 1.7rem; 
}
.service-card p {
    color: var(--text-medium); /* Softer text color */
    font-size: 1.05rem;
}

/* Project Grid */
.project-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2.5rem; 
    margin-top: 2rem;
}
.project-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12); 
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); 
}
.project-card .project-image {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.project-card .project-info {
    padding: 1.5rem;
    text-align: left; 
}
.project-card h3 {
    color: var(--dark-blue); /* Changed heading color */
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}
.project-card p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.project-card .btn-more-info {
    background-color: var(--accent-green); /* Changed to accent green */
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.project-card .btn-more-info:hover {
    background-color: #248a7f; /* Darker accent green */
}
.view-all-projects {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.2rem;
}
.view-all-projects a {
    color: var(--medium-blue); /* Changed link color */
    text-decoration: none;
    font-weight: 600;
}
.view-all-projects a:hover {
    text-decoration: underline;
}

/* Contact Section Styling */
.contact-details {
    background-color: #e6f3ff; /* Still a light blue, might adjust to a lighter shade from new palette if desired */
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem; 
    text-align: left; 
}
.contact-details h3 {
    color: var(--dark-blue); /* Changed heading color */
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.contact-details p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}
.contact-details a {
    color: var(--medium-blue); /* Changed link color */
    text-decoration: none;
    font-weight: 600;
}
.contact-details a:hover {
    text-decoration: underline;
}
.contact-form-section h3 {
    color: var(--dark-blue); /* Changed heading color */
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center; 
}
/* Contact Form - existing styles */
.contact-form { background: var(--white); padding: 2rem; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 4px; }
.contact-form button { 
    background: var(--accent-green); /* Changed to accent green */
    color: var(--white); 
    border: none; 
    padding: 0.75rem 2rem; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}
.contact-form button:hover { background-color: #248a7f; } /* Darker accent green */

/* Responsive adjustments for Contact Section */
@media (min-width: 768px) {
    #contact .section {
        display: flex;
        flex-wrap: wrap; 
        gap: 4rem; 
        align-items: flex-start; 
    }
    .contact-details {
        flex: 1; 
        min-width: 300px; 
        margin-bottom: 0; 
    }
    .contact-form-section {
        flex: 1.5; 
        min-width: 350px; 
    }
    .contact-form-section h3 {
         text-align: left; 
    }
}

/* Small Adjustments for overall consistency */
h1, h2, h3, h4, h5, h6 { margin-top: 0; }
p { margin-bottom: 1rem; }

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Modal Overlay and Container */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity background */
    backdrop-filter: blur(8px); /* Blur effect for the background */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    opacity: 0; /* Start hidden for animation */
    transition: opacity 0.3s ease-in-out; /* Fade in animation */
}

/* Modal Content Box */
.modal-content {
    background-color: var(--white);
    margin: 8% auto; /* 8% from the top and centered */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 700px; /* Max width of the modal */
    position: relative;
    transform: translateY(-50px); /* Start slightly above for animation */
    transition: transform 0.3s ease-in-out; /* Slide in animation */
}

/* When the modal is active, show it and animate */
.modal.active {
    display: flex; /* Use flex to center content */
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal.active .modal-content {
    transform: translateY(0); /* Slide to its final position */
}

/* Close Button */
.close-button {
    color: #aaa;
    font-size: 36px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--dark-blue);
    text-decoration: none;
    cursor: pointer;
}

/* Modal Content Specifics */
.modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-title {
    color: var(--dark-blue);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.modal-location {
    color: var(--medium-blue);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-description {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.modal-details {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.7;
}

/* Hide body overflow when modal is open to prevent scrolling */
body.modal-open {
    overflow: hidden;
}

/* Header & Footer */
header, footer { 
    background: linear-gradient(to right, var(--dark-blue), var(--medium-blue)); /* Added gradient */
    color: var(--white); 
    padding: 1.5rem; 
    text-align: center; 
}

/* Navigation */
nav { 
    background: linear-gradient(to right, var(--medium-blue), var(--light-blue)); /* Added gradient */
    padding: 1rem; 
    text-align: center; 
}

/* Scroll Reveal Animations */
.hidden-section {
    opacity: 0;
    transform: translateY(50px); /* Starts slightly below its final position */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible-section {
    opacity: 1;
    transform: translateY(0); /* Slides to its final position */
}

.project-card .project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: transform 0.4s ease-in-out; /* Add transition for smooth zoom */
}

.project-card:hover .project-image {
    transform: scale(1.05); /* Slightly zoom in the image on card hover */
}