:root {
    --primary-color: #1D2A39;    /* Deep Navy */
    --secondary-color: #2D9CDB;  /* Electric Blue */
    --accent-color: #6A7A89;     /* Slate Grey */
    --background-color: #E8ECEF; /* Light Grey */
    --text-color: #2E2E2E;       /* Muted Blue-Grey */
    --card-background: #ffffff;
    --border-color: #BDC3C7;
    --font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 180px; /* Adjust this value based on header height */
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

header {
    background-color: var(--card-background);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav .logo img {
    height: 150px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Dropdown menu styles */
.dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-background);
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
    list-style: none;
    display: block;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
}

.hero {
    text-align: center;
    padding: 6rem 2rem;
    background-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--accent-color);
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(45, 156, 219, 0.4);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #fff;
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(45, 156, 219, 0.6);
}

section {
    padding: 4rem 0;
    background-color: var(--card-background);
    border-radius: 0;
    box-shadow: none;
}

section:nth-child(even) {
    background-color: var(--background-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-background);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06), 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.6s ease-out;
    border: 1px solid var(--border-color);
    text-align: center;
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1), 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Clickable card styles */
.clickable-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.clickable-card:hover {
    color: inherit;
    text-decoration: none;
}

/* Remove old h3 link styles and update for clickable cards */
.clickable-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.clickable-card:hover h3 {
    color: var(--secondary-color);
}

#waymark-health .waymark-health-content,
.waymark-health-showcase .waymark-health-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

#waymark-health .waymark-health-logo img,
.waymark-health-showcase .waymark-health-logo img {
    height: 150px;
}

/* Product highlight styles */
.product-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-highlight h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.product-highlight ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.product-highlight li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.product-highlight li strong {
    color: var(--primary-color);
}

/* Ember EMR link styling */
.ember-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ember-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.ember-link strong {
    font-weight: 700;
}

#contact a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* Service card enhancements */
.learn-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.learn-more:hover {
    color: var(--primary-color);
}

/* Service page specific styles */
.service-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.service-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.service-icon.large {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.service-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-hero .lead {
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.service-overview, .features-section, .technology-section, .cta-section {
    padding: 4rem 0;
}

.service-overview {
    background-color: var(--card-background);
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* Simple responsive nav for now */
    }

    #waymark-health .waymark-health-content,
    .waymark-health-showcase .waymark-health-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }

    .service-hero h1 {
        font-size: 2.5rem;
    }

    .service-hero .lead {
        font-size: 1.2rem;
    }

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

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
