:root {
    --primary: #5F9EA0;
    /* Logo Teal */
    --primary-dark: #3e7577;
    /* Darker shade of logo teal */
    --primary-light: #e0f2f1;
    /* Very light tint */
    --black: #1a1a1a;
    --dark-grey: #333333;
    --light-grey: #f4f6f8;
    --white: #ffffff;
    --border: #eef0f2;
    --container: 1400px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin-top: 0;
    letter-spacing: -0.02em;
    color: var(--black);
}

/* Header */
header {
    background: var(--white);
    color: var(--black);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary);
    /* Strong brand line */
}

header .inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--black);
    font-weight: 700;
    font-size: 1.2rem;
}

header .logo img {
    height: 50px;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--dark-grey);
    text-decoration: none;
    padding: 0 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 4px solid transparent;
    /* Moved to bottom for balance */
    transition: all 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    background: linear-gradient(to bottom, transparent 90%, rgba(95, 158, 160, 0.1) 100%);
}

/* Hero */
.hero {
    background: #1a1a1a;
    color: white;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    /* Use a gradient map effect to strongly integrate the logo teal */
    mix-blend-mode: overlay;
}

/* New: Gradient underlay to force the color tone */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 1) 0%, rgba(95, 158, 160, 0.8) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* increased z-index */
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero h1 {
    font-size: 4.5rem;
    color: white;
    max-width: 900px;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
    /* Subtle text shadow for legibility over complex background */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    color: #f0f0f0;
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
    border-left: 5px solid var(--primary);
    /* Thicker accent */
    padding-left: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-weight: 700;
    /* Bold */
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Lift */
}

.btn:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 8rem 2rem;
}

/* Section Header */
.section-header {
    margin-bottom: 4rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header h2 {
    font-size: 3rem;
    width: 40%;
    color: var(--primary-dark);
    /* Colored heading */
}

.section-header p {
    width: 50%;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    /* Re-introducing explicit gaps for "card" look but cleaner */
}

.service-card {
    background: white;
    padding: 3rem;
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    /* Strong colored top cap */
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    /* Clean look on hover */
}

.service-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.service-card p {
    color: var(--dark-grey);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.service-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-link::after {
    content: '→';
    transition: transform 0.2s;
}

.service-card:hover .service-link::after {
    transform: translateX(5px);
}

/* Footer */
footer {
    background: #111;
    color: white;
    padding: 6rem 2rem;
    border-top: 10px solid var(--primary);
    /* Colored footer top */
}

footer .inner {
    max-width: var(--container);
    margin: 0 auto;
    padding-top: 2rem;
}

footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--primary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 3px solid var(--primary);
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: var(--black);
    padding: 1rem 1.5rem;
    text-decoration: none;
    display: block;
    height: auto;
    /* Override nav a height */
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    /* Ensure alignment */
    align-items: center;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--light-grey);
    color: var(--primary-dark);
    padding-left: 2rem;
    /* Slide effect */
}

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

/* Ensure the parent link stays active/highlighted when hovering dropdown */
.dropdown:hover>a {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

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

    header .inner {
        position: relative;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 3px solid var(--primary);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
        z-index: 200;
        height: auto;
    }

    nav.open {
        display: flex;
    }

    nav a {
        height: auto;
        padding: 0.75rem 2rem;
        width: 100%;
        box-sizing: border-box;
        border-bottom: none;
    }

    /* Dropdown mobile: show all links flat */
    .dropdown {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    .dropdown-content {
        display: block;
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--primary);
        margin-left: 2rem;
        min-width: auto;
        background: var(--light-grey);
    }

    .dropdown-content a {
        padding: 0.5rem 1rem;
    }

    .hero {
        min-height: auto;
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
        overflow-wrap: break-word;
    }

    .hero p {
        font-size: 1.1rem;
        padding-left: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        width: 100%;
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .section-header p {
        width: 100%;
        font-size: 1.1rem;
    }

    .container {
        padding: 2.5rem 1rem;
    }

    footer {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(1.75rem, 12vw, 2.2rem);
    }

    header .logo img {
        height: 36px;
    }

    header .logo span {
        display: none;
    }
}