/*
Theme Name: LabCare
Theme URI: https://example.com/labcare
Author: NoorTech Solutions
Author URI: https://example.com
Description: A clinical, trust-first theme built to integrate directly with the Lab Management System plugin. Pulls live test prices, lab contact details, and the patient/technician portal links straight from the plugin — no manual setup required. Also works standalone as a general diagnostic-lab marketing site.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: labcare
License: GPLv2 or later
*/

/* =========================================================================
   DESIGN TOKENS
   ========================================================================= */
:root {
	--lab-ink: #14213D;
	--lab-ink-soft: #33415C;
	--lab-paper: #F8F6F1;
	--lab-surface: #FFFFFF;
	--lab-accent: #1F7A5C;
	--lab-accent-dark: #175E46;
	--lab-accent-soft: #E4F3EC;
	--lab-flag-high: #C0392B;
	--lab-flag-low: #1D4ED8;
	--lab-line: #E4E0D6;
	--lab-muted: #62675E;

	--font-display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
	--font-body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
	--font-mono: 'IBM Plex Mono', 'Courier New', monospace;

	--container: 1180px;
	--radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--lab-paper);
	color: var(--lab-ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--lab-accent); text-decoration: none; }
a:hover { color: var(--lab-accent-dark); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--lab-ink);
	line-height: 1.15;
	margin: 0 0 .5em;
	letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow {
	font-family: var(--font-mono);
	font-size: 12.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--lab-accent);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}
.eyebrow::before {
	content: "";
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--lab-accent);
	display: inline-block;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 15px;
	padding: 13px 26px;
	border-radius: 6px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lab-ink); color: #fff; }
.btn-primary:hover { background: var(--lab-accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--lab-ink); color: var(--lab-ink); }
.btn-outline:hover { background: var(--lab-ink); color: #fff; }
.btn-accent { background: var(--lab-accent); color: #fff; }
.btn-accent:hover { background: var(--lab-accent-dark); color: #fff; }

/* =========================================================================
   SITE HEADER
   ========================================================================= */
.site-header {
	background: var(--lab-surface);
	border-bottom: 1px solid var(--lab-line);
	position: sticky; top: 0; z-index: 500;
}
.site-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 24px;
	max-width: var(--container); margin: 0 auto;
	gap: 20px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { max-height: 44px; width: auto; }
.site-title {
	font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--lab-ink); margin: 0;
}
.site-title a { color: inherit; }
.site-tagline { font-size: 12px; color: var(--lab-muted); font-family: var(--font-mono); margin: 0; }

.primary-nav ul {
	list-style: none; display: flex; gap: 30px; margin: 0; padding: 0;
}
.primary-nav a {
	color: var(--lab-ink-soft); font-weight: 500; font-size: 15px; padding: 6px 0; position: relative;
}
.primary-nav a:hover { color: var(--lab-accent); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
	font-family: var(--font-mono); font-size: 14px; color: var(--lab-ink);
	display: flex; align-items: center; gap: 6px;
}
.menu-toggle {
	display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--lab-ink);
}

@media (max-width: 900px) {
	.primary-nav { position: fixed; top: 0; right: -280px; height: 100vh; width: 260px; background: var(--lab-surface);
		box-shadow: -6px 0 24px rgba(0,0,0,.08); transition: right .25s ease; padding: 90px 24px 24px; z-index: 600; }
	.primary-nav.is-open { right: 0; }
	.primary-nav ul { flex-direction: column; gap: 18px; }
	.menu-toggle { display: block; }
	.header-phone { display: none; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
	padding: 72px 0 64px;
	background: linear-gradient(180deg, #FFFFFF 0%, var(--lab-paper) 100%);
	border-bottom: 1px solid var(--lab-line);
}
.hero-grid {
	display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.hero p.lede { font-size: 18px; color: var(--lab-ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Specimen card — the theme's signature element: styled like a lab sample label */
.specimen-card {
	background: var(--lab-surface);
	border: 1px solid var(--lab-line);
	border-radius: var(--radius);
	box-shadow: 0 18px 40px -18px rgba(20,33,61,.25);
	position: relative;
	padding: 22px 22px 18px;
	overflow: hidden;
}
.specimen-card::before {
	content: "";
	position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
	background: repeating-linear-gradient(180deg, var(--lab-ink) 0 3px, transparent 3px 9px);
	opacity: .5;
}
.specimen-card-head {
	display: flex; justify-content: space-between; align-items: center;
	font-family: var(--font-mono); font-size: 12px; color: var(--lab-muted);
	padding-left: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--lab-line); padding-bottom: 12px;
}
.specimen-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lab-accent); display: inline-block; margin-right: 6px; }
.specimen-table { width: 100%; border-collapse: collapse; padding-left: 14px; font-size: 14px; }
.specimen-table th, .specimen-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--lab-line); }
.specimen-table th { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--lab-muted); font-weight: 500; }
.specimen-table td { font-family: var(--font-mono); font-size: 13.5px; }
.specimen-table td.param-name { font-family: var(--font-body); font-weight: 500; }
.flag-high { color: var(--lab-flag-high); font-weight: 700; }
.flag-low { color: var(--lab-flag-low); font-weight: 700; }
.flag-ok { color: var(--lab-muted); }

/* =========================================================================
   TRUST STRIP
   ========================================================================= */
.trust-strip { padding: 34px 0; background: var(--lab-ink); }
.trust-strip .container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.trust-item { color: #fff; display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; flex: 1 1 200px; }
.trust-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lab-accent); flex: none; }

/* =========================================================================
   SECTIONS (generic)
   ========================================================================= */
.section { padding: 76px 0; }
.section-head { max-width: 640px; margin: 0 0 44px; }
.section-alt { background: var(--lab-surface); border-top: 1px solid var(--lab-line); border-bottom: 1px solid var(--lab-line); }

/* =========================================================================
   TESTS / SERVICES GRID
   ========================================================================= */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.test-card {
	background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--radius);
	padding: 20px 20px 18px; position: relative; padding-left: 26px;
	transition: box-shadow .15s ease, transform .15s ease;
}
.test-card::before {
	content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--lab-accent);
}
.test-card:hover { box-shadow: 0 14px 30px -18px rgba(20,33,61,.35); transform: translateY(-2px); }
.test-card .dept { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lab-muted); }
.test-card h3 { margin: 6px 0 10px; font-size: 17px; }
.test-card .price { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--lab-ink); }
.test-card .sample-type { font-size: 12.5px; color: var(--lab-muted); margin-top: 6px; }

.dept-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.dept-filter button {
	font-family: var(--font-mono); font-size: 12.5px; padding: 8px 16px; border-radius: 999px;
	border: 1px solid var(--lab-line); background: #fff; color: var(--lab-ink-soft); cursor: pointer;
}
.dept-filter button.active, .dept-filter button:hover { background: var(--lab-ink); color: #fff; border-color: var(--lab-ink); }

/* =========================================================================
   PORTALS
   ========================================================================= */
.portals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.portal-card {
	background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--radius);
	padding: 32px; position: relative; overflow: hidden;
}
.portal-card::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
	background: repeating-linear-gradient(180deg, var(--lab-ink) 0 3px, transparent 3px 9px);
	opacity: .35;
}
.portal-card .eyebrow { margin-bottom: 8px; }
.portal-card p { color: var(--lab-ink-soft); }
@media (max-width: 760px) { .portals-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   FEATURE / ABOUT BLOCKS
   ========================================================================= */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-item { padding: 4px; }
.feature-item .num { font-family: var(--font-mono); color: var(--lab-accent); font-size: 13px; margin-bottom: 10px; display:block; }
@media (max-width: 820px) { .feature-grid { grid-template-columns: 1fr; } }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   CTA BANNER
   ========================================================================= */
.cta-banner {
	background: var(--lab-accent); color: #fff; padding: 56px 0; text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #E4F3EC; font-size: 17px; }
.cta-banner .btn-primary { background: #fff; color: var(--lab-ink); }
.cta-banner .btn-primary:hover { background: var(--lab-ink); color: #fff; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--lab-ink); color: #C9D2C8; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono); margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-grid a { color: #C9D2C8; }
.footer-grid a:hover { color: #fff; }
.site-footer .footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: 13px; color: #8C978A;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* =========================================================================
   PORTAL / FULL-WIDTH TEMPLATE (Technician & Patient portal pages)
   ========================================================================= */
.lab-portal-page .site-content { background: var(--lab-paper); padding: 40px 0 80px; min-height: 60vh; }
.lab-portal-page .container-narrow { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* =========================================================================
   GENERIC PAGE / SINGLE / ARCHIVE CONTENT
   ========================================================================= */
.site-content { padding: 56px 0; }
.entry-content { max-width: 760px; }
.entry-content img { border-radius: var(--radius); }
.page-title { margin-bottom: 28px; }

.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote {
	border-left: 3px solid var(--lab-accent); margin: 24px 0; padding: 4px 20px; color: var(--lab-ink-soft); font-style: italic;
}

.pagination { display: flex; gap: 10px; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--lab-line); border-radius: 6px; font-family: var(--font-mono); font-size: 13px; }

.widget { margin-bottom: 32px; }
.widget-title { font-family: var(--font-display); font-size: 16px; margin-bottom: 14px; }

/* Empty / 404 state */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state .eyebrow { justify-content: center; }

@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; }
	.about-grid { grid-template-columns: 1fr; }
}
