/* --- 1. Global Reset & Base Styles --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #343a40; /* Dark button background / Content headings / Footer background */
    --light-bg: #f8f9fa;
    --dark-bg: #212529; /* Dark header background for all pages */
    --text-color: #333;
    --white: #fff;
    --spacing: 20px;
}

/* Explicitly reset HTML/Body margin/padding to prevent the white bar */
html, body {
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    /* REDUCED VERTICAL WHITESPACE */
    padding: 15px 0; 
}

/* --- 2. Typography --- */
h1, h2, h3 {
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: left; /* Ensures all content headings are left-aligned */
}
h1 { font-size: 2.5em; }
h2 { font-size: 2em; margin-top: 1em; }
h3 { font-size: 1.5em; }

p { margin-bottom: 1em; }
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover { color: #0056b3; }

/* --- 3. Header Structure & Logo Positioning (DARK HEADER ON ALL PAGES) --- */
.main-header {
    background: var(--dark-bg);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* REDUCED WHITESPACE BELOW HEADER */
    padding-bottom: 40px; 
}

/* --- Header Top & Nav Links --- */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* REDUCED PADDING to shrink vertical space around logo/nav */
    padding-top: 10px; 
    padding-bottom: 10px;
}

.logo img {
    height: auto;
    /* LOGO SIZE MAXIMIZED (180px) for visibility of embedded text */
    max-height: 180px; 
    width: auto;
    display: block;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px; 
    padding: 10px 15px; 
    gap: 15px; 
}

.main-nav a {
    color: var(--white); 
    padding: 0; 
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9em;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* --- Hero & Branding Content (HOME PAGE HEADER CONTENT) --- */
.site-branding {
    color: var(--white); 
    /* REDUCED WHITESPACE */
    padding: 30px 0;
    text-align: left; /* Left Aligned titles */
}

.site-branding h1 {
    font-size: 3em;
    color: var(--white); 
    margin-bottom: 0;
}

.site-branding p {
    font-size: 1.25em;
    color: #ccc;
    margin-bottom: 20px;
}

/* --- FIX for Button Alignment & Size on Home Page --- */
.site-branding .button {
    display: block; 
    max-width: 250px; 
    text-align: center; 
    padding: 12px 25px; 
}

/* --- Hero Sections (SUB-PAGE HEADERS) --- */
.hero-section {
    /* REDUCED WHITESPACE */
    padding: 30px 0;
    text-align: left;
}

.hero-section h1 {
    font-size: 2.5em;
    margin-top: 0;
}

.hero-section p {
    margin-bottom: 0;
}

/* Ensures text is white when inside the dark header on sub-pages */
.main-header .hero-section h1,
.main-header .hero-section p {
    color: var(--white); 
}

.hero-section.small-hero {
    /* REDUCED WHITESPACE */
    padding: 15px 0 30px 0;
}

/* --- 4. Content Sections (Standard) --- */
section {
    /* REDUCED WHITESPACE */
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}
section:last-of-type { border-bottom: none; }

.section-description {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 30px;
    text-align: center; 
}

/* --- 5. Services Grid & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing);
    margin-top: 30px;
}

.card {
    background: var(--light-bg);
    padding: var(--spacing);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card ul {
    list-style: disc;
    margin-left: 20px;
    padding-top: 10px;
    color: #555;
}

/* --- 6. Buttons & Links (Generic Button Styles) --- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.secondary-button {
    background-color: var(--secondary-color);
    color: var(--white) !important;
}

.secondary-button:hover {
    background-color: #1a1e21;
}

.welcome-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing);
    margin-top: 30px;
}

/* --- 7. Contact Form Styles --- */
.contact-form {
    max-width: 600px;
    margin: 30px auto; 
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); 
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block; 
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%; 
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    display: block;
}

.contact-form textarea {
    resize: vertical;
}

.contact-info {
    text-align: left; 
    margin-bottom: 30px;
    margin-top: 10px;
}

/* --- 8. Footer --- */
footer {
    background: var(--secondary-color); 
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

.social a {
    color: var(--white); 
    margin: 0 5px;
}
.social a:hover {
    color: var(--primary-color);
}

/* --- 9. Media Queries (Responsiveness) --- */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        border: none; 
        background: none;
        box-shadow: none;
        padding: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1); 
    }
    
    .main-nav a {
        padding: 5px 0;
        margin: 0;
        color: var(--white); 
    }

    .site-branding {
        text-align: left;
    }

    .welcome-links {
        flex-direction: column;
        gap: 15px;
    }
    .secondary-button {
        margin-left: 0;
    }
    
    .site-branding .button {
        max-width: 100%; 
    }
}
