:root {
    /* Color Palette - Corporate & Trustworthy */
    --color-primary: #0f2c4a;
    /* Deep Navy - Authority */
    --color-primary-dark: #0a1f35;
    --color-secondary: #3e7cb1;
    /* Accent Blue */
    --color-accent: #c5a065;
    /* Gold/Bronze - Premium Touch */

    --color-bg-white: #ffffff;
    --color-bg-light: #f4f6f8;
    /* Light gray-blue for section banding */
    --color-bg-dark: #0f2c4a;

    --color-text-main: #1a1a1a;
    /* Sharp Black */
    --color-text-light: #4a5568;
    /* Dense Gray */
    --color-text-on-dark: #ffffff;

    --color-border: #e2e8f0;

    /* Typography - Swapped for Authority + Readability */
    --font-heading: 'Merriweather', serif;
    /* Serif for Headers = Tradition/Authority */
    --font-body: 'Inter', sans-serif;
    /* Sans for Body = Modern/Clean/Dense */

    /* Scale - Standard Web Scale */
    --text-xs: 0.8125rem;
    --text-sm: 0.9375rem;
    --text-base: 1.0625rem;
    /* ~17px */
    --text-md: 1.25rem;
    --text-lg: 1.5rem;
    --text-xl: 2rem;
    --text-2xl: 2.5rem;
    --text-3xl: 3.5rem;

    /* Spacing - Dense & Structured */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Alias fix for PHP inline styles */
    --spacing-xs: var(--space-xs);
    --spacing-sm: var(--space-sm);
    --spacing-md: var(--space-md);
    --spacing-lg: var(--space-lg);
    --spacing-xl: var(--space-xl);

    /* UI Elements */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --container-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.25;
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

h1 {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-2xl);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-primary-dark);
}

p {
    margin-bottom: 1.5rem;
    max-width: 70ch;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Layout & Grid */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-gap-xl {
    gap: var(--space-xl);
}

/* Section Banding */
.section {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.section.bg-light {
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
}

.section.bg-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-on-dark);
}

.section.no-border {
    border: none;
}

.section.bg-texture {
    background-color: #ffffff;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Components: Header */
header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--color-primary);
    text-decoration: none !important;
}

.logo span {
    color: var(--color-secondary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    height: 100%;
    align-items: center;
    margin: 0;
}

nav a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-main);
    text-transform: none;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    text-decoration: none !important;
}

nav a.active,
nav a:hover {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

/* Components: Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff !important;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none !important;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary) !important;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--color-primary);
    text-decoration: none !important;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--color-bg-light);
    color: var(--color-secondary) !important;
    border-color: var(--color-secondary);
}

/* Components: Cards */
.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg-light);
    color: var(--color-secondary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.info-card-icon svg {
    width: 24px;
    height: 24px;
}

/* Components: Footer */
footer {
    background: #0f172a;
    color: #fff;
    padding: 5rem 0 2rem;
}

footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

footer h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

footer p {
    color: #94a3b8;
    font-size: 0.95rem;
}

footer ul {
    list-style: none;
    padding: 0;
}

/* Global footer reset */
footer li {
    margin-bottom: 0.75rem;
}

footer a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 0.95rem;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(62, 124, 177, 0.1);
}

/* List Styles - Fix Duplication */
/* Use !important to override browser defaults if necessary */
ul.checked-list,
ul.clean-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

ul.checked-list li {
    position: relative;
    /* padding-left is handled by the flex gap in the HTML inline styles, 
       but if we use ::before for content, we'd need padding. 
       Currently using inline spans for circles/checks. */
    list-style-type: none !important;
    /* Double ensure */
}

/* Responsive / Mobile Optimization */
@media (max-width: 900px) {
    :root {
        --text-2xl: 1.75rem;
        --text-3xl: 2.25rem;
        --space-lg: 3rem;
        --space-xl: 3.5rem;

        /* Update aliases for mobile */
        --spacing-md: 1.5rem;
        --spacing-lg: var(--space-lg);
        --spacing-xl: var(--space-xl);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        /* Stack grids */
        gap: 2rem;
    }

    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    nav ul {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.5rem;
        height: auto;
    }

    footer .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 2rem;
    }

    footer {
        padding: 3rem 0 2rem;
    }

    .container {
        padding: 0 1.25rem;
        /* Tighter padding for mobile */
    }

    /* Hero fixes */
    .section.bg-texture {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Stack buttons on mobile */
    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem !important;
    }

    .cta-group .btn-primary,
    .cta-group .btn-outline {
        width: 100%;
        text-align: center;
        white-space: nowrap;
        /* Prevent text splitting */
    }

    /* Services Page Overrides */
    #psychoed,
    #coaching,
    #inclusion {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* About Page Overrides */
    .about-image {
        margin-bottom: 2rem;
    }

    /* General Inline Style Overrides */
    [style*="font-size: 3rem"] {
        font-size: 2.25rem !important;
        /* Fix giant page titles */
    }

    [style*="padding: var(--spacing-lg)"],
    [style*="padding: 5rem"] {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    [style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
}