/* Universal Reset and Smooth Scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* This creates the gliding effect */
}

body {
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    font-family: 'Inter', sans-serif;
    background-color: #35374b; /* Deep dark background */
    color: #e0e0e0;
    line-height: 1.6;
}

/* Apply structural font to headings and sidebar links */
h1, h2, h3, .nav-links a {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px; 
}

/* Layout Setup */
.layout-wrapper {
    display: flex;
    flex-direction: column;
}

.sidebar {
    display: block; 
    
    /* Layout Setup */
    position: absolute; /* Removes it from document flow so it doesn't push text down */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10; /* Ensures the logo sits on top of the content background */
    
    /* Styling */
    background-color: transparent; 
    border: none; 
    padding: 2rem 1.5rem 1rem; 
    text-align: center;
}

/* 1. Brand Container */
.brand {
    position: static; 
    margin: 0;
    padding: 0;
}

/* 2. Logo Sizing (Forced to stretch) */
.logo-img {
    width: 100%;
    max-width: 180px; 
    margin: 0 auto;
    display: block;
}

.nav-links {
    display: none; /* Absolutely hides the links on mobile */
}

/* 1. Spacing out the list items to make room for the line */
.nav-links li {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem; /* Creates space between the text and the line */
    position: relative;     /* Required to anchor the line to the bottom */
}

/* 2. Drawing the Fading Gradient Line */
.nav-links li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;      /* Centers the line */
    width: 60%;     /* Makes the line slightly narrower than the sidebar */
    height: 2px;    /* Thickness of the line */
    
    /* The Gradient: Fades from transparent -> Sage Green -> transparent */
    background: linear-gradient(90deg, transparent, #78a083, transparent);
    
    opacity: 0.3;   /* Keeps it subtle when not active */
    transition: all 0.4s ease; /* Smooth animation when hovered */
}

/* 3. The Hover Effect: The line glows and expands when you hover over the link */
.nav-links li:hover::after,
.nav-links li:has(a.active)::after {
    opacity: 1;
    width: 80%;
    left: 10%;
}


/* 5. Link Text Size */
.nav-links a {
    font-size: 1.5rem; /* Significantly increased from the standard 1rem size */
    text-decoration: none;
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #78a083; 
}

.nav-links a.active {
    color: #78a083 !important;
    font-weight: bold; 
}

/* Main Content Styling */
.content {
    flex: 1;
}

/* Section Formatting */
section {
    min-height: 100vh; /* Forces each section to fill the screen */
    padding: 4rem 2rem;
    display: flex;
    align-items: center; /* Centers content vertically */
    border-bottom: 1px solid #50727b;
}

.section-inner {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #bbb;
}

/* Buttons and Links */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    color: #78a083;
    text-decoration: none;
    border: 2px solid #78a083;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #78a083;
    color: #121212;
}

.accent-text {
    color: #78a083;
    text-decoration: none;
}

/* Grid for Services */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.card {
    background-color: #344955;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #78a083;
}

.card h3 {
    color: #fff;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .layout-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap; 
        width: 100%;
    }

    .sidebar {
        width: 340px; 
        padding: 3rem 1.5rem; 
        background-color: #344955;
        
        display: flex;
        flex-direction: column;
        justify-content: center; /* 1. Centers the links perfectly relative to the 100vh screen */
        align-items: center;
        
        height: 100vh;
        position: sticky; 
        top: 0;
        border-right: 1px solid #50727b;
    }

    /* 2. Pull the logo out of the Flexbox calculation on desktop ONLY */
    .brand {
        position: absolute;
        top: 3rem; 
        left: 0;
        width: 100%;
        padding: 0 1.5rem; /* Restores the padding to match the sidebar */
        box-sizing: border-box; /* Forces the padding to stay inside the 340px limit */
        margin-bottom: 0; 
    }

    .nav-links {
        /* 3. Remove the auto margins, let the sidebar's justify-content handle it */
        display: flex;
        flex-direction: column;
        margin-top: 0;     
        margin-bottom: 0;  
        padding: 0;       
        list-style: none; 
        width: 100%;
        text-align: center;  
    }
    
    .content {
        flex: 1; 
        min-width: 0; 
        padding: 0 4rem;
        min-height: 100vh; 
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .logo-img {
        width: 100%; 
        max-width: 200px; /* The hard cap. Change this number to dial in the exact size */
        margin: 0 auto;   /* Keeps the logo perfectly centered inside the brand container */
    }

    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ==========================================================================
   CONTACT FORM STYLING
   ========================================================================== */

/* 1. Form Layout */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Spaces out the input fields */
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* 2. Labels */
.contact-form label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #78a083; /* Sage Green */
    letter-spacing: 1px;
}

/* 3. Input Boxes & Dropdown */
.contact-form input,
.contact-form select,
.contact-form textarea {
    font-family: 'Inter', sans-serif;
    background-color: rgba(30, 35, 45, 0.6); /* Semi-transparent dark background */
    border: 1px solid #50727b;
    color: #e0e0e0;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* 4. The Active "Glow" Effect */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #78a083; /* Snaps to Sage Green */
    box-shadow: 0 0 8px rgba(120, 160, 131, 0.4); /* Adds a soft green glow */
}

/* 5. The Submit Button */
.submit-btn {
    font-family: 'Montserrat', sans-serif;
    background-color: #78a083;
    color: #1a1c23; /* Dark text for contrast */
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #5d8266; /* Darkens slightly on hover */
}