/* --- CSS Variables for Consistent Theming --- */
:root {
    --primary-dark: #1e293b;
    --accent-color: #f97316;
    --accent-hover: #ea580c;
    --bg-light: #f8fafc;
    --surface-white: #ffffff;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* --- General Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevents horizontal scrolling on mobile */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--primary-dark);
    background-color: var(--surface-white);
    overflow-x: hidden; /* Prevents horizontal scrolling on mobile */
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding { padding: 100px 0; }
.section-bg { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Utilities */
.mt-4 { margin-top: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* --- Typography & Headings --- */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.max-width-text {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* --- Navbar --- */
.navbar {
    background: rgba(30, 41, 59, 0.98); 
    color: #fff;
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li { margin-left: 30px; }

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent-color); }

.btn-nav {
    background: var(--accent-color);
    color: #fff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
}

.btn-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%), url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    height: 85vh;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-content {
    max-width: 600px;
    margin-left: 5%;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero .highlight {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4); 
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
}

/* --- About Section Styling --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 3rem;
    text-align: left;
}

.about-text h3, .about-features h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
}

.about-features ul {
    list-style: none;
    padding: 0;
}

.about-features li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 35px;
    color: var(--text-muted);
}

.about-features li strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.2rem;
}

.about-features li::before {
    content: '✔';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Why Choose Us */
.why-choose-us h4 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.check-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* --- Animated Services Grid --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-box {
    background: var(--surface-white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 4px solid transparent;
}

.service-box:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--accent-color);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
    transition: var(--transition);
    overflow: hidden; /* Added to keep large images inside the circle */
}

/* ADD THIS NEW RULE */
.custom-icon {
    width: 60%; /* Adjust this percentage to make the logo bigger or smaller inside the circle */
    height: auto;
    object-fit: contain;
}

.service-box:hover .icon-circle {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}
.service-box h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.service-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Projects --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--surface-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.img-wrapper {
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
}

.project-info p {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
/* --- Our Clients Marquee --- */
.clients {
    background-color: var(--surface-white); /* Ensure it contrasts with the gray sections above/below */
    overflow: hidden; /* Critical for the marquee effect */
}

.client-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 20px 0;
    position: relative;
    /* Optional: Adds a fade effect on the left and right edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: scroll 30s linear infinite; /* Adjust '30s' to make it faster or slower */
}

/* Pause the scrolling if a user hovers over a logo */
.client-marquee:hover .marquee-content {
    animation-play-state: paused;
}

.client-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px; /* Fixed width for consistency */
    height: 100px;
    margin: 0 30px; /* Space between logos */
    filter: grayscale(100%) opacity(60%); /* Makes logos gray and slightly faded for a clean look */
    transition: var(--transition);
}

.client-logo-box:hover {
    filter: grayscale(0%) opacity(100%); /* Returns logo to full color when hovered */
    transform: scale(1.05);
}

.client-logo-box img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

/* The Animation Keyframes */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
    /* Translates by -50% because we duplicated the 8 logos, creating a seamless loop */
}
/* --- Contact Form --- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    background: var(--surface-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.contact-info, .contact-form { flex: 1; min-width: 300px; }

.contact-info h3 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.contact-detail { margin-bottom: 1rem; color: var(--text-muted); }

.input-group { margin-bottom: 1.5rem; }

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 2.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-text p {
    margin: 0;
    color: #cbd5e1;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* =========================================================
   MOBILE RESPONSIVE FIXES 
   ========================================================= */
@media(max-width: 768px) {
    body, html { overflow-x: hidden; }

    .section-padding { padding: 60px 0; }
    .section-title { font-size: 2rem; margin-bottom: 2rem; }

    .hero { background-position: center; height: auto; padding: 100px 0; }
    .hero-content { margin-left: 0; text-align: center; padding: 0 15px; }
    .hero h1 { font-size: 2.5rem; }

    .navbar .container { flex-direction: column; gap: 15px; }
    .nav-links { 
        flex-direction: column; 
        width: 100%; 
        gap: 15px; 
        text-align: center; 
    }
    .nav-links li { margin-left: 0; }

    /* Force Grids to ONE column */
    .grid-2, .service-grid, .about-content { 
        grid-template-columns: 1fr !important; 
        gap: 30px; 
    }

    .contact-wrapper { padding: 2rem 1.5rem; flex-direction: column; }
    .contact-info, .contact-form { min-width: 100%; }

    /* Footer Mobile Fix */
    .footer-content {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }
}
/* --- Image Modal Styles --- */

/* Make cards look clickable */
.project-card {
    cursor: pointer;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 9999; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); /* Semi-transparent black */
    backdrop-filter: blur(8px); /* The background blur effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Class added via JS to trigger fade-in */
.modal.show {
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.modal.show .modal-content {
    transform: scale(1); /* Pop-in effect */
}

/* The Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.close-modal:hover,
.close-modal:focus {
    color: #ff4757; /* Feel free to change this to your theme's highlight color */
    text-decoration: none;
}

/* Prevent the background webpage from scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}