/* Basic Reset and Box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a; /* Dark background */
    color: #f0f0f0; /* Light text */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header and Navigation */
header {
    background-color: #222;
    padding: 1rem 0;
    position: sticky; /* Optional: Keeps header at the top on scroll */
    top: 0;
    z-index: 10; /* Ensure it's above other content */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav h1 {
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #f0f0f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: #444;
}

/* Main Content Sections */
main section {
    padding: 40px 0;
}

.hero {
    text-align: center;
    padding: 80px 0;
    background-color: #333; /* Slightly darker hero background */
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.services {
    background-color: #2a2a2a; /* Slightly lighter services background */
}

.services h2,
.contact h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.contact {
    background-color: #333; /* Slightly darker contact background */
    text-align: center;
}

.contact p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.contact a {
    color: #add8e6; /* Light blue for links */
    text-decoration: none;
}

.contact a:hover,
.contact a:focus {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #222;
    color: #f0f0f0;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
}

.services {
    background-color: #2a2a2a; /* Slightly lighter services background */
    padding: 40px 0;
}

.services h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.services-content { /* New container for the paragraphs */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    gap: 20px; /* Space between the boxes */
    max-width: 1200px; /* Match the main container width for consistency */
    margin: 0 auto; /* Center the paragraph container */
    padding: 0 20px; /* Add some horizontal padding */
}

.services-content p {
    flex: 1 1 calc(50% - 20px); /* Each paragraph takes up roughly 50% width with spacing */
    margin-bottom: 0; /* Remove default paragraph margin within the flex container */
    padding: 20px;
    background-color: #333; /* Slightly darker background for the boxes */
    border-radius: 5px;
}

/* Styles for the contact form layout */
.contact-form {
    display: grid;
    grid-template-columns: auto 1fr; /* Auto for label width, 1fr for input */
    grid-gap: 10px; /* Spacing between rows and columns */
    padding: 10px;
}

.contact-form .form-row {
    display: contents; /* Make .form-row children participate in the grid directly */
}

.contact-form label {
    text-align: left; /* Ensure labels are left-aligned within their grid cell */
    padding-right: 10px; /* Add some spacing between label and input */
}

.contact-form input[type="text"],
.contact-form textarea { /* Apply to textarea */
    width: 100%; /* Make inputs take up the remaining width */
    padding: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Styles for the submit button */
.contact-form input[type="submit"] {
    background-color: #007bff; /* Consistent primary color */
    color: white;
    padding: 10px 15px; /* Adjust as needed */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    grid-column: 2 / 3; /* Place it in the input column */
    justify-self: start; /* Align it to the left within its grid cell */
    margin-top: 20px; /* Add more space above the button */
    transition: background-color 0.3s ease;
}

.contact-form input[type="submit"]:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .services-content {
        flex-direction: column; /* Stack paragraphs vertically on smaller screens */
    }

    .services-content p {
        width: 100%; /* Each paragraph takes full width on smaller screens */
    }
}

/* Basic Responsive Design using Media Queries */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }

    nav h1 {
        margin-bottom: 10px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem;
        text-align: center;
        border-radius: 0;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    main section {
        padding: 30px 0;
    }

    .container {
        padding: 15px;
    }
}