/* MODERN TECH REDESIGN */

/* 1. Variables & Global Styles */
:root {
    --primary-color: #001427; /* Dark Blue */
    --accent-color: #6B0504;  /* Dark Red */
    --bg-color: #f8f9fa;      /* Light Grey */
    --surface-color: #FFFFFF; /* White */
    --text-color: #212529;    /* Near Black */
    --text-muted-color: #77878B; /* Greyish Blue */
    --container-width: 1140px;
    --border-radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 600;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #4a0302; /* Darker red */
}

/* 2. Header & Navigation */
header {
    background-color: var(--primary-color);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo img {
    max-height: 55px;
    display: block;
    z-index: 1001;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--surface-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Navigation List */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
    position: relative;
}

.nav-link, .dropdown-toggle {
    color: var(--surface-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    display: block;
}

.nav-link:hover, .dropdown-toggle:hover {
    opacity: 1;
    color: var(--surface-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 4px;
    padding: 0.5rem 0;
    top: 100%;
    left: 0;
}

.dropdown-item {
    margin: 0;
}

.dropdown-link {
    color: var(--surface-color);
    padding: 0.75rem 1.5rem;
    display: block;
    transition: background-color 0.2s ease;
}

.dropdown-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Active States */
.nav-link.active, .dropdown-link.active {
    opacity: 1;
    font-weight: 600;
}

.nav-link::after, .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.dropdown-toggle:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Styles */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-list.active {
        right: 0;
    }

    .nav-item {
        margin: 1rem 0;
        width: 100%;
    }

    .nav-link, .dropdown-toggle {
        padding: 0.8rem 0;
        font-size: 1.1rem;
    }

    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-link {
        padding: 0.5rem 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Desktop Styles */
@media (min-width: 993px) {
    .dropdown-content {
        display: none;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

nav ul li a:hover, 
nav ul li a.active {
    opacity: 1;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Dropdown - JS Controlled */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 10px); /* Position below the nav item with a small gap */
    background-color: var(--surface-color);
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,20,39,0.15);
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) translateX(-50%);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(-50%);
}



.dropdown-content a {
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    display: block;
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
    color: var(--accent-color);
}

/* 3. Main Content & Cards */
main {
    padding: 3rem 0;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted-color);
    max-width: 800px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-card {
    background: var(--surface-color);
    padding: 2rem;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,20,39,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,20,39,0.1);
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* 4. Buttons & Forms */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent-color);
    color: var(--surface-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #500403;
    color: var(--surface-color);
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #00284d;
}

.contact-form {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,20,39,0.05);
    max-width: 700px;
    margin: 3rem auto;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 20, 39, 0.1);
}

/* 5. Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 3rem 0;
    background-color: var(--surface-color);
    border-top: 1px solid #dee2e6;
    font-size: 0.95rem;
    color: var(--text-muted-color);
}
