/* --- 1. THEME VARIABLES --- */
:root {
    --brand-purple: #853d7d;
    --brand-pink: #ec008c;
    --brand-cyan: #00adef;
    --brand-yellow: #fff200;
    --brand-black: #231f20;
    --dark-nav: #2d2d2d;
    --footer-bg: #1a1a1a;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-bg: #f4f7f6;
}

/* --- 2. GLOBAL RESET (Based on NiryatOne) --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Roboto', sans-serif; }
html { scroll-behavior: smooth; }

/* FIX: This specific setup prevents the "shifting" on mobile */
body { 
    background-color: var(--white); 
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

/* Main Wrapper logic from your working project */
.main-wrapper {
    background: white;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; font-weight: 800; text-transform: uppercase; margin-bottom: 15px; line-height: 1.2; }
p { line-height: 1.6; color: var(--text-light); margin-bottom: 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Buttons */
.btn-yellow { display: inline-block; background-color: var(--brand-yellow); color: var(--brand-black); padding: 14px 35px; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; border: none; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.btn-yellow:hover { background-color: var(--brand-black); color: var(--white); }

.btn-outline { display: inline-block; background: transparent; border: 2px solid var(--white); color: var(--white); padding: 12px 30px; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.btn-outline:hover { background: var(--white); color: var(--brand-purple); }
footer .btn-outline { border-color: var(--brand-yellow); color: var(--brand-yellow); }
footer .btn-outline:hover { background: var(--brand-yellow); color: var(--brand-black); }

/* --- 3. HEADER SECTION (Based on NiryatOne Structure) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.logo-img { height: 50px; width: auto; object-fit: contain; }
.logo-text h2 { margin: 0; font-size: 1.6rem; color: #000; letter-spacing: -1px; line-height: 1; }
.logo-text span { font-size: 0.75rem; color: #999; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; display: block; }

/* DESKTOP NAVIGATION */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
    white-space: nowrap;
}
nav a:hover, nav a.active { color: var(--brand-pink); }

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-weight: 600;
    color: #000;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* HAMBURGER (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1002;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-dark);
    border-radius: 2px;
}

/* --- 5. HERO SECTION --- */
#hero { 
    min-height: 85vh; 
    background: linear-gradient(rgba(133, 61, 125, 0.85), rgba(80, 20, 75, 0.9)), url('machinebg1.jpeg'); 
    background-size: cover; 
    background-position: center; 
    color: var(--white); 
    display: flex; 
    align-items: center; 
    text-align: center; 
    position: relative; 
    padding: 100px 0; 
}

#hero h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; color: var(--white); }
#hero h1 span { color: var(--brand-yellow); }
#hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; opacity: 0.9; color: #eee; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* --- 6. WHY CHOOSE US (Clean Text) --- */
.why-section { background: #fff; padding: 80px 0; }
.why-wrapper { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.why-content-col { width: 100%; text-align: center; }
.section-header-center { margin-bottom: 40px; }
.section-header-center h2 { font-size: 3rem; color: var(--brand-black); margin-bottom: 0; }

.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-item { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; align-items: center; text-align: center; transition: 0.3s; border: 1px solid transparent; }
.feature-item:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.feature-icon { font-size: 2.5rem; margin-bottom: 20px; }
.icon-pink { color: var(--brand-pink); }
.icon-cyan { color: var(--brand-cyan); }
.icon-purple { color: var(--brand-purple); }
.feature-text h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--brand-black); }
.feature-text p { font-size: 0.9rem; margin: 0; }

/* --- 7. SERVICES GRID (3 ITEMS PER ROW DESKTOP) --- */
.services-section { padding: 80px 0; background: var(--white); }
.services-header { text-align: center; margin-bottom: 60px; }
.services-header h2 { font-size: 3rem; color: var(--brand-black); }

/* Grid: 3 cols desktop */
.services-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.service-item { position: relative; overflow: hidden; border-radius: 6px; background: #000; width: 100%; height: 350px; }
.service-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); opacity: 0.9; }
.service-item:hover img { transform: scale(1.08); opacity: 1; }
.service-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 100%); z-index: 1; transition: background 0.3s; }
.service-label { position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px; z-index: 2; color: white; font-weight: 800; text-transform: uppercase; font-size: 1.2rem; letter-spacing: 1px; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.view-more-wrapper { text-align: center; padding: 50px 0 0; }

/* --- 9. PROJECTS SECTION (4 ITEMS PER ROW DESKTOP) --- */
.projects-section { padding-top: 80px; padding-bottom: 0; background: #fff; }
.projects-header { text-align: center; margin-bottom: 50px; }
.projects-header h2 { font-size: 3rem; color: var(--brand-black); margin-bottom: 10px; }

/* Grid: 4 cols desktop */
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }

.project-item { position: relative; height: 350px; overflow: hidden; background: #f0f0f0; }
.project-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-item:hover img { transform: scale(1.1); }

/* --- 10. TESTIMONIALS SECTION --- */
.testimonials-section { text-align: center; padding: 80px 0 80px; background: #fff; }
.section-header-center { text-align: center; margin-bottom: 40px; }
.section-header-center h2 { font-size: 3rem; color: var(--brand-black); }
.testimonial-quote { max-width: 800px; margin: 0 auto 50px; font-size: 1.1rem; color: #777; line-height: 1.8; font-style: italic; padding: 0 15px; }
.testimonial-faces { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; }
.testimonial-person { text-align: center; cursor: pointer; transition: 0.3s; }
.testimonial-person img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 15px; filter: grayscale(100%); transition: 0.3s; }
.testimonial-person:hover img, .testimonial-person.active img { filter: grayscale(0%); transform: scale(1.1); box-shadow: 0 5px 15px rgba(236, 0, 140, 0.3); }

/* --- 14. GRADIENT BAR --- */
.gradient-bar { height: 10px; width: 100%; background: linear-gradient(to right, var(--brand-cyan) 0%, var(--brand-pink) 50%, var(--brand-yellow) 100%); }

/* --- 15. FOOTER --- */
footer { background: var(--footer-bg); color: #aaa; padding: 80px 0 40px; }
.footer-top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-bottom: 80px; }
.footer-col-title { color: var(--white); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; margin-bottom: 25px; letter-spacing: 1px; position: relative; padding-bottom: 10px; }
.footer-col-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; background: var(--brand-yellow); }
.footer-info-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.footer-info-item i { color: #555; margin-top: 5px; }
.footer-nav-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.footer-nav-list a { color: #aaa; font-size: 0.9rem; transition: 0.3s; }
.footer-nav-list a:hover { color: var(--white); padding-left: 5px; }
.footer-buttons { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding-top: 30px; margin-top: 50px; flex-wrap: wrap; gap: 20px; }
.payment-icons i { margin-right: 10px; font-size: 1.5rem; color: #555; }
.social-circles { display: flex; gap: 10px; }
.social-circles a { width: 35px; height: 35px; border: 1px solid #555; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #777; transition: 0.3s; }
.social-circles a:hover { border-color: var(--white); color: var(--white); }


/* =========================================
   RESPONSIVE & MOBILE OPTIMIZATION
   ========================================= */

@media (max-width: 900px) {
    /* 1. Header: Switch to Mobile Layout */
    .main-wrapper { border-radius: 0; box-shadow: none; }
    header { padding: 15px 20px; justify-content: space-between; }
    
    .logo-container { font-size: 1.3rem; gap: 10px; }
    .logo-img { height: 40px; }
    .logo-text h2 { font-size: 1.3rem; }
    .logo-text span { font-size: 0.65rem; }

    /* Hamburger: Show it */
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Nav Wrapper: Slide out logic */
    .nav-wrapper { 
        position: fixed; 
        left: -100%; 
        top: 70px; /* Adjust based on header height */
        flex-direction: column; 
        background-color: white; 
        width: 100%; 
        height: calc(100vh - 70px); 
        padding: 40px 20px; 
        transition: 0.3s; 
        align-items: flex-start; 
        border-top: 1px solid #f0f0f0; 
        overflow-y: auto; 
    }
    .nav-wrapper.active { left: 0; }

    /* Mobile Links */
    nav ul { flex-direction: column; width: 100%; gap: 20px; margin-bottom: 30px; }
    nav a { font-size: 1.2rem; display: block; padding: 10px 0; border-bottom: 1px solid #f9f9f9; }
    
    .header-contact { align-items: flex-start; margin-top: 20px; padding-top: 20px; border-top: 2px solid #f0f0f0; width: 100%; }

    /* 2. Hero & Sections */
    #hero { padding: 60px 20px; text-align: center; align-items: center; min-height: 60vh; }
    #hero h1 { font-size: 2.2rem; }
    .hero-buttons { justify-content: center; }

    /* 3. Section Grids -> Stack Vertically */
    .feature-list { grid-template-columns: 1fr; }
    .services-container { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    
    .section-header-center h2 { font-size: 2.2rem; }
    .footer-top-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-info-item { justify-content: center; }
    .footer-buttons { justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 15px; }
}