/*
Theme Name: Hippocrates Health World
Theme URI: https://www.health-world.co.za/
Author: Hippocrates Health World
Description: Custom block theme for Hippocrates Health World, a health store and wellness centre in Glen Marais, Kempton Park. Gold and green brand, fast loading, built for local search.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hippocrates-health-world
*/

/* Most styling lives in theme.json. These rules cover what theme.json can't. */

:root {
	--hhw-radius: 18px;
	--hhw-shadow: 0 1px 2px rgba(18, 56, 38, .06), 0 8px 24px rgba(18, 56, 38, .06);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 110px; }

/* Sections sit flush against each other */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.hhw-topbar { font-size: .875rem; }
.hhw-topbar a { color: var(--wp--preset--color--gold-light); text-decoration: none; font-weight: 600; }
.hhw-topbar a:hover { text-decoration: underline; }
.hhw-topbar p { margin: 0; }

.hhw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .hhw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hhw-header { top: 0; position: relative; } }

.hhw-logo { margin: 0; line-height: 0; }
.hhw-logo img { display: block; width: 260px; max-width: 58vw; height: auto; }
@media (min-width: 1100px) { .hhw-logo img { width: 300px; } }

.hhw-nav .wp-block-navigation-item__content { font-weight: 500; }
.hhw-nav .wp-block-navigation__submenu-container { border-radius: 12px; padding: .5rem 0; box-shadow: var(--hhw-shadow); }
.hhw-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .5rem 1.1rem; }

/* ---------- Eyebrow label ---------- */
.hhw-eyebrow {
	font-size: .8125rem !important;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--wp--preset--color--gold-dark);
	margin-bottom: .75rem !important;
}
.has-forest-background-color .hhw-eyebrow,
.has-deep-background-color .hhw-eyebrow { color: var(--wp--preset--color--gold-light); }

/* ---------- Hero ---------- */
.hhw-hero h1, .hhw-hero h2 { color: #fff; }
.hhw-hero a:not(.wp-block-button__link) { color: var(--wp--preset--color--gold-light); }
.hhw-hero .hhw-lead { color: #D6DDD5; font-size: 1.1875rem; max-width: 36rem; }
.hhw-hero-photo img,
.hhw-photo img { border-radius: var(--hhw-radius); width: 100%; height: 100%; object-fit: cover; }
.hhw-hero-photo { margin: 0; }
.hhw-photo { margin: 0; }

.hhw-infocard {
	border-radius: 16px;
	padding: 1.25rem 1.5rem !important;
}
.hhw-infocard p { margin: 0; }
.hhw-infocard .hhw-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--wp--preset--color--muted); }
.hhw-infocard .hhw-value { font-weight: 700; font-size: 1.0625rem; }

/* ---------- Placeholder for photos still to come ---------- */
.hhw-placeholder {
	border: 2px dashed var(--wp--preset--color--line-strong);
	border-radius: var(--hhw-radius);
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--wp--preset--color--muted);
	padding: 2rem;
}

/* ---------- Stats strip ---------- */
.hhw-stat-number { font-family: var(--wp--preset--font-family--heading); font-size: 2.5rem; line-height: 1; color: var(--wp--preset--color--green); margin: 0 0 .35rem !important; }
.hhw-stat-label { margin: 0 !important; color: var(--wp--preset--color--muted); }

/* ---------- Tick list ---------- */
.hhw-ticks { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem; }
.hhw-ticks li {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: .75rem 1rem .75rem 2.6rem;
	position: relative;
	font-weight: 500;
}
.hhw-ticks li::before {
	content: "";
	position: absolute;
	left: 1rem; top: 50%;
	width: .55rem; height: 1rem;
	border: solid var(--wp--preset--color--green);
	border-width: 0 2.5px 2.5px 0;
	transform: translateY(-62%) rotate(45deg);
}

/* ---------- Cards ---------- */
.hhw-card {
	background: var(--wp--preset--color--cream);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--hhw-radius);
	padding: 1.5rem 1.5rem 1.25rem !important;
	display: flex;
	flex-direction: column;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hhw-card:hover { border-color: var(--wp--preset--color--gold); box-shadow: var(--hhw-shadow); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .hhw-card, .hhw-card:hover { transition: none; transform: none; } }
.hhw-card h3 { margin: 0 0 .35rem; font-size: 1.375rem; }
.hhw-card h3 a { color: var(--wp--preset--color--deep); text-decoration: none; }
.hhw-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.hhw-card { position: relative; }
.hhw-card .hhw-who { font-weight: 700; color: var(--wp--preset--color--gold-dark); margin: 0 0 .5rem; font-size: .9375rem; }
.hhw-card p { margin: 0 0 .75rem; }
.hhw-card .hhw-more { margin-top: auto; margin-bottom: 0; font-weight: 700; color: var(--wp--preset--color--green); }

/* ---------- Reviews ---------- */
.hhw-review {
	background: var(--wp--preset--color--forest-2);
	border-radius: var(--hhw-radius);
	padding: 1.75rem !important;
	border: 0 !important;
	margin-top: 0;
	margin-bottom: 0;
}
.hhw-review p { font-family: var(--wp--preset--font-family--heading); font-size: 1.1875rem; line-height: 1.55; color: var(--wp--preset--color--cream); }
.hhw-review p:first-child::before { content: "★★★★★"; display: block; color: var(--wp--preset--color--gold-light); letter-spacing: 3px; font-family: var(--wp--preset--font-family--body); font-size: 1rem; margin-bottom: 1rem; }
.hhw-quote-plain p:first-child::before { content: none !important; }
.hhw-review cite { color: #C9D8CD; font-style: normal; font-weight: 700; font-size: .9375rem; }

/* ---------- Brands ---------- */
.hhw-brands { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.hhw-brands li { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding: .5rem 1rem; font-weight: 500; font-size: .9375rem; }

/* ---------- FAQ ---------- */
.hhw-faq-item { border-top: 1px solid var(--wp--preset--color--line-strong); padding: 1.1rem 0; margin-bottom: 0 !important; }
.hhw-faq-item + .hhw-faq-item { margin-top: 0 !important; }
.hhw-faq-item:last-child { border-bottom: 1px solid var(--wp--preset--color--line-strong); }
.hhw-faq-item summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--wp--preset--color--deep);
	list-style: none;
	padding-right: 2rem;
	position: relative;
}
.hhw-faq-item summary::-webkit-details-marker { display: none; }
.hhw-faq-item summary::after { content: "+"; position: absolute; right: .25rem; top: -.1rem; font-size: 1.5rem; color: var(--wp--preset--color--gold-dark); }
.hhw-faq-item[open] summary::after { content: "–"; }
.hhw-faq-item p { margin: .75rem 0 0; }

/* ---------- Visit / map ---------- */
.hhw-map iframe { width: 100%; min-height: 420px; border: 0; border-radius: var(--hhw-radius); display: block; }
.hhw-address p { margin: 0 0 1rem; }

/* ---------- Page title band ---------- */
.hhw-page-head h1 { color: #fff; margin: 0; }
.hhw-breadcrumb { font-size: .875rem; color: #C9D8CD; margin: 0 0 .5rem; }
.hhw-breadcrumb a { color: var(--wp--preset--color--gold-light); }

/* ---------- Practitioner box on service pages ---------- */
.hhw-practitioner {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--hhw-radius);
	padding: 1.5rem !important;
}
.hhw-practitioner img { border-radius: 14px; }
.hhw-practitioner > .wp-block-image { flex-shrink: 0; margin: 0; }
.hhw-booking {
	border-radius: var(--hhw-radius);
	padding: 1.75rem !important;
}
.hhw-booking p { margin: 0 0 .6rem; }
.hhw-booking h3 { margin: 0 0 .9rem; }
.hhw-booking a { color: var(--wp--preset--color--gold-light); font-weight: 700; }

/* ---------- Footer ---------- */
.hhw-footer a { color: #C9D3CB; text-decoration: none; }
.hhw-footer a:hover { color: #fff; text-decoration: underline; }
.hhw-footer p { margin: 0 0 .5rem; }
.hhw-footer .hhw-footer-title { color: #fff; font-weight: 700; margin-bottom: .75rem; }
.hhw-footer-logo img { width: 240px; height: auto; display: block; }
.hhw-footer-bottom { border-top: 1px solid #24503A; font-size: .875rem; color: #9FB2A5; }

/* ---------- WhatsApp floating button ---------- */
.hhw-wa {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: #1F7A3E;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 700;
	padding: .8rem 1.1rem;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.hhw-wa:hover { background: #17642F; }
.hhw-wa svg { width: 22px; height: 22px; fill: currentColor; }
@media (max-width: 600px) { .hhw-wa span { display: none; } .hhw-wa { padding: .85rem; } }

/* Focus visibility */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 3px; border-radius: 4px; }

/* "Visit Us" call-to-action in the menu */
.hhw-nav .hhw-nav-cta > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--green);
	color: #fff !important;
	border-radius: 999px;
	padding: .65rem 1.2rem !important;
	font-weight: 700;
}
.hhw-nav .hhw-nav-cta > .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--deep); }
.hhw-nav .wp-block-navigation__responsive-container.is-menu-open { padding-top: 1.5rem; }
.hhw-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.125rem; }

/* Page-builder pages (e.g. Pagelayer) can set their own page-wide font and background.
   Keep the site's own typography so the header, menu and footer always look the same. */
body.wp-theme-hippocrates-health-world {
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 1.0625rem !important;
	font-weight: 400 !important;
	font-style: normal !important;
	background-color: var(--wp--preset--color--cream) !important;
}

/* ---------- Contact form ---------- */
.hhw-form-wrap { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--hhw-radius); padding: clamp(1.25rem, 3vw, 2rem); }
.hhw-form { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.hhw-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.hhw-field-row .hhw-field { flex: 1 1 14rem; }
.hhw-field-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.hhw-field label { font-weight: 700; font-size: .9375rem; color: var(--wp--preset--color--deep); }
.hhw-field input, .hhw-field select, .hhw-field textarea {
	font: inherit;
	font-size: 1rem;
	padding: .75rem .9rem;
	border: 1.5px solid var(--wp--preset--color--line-strong);
	border-radius: 10px;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	width: 100%;
	box-sizing: border-box;
}
.hhw-field input:focus, .hhw-field select:focus, .hhw-field textarea:focus { outline: 3px solid var(--wp--preset--color--gold-light); outline-offset: 1px; border-color: var(--wp--preset--color--green); }
.hhw-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9375rem; }
.hhw-check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--wp--preset--color--green); flex-shrink: 0; }
.hhw-hint { margin: -.4rem 0 0; font-size: .875rem; color: var(--wp--preset--color--muted); }
.hhw-submit {
	align-self: flex-start;
	background: var(--wp--preset--color--green);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: .9rem 1.75rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}
.hhw-submit:hover { background: var(--wp--preset--color--deep); }
.hhw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hhw-form-notice { border-radius: 12px; padding: 1rem 1.15rem; margin-bottom: 1.25rem; }
.hhw-form-ok { background: #E3F1E7; color: #123826; border: 1px solid #A9D3B5; }
.hhw-form-err { background: #FBEAEA; color: #7A1F1F; border: 1px solid #E8B4B4; }

/* Contact methods list */
.hhw-contact-ways { list-style: none; padding: 0 !important; display: grid; gap: .75rem; }
.hhw-contact-ways li { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: .9rem 1.1rem; }
.hhw-contact-ways strong { display: block; color: var(--wp--preset--color--deep); }
