/* --- CSS VARIABLES (Exact Logo Colors) --- */
:root {
    /* The Deep Blue from the outer gear and "INTERGRAL" text */
    --primary-blue: #31347A; 
    /* The Maroon/Dark Purple from the inner "IE" and "ENGINEERING" text */
    --accent-maroon: #581C48; 
    
    --light-bg: #f8f9fa;
    --text-dark: #2c2c2c;
    --text-light: #fff;
    --section-spacing: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    /* Subtle engineering grid pattern background */
    background-color: #fff;
    background-image: 
        linear-gradient(rgba(49, 52, 122, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 52, 122, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

h2.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    text-transform: uppercase;
}

/* Unique double underline style */
h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-maroon);
    margin: 15px auto 5px auto;
}
h2.section-title::before {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: var(--primary-blue);
    margin: 0 auto;
}

a { text-decoration: none; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background: var(--accent-maroon);
    color: var(--text-light);
    padding: 14px 35px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-maroon);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    background: transparent;
    color: var(--accent-maroon);
    box-shadow: 0 6px 12px rgba(88, 28, 72, 0.2);
}

.btn-outline {
    background: transparent; 
    color: white; 
    border-color: white;
}
.btn-outline:hover {
    background: white;
    color: var(--primary-blue);
    border-color: white;
}

/* --- HEADER / NAVIGATION --- */
header {
    background: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary-blue);
    /* ADDED: Smooth transition for padding changes */
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

/* THIS IS THE STYLE FOR THE LOGO IMAGE */
.logo-img {
    height: 60px;
    width: auto;
    margin-right: 15px;
    transition: all 0.3s ease;
}

/* Fallback text styles (currently unused) */
.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    text-transform: uppercase;
    line-height: 1.1;
}
.logo-text span {
        color: var(--accent-maroon);
        display: block;
        font-size: 1rem;
        letter-spacing: 2px;
}


.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
    transition: 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-maroon);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
        color: var(--accent-maroon);
}

header.scrolled {
    padding: 0.4rem 0; /* Smaller vertical padding */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); /* Slightly deeper shadow */
}

/* When the header has the 'scrolled' class, make the logo smaller */
header.scrolled .logo-img {
    height: 40px; /* Reduces height from 60px to 40px */
}

/* --- BURGER MENU STYLES (Default State) --- */
.burger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    margin: 5px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

/* Burger Animation Classes (Added via JS later) */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- HERO SECTION --- */
#home {
    height: 90vh; 
    background: linear-gradient(rgba(49, 52, 122, 0.85), rgba(88, 28, 72, 0.8)), url('https://images.unsplash.com/photo-1635350646505-4915c89012d1?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    text-align: left;
    color: var(--text-light);
    padding-top: 80px;
    position: relative;
}

/* Unique design element: angled bottom edge */
#home::bottom {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #fff;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
}

.hero-content h1 span {
    color: #d4a5c9; /* A lighter version of the maroon for contrast on dark bg */
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* --- SECTIONS GENERAL --- */
section {
    padding: var(--section-spacing) 0;
    position: relative;
}

/* --- SERVICES SECTION (Custom Cards) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    /* Unique Custom Shape using clip-path for angled corners */
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border-top: 5px solid var(--accent-maroon);
    position: relative;
    z-index: 1;
}

/* Cool hover effect background */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    z-index: -1;
    opacity: 0;
    transition: all 0.4s ease;
        clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.service-card:hover {
    transform: translateY(-15px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover h3, 
.service-card:hover i,
.service-card:hover li,
.service-card:hover li::before {
    color: white;
}

.service-card i {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    display: block;
    transition: 0.4s;
}

.service-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    transition: 0.4s;
}

.service-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    font-size: 0.95rem;
    transition: 0.4s;
}

.service-list li::before {
    content: '\f0da'; /* FontAwesome caret right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-maroon);
    position: absolute;
    left: 0;
    top: 2px;
    transition: 0.4s;
}

/* --- WHY CHOOSE US (Angled Section) --- */
#why-us {
    /* Using the primary blue background */
    background: var(--primary-blue);
    color: white;
    /* Creating the angled skew effect */
    transform: skewY(-3deg);
    margin-top: 50px;
    padding: 120px 0;
    z-index: 10;
}

/* Un-skewing the content so it's straight */
#why-us .container {
    transform: skewY(3deg);
}

#why-us .section-title {
    color: white;
}
#why-us .section-title::before { background: rgba(255,255,255,0.3); }
#why-us .section-title::after { background: var(--accent-maroon); }

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

.feature-item {
    flex: 1 1 200px;
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.05); /* Slight transparent box */
    border-radius: 8px;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.feature-item:hover {
        background: rgba(255,255,255,0.1);
        transform: translateY(-5px);
        border-color: var(--accent-maroon);
}

.feature-item i {
    color: #d4a5c9; /* Lighter maroon for contrast */
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-item h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* --- GALLERY SECTION --- */
#gallery {
    /* Alternate background color to separate it from sections above and below */
    background: var(--light-bg);
    /* Push down slightly because of the angled section above */
    margin-top: 50px;
}

.gallery-grid {
    display: grid;
    /* Auto-fit grid: creates as many columns as fit, min 300px wide */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden; /* Needed to contain the zoom effect */
    border-radius: 8px;
    height: 250px; /* Fixed height for consistent look */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the box exactly without stretching */
    transition: transform 0.5s ease;
}

/* Hover Overlay Effect using pseudo-element */
.gallery-item::after {
    content: '\f00e'; /* FontAwesome magnifying glass icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Using the brand's primary blue with transparency */
    background: rgba(49, 52, 122, 0.8); 
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

/* When hovering over the container, target the image */
.gallery-item:hover img {
    transform: scale(1.1); /* Zoom in image slightly */
}

/* When hovering over the container, show the overlay */
.gallery-item:hover::after {
    opacity: 1; /* Show overlay */
}

/* --- ABOUT PAGE CONTENT --- */
#about {
    background: white;
}
.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 3;
    min-width: 300px;
}

.about-text p.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-maroon);
    padding-left: 20px;
}

.mission-vision-box {
    flex: 2;
    background: white;
    padding: 50px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    /* Another custom shape */
    border-radius: 4px 30px 4px 30px;
    border: 1px solid rgba(49, 52, 122, 0.1);
    min-width: 300px;
    position: relative;
}

/* Decorative gear icon behind mission box */
.mission-vision-box::after {
    content: '\f013';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 100px;
    color: var(--primary-blue);
    opacity: 0.05;
    z-index: 0;
}

.mv-item {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.mv-item:last-child { margin-bottom: 0; }

.mv-item h3 {
    color: var(--accent-maroon);
    display: flex;
    align-items: center;
}

.mv-item h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* --- CONTACT PAGE CONTENT (UPDATED) --- */
#contact {
    background-color: #fff;
}

.contact-container {
    display: grid;
    /* Adjust columns so the map gets a bit more space */
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    /* Ensure the container has height so the map fills it */
    min-height: 500px; 
}

.contact-info {
    background: var(--primary-blue);
    color: white;
    padding: 50px;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(49, 52, 122, 0.2);
    position: relative;
    overflow: hidden;
    height: 100%; /* Ensure it matches map height */
}

/* Decorative circles in contact info bg */
.contact-info::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--accent-maroon);
    opacity: 0.2;
}

.contact-info h3 { color: white; margin-bottom: 30px;}

.contact-item {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.contact-item i {
    background: var(--accent-maroon);
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #d4a5c9;
}

/* --- MAP STYLES --- */
.map-container {
    height: 100%;
    min-height: 400px; /* Ensure it has height on mobile */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 2px solid #eee;
}


/* --- FOOTER --- */
footer {
    background: var(--primary-blue);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    border-top: 4px solid var(--accent-maroon);
}

footer strong { color: white; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Show the burger icon */
    .burger {
        display: block;
        z-index: 1001; /* Ensure it's clickable above everything */
    }

    /* Redesign navigation for mobile */
    .nav-links {
        position: fixed;
        right: -100%; /* Start hidden off-screen to the right */
        /* Initial header height is roughly 92px (60px logo + padding + border) */
        top: 92px; 
        height: calc(100vh - 92px); /* Full height minus header */
        background-color: white;
        display: flex;
        flex-direction: column; /* Stack links vertically */
        align-items: center;
        justify-content: flex-start;
        width: 100%; /* Full width overlay */
        padding-top: 60px;
        transition: right 0.3s ease-in-out; /* Smooth slide effect */
        z-index: 999;
        border-top: 3px solid var(--primary-blue);
        box-shadow: -5px 10px 15px rgba(0,0,0,0.1);
    }

    /* The class added by JS to slide the menu in */
    .nav-active {
        right: 0%;
    }

    /* Adjust link styling for mobile view */
    .nav-links li {
        opacity: 0; /* Start hidden for animation */
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    header.scrolled .nav-links {
    top: 55px;
    height: calc(100vh - 55px);
   }

    /* General mobile adjustments from before */
    .hero-content h1 { font-size: 2.5rem; }
    .contact-container { grid-template-columns: 1fr; }
    #why-us { transform: skewY(0deg); padding: 80px 0;}
    #why-us .container { transform: skewY(0deg); }
    .section-title { font-size: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item { height: 300px; }
    .map-container { height: 400px; }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}
