:root {
    --primary-color: #e8491d;
    --secondary-color: #35424a;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --spacing-unit: 1rem;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --secondary-color: #1a202c;
    --text-color: #e2e8f0;
    --bg-color: #2d3748;
    --white: #2d3748;
    /* Card background in dark mode */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode header {
    background-color: #171923;
}

body.dark-mode main.container,
body.dark-mode .service-card {
    background-color: #1a202c;
}

body.dark-mode .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://via.placeholder.com/1200x600') no-repeat center center/cover;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Navigation Bar */
header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 0;
    border-bottom: var(--primary-color) 3px solid;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    background: none;
    box-shadow: none;
    width: 90%;
    max-width: 1200px;
}

header #branding img {
    height: 50px;
    transition: var(--transition);
}

header #branding img:hover {
    transform: scale(1.05);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

header nav ul {
    display: flex;
    gap: 20px;
}

header nav li a {
    color: var(--white);
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

header nav li a:hover,
header nav li a[aria-current="page"] {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px;
}

main.container {
    background: var(--white);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    flex: 1;
    padding: 40px;
    transition: background-color 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(53, 66, 74, 0.9), rgba(53, 66, 74, 0.9)), url('https://via.placeholder.com/1200x600') no-repeat center center/cover;
    height: 400px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn:hover {
    background: #c93a12;
    transform: translateY(-2px);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.service-card h3 {
    margin-top: 0;
    color: var(--secondary-color);
}

/* Forms */
form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--secondary-color);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(232, 73, 29, 0.2);
}

textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    padding: 30px;
    margin-top: auto;
    color: var(--white);
    background-color: var(--secondary-color);
    text-align: center;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }

    #menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        width: 100%;
        margin-top: 15px;
    }

    header nav.active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
    }

    header nav li a {
        display: block;
        text-align: center;
        padding: 10px;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    main.container {
        padding: 20px;
        width: 95%;
    }
}