/* ============================================= */
/* GLOBAL STYLES & VARIABLES                     */
/* ============================================= */
:root {
    --bg-color: #0d1619;
    --primary-accent: #828e97;
    --secondary-accent: #ffffff;
    --text-color: #ffffff;
    --body-color: #ffffff;
    --card-bg: #375075;
    --border-color: #ffffff;
    --shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg-color);
    color: var(--body-color);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Global Image Reset for Responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

a {
    color: var(--secondary-accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-accent);
}

.btn {
    display: inline-block;
    background: var(--primary-accent);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
/* ============================================= */
/* HEADER & NAVIGATION                           */
/* ============================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    
    /* SIZE ADJUSTMENT: Height increased to 160px to fit the large CEO logo */
    height: 130px; 
    
    /* YOUR REQUESTED COLOR (Grey) */
    background: rgba(105, 119, 119, 0.95); 
    
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 0 5%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    /* SIZE ADJUSTMENT: Shrinks to 70px on scroll */
    height: 100px; 
    
    /* YOUR REQUESTED COLOR (Light/White) */
    background: rgba(229, 234, 236, 0.98); 
    
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* --- MAIN LOGO (Standard Size) --- */
.logo img {
    height: 60px; /* Keeps main logo standard and professional */
    width: auto;
    transition: transform 0.3s ease, height 0.3s ease;
}

/* --- CEO LOGO (Enhanced Size) --- */
.header-extra-logo img {
    height: 100px; /* ENHANCED: Significantly larger */
    width: auto;
    transition: height 0.3s ease;
}

/* --- SCROLLING BEHAVIOR --- */
/* Shrink both logos when scrolling to fit the smaller bar */
header.scrolled .logo img {
    height: 50px;
}
header.scrolled .header-extra-logo img {
    height: 60px; /* Kept slightly larger than main logo even when scrolled */
}
/* -------------------------- */

/* Mobile Menu Button */
.mobile-menu {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: block;
    z-index: 1001;
}

/* Update Mobile Menu Color on Scroll for visibility */
header.scrolled .mobile-menu {
    color: #1a1a1a;
}

/* Navigation - Mobile Layout */
nav ul {
    display: none;
    flex-direction: column;
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(105, 119, 119, 0.98); 
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

nav ul.nav-open {
    display: flex;
}

nav li {
    margin: 15px 0;
    text-align: center;
}

nav a {
    color: #ffffff; 
    font-size: 18px;
    padding: 10px;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    display: block;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-accent);
}

/* Scroll Text Color Logic */
header.scrolled nav a {
    color: #1a1a1a; 
}

header.scrolled nav a:hover {
    color: var(--primary-accent);
}

/* Desktop Navigation (> 900px) */
@media (min-width: 900px) {
    .mobile-menu {
        display: none;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        position: static;
        background: none;
        padding: 0;
        width: auto;
        border: none;
        box-shadow: none;
        height: 100%;
        align-items: center;
    }

    nav li {
        margin: 0 15px;
    }

    nav a {
        display: inline;
        font-size: 16px;
        padding: 5px 0;
    }
}

/* Extra Logo Layout */
.header-extra-logo {
    display: none;
}
@media (min-width: 768px) {
    .header-extra-logo {
        display: block;
        margin-left: 80px; 
    }
}

/* ============================================= */
/* PAGE SECTIONS                                 */
/* ============================================= */
main {
    padding-top: 80px; /* Offset for fixed header */
}

section {
    padding: 60px 20px;
    width: 100%;
    max-width: 1400px; /* Cap width for ultra-wide screens */
    margin: 0 auto;
}

section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem); /* Fluid typography */
    margin-bottom: 40px;
}
/* ============================================= */
/* HERO SECTION                                  */
/* ============================================= */
#home {
    /* Changed from 300vh to 100vh to prevent massive empty scrolling */
    min-height: 100vh; 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(15, 15, 15, 0.92), rgba(40, 40, 40, 0.6)), url('images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding-top: 180px; /* Ensure content doesn't go under the fixed header on mobile */
}

.hero-container {
    display: flex;
    flex-direction: column-reverse; /* Image on top for mobile preferred, text bottom */
    align-items: center;
    gap: 40px;
    width: 100%;
}

.hero-text {
    flex: 1;
    text-align: center;
    width: 100%;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Fluid font size */
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.hero-strengths {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    display: inline-block;
    text-align: left;
}

.hero-strengths li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1rem;
}

.hero-strengths i {
    color: var(--primary-accent);
    margin-right: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hero-image {
    flex: 1;
    width: 100%;
    max-width: 500px;
}

/* --- MOBILE DEFAULT LAYOUT (Stacking) --- */
.hero-image-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.hero-image-grid img {
    width: 100%;
    height: 250px; /* Fixed height for neat mobile stacking */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
/* ---------------------------------------- */


/* Desktop Hero Layout (> 900px) */
@media (min-width: 900px) {
    #home {
         padding-top: 80px; /* Reset padding for desktop */
    }
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 50px;
    }
    .hero-text {
        text-align: left;
    }
    .hero-text p {
        margin-left: 0;
    }

    /* --- DESKTOP GRID LAYOUT (Overlapping) --- */
    /* We re-apply the complex grid only on larger screens */
    .hero-image-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 1fr);
        aspect-ratio: 1 / 1;
        gap: 0;
    }
    
    .hero-image-grid img {
         height: 100%; /* Reset fixed mobile height so grid works */
    }

    .hero-img-1 { grid-column: 1 / span 4; grid-row: 1 / span 4; z-index: 1;}
    .hero-img-2 { grid-column: 3 / span 3; grid-row: 3 / span 3; z-index: 2; }
    .hero-img-3 { grid-column: 1 / span 3; grid-row: 4 / span 2; z-index: 3; }
    /* ---------------------------------------- */
}

/* Desktop Hero Layout */
@media (min-width: 900px) {
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 50px;
    }
    .hero-text {
        text-align: left;
    }
    .hero-text p {
        margin-left: 0;
    }
}

/* SERVICES SECTION */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    min-height: auto;
}

.service-card::before {
    content: '';
    display: block;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
}

.service-images {
    width: 100%;
    height: 250px;
}

.service-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-images img {
    transform: scale(1.05);
}

.service-content {
    padding: 30px 20px;
    text-align: center;
}

.service-content ul {
    text-align: left;
    list-style: none; /* Removed bullet points to clean up text fit */
}

.service-content h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Desktop Services Layout */
@media (min-width: 900px) {
    .services-grid {
        gap: 80px;
    }
    .service-card {
        flex-direction: row;
        min-height: 380px;
    }
    .service-card:nth-child(even) {
        flex-direction: row-reverse;
    }
    .service-card::before {
        position: absolute;
        top: 0; left: 0; right: 0;
    }
    .service-images {
        flex: 1;
        height: auto;
    }
    .service-content {
        flex: 1;
        padding: 40px;
        text-align: left;
    }
}

/* ABOUT SECTION */
#about {
    background: rgba(42, 42, 42, 0.5);
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-text h4 {
    font-size: 1.3rem;
    color: var(--secondary-accent);
    margin-top: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.about-image img {
    max-width: 300px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .about-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .about-text {
        flex: 2;
    }
    .about-image {
        flex: 1;
    }
    .about-image img {
        max-width: 100%;
    }
}

/* ACHIEVEMENTS & CAPABILITIES GRID SYSTEMS */
.achievements-grid, 
.capabilities-grid, 
.poster-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Default Mobile: 1 Column */
.achievements-grid, 
.capabilities-grid, 
.poster-grid {
    grid-template-columns: 1fr;
}

/* Tablet: 2 Columns */
@media (min-width: 600px) {
    .capabilities-grid, .poster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 Columns for Capabilities, adjust others */
@media (min-width: 900px) {
    .capabilities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.achievement-item, .capability-item {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid transparent;
    transition: transform 0.3s;
}

.achievement-item:hover, .capability-item:hover {
    transform: translateY(-5px);
    border-top-color: var(--primary-accent);
}

.achievement-item i, .capability-item i {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 20px;
}

/* REVIEWS SECTION */
.review-box {
    background: var(--card-bg);
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stars i {
    color: #FFD700;
    font-size: 1.5rem;
    margin: 0 2px;
}

/* CONTACT SECTION */
#contact {
    background: rgba(30, 58, 138, 0.1);
    text-align: center;
}

.contact-details {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
}

/* FOOTER */
footer {
    background: var(--card-bg);
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* ANIMATIONS */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* MODALS */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    padding: 20px; /* Padding for mobile */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-accent);
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 85vh; /* Prevent modal being taller than screen */
    overflow-y: auto; /* Scroll inside modal */
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-accent);
}