/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Color Palette - Clean Corporate (Trustworthy Blue/Navy) */
    --bg-body: #ffffff;
    --bg-light: #f3f4f6;
    /* Light grey for section contrast */
    --bg-dark: #0f172a;
    /* Navy Blue for footer/hero */
    --bg-dark-gray: #1e293b;
    /* New Dark Gray */

    --primary: #0f172a;
    /* Dark Navy - Trust/Stability */
    --accent: #2563eb;
    /* Bright Blue - Action/Link */
    --accent-hover: #1d4ed8;

    --text-main: #334155;
    /* Slate 700 */
    --text-dark: #0f172a;
    /* Slate 900 - Headings */
    --text-light: #94a3b8;
    /* Slate 400 */
    --text-white: #ffffff;

    --nav-height: 80px;
    --transition-fast: 0.3s ease;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 16px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    color: var(--text-white);
    /* Hero text is usually on dark bg */
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 1rem;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* =========================================
   2. COMPONENTS
   ========================================= */
.container {
    max-width: 1024px;
    /* Slightly tighter for text readability */
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border-radius: 4px;
    /* More square for corporate feel */
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-white);
    color: var(--text-white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.nav-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--nav-height);
    background-color: var(--primary);
    /* Fallback */
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    /* AC/Engineering Vibe */
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 1100px;
    width: 90%;
    /* Parent container */
}

/* Explicit animations for children to control timing */
.hero h1 {
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero p {
    color: #cbd5e1;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.hero div {
    /* Buttons container */
    animation: fadeInUp 1s ease-out 0.9s backwards;
}

/* =========================================
   5. SECTIONS GENERAL
   ========================================= */
.section {
    padding: 6rem 0;
}

.section-bg-light {
    background-color: var(--bg-light);
}

.section-bg-dark-gray {
    background-color: var(--bg-dark-gray);
    color: var(--text-white);
}

.section-bg-dark-gray .section-title p {
    color: #cbd5e1;
}

.section-bg-dark-gray h2 {
    color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title p {
    color: var(--text-main);
    font-size: 1rem;
    margin-top: 1rem;
}

/* =========================================
   6. SERVICES (3 Column)
   ========================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--accent);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

/* =========================================
   7. WORKS (Grid)
   ========================================= */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* 2 columns on tablet, 1 on mobile */
    gap: 2rem;
}

.work-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.work-image {
    height: 200px;
    background: #e2e8f0;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-content {
    padding: 1.5rem;
}

.work-category {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.work-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.work-desc {
    font-size: 0.9rem;
    color: var(--text-main);
}

/* =========================================
   8. COMPANY PROFILE (Table)
   ========================================= */
.company-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
    /* For rounded corners */
}

.company-table th,
.company-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.company-table th {
    background-color: var(--bg-light);
    width: 30%;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

/* =========================================
   9. CONTACT FORM
   ========================================= */
.contact-container {
    max-width: 600px;
    /* Narrower for form */
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
    background: var(--bg-dark);
    padding: 4rem 0 2rem;
    color: var(--text-white);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #94a3b8;
}

/* =========================================
   11. ANIMATIONS & MEDIA QUERIES
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
        /* JS will toggle */
    }

    .menu-toggle {
        display: block;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background-color: var(--bg-light);
        padding-bottom: 0.5rem;
    }

    .company-table td {
        padding-top: 0.5rem;
    }
}