/* Universal Styles for Reset and Overflow Prevention */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%; /* Ensure no element exceeds viewport width */
    min-width: 0; /* Ensure elements can shrink */
}

html, body {
    width: 100vw; /* Ensure width is exactly viewport width */
    overscroll-behavior-x: none; /* Prevent horizontal overscroll bounce */
}

body {
    font-family: 'Inter', sans-serif; /* Changed font to Inter */
    color: #333;
    line-height: 1.6;
    word-break: break-word; /* Break long words to prevent overflow */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; /* Reverted to original centering */
    padding: 20px 0;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: #e0e0e0; /* Made "What We Do" section a little darker */
}

/* Header Styles */
header {
    background-color: #1e1e1e; /* Corrected to user's original header color */
    color: #FFFFFF; /* Kept header text color white */
    padding: 15px 20px; /* Made header 50% bigger vertically */
    /* Removed border-bottom to eliminate the white line */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%; /* Ensure header takes full width */
    max-width: 100vw; /* Ensure header doesn't exceed viewport width */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Take full width of the header */
    max-width: 100%; /* Ensure it respects max-width */
    padding: 0; /* Remove padding from container, will add to header */
}


header .logo img {
    max-width: 100%; /* Ensure logo image is responsive */
    height: auto; /* Maintain aspect ratio */
}

header .logo h1 {
    margin: 0;
    font-size: 24px;
    color: #FFFFFF; /* Kept logo text color white */
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #FFFFFF; /* Kept navigation link color white */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #CCCCCC; /* Kept lighter gray for hover on white text */
}

/* Hamburger Menu Styles */
.hamburger {
    display: none; /* Hidden by default on larger screens */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    z-index: 1001;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: #FFFFFF; /* White bars for contrast with header */
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        width: 100%;
        max-width: 100%;
    }

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
        flex-wrap: nowrap;
        min-width: 0;
    }

    header .logo {
        flex-shrink: 0;
        min-width: 0;
    }

    .hamburger {
        display: flex; /* Show hamburger on small screens */
        flex-shrink: 0;
        margin-left: auto; /* Push hamburger to the right */
    }

    header nav {
        display: none; /* Hide regular nav on small screens */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        background-color: #1e1e1e; /* Match header background */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        max-width: 100%;
        min-width: 0;
        z-index: 1000; /* Ensure it appears above other content */
    }

    header nav.active {
        display: flex; /* Show nav when active */
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        text-align: center;
    }

    header nav ul li {
        margin: 10px 0;
    }
}

/* Hero Section Styles */
#hero {
    position: relative; /* For absolute positioning of video */
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Hide overflowing video parts */
    color: #fff;
    text-align: center;
    display: flex;
    align-items: flex-start; /* Align content to the top */
    justify-content: center;
    padding: 100px 0 0 0; /* Add padding to push content down from top, but still higher than center */
    background-color: #1e1e1e; /* Match header background color for seamless load */
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire container */
}

#hero h2 {
    font-size: 48px;
    margin-bottom: 10px;
    z-index: 1; /* Ensure text is above video */
    color: #FFFFFF; /* Changed text color to white */
}

#hero p {
    font-size: 20px;
    z-index: 1; /* Ensure text is above video */
}

@media (max-width: 768px) {
    #hero h2 {
        font-size: 36px;
    }

    #hero p {
        font-size: 18px;
    }

    .section-padding {
        padding: 40px 0;
    }

    h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    #hero h2 {
        font-size: 28px;
    }

    #hero p {
        font-size: 16px;
    }

    .services-grid, .projects-grid {
        grid-template-columns: 1fr; /* Stack items on very small screens */
    }
}

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in, .fade-in-delay {
    opacity: 0; /* Start invisible */
    transform: translateY(20px); /* Start slightly below */
}

.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.fade-in-delay {
    animation: fadeIn 1.5s ease-out 1s forwards; /* 1-second delay */
}

#hero p {
    font-size: 20px;
    /* Removed z-index as it's not strictly necessary for animation */
}


/* Section Heading Styles */
h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #1e1e1e; /* Changed to match header/footer color */
}

/* Services Grid Styles */
.services-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.service-item, .project-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover, .project-item:hover {
    transform: translateY(-5px);
}

.service-item h3, .project-item h3 {
    color: #1e1e1e; /* Changed to match header/footer color */
    font-size: 24px;
    margin-top: 0;
}

/* Footer Styles */
footer {
    background-color: #1e1e1e; /* Match header background color */
    color: #FFFFFF;
    padding: 60px 20px 20px 20px; /* Adjust padding for new layout */
    margin-top: 40px;
    width: 100%; /* Ensure footer takes full width */
    max-width: 100vw; /* Ensure footer doesn't exceed viewport width */
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; /* Adjust column widths as per image */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: #FFFFFF;
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #CCCCCC; /* Lighter white for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #FFFFFF;
}

.social-icons a {
    display: inline-block;
    color: #FFFFFF;
    font-size: 24px;
    margin-right: 15px;
    text-decoration: none;
}

.contact-button {
    background-color: #FFFFFF;
    color: #1e1e1e; /* Dark text for contrast */
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-button:hover {
    background-color: #e0e0e0;
}

.contact-button .arrow {
    margin-left: 8px;
    font-size: 18px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 20px;
    color: #CCCCCC;
    font-size: 14px;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: #CCCCCC;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #FFFFFF;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        text-align: center;
    }

    .footer-col {
        margin-bottom: 30px;
    }

    .footer-col.logo-col {
        margin-bottom: 0; /* No extra margin for logo */
    }

    .footer-col.logo-col img {
        margin: 0 auto 20px auto; /* Center logo */
        display: block;
    }

    .social-icons {
        justify-content: center;
        display: flex;
        flex-wrap: wrap; /* Allow icons to wrap to the next line */
        margin-top: 10px;
    }

    .social-icons a {
        display: block; /* Make each link take its own line */
        font-size: 20px; /* Smaller font size for mobile */
        margin: 5px 0; /* Add vertical spacing */
    }

    .contact-button {
        margin: 20px auto 0 auto; /* Center button */
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom p {
        margin: 5px 0;
    }

    .footer-bottom a {
        margin: 0;
        display: block;
    }
}
