/* Health Sphere — Public Styles */

:root {
    --blue-900: #0a3d62;
    --blue-700: #0066a1;
    --blue-600: #0077b6;
    --blue-500: #0096c7;
    --blue-100: #e8f4fc;
    --grey-900: #1a2332;
    --grey-700: #4a5568;
    --grey-500: #718096;
    --grey-200: #e8ecf0;
    --grey-100: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 4px 24px rgba(10, 61, 98, 0.08);
    --radius: 12px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--grey-900);
    background: var(--white);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-600); }

.container {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--grey-200);
    backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--grey-900);
}

.logo:hover { color: var(--grey-900); }

.logo-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text strong { font-size: 1.05rem; }
.logo-text small { font-size: 0.72rem; color: var(--grey-500); font-weight: 500; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--grey-900);
    transition: 0.2s;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: var(--grey-700);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--blue-700);
    border-bottom-color: var(--blue-700);
}

.main-nav .nav-cta {
    background: var(--blue-700);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border-bottom: none !important;
}

.main-nav .nav-cta:hover {
    background: var(--blue-600);
    color: var(--white) !important;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-500) 100%);
    color: var(--white);
    padding: 4rem 0 5rem;
}

.hero-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.hero-logo-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 1.25rem 1.75rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-logo {
    width: min(100%, 480px);
    height: auto;
    display: block;
}

.logo-image {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.hero-content {
    max-width: 720px;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin: 0.5rem 0 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 640px;
    margin-inline: auto;
}

.hero-actions {
    justify-content: center;
}

.hero-map-wrap {
    width: 100%;
    max-width: 640px;
    margin-top: 0.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-500);
}

.hero .eyebrow { color: rgba(255,255,255,0.75); }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-home .hero-actions {
    margin-top: 1.5rem;
}

/* Map placeholder */
.map-placeholder {
    position: relative;
    aspect-ratio: 4/3;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    overflow: hidden;
}

.map-region {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.5;
}

.map-canada { top: 8%; left: 35%; }
.map-usa { top: 35%; left: 30%; }
.map-mexico { bottom: 15%; left: 28%; }

.map-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid var(--blue-500);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
    animation: pulse 2s infinite;
}

.pin-canada { top: 18%; left: 42%; }
.pin-usa-west { top: 48%; left: 18%; }
.pin-usa-central { top: 42%; left: 38%; }
.pin-mexico { bottom: 28%; left: 32%; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.925rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background: var(--blue-700);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-600);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.btn-light {
    background: var(--white);
    color: var(--blue-700);
}

.btn-light:hover { background: var(--grey-100); color: var(--blue-700); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--grey-100); }

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin: 0.5rem 0;
    color: var(--grey-900);
}

.section-header p { color: var(--grey-500); margin: 0; }

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.container-wide {
    width: min(100% - 2rem, 1400px);
}

.lab-card-compact .card-body {
    padding: 1rem;
}

.lab-card-compact .card-body h2,
.lab-card-compact .card-body h3 {
    font-size: 0.95rem;
    line-height: 1.3;
}

.lab-card-compact .card-body > p:not(.card-excerpt) {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.lab-card-compact .card-excerpt {
    font-size: 0.78rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lab-card-compact .card-image-logo {
    padding: 0.85rem;
    aspect-ratio: 4/3;
}

.lab-card-compact .text-link {
    font-size: 0.8rem;
}

.lab-card-compact .btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
    width: 100%;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--grey-200);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--blue-100);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue-700);
}

.card-image-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--white);
    aspect-ratio: 16/10;
}

.card-image-logo img {
    max-width: 85%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.card-body { padding: 1.5rem; }

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue-700);
    background: var(--blue-100);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.card-body h2, .card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.card-excerpt { color: var(--grey-500); font-size: 0.9rem; }

.text-link {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.feature-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue-700);
    margin-bottom: 0.75rem;
}

.feature h3 { margin: 0 0 0.5rem; }

.feature p { color: var(--grey-500); font-size: 0.95rem; }

/* CTA Banner */
.cta-banner {
    background: var(--blue-900);
    color: var(--white);
    padding: 3.5rem 0;
}

.cta-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-banner h2 { margin: 0 0 0.5rem; }
.cta-banner p { margin: 0; opacity: 0.85; }

/* Page hero */
.page-hero {
    background: linear-gradient(180deg, var(--blue-100) 0%, var(--white) 100%);
    padding: 3.5rem 0 2.5rem;
    border-bottom: 1px solid var(--grey-200);
}

.page-hero-compact { padding: 2.5rem 0 1.5rem; }

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin: 0.5rem 0;
}

.lead { font-size: 1.1rem; color: var(--grey-500); max-width: 640px; }

.breadcrumb {
    font-size: 0.875rem;
    color: var(--grey-500);
    margin-bottom: 1rem;
}

.breadcrumb a { color: var(--blue-700); }

/* Content pages */
.content-page { max-width: 760px; }
.content-page h2 { margin-top: 2rem; color: var(--blue-900); }
.content-page h3 { margin-top: 1.5rem; color: var(--grey-900); font-size: 1.1rem; }
.content-page ul { padding-left: 1.25rem; }
.content-page li { margin-bottom: 0.5rem; }
.content-page p + h3 { margin-top: 1.75rem; }

/* Lab profile */
.lab-profile-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.lab-profile-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.lab-profile-logo img {
    max-height: 60px;
    margin-bottom: 1rem;
}

.info-panel {
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-panel h3 { margin-top: 0; color: var(--blue-900); }
.info-panel p { margin-bottom: 1rem; font-size: 0.95rem; }

.lab-logo img { max-height: 48px; padding: 1rem 1rem 0; }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-lab-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-lab-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--grey-200);
    font-size: 0.9rem;
}

.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-row { margin-bottom: 1.25rem; }
.form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    color: var(--grey-700);
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--blue-700);
    box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.15);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* News */
.news-list-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--grey-200);
}

.news-list-item time {
    font-size: 0.85rem;
    color: var(--grey-500);
}

.news-list-item h2 { margin: 0.5rem 0; font-size: 1.35rem; }
.news-list-item h2 a { color: var(--grey-900); }
.news-list-item h2 a:hover { color: var(--blue-700); }

.article-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Footer */
.site-footer {
    background: var(--grey-900);
    color: rgba(255,255,255,0.8);
    padding-top: 3.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.site-footer h3, .site-footer h4 {
    color: var(--white);
    margin-top: 0;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li { margin-bottom: 0.5rem; }

.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.25rem 0;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

/* Manufacturing network map */
.network-map-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--grey-100) 0%, var(--white) 100%);
}

.network-map-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2.5rem;
}

.network-map-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--blue-900);
    margin: 0.5rem 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.network-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.network-stat {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.network-stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--blue-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.network-stat span {
    font-size: 0.8rem;
    color: var(--grey-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.network-map-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(10, 61, 98, 0.12);
    background: var(--white);
    border: 1px solid var(--grey-200);
    margin-bottom: 2rem;
}

.network-map-visual--image {
    padding: 0;
}

.network-map-image {
    width: 100%;
    height: auto;
    display: block;
}

.network-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

.network-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 3px solid var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 2;
}

.network-pin:hover {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.network-pin--canada { background: #1a4d7c; }
.network-pin--usa { background: #0097b2; }
.network-pin--mexico { background: #2d8659; }

.network-map-legend {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grey-700);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.legend-dot--canada { background: #1a4d7c; }
.legend-dot--usa { background: #0097b2; }
.legend-dot--mexico { background: #2d8659; }

.network-facility-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.network-facility-row {
    display: grid;
    grid-template-columns: 48px 1.2fr 1fr 1.5fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--grey-200);
    transition: background 0.2s;
}

.network-facility-row:last-child {
    border-bottom: none;
}

.network-facility-row:hover,
.network-facility-row.is-highlighted {
    background: var(--blue-100);
}

.network-facility-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--white);
    font-size: 0.95rem;
}

.network-facility-row--canada .network-facility-num { background: #1a4d7c; }
.network-facility-row--usa .network-facility-num { background: #0097b2; }
.network-facility-row--mexico .network-facility-num { background: #2d8659; }

.network-facility-brand strong {
    font-size: 0.95rem;
    color: var(--blue-900);
}

.network-facility-brand img {
    max-height: 44px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
}

.network-facility-location {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--grey-700);
}

.network-flag {
    margin-right: 0.35rem;
}

.network-facility-summary p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: var(--grey-500);
    line-height: 1.5;
}

.network-facility-summary .text-link {
    font-size: 0.85rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.network-map-links {
    margin-top: 1.5rem;
    text-align: center;
}

.network-map-links > p {
    color: var(--grey-500);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.network-map-link-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.network-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--grey-900);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.network-map-link:hover {
    background: var(--blue-100);
    border-color: var(--blue-700);
    color: var(--blue-900);
}

.network-map-link-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    color: var(--white);
}

.network-map-link--canada .network-map-link-num { background: #1a4d7c; }
.network-map-link--usa .network-map-link-num { background: #0097b2; }
.network-map-link--mexico .network-map-link-num { background: #2d8659; }

/* Responsive */
@media (max-width: 960px) {
    .hero-grid,
    .lab-profile-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid { gap: 1.5rem; }

    .card-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-logo-wrap {
        max-width: 100%;
        padding: 1rem 1.25rem;
    }

    .network-stats {
        grid-template-columns: 1fr;
    }

    .network-facility-row {
        grid-template-columns: 40px 1fr;
        gap: 0.75rem 1rem;
    }

    .network-facility-brand {
        grid-column: 2;
    }

    .network-facility-location {
        grid-column: 2;
    }

    .network-facility-summary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--grey-200);
        display: none;
        padding: 1rem;
    }

    .main-nav.open { display: block; }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav .nav-cta { text-align: center; }

    .form-row-2 { grid-template-columns: 1fr; }

    .card-grid-5 {
        grid-template-columns: 1fr;
    }

    .cta-banner-inner { flex-direction: column; text-align: center; }
}
