/*
Theme Name: All Medical Transport
Theme URI: https://allmedicaltransport.com
Author: ACC Medlink IT
Description: Warm, fast, mobile-first directory theme for local medical transportation providers.
Version: 1.1.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: allmed
*/

/* ---------- Tokens ---------- */
:root {
	--accent: #0e7490;        /* medical teal */
	--accent-dark: #155e75;
	--accent-light: #ecfeff;
	--amber: #f59e0b;         /* warm accent */
	--amber-dark: #b45309;
	--amber-soft: #fef3c7;
	--cream: #fdfbf7;         /* soft warm section background */
	--ink: #1e293b;
	--ink-soft: #475569;
	--ink-faint: #94a3b8;
	--line: #e7e2d8;
	--line-cool: #e2e8f0;
	--bg: #ffffff;
	--bg-soft: #fdfbf7;
	--radius: 16px;
	--radius-sm: 10px;
	--maxw: 1080px;
	--shadow: 0 2px 12px rgba(120, 100, 60, .07), 0 1px 3px rgba(15, 23, 42, .04);
	--shadow-lift: 0 8px 24px rgba(120, 100, 60, .10), 0 2px 6px rgba(15, 23, 42, .05);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.75rem; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.allmed-container { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
	padding: .85rem 1rem; max-width: var(--maxw); margin: 0 auto;
}
.site-logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.site-logo .site-logo__mark { color: var(--amber); }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; align-items: center; }
.site-nav a {
	display: inline-block; padding: .4rem .65rem; border-radius: 8px;
	text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { background: var(--cream); color: var(--ink); }
.site-nav .nav-cta a {
	background: var(--accent); color: #fff; font-weight: 600;
	padding: .45rem .9rem; border-radius: 999px;
}
.site-nav .nav-cta a:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Buttons / notices ---------- */
.allmed-btn {
	display: inline-block; border: 0; cursor: pointer; text-decoration: none;
	font: inherit; font-weight: 600; border-radius: 12px; padding: .65rem 1.25rem;
	transition: background .15s, box-shadow .15s, transform .15s;
}
.allmed-btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.allmed-btn--primary:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--shadow-lift); }
.allmed-btn--ghost { background: #fff; color: var(--accent-dark); border: 1px solid var(--line-cool); }
.allmed-btn--ghost:hover { border-color: var(--accent); }
.allmed-btn--sm { padding: .35rem .85rem; font-size: .88rem; border-radius: 10px; }
.allmed-notice { padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1rem 0; }
.allmed-notice--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(180deg, #fdf8ee 0%, var(--cream) 55%, #fff 100%);
	border-bottom: 1px solid var(--line);
	padding: 2.75rem 0 3rem;
}
.hero__grid { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
.hero__copy { text-align: left; }
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); margin-bottom: .35em; letter-spacing: -.015em; }
.hero p.hero__sub { color: var(--ink-soft); max-width: 36rem; margin: 0 0 1.5rem; font-size: 1.08rem; }
.hero__art img {
	display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
	border-radius: 24px; background-color: #d7edf3; box-shadow: var(--shadow-lift);
}
@media (min-width: 860px) {
	.hero__grid { grid-template-columns: 11fr 9fr; gap: 2.5rem; }
}

/* ---------- Search form ---------- */
.allmed-search {
	display: flex; flex-direction: column; gap: .85rem;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 1.25rem; max-width: 46rem;
	text-align: left;
}
.allmed-search__field { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.allmed-search label, .allmed-form label, .allmed-form legend { font-weight: 600; font-size: .9rem; color: var(--ink); }
.allmed-optional { font-weight: 400; color: var(--ink-faint); }
.allmed-search select, .allmed-search input[type="text"],
.allmed-form input, .allmed-form select, .allmed-form textarea {
	font: inherit; padding: .6rem .75rem; border: 1px solid var(--line-cool);
	border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.allmed-search select:focus, .allmed-search input:focus,
.allmed-form input:focus, .allmed-form select:focus, .allmed-form textarea:focus {
	border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0;
}
@media (min-width: 640px) {
	.allmed-search { flex-direction: row; align-items: flex-end; }
	.allmed-search .allmed-btn { flex: 0 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 2.75rem 0; }
.section--soft, .section--cream { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title { text-align: center; margin: 0 0 1.5rem; }
.section__title small { display: block; font-size: .85rem; font-weight: 700; color: var(--amber-dark); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2rem; }

/* Service cards */
.svc-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
.svc-grid a, a.svc-card {
	display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem;
	transition: border-color .15s, box-shadow .15s, transform .15s;
	box-shadow: var(--shadow);
}
.svc-grid a:hover, a.svc-card:hover {
	border-color: var(--amber); box-shadow: var(--shadow-lift); color: var(--accent-dark);
	transform: translateY(-2px);
}
.svc-card__img { display: block; background-color: #f3e8d3; }
.svc-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.svc-card__body { display: block; padding: .85rem 1rem 1rem; }
.svc-grid .svc-count { display: block; font-weight: 400; color: var(--ink-faint); font-size: .85rem; margin-top: .15rem; }

/* State grid */
.state-grid { display: grid; gap: .4rem; grid-template-columns: repeat(2, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 560px) { .state-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .state-grid { grid-template-columns: repeat(5, 1fr); } }
.state-grid a { display: block; padding: .45rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.state-grid a:hover { background: var(--amber-soft); color: var(--amber-dark); }

/* State flag cards (Browse by State page) */
.state-cards {
	display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr);
	list-style: none; margin: 1.5rem 0 0; padding: 0;
}
@media (min-width: 560px) { .state-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .state-cards { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 980px) { .state-cards { grid-template-columns: repeat(6, 1fr); gap: .85rem; } }
a.state-card {
	display: block; height: 100%; background: #fff; border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; text-decoration: none;
	box-shadow: var(--shadow);
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.state-card:hover, a.state-card:focus-visible {
	border-color: var(--amber); box-shadow: var(--shadow-lift); transform: translateY(-3px);
}
/* On the Browse by State page the grid escapes the 44rem prose column
   and uses the full container width; intro copy stays readable. */
.entry-content:has(.state-cards),
.entry-content:has(.svc-grid) { max-width: none; }
.entry-content:has(.state-cards) > p,
.entry-content:has(.svc-grid) > p { max-width: 44rem; }

.state-card__flag { display: block; }
.state-card__flag img,
.state-card__flag .state-flag__fallback {
	display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
	border-bottom: 1px solid var(--line-cool); background: #fff;
}
.state-card__flag .state-flag__fallback {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--accent-dark), var(--accent));
	border-color: var(--accent-dark); color: #fff;
	font-weight: 800; font-size: 1.55rem; letter-spacing: .06em;
}
.state-card__name { display: block; padding: .6rem .75rem 0; font-weight: 600; font-size: .95rem; color: var(--ink); line-height: 1.3; }
a.state-card:hover .state-card__name { color: var(--accent-dark); }
.state-card__count { display: block; padding: .15rem .75rem .75rem; font-size: .8rem; color: var(--ink-faint); white-space: nowrap; }

/* Compact state flag chips (homepage) */
.state-chips { display: grid; gap: .3rem; grid-template-columns: repeat(2, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 560px) { .state-chips { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .state-chips { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 980px) { .state-chips { grid-template-columns: repeat(5, 1fr); } }
a.state-chip {
	display: flex; align-items: center; gap: .55rem; padding: .3rem .5rem;
	border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-size: .92rem;
}
a.state-chip:hover { background: var(--amber-soft); color: var(--amber-dark); }
.state-chip img,
.state-chip .state-flag__fallback {
	flex: 0 0 auto; display: block; width: 34px; height: 23px; object-fit: cover;
	border-radius: 4px; border: 1px solid var(--line-cool); background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.state-chip .state-flag__fallback {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--accent-dark), var(--accent));
	border-color: var(--accent-dark); color: #fff;
	font-weight: 700; font-size: .55rem; letter-spacing: .05em;
}

/* ---------- Long-distance CTA banner ---------- */
.ld-banner {
	background: linear-gradient(135deg, var(--accent-dark), var(--accent));
	color: #fff; border-radius: var(--radius); padding: 1.75rem 1.75rem;
	display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
	box-shadow: var(--shadow-lift);
	border-top: 4px solid var(--amber);
}
.ld-banner h2, .ld-banner h3 { color: #fff; margin: 0 0 .25rem; font-size: 1.2rem; }
.ld-banner p { margin: 0; color: #e0f2fe; font-size: .95rem; max-width: 38rem; }
.ld-banner__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ld-banner__actions .allmed-btn--white { background: #fff; color: var(--accent-dark); }
.ld-banner__actions .allmed-btn--white:hover { background: var(--amber-soft); color: var(--amber-dark); }
.ld-banner__phone { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.ld-banner__phone:hover { color: #fde68a; }

/* ---------- Provider lists / cards ---------- */
.provider-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .85rem; }
.provider-list--featured { margin-bottom: 0; }
.provider-card {
	background: #fff; border: 1px solid var(--line-cool); border-radius: var(--radius);
	padding: 1rem 1.25rem; box-shadow: none;
}
.provider-card h3, .provider-card h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.provider-card h3 a, .provider-card h2 a { text-decoration: none; color: var(--ink); }
.provider-card h3 a:hover, .provider-card h2 a:hover { color: var(--accent-dark); text-decoration: underline; }
.provider-card__addr { margin: 0 0 .35rem; color: var(--ink-soft); font-size: .95rem; }
.provider-card__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; font-size: .95rem; }
.provider-card__phone { font-weight: 600; text-decoration: none; }
.svc-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.svc-tags a, .svc-tags span {
	display: inline-block; font-size: .78rem; font-weight: 600; text-decoration: none;
	background: var(--accent-light); color: var(--accent-dark);
	border-radius: 999px; padding: .15rem .6rem;
}

/* Nationwide featured cards */
.provider-card--national {
	border: 2px solid var(--amber); background: #fffdf5;
	box-shadow: var(--shadow); position: relative;
}
.national-badge {
	display: inline-block; background: var(--amber); color: #fff;
	font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
	border-radius: 999px; padding: .18rem .7rem; margin-bottom: .45rem;
}
.provider-card--national .provider-card__addr { color: var(--amber-dark); font-weight: 600; }

/* City list on state pages */
.city-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .3rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .city-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .city-list { grid-template-columns: repeat(3, 1fr); } }
.city-list a { text-decoration: none; padding: .35rem .5rem; border-radius: 8px; display: block; color: var(--ink-soft); }
.city-list a:hover { background: var(--amber-soft); color: var(--amber-dark); }
.city-list .count { color: var(--ink-faint); font-size: .85rem; }

/* Breadcrumbs */
.crumbs { font-size: .88rem; color: var(--ink-faint); margin: 1.25rem 0 .5rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent-dark); text-decoration: underline; }

/* Single provider */
.provider-single {
	background: #fff; border: 1px solid var(--line-cool); border-radius: var(--radius);
	padding: 1.75rem; margin: 0 0 1.5rem; box-shadow: var(--shadow);
}
.provider-single h1 { margin-bottom: .5rem; }
.provider-single__row { margin: .35rem 0; color: var(--ink-soft); }
.provider-single__row strong { color: var(--ink); }
.provider-single__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.provider-single--national { border: 2px solid var(--amber); background: #fffdf5; }

/* ---------- Forms (contact / submit) ---------- */
.allmed-form { max-width: 40rem; display: flex; flex-direction: column; gap: 1rem; }
.allmed-form__row { display: flex; flex-direction: column; gap: .3rem; }
.allmed-form__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .allmed-form__grid { grid-template-columns: 2fr 2fr 1fr; } }
.allmed-form fieldset { border: 1px solid var(--line-cool); border-radius: 10px; padding: .85rem 1rem; margin: 0; }
.allmed-checks { display: grid; gap: .4rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .allmed-checks { grid-template-columns: 1fr 1fr; } }
.allmed-check { display: flex; gap: .5rem; align-items: center; font-weight: 400 !important; }
.allmed-check input { width: auto; }
.allmed-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* ---------- Blog ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .post-list--cards { grid-template-columns: repeat(2, 1fr); } }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.post-card h3, .post-card h2 { margin: 0 0 .35rem; font-size: 1.1rem; }
.post-card h3 a, .post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card h3 a:hover, .post-card h2 a:hover { color: var(--accent-dark); }
.post-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.entry-content { max-width: 44rem; }
.entry-content h2 { margin-top: 1.75em; }
.entry-content a { text-decoration-thickness: 1px; }

/* Pagination */
.pagination { margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.pagination .page-numbers {
	display: inline-block; padding: .4rem .75rem; border: 1px solid var(--line-cool);
	border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-size: .92rem;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; }
.site-footer__banner { padding: 0 0 2rem; }
.site-footer__main { background: var(--ink); color: #cbd5e1; padding: 2rem 0; font-size: .92rem; }
.site-footer__main a { color: #e2e8f0; text-decoration: none; }
.site-footer__main a:hover { color: #fff; text-decoration: underline; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.site-footer__note { margin-top: 1.25rem; color: var(--ink-faint); font-size: .85rem; }

/* ---------- Misc ---------- */
.page-intro { color: var(--ink-soft); max-width: 44rem; }
.error-404 { text-align: center; padding: 3rem 0; }
.error-404 .allmed-search { margin: 1.5rem auto 0; }
main.site-main { padding-bottom: 1rem; min-height: 50vh; }

/* ---- Brand sales pages (national featured providers) ---- */
.brand-page { margin-top: .75rem; }
.brand-hero {
	display: grid; gap: 2rem; align-items: center;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 2rem; margin-bottom: 2rem;
}
@media (min-width: 860px) { .brand-hero { grid-template-columns: 1.1fr 1fr; padding: 2.5rem; } }
.brand-hero__logo { display: block; max-height: 64px; width: auto; max-width: 280px; object-fit: contain; margin-bottom: 1rem; }
.brand-hero__tagline { font-size: 1.15rem; color: var(--ink-soft); margin: .5rem 0 1.25rem; line-height: 1.5; }
.brand-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.brand-hero__media img { display: block; width: 100%; height: auto; border-radius: 16px; }
.svc-tags--hero { margin-top: .25rem; }
.allmed-btn--lg { font-size: 1.1rem; padding: .85rem 1.6rem; }

.brand-body { max-width: 46rem; }
.brand-body h2 { margin-top: 2rem; }
.brand-body ul { padding-left: 1.2rem; }
.brand-body li { margin: .4rem 0; }
.brand-body figure { margin: 1.5rem 0; }
.brand-body figure img { width: 100%; height: auto; border-radius: 16px; display: block; }
.brand-body figcaption { font-size: .85rem; color: var(--ink-faint); padding-top: .4rem; }
.brand-split { display: grid; gap: 1rem; }
@media (min-width: 700px) { .brand-split { grid-template-columns: 1fr 1fr; } }

.brand-cta-band {
	display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between;
	background: linear-gradient(120deg, var(--accent-dark, #155e75), var(--accent, #0e7490));
	border-top: 4px solid var(--warm, #f59e0b);
	color: #fff; border-radius: var(--radius); padding: 1.75rem 2rem; margin: 2.5rem 0 1rem;
}
.brand-cta-band h2 { color: #fff; margin: 0 0 .3rem; font-size: 1.35rem; }
.brand-cta-band p { margin: 0; color: #e0f2fe; }
