/* Direct targeting of blog section headings */
.prose h2:contains("Why Flexible Working Matters for Neurodiversity"),
.prose h2:contains("Our Approach to Flexibility"),
.prose h2:contains("The Benefits We've Seen"),
.prose h2:contains("Looking Forward"),
.prose h3:contains("Why Flexible Working Matters for Neurodiversity"),
.prose h3:contains("Our Approach to Flexibility"),
.prose h3:contains("The Benefits We've Seen"),
.prose h3:contains("Looking Forward"),
.prose .section-heading-large {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #00717C !important;
    display: block !important;
    margin-top: 4rem !important;
    margin-bottom: 2rem !important;
    border-bottom: 4px solid rgba(0, 113, 124, 0.4) !important;
    padding-bottom: 1rem !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

/* Spectrum Dynamics CIC - Main Stylesheet */

/* Color Palette - Updated for accessibility and aesthetics */
:root {
    --primary: #00717C;     /* Deep teal - Calming and professional */
    --secondary: #FF7F41;   /* Warm orange - Energetic and engaging */
    --tertiary-1: #8C6A9D;  /* Muted purple - Represents creativity */
    --tertiary-2: #7BA05B;  /* Sage green - Represents growth and support */
    --background: #FFF9EB;  /* Soft cream - Reduces eye strain */
    --background-alt: #F7F7F7; /* Light gray */
    --text: #333333;        /* Dark gray */
    --text-secondary: #555555; /* Medium gray - Improved contrast */
    --text-light: #FFFFFF;  /* White text for dark backgrounds */
    --text-on-cream: #333333; /* Dark text for cream backgrounds */
    --link: #00717C;        /* Teal - Consistent with primary */
    --link-hover: #005A63;  /* Darker teal */
    --focus: #FF7F41;       /* Warm orange - High contrast focus */
}

/* Base Typography - Updated for better readability and accessibility */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
    background-color: var(--background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito Sans', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0.75em;
    color: var(--primary);
}

h1 {
    font-size: 2.25rem; /* 36px */
    line-height: 1.2;
    margin-bottom: 0.75em;
}

h2 {
    font-size: 1.875rem; /* 30px */
    line-height: 1.3;
    margin-bottom: 0.75em;
}

h3 {
    font-size: 1.5rem; /* 24px */
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 0.75em;
}

h4 {
    font-size: 1.25rem; /* 20px */
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.5em;
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 70ch; /* Improves readability by limiting line length */
    color: var(--text-on-cream); /* Ensure dark text on cream backgrounds */
}

small {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

/* Improved list readability */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only.focus:not-sr-only {
    position: fixed;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    z-index: 9999;
}

/* Focus styles - Enhanced for better visibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus, [tabindex]:focus {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(255, 127, 65, 0.4); /* Additional focus indicator */
    transition: outline-offset 0.2s ease;
}

/* Ensure focus is visible in high contrast mode */
@media (forced-colors: active) {
    a:focus, button:focus, input:focus, textarea:focus, select:focus, [tabindex]:focus {
        outline: 3px solid CanvasText;
    }
}

/* Links - Updated for better accessibility */
a {
    color: var(--link);
    text-decoration: underline; /* Underline for better accessibility */
    text-underline-offset: 0.2em; /* Improved underline positioning */
    transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--link-hover);
    text-decoration-thickness: 2px;
}

/* External links indicator */
a[href^="http"]:not([href*="spectrumdynamics.co.uk"])::after {
    content: " ↗";
    display: inline-block;
    margin-left: 0.2em;
}

/* Buttons - Enhanced for accessibility and visual appeal */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 10rem; /* Ensures sufficient touch target */
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--link-hover);
    border-color: var(--link-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #E86A2D; /* Darker orange */
    border-color: #E86A2D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover, .btn-outline:focus {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Forms - Improved for accessibility */
input, textarea, select {
    padding: 0.875rem;
    border: 2px solid #ccc;
    border-radius: 0.375rem;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

input:hover, textarea:hover, select:hover {
    border-color: #999;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 124, 0.2);
}

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

/* Form validation styles */
input.error, textarea.error, select.error {
    border-color: #d9534f;
}

.error-message {
    color: #d9534f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Accessible checkboxes and radio buttons */
.checkbox-group, .radio-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.checkbox-group input, .radio-group input {
    width: auto;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.checkbox-group label, .radio-group label {
    margin-bottom: 0;
    font-weight: normal;
}

/* Spacing and Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-sm {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.section-lg {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Card component */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
/* Blog Post Styling */
.prose h2 {
    color: #00717C;
    font-size: 2.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 113, 124, 0.2);
    padding-bottom: 0.5rem;
}

.prose h3 {
    color: #00717C;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
/* Style for section headings with links */
.prose a[href^="#"] {
    color: #00717C;
    font-weight: 700;
    font-size: 2.5rem;
    text-decoration: none;
    display: block;
    margin-top: 4rem;
    margin-bottom: 2rem;
    transition: color 0.2s;
    border-bottom: 2px solid rgba(0, 113, 124, 0.2);
    padding-bottom: 0.75rem;
}

/* Specific style for blog post section headings */
.prose h2:contains("Why Flexible Working Matters for Neurodiversity"),
.prose h2:contains("Our Approach to Flexibility"),
.prose h2:contains("The Benefits We've Seen"),
.prose h2:contains("Looking Forward"),
.prose h3:contains("Why Flexible Working Matters for Neurodiversity"),
.prose h3:contains("Our Approach to Flexibility"),
.prose h3:contains("The Benefits We've Seen"),
.prose h3:contains("Looking Forward"),
.prose p:contains("Why Flexible Working Matters for Neurodiversity"),
.prose p:contains("Our Approach to Flexibility"),
.prose p:contains("The Benefits We've Seen"),
.prose p:contains("Looking Forward"),
.prose .section-heading-large {
    color: #00717C !important;
    font-weight: 800 !important;
    font-size: 2.5rem !important;
    text-decoration: none !important;
    display: block !important;
    margin-top: 4rem !important;
    margin-bottom: 2rem !important;
    transition: color 0.2s !important;
    border-bottom: 4px solid rgba(0, 113, 124, 0.4) !important;
    padding-bottom: 1rem !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}


.prose a:hover {
    color: #FF7F41;
}

.prose p {
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #333333;
    max-width: 70ch;
    letter-spacing: 0.01em;
}

/* Add more spacing after paragraphs that precede headings */
.prose p + a {
    margin-top: 4rem;
}

/* Add some visual interest to lists */
.prose ul {
    margin-left: 2rem;
    margin-bottom: 2.5rem;
    margin-top: 2rem;
    padding-left: 1rem;
}

.prose ul li {
    margin-bottom: 1.25rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.7;
    padding-left: 0.5rem;
}

.prose ul li::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0.75rem;
    width: 0.6rem;
    height: 0.6rem;
    background-color: #00717C;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add more spacing between sections */
.prose h2, .prose h3, .prose h4 {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.prose ul, .prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a:not(:first-child) {
    color: #FF7F41;
    text-decoration: underline;
    transition: color 0.2s;
    font-size: inherit;
    font-weight: inherit;
    display: inline;
    margin: 0;
}

.prose a:hover {
    color: #00717C;
}

.prose blockquote {
    border-left: 4px solid #00717C;
    padding-left: 1rem;
    font-style: italic;
    color: #4B5563;
    margin: 1.5rem 0;
}

.prose strong {
    font-weight: 700;
    color: #00717C;
}

/* Blog post image styling */
.prose img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

/* Hero section styling */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #005A63 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

/* Neurodiversity message cards */
.neurodiversity-card {
    background-color: #FFFFFF !important;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s ease;
    color: var(--text-on-cream);
}

.neurodiversity-card:hover {
    transform: translateY(-5px);
}

.neurodiversity-card p {
    color: var(--text-on-cream);
}

/* Mission and vision section */
.mission-vision {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: var(--text-on-cream);
}

.mission-vision p {
    color: var(--text-on-cream);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.625rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem 1.25rem;
    }
    
    .section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Accessibility enhancements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link enhancement */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Improved table accessibility */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--background-alt);
    font-weight: 600;
}

/* Ensure tables are responsive */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Print styles for accessibility */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
    
    a[href^="#"]:after {
        content: "";
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    table, figure {
        page-break-inside: avoid;
    }
}

/* Dark mode support for users with system preference - DISABLED */
@media (prefers-color-scheme: dark) {
    /* Disabled dark mode for now */
    /*
    :root {
        --background: #1a1a1a;
        --background-alt: #2a2a2a;
        --text: #f0f0f0;
        --text-secondary: #cccccc;
    }
    
    body {
        background-color: var(--background);
        color: var(--text);
    }
    */
    
    /* Disabled dark mode for now */
    /*
    .card, .neurodiversity-card, .mission-vision {
        background-color: var(--background-alt);
    }
    
    a {
        color: #4db6bd;
    }
    
    a:hover {
        color: #5ec8cf;
    }
    input, textarea, select {
        background-color: #FFFFFF;
        color: #333333;
        border-color: #444;
    }
    
    
    body.light-mode {
        --background: #FFF9EB;
        --background-alt: #F7F7F7;
        --text: #333333;
        --text-secondary: #555555;
    }
    */
}

/* Additional styles for better text contrast */
.bg-cream {
    background-color: var(--background);
}

.bg-cream p,
.bg-cream li,
.bg-cream span,
.bg-cream div {
    color: var(--text-on-cream);
}

.bg-teal {
    background-color: var(--primary);
}

.bg-teal p,
.bg-teal li,
.bg-teal span,
.bg-teal div,
.bg-teal h1,
.bg-teal h2,
.bg-teal h3,
.bg-teal h4,
.bg-teal h5,
.bg-teal h6 {
    color: var(--text-light);
}

.text-teal {
    color: var(--primary);
}

.text-orange {
    color: var(--secondary);
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 113, 124, 0.85);
    color: white;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
    color: white;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
}

.cookie-consent-actions button {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.cookie-consent-actions button:hover {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .cookie-consent-actions button {
        flex: 1;
    }
}

.text-purple {
    color: var(--tertiary-1);
}

.text-green {
    color: var(--tertiary-2);
}

.text-dark {
    color: var(--text-on-cream) !important;
}

.border-teal {
    border-color: var(--primary);
}

.border-orange {
    border-color: var(--secondary);
}

.border-purple {
    border-color: var(--tertiary-1);
}

.border-green {
    border-color: var(--tertiary-2);
}

/* Dropdown menu delay for better usability */
.dropdown-menu {
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    display: block !important;
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* Keep dropdown visible when hovering over it */
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
}

/* Add a small delay before hiding the dropdown */
.group:not(:hover) .dropdown-menu {
    transition-delay: 0.3s;
}