:root {
    --primary-color: #28AAE1; /* INREACH logo color - RGB: 40, 170, 225 - PMS: 298 C */
    --secondary-color: #0e6b94; /* Darker shade of primary for hover states and contrast */
    --accent-color: #1d87b3; /* Middle tone for accents */
    --primary-dark: #0e6b94; /* Darker version of primary for better text contrast */
    --text-color: #1f2937; /* Dark gray for main text - good contrast with white */
    --light-text: #4b5563; /* Medium gray for secondary text - improved contrast */
    --background-color: #ffffff; /* White background */
    --light-background: #f0f7fb; /* Very light blue tint for sections */
    --border-color: #d1e9f5; /* Light blue for borders */
    --spacing-unit: 1rem;
    --border-radius: 0.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-unit);
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-unit);
}

/* Header & Navigation */
.main-header {
    background-color: var(--background-color);
    box-shadow: 0 2px 8px rgba(40, 170, 225, 0.15); /* Subtle blue shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    z-index: 1001; /* Keep logo above the menu when expanded */
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo a:hover .logo-img {
    transform: scale(1.05);
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 24px;
}

.hamburger-bar {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger-bar:nth-child(1) {
    top: 4px;
}

.hamburger-bar:nth-child(2) {
    top: 11px;
}

.hamburger-bar:nth-child(3) {
    top: 18px;
}

/* Hamburger Animation */
.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
}

/* Navigation Wrapper */
.nav-wrapper {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, border-bottom 0.2s;
    padding-bottom: 3px;
    position: relative;
}

.nav-links a:hover, .nav-links a.current-page {
    color: var(--primary-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.current-page {
    position: relative;
}

.current-page::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color); /* Using darker shade for better contrast */
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600; /* Increased for better contrast */
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

.cta-button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Sections */
section {
    padding: 4rem 1rem;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Grid Layouts */
.services-grid,
.features-grid,
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.service-card,
.feature,
.cta-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(40, 170, 225, 0.1);
    border: 1px solid var(--border-color);
}

.service-card:hover,
.feature:hover,
.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(40, 170, 225, 0.15);
}

/* Footer */
.main-footer {
    background-color: var(--light-background);
    padding: 4rem 1rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(40, 170, 225, 0.1);
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.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;
}

.newsletter-signup {
    margin-top: 1.5rem;
}

.newsletter-signup h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
}

.newsletter-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.newsletter-button:hover {
    background-color: var(--primary-dark);
}

.newsletter-success {
    background-color: rgba(40, 170, 225, 0.1);
    color: var(--primary-dark);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--light-text);
}

.footer-bottom a {
    color: #28AAE1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-bottom a:hover, .footer-bottom a:focus {
    color: #0e6b94;
    text-decoration: underline;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .back-to-top {
        transition: none !important;
    }
    
    html, body {
        scroll-behavior: auto !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
    .logo {
        flex: 0 0 auto;
    }
    .menu-toggle {
        flex: 0 0 auto;
    }
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--background-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        z-index: 1000;
    }
    
    .nav-wrapper.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }
    
    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: calc(0.05s * var(--item-index, 0));
    }
    
    .nav-wrapper.active .nav-links li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }
    
    /* Add overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    section {
        padding: 2rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-button {
        width: 100%;
        padding: 0.75rem;
    }
}

/* Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    text-decoration: underline;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    z-index: 100;
    font-weight: 600;
    border-radius: 0 0 var(--border-radius) 0;
}

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

/* Responsive Navigation */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--background-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        z-index: 1000;
    }
    
    .nav-wrapper.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }
    
    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: calc(0.05s * var(--item-index, 0));
    }
    
    .nav-wrapper.active .nav-links li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }
    
    /* Add overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Accessibility - Focus States */
.menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.menu-toggle:focus:not(:focus-visible) {
    outline: none;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        left: 20px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

.breadcrumbs a {
    color: #28AAE1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.breadcrumbs a:hover, .breadcrumbs a:focus {
    color: #0e6b94;
    text-decoration: underline;
} 

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}
