/*
Theme Name: Matlosana Directory
Theme URI: https://matlosana.co.za
Author: Matlosana.co.za
Author URI: https://matlosana.co.za
Description: A purpose-built business directory theme for Matlosana.co.za, designed around HivePress. Includes a local hero search, category-first navigation and dedicated styling for HivePress listings, vendors and forms.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matlosana-directory
Tags: business-directory, custom-logo, custom-menu, featured-images, block-styles, wide-blocks, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	--md-ink: #14272e;
	--md-ink-soft: #4a5b62;
	--md-primary: #0f5068;
	--md-primary-dark: #0a3b4d;
	--md-primary-light: #e7f0f3;
	--md-accent: #e2763f;
	--md-accent-dark: #c45f2c;
	--md-accent-light: #fdf0e8;
	--md-bg: #f5f6f2;
	--md-surface: #ffffff;
	--md-muted-bg: #eef2ee;
	--md-border: #dde3df;
	--md-border-strong: #c4cec7;
	--md-radius-sm: 8px;
	--md-radius: 14px;
	--md-radius-lg: 22px;
	--md-shadow-sm: 0 2px 8px rgba(15, 80, 104, 0.06);
	--md-shadow: 0 12px 32px rgba(15, 80, 104, 0.1);
	--md-shadow-lg: 0 24px 60px rgba(10, 59, 77, 0.22);
	--md-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--md-container: 1200px;
	--md-gutter: 24px;
	--md-header-height: 84px;
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--md-header-height) + 24px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--md-bg);
	color: var(--md-ink);
	font-family: var(--md-font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

iframe {
	max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	color: var(--md-ink);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2rem, 4vw, 3.1rem);
}

h2 {
	font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

h3 {
	font-size: clamp(1.25rem, 1.8vw, 1.55rem);
}

h4 {
	font-size: 1.15rem;
}

p {
	margin: 0 0 1.15em;
}

a {
	color: var(--md-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--md-accent-dark);
}

ul,
ol {
	margin: 0 0 1.2em;
	padding-left: 1.4em;
}

blockquote {
	margin: 1.5em 0;
	padding: 0.4em 0 0.4em 1.4em;
	border-left: 4px solid var(--md-accent);
	color: var(--md-ink-soft);
	font-size: 1.1em;
}

code,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	overflow: auto;
	padding: 1.2rem;
	border-radius: var(--md-radius-sm);
	background: #102830;
	color: #eaf4f2;
}

table {
	width: 100%;
	margin-bottom: 1.5rem;
	border-collapse: collapse;
}

th,
td {
	padding: 0.7rem 0.85rem;
	border-bottom: 1px solid var(--md-border);
	text-align: left;
}

th {
	color: var(--md-ink);
	font-weight: 700;
}

hr {
	margin: 2.5rem 0;
	border: 0;
	border-top: 1px solid var(--md-border);
}

::selection {
	background: var(--md-accent);
	color: #fff;
}

:focus-visible {
	outline: 3px solid var(--md-accent);
	outline-offset: 3px;
}

/* ==========================================================================
   3. Layout utilities
   ========================================================================== */

.md-container {
	width: min(var(--md-container), 100%);
	margin-inline: auto;
	padding-inline: var(--md-gutter);
}

.md-main {
	display: block;
	min-height: 50vh;
}

.md-section {
	padding-block: clamp(2rem, 4vw, 3.5rem);
}

.md-section--front {
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.md-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 1.75rem;
}

.md-button,
.hp-button,
input[type="submit"],
input[type="button"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.72rem 1.35rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background-color: var(--md-primary);
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.md-button:hover,
.hp-button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover {
	background-color: var(--md-primary-dark);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.md-button--primary {
	background-color: var(--md-primary);
	color: #fff;
}

.md-button--accent {
	background-color: var(--md-accent);
	color: #fff;
	box-shadow: 0 10px 24px rgba(226, 118, 63, 0.28);
}

.md-button--accent:hover {
	background-color: var(--md-accent-dark);
	color: #fff;
}

.md-button--ghost {
	border-color: var(--md-border-strong);
	background: transparent;
	color: var(--md-primary);
}

.md-button--ghost:hover {
	border-color: var(--md-primary);
	background: var(--md-primary-light);
	color: var(--md-primary-dark);
}

.md-icon {
	flex: 0 0 auto;
}

.md-eyebrow {
	margin: 0 0 0.75rem;
	color: var(--md-accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.md-has-sidebar .md-section {
	padding-bottom: 4rem;
}

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 200;
	border-bottom: 1px solid var(--md-border);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(160%) blur(12px);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	min-height: var(--md-header-height);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-width: 0;
}

.custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.custom-logo-link img,
.site-branding img {
	width: auto;
	max-width: 260px;
	max-height: 58px;
	object-fit: contain;
}

.site-title {
	color: var(--md-ink);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	text-decoration: none;
}

.site-title:hover {
	color: var(--md-primary);
}

.site-description {
	margin: 0.2rem 0 0;
	color: var(--md-ink-soft);
	font-size: 0.8rem;
	line-height: 1.3;
}

.main-navigation {
	justify-self: center;
}

.primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu > li {
	position: relative;
	margin: 0;
}

.primary-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.55rem 0.75rem;
	border-radius: 999px;
	color: var(--md-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a,
.primary-menu > li.current-menu-ancestor > a {
	background-color: var(--md-primary-light);
	color: var(--md-primary-dark);
}

.primary-menu > li.menu-item-has-children > a::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-left: 0.15rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
}

.sub-menu {
	position: absolute;
	top: calc(100% + 0.55rem);
	left: 0;
	z-index: 300;
	display: block;
	min-width: 230px;
	margin: 0;
	padding: 0.5rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: #fff;
	box-shadow: var(--md-shadow);
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu,
.primary-menu li.is-submenu-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sub-menu li {
	margin: 0;
}

.sub-menu a {
	display: block;
	padding: 0.55rem 0.8rem;
	border-radius: var(--md-radius-sm);
	color: var(--md-ink);
	font-size: 0.9rem;
	text-decoration: none;
	white-space: normal;
}

.sub-menu a:hover {
	background: var(--md-primary-light);
	color: var(--md-primary-dark);
}

.submenu-toggle {
	display: none;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.site-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}

.site-header__actions .md-button {
	padding: 0.62rem 1.1rem;
	font-size: 0.88rem;
	white-space: nowrap;
}

.site-header__cta-short {
	display: none;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: #fff;
	color: var(--md-ink);
	font-family: inherit;
	font-size: 0.9rem;
	line-height: 1.2;
	cursor: pointer;
}

.menu-toggle:hover {
	background: var(--md-muted-bg);
	color: var(--md-primary-dark);
}

.search-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: #fff;
	color: var(--md-ink);
	cursor: pointer;
}

.search-toggle:hover {
	background: var(--md-muted-bg);
	color: var(--md-primary-dark);
}

.search-toggle .fa-magnifying-glass {
	font-size: 1.05rem;
	line-height: 1;
}

.md-search-form__button .fa-magnifying-glass {
	font-size: 0.9rem;
}

.md-search-modal {
	display: none;
}

.md-search-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.9rem;
}

.md-search-modal__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.md-search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: #fff;
	color: var(--md-ink);
	cursor: pointer;
}

.md-search-close:hover {
	background: var(--md-muted-bg);
	color: var(--md-primary-dark);
}

.md-hero__search .md-search-modal__head {
	display: none;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */

.md-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
	border-bottom: 1px solid rgba(15, 80, 104, 0.18);
	background:
		radial-gradient(circle at 10% 88%, rgba(226, 118, 63, 0.22), transparent 44%),
		radial-gradient(circle at 88% 8%, rgba(15, 80, 104, 0.18), transparent 40%),
		radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.35), transparent 55%),
		linear-gradient(135deg, #0f5068 0%, #4c9fbd 24%, #e6f6fb 46%, #ffd27a 72%, #e2763f 100%);
	color: var(--md-ink);
}

.md-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.7) 1.4px, transparent 1.4px);
	background-size: 30px 30px;
	opacity: 0.38;
	pointer-events: none;
}

.md-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 960px;
	text-align: center;
}

.md-hero .md-eyebrow {
	color: #a8431e;
}

.md-hero__title {
	margin: 0 auto 1rem;
	max-width: 16ch;
	color: var(--md-ink);
	font-size: clamp(2.35rem, 5.5vw, 4rem);
	line-height: 1.04;
	letter-spacing: -0.035em;
}

.md-hero__title--logo {
	display: block;
	max-width: min(100%, 640px);
	margin: 0 auto 1.5rem;
}

.md-hero__title--logo img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 8px 22px rgba(255, 252, 240, 0.98)) drop-shadow(0 2px 5px rgba(20, 39, 46, 0.18));
}

.md-hero__text {
	max-width: 62ch;
	margin: 0 auto 2rem;
	color: rgba(20, 39, 46, 0.78);
	font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.md-hero__search {
	max-width: 820px;
	margin: 0 auto 1.5rem;
	text-align: left;
}

.md-hero__search .hp-form--wide {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	margin: 0;
	padding: 0.5rem;
	border-radius: var(--md-radius-lg);
	background: #fff;
	box-shadow: 0 18px 45px rgba(15, 80, 104, 0.16);
}

.md-hero__search .hp-form--wide .hp-form__fields {
	display: flex;
	flex: 1;
	gap: 0.5rem;
	margin: 0;
	min-width: 0;
}

.md-hero__search .hp-form__field {
	flex: 1;
	margin: 0;
	min-width: 0;
}

.md-hero__search .hp-form__field:first-child {
	flex: 0 0 38%;
}

.md-hero__search .hp-form__field input,
.md-hero__search .hp-form__field select {
	width: 100%;
	height: 100%;
	min-height: 50px;
	margin: 0;
	padding: 0.65rem 0.95rem;
	border: 1px solid transparent;
	border-radius: var(--md-radius);
	background: var(--md-bg);
	color: var(--md-ink);
	font-family: inherit;
	font-size: 0.95rem;
}

.md-hero__search .hp-field--location {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	height: 100%;
	min-height: 50px;
	padding-left: 0.45rem;
	border-radius: var(--md-radius);
	background: var(--md-bg);
}

.md-hero__search .hp-field--location input {
	min-height: 48px;
	padding-left: 0.5rem;
	border: 0;
	background: transparent;
}

.md-hero__search .hp-field--location a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--md-primary);
	text-decoration: none;
}

.md-hero__search .hp-form__field input:focus,
.md-hero__search .hp-form__field select:focus {
	border-color: var(--md-primary);
	outline: none;
	background: #fff;
}

.md-hero__search .hp-form--wide .hp-form__footer {
	margin: 0;
}

.md-hero__search .hp-form__button {
	height: 100%;
	min-height: 50px;
	margin: 0;
	padding-inline: 1.6rem;
	border-radius: var(--md-radius);
	background: var(--md-accent);
	color: #fff;
	box-shadow: none;
	font-size: 0.95rem;
}

.md-hero__search .hp-form__button:hover {
	background: var(--md-accent-dark);
}

.md-hero__categories {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.md-hero__categories-label {
	margin-right: 0.25rem;
	color: rgba(20, 39, 46, 0.72);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.md-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.8rem;
	border: 1px solid rgba(15, 80, 104, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.62);
	color: var(--md-primary-dark);
	font-size: 0.82rem;
	font-weight: 550;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.md-chip:hover {
	border-color: rgba(15, 80, 104, 0.35);
	background: #fff;
	color: var(--md-primary-dark);
}

.md-hero__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.md-hero__stats li {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
}

.md-hero__stats strong {
	color: var(--md-ink);
	font-size: 1.4rem;
	font-weight: 800;
}

.md-hero__stats span {
	color: rgba(20, 39, 46, 0.72);
	font-size: 0.85rem;
}

/* ==========================================================================
   6. Entries and page headers
   ========================================================================== */

.md-entry {
	max-width: 100%;
}

.md-entry__header {
	margin-bottom: 1.5rem;
}

.md-entry__title {
	margin-bottom: 0.35rem;
}

.md-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.1rem;
	color: var(--md-ink-soft);
	font-size: 0.88rem;
}

.md-entry__meta a {
	color: var(--md-ink-soft);
}

.md-entry__thumb {
	margin: 0 0 1.75rem;
}

.md-entry__thumb img {
	width: 100%;
	border-radius: var(--md-radius);
}

.md-entry__footer {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--md-border);
}

.md-page-header {
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.md-page-header__title {
	margin-bottom: 0.5rem;
}

.md-page-header__title span {
	color: var(--md-primary);
}

.md-page-header__description {
	max-width: 70ch;
	color: var(--md-ink-soft);
}

.md-page-header .md-search-form {
	max-width: 520px;
	margin-top: 1.25rem;
}

.md-entry--front .entry-content > *:first-child {
	margin-top: 0;
}

.md-entry--listing .entry-content {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius-lg);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
}

.md-entry--listing .entry-content > *:first-child {
	margin-top: 0;
}

/* Front page block content */

.md-entry--front .entry-content .wp-block-columns {
	gap: 1rem;
}

.md-entry--front .entry-content .wp-block-column {
	min-width: 0;
}

.md-entry--front .entry-content .wp-block-image {
	margin-bottom: 0.5rem;
}

.md-entry--front .entry-content .wp-block-image img {
	border-radius: var(--md-radius-sm);
}

.md-entry--front .entry-content .wp-block-group.has-background,
.md-entry--front .entry-content .wp-block-column.has-background {
	border-radius: var(--md-radius);
}

/* Restore the live-site artwork behind the category grids. */
.md-entry--front .entry-content .wp-block-column:has(.hp-listing-categories) {
	position: relative;
	overflow: hidden;
	background-image: var(--md-front-categories-background, none);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.md-entry--front .entry-content .wp-block-column:has(.hp-listing-categories)::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(247, 245, 228, 0.72);
	pointer-events: none;
}

.md-entry--front .entry-content .wp-block-column:has(.hp-listing-categories) > * {
	position: relative;
	z-index: 1;
}

/* ==========================================================================
   7. Post cards
   ========================================================================== */

.md-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.md-card:hover {
	border-color: var(--md-border-strong);
	box-shadow: var(--md-shadow);
	transform: translateY(-3px);
}

.md-card__image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--md-muted-bg);
}

.md-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.md-card:hover .md-card__image img {
	transform: scale(1.03);
}

.md-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.2rem 1.25rem 1.3rem;
}

.md-card__eyebrow {
	margin: 0 0 0.4rem;
	color: var(--md-accent-dark);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.md-card__eyebrow a {
	color: inherit;
	text-decoration: none;
}

.md-card__title {
	margin: 0 0 0.55rem;
	font-size: 1.2rem;
	line-height: 1.3;
}

.md-card__title a {
	color: var(--md-ink);
	text-decoration: none;
}

.md-card__title a:hover {
	color: var(--md-primary);
}

.md-card__excerpt {
	margin: 0 0 1rem;
	color: var(--md-ink-soft);
	font-size: 0.92rem;
}

.md-card__meta {
	margin: auto 0 0;
	color: var(--md-ink-soft);
	font-size: 0.8rem;
}

.md-card__sep {
	margin-inline: 0.35rem;
	opacity: 0.5;
}

/* ==========================================================================
   8. Pagination, empty states and search
   ========================================================================== */

.navigation.pagination,
.md-empty + .navigation.pagination {
	margin-top: 2.5rem;
}

.nav-links,
.hp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: #fff;
	color: var(--md-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
	border-color: var(--md-primary);
	background: var(--md-primary);
	color: #fff;
}

.page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.md-empty {
	max-width: 720px;
	margin-inline: auto;
	padding: clamp(2rem, 4vw, 3rem);
	border: 1px dashed var(--md-border-strong);
	border-radius: var(--md-radius-lg);
	background: var(--md-surface);
	text-align: center;
}

.md-empty--404 {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.md-empty .md-search-form {
	max-width: 520px;
	margin: 1.5rem auto;
}

.md-404-categories {
	margin: 1.5rem 0;
}

.md-404-categories__label {
	color: var(--md-ink-soft);
	font-size: 0.85rem;
}

.md-404-categories .md-chip {
	border-color: var(--md-border);
	background: var(--md-muted-bg);
	color: var(--md-primary-dark);
}

.md-404-categories .md-chip:hover {
	border-color: var(--md-primary);
	background: var(--md-primary-light);
}

.md-search-form {
	display: flex;
	gap: 0.4rem;
	margin: 0;
	padding: 0.35rem;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--md-shadow-sm);
}

.md-search-form__field {
	flex: 1;
	min-width: 0;
	padding: 0.6rem 1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--md-ink);
	font-family: inherit;
	font-size: 0.95rem;
}

.md-search-form__field:focus {
	outline: none;
	background: var(--md-muted-bg);
}

.md-search-form__button {
	padding-inline: 1.15rem;
}

/* ==========================================================================
   9. HivePress: page, listings and categories
   ========================================================================== */

.md-main > .content-area {
	padding-block: clamp(2rem, 4vw, 3.5rem);
}

.hp-page {
	width: 100%;
	max-width: var(--md-container);
	margin-inline: auto;
	padding-inline: var(--md-gutter);
}

.hp-page__title {
	margin-bottom: 1.25rem;
}

.hp-page__header:not(:last-child) {
	margin-bottom: 2.5rem;
}

.hp-page__description {
	color: var(--md-ink-soft);
}

.hp-section:not(:last-child),
.hp-widget:not(:last-child) {
	margin-bottom: 2rem;
}

.hp-section__title {
	margin-bottom: 0.85rem;
}

/* Listing cards */

.hp-listing--view-block {
	display: flex;
	height: 100%;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hp-listing--view-block:hover {
	border-color: var(--md-border-strong);
	box-shadow: var(--md-shadow);
	transform: translateY(-3px);
}

.hp-listing--view-block .hp-listing__header {
	position: relative;
	margin: 0;
	background: var(--md-muted-bg);
}

.hp-listing--view-block .hp-listing__image {
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #fff;
}

.hp-listing--view-block .hp-listing__image img,
.hp-listing--view-block .hp-listing__image video {
	width: 100%;
	height: 100%;
	padding: 0.75rem;
	object-fit: contain;
	background: #fff;
	transition: transform 0.35s ease;
}

.hp-listing--view-block:hover .hp-listing__image img {
	transform: scale(1.025);
}

.hp-listing--view-block .hp-listing__content {
	flex: 1;
	padding: 0.6rem 1rem 0.5rem;
}

.hp-listing--view-block .hp-listing__content:not(:last-child) {
	margin-bottom: 0;
}

.hp-listing--view-block .hp-listing__title {
	margin: 0 0 0.3rem;
	font-size: 1.12rem;
	line-height: 1.3;
}

.hp-listing--view-block .hp-listing__title a {
	color: var(--md-ink);
}

.hp-listing--view-block .hp-listing__title a:hover {
	color: var(--md-primary);
}

.hp-listing--view-block .hp-listing__categories {
	margin-bottom: 0.25rem;
	color: var(--md-accent-dark);
	font-size: 0.76rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-listing--view-block .hp-listing__categories a {
	color: inherit;
	text-decoration: none;
}

.hp-listing--view-block .hp-listing__details--primary {
	color: var(--md-ink-soft);
	font-size: 0.86rem;
}

.hp-listing--view-block .hp-listing__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0;
	padding: 0.4rem 1rem 0.5rem;
	border-top: 1px solid var(--md-border);
	color: var(--md-ink-soft);
	font-size: 0.82rem;
}

.hp-listing--view-block .hp-listing__footer:not(:has(a, button, time, .hp-listing__attribute)) {
	display: none;
}

.hp-listing--view-block .hp-listing__location a {
	color: inherit;
	text-decoration: none;
}

.hp-listing--view-block .hp-listing__created-date {
	margin-top: 0.35rem;
	color: var(--md-ink-soft);
	font-size: 0.76rem;
}

.hp-listing--view-block .hp-listing__attributes--primary {
	color: var(--md-primary);
	font-weight: 650;
}

.hp-listing--view-block.hp-listing--featured {
	border-color: var(--md-accent);
	box-shadow: 0 0 0 3px var(--md-accent-light), var(--md-shadow-sm);
}

.hp-listing--view-block.hp-listing--featured:hover {
	border-color: var(--md-accent-dark);
	box-shadow: 0 0 0 3px rgba(226, 118, 63, 0.24), var(--md-shadow);
}

.hp-listing--view-block .hp-listing__featured-badge {
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	height: auto;
	padding: 0.55rem 1rem;
	border-radius: 0;
	background: linear-gradient(90deg, var(--md-accent), var(--md-accent-dark));
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.hp-listing--view-block .hp-listing__featured-badge i {
	font-size: 0.78rem;
}

/* Featured listings section on parent category pages */

.md-featured-section {
	padding: 1.2rem 1.2rem 1.35rem;
	border: 1px solid rgba(226, 118, 63, 0.55);
	border-radius: var(--md-radius);
	background: linear-gradient(180deg, var(--md-accent-light) 0%, var(--md-surface) 62%);
	box-shadow: var(--md-shadow-sm);
}

.md-featured-section .hp-section__title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 1rem;
	color: var(--md-accent-dark);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

.md-featured-section .hp-section__title::before {
	content: "";
	width: 4px;
	height: 1.3em;
	flex: 0 0 auto;
	border-radius: 999px;
	background: var(--md-accent);
}

@media only screen and (max-width: 47.99em) {
	.md-featured-section {
		padding: 1rem 0.85rem 1.15rem;
	}
}

.hp-listing--view-block .hp-listing__actions--primary .hp-listing__action {
	color: var(--md-ink-soft);
	opacity: 0.8;
}

.hp-listing--view-block .hp-listing__actions--primary .hp-listing__action:hover,
.hp-listing--view-block .hp-listing__actions--primary .hp-listing__action[data-state="active"] {
	color: var(--md-accent);
	opacity: 1;
}

/* Listing categories */

.hp-listing-category--view-block {
	display: flex;
	height: 100%;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hp-listing-category--view-block:hover {
	border-color: var(--md-border-strong);
	box-shadow: var(--md-shadow);
	transform: translateY(-3px);
}

.hp-listing-category--view-block .hp-listing-category__header {
	margin: 0;
}

.hp-listing-category--view-block .hp-listing-category__image {
	margin: 0;
	aspect-ratio: 8 / 3;
	overflow: hidden;
	background: #fff;
}

.hp-listing-category--view-block .hp-listing-category__image img {
	width: 100%;
	height: 100%;
	padding: 0.4rem 0.6rem;
	object-fit: contain;
}

.hp-listing-category--view-block .hp-listing-category__content {
	padding: 0.1rem 0.9rem 0.6rem;
}

.hp-listing-category--view-block .hp-listing-category__name {
	margin: 0 0 0.1rem;
	font-size: 1rem;
	text-align: center;
}

.hp-listing-category--view-block .hp-listing-category__name a {
	color: var(--md-ink);
	text-decoration: none;
}

.hp-listing-category--view-block .hp-listing-category__name a:hover {
	color: var(--md-primary);
}

.hp-listing-category--view-block .hp-listing-category__item-count {
	color: var(--md-ink-soft);
	text-align: center;
}

.hp-listing-category--view-block .hp-listing-category__description {
	margin-top: 0.15rem;
	color: var(--md-ink-soft);
	font-size: 0.78rem;
	line-height: 1.4;
	text-align: center;
}

/* Single listing */

.hp-listing--view-page {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius-lg);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
}

.hp-listing--view-page .hp-listing__title {
	margin-bottom: 1rem;
}

.md-listing-subtitle {
	margin: -0.65rem 0 1rem;
	color: var(--md-primary);
	font-size: clamp(0.95rem, 1.3vw, 1.1rem);
	font-weight: 650;
	line-height: 1.4;
}

.md-listing-subtitle i {
	margin-right: 0.35rem;
	color: var(--md-accent-dark);
	font-size: 0.9em;
}

.hp-listing--view-page .hp-listing__images img,
.hp-listing--view-page .hp-listing__image img {
	border-radius: var(--md-radius);
}

.hp-listing--view-page .hp-listing__attributes--primary .hp-listing__attribute {
	border-radius: var(--md-radius-sm);
	background: var(--md-muted-bg);
	font-weight: 650;
}

/* Make the whole contact row clickable, not just the text. */
.hp-listing__attribute--contact-email a,
.hp-listing__attribute--facebook a,
.hp-listing__attribute--website a,
.hp-listing__attribute--instagram a,
.hp-listing__attribute--whatsapp a,
.hp-listing__attribute--telegram a,
.hp-listing__attribute--whatschan a {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.hp-listing__attribute--contact-email a:hover,
.hp-listing__attribute--facebook a:hover,
.hp-listing__attribute--website a:hover,
.hp-listing__attribute--instagram a:hover,
.hp-listing__attribute--whatsapp a:hover,
.hp-listing__attribute--telegram a:hover,
.hp-listing__attribute--whatschan a:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The date added is intentionally hidden on the front end. It stays in the
   database and in the WordPress admin for the invoice app. */
.hp-listing__created-date,
.md-free-listing .hp-listing__images,
.md-free-listing .hp-listing__image,
.md-free-listing .hp-listing__description,
.md-free-listing .hp-listing__map,
.md-free-listing .hp-listing__attributes--secondary,
.md-free-listing .hp-listing__attributes--ternary {
	display: none !important;
}

.md-free-listing .hp-listing__attributes--primary .hp-listing__attribute:not(.hp-listing__attribute--phone1) {
	display: none !important;
}

.hp-listing__attribute--openinghours .md-business-hours {
	margin-top: 0.45rem;
	font-weight: 400;
}

.md-business-hours__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.md-business-hours__list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.18rem 0;
	border-bottom: 1px solid rgba(16, 40, 48, 0.09);
	line-height: 1.4;
}

.md-business-hours__list li:last-child {
	border-bottom: 0;
}

.md-business-hours__day {
	font-weight: 650;
}

.md-business-hours__time {
	text-align: right;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.md-business-hours__list li {
		gap: 0.65rem;
		font-size: 0.9rem;
	}
}

.hp-listing--view-page .hp-listing__actions--primary .hp-button {
	width: 100%;
}

.hp-listing--view-page .hp-listing__content,
.hp-listing--view-page .hp-listing__description {
	color: var(--md-ink);
}

/* Vendors */

.hp-vendor--view-block {
	padding: 1.25rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
}

.hp-vendor__image img {
	border: 4px solid #fff;
	box-shadow: var(--md-shadow-sm);
}

/* Grid helpers from HivePress */

.hp-grid__item {
	min-width: 0;
}

.hp-row {
	display: flex;
	flex-wrap: wrap;
}

/* Widgets inside HivePress layouts */

.hp-widget {
	padding: 1.25rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
}

.hp-widget .hp-widget__title,
.hp-widget .widget-title {
	margin-top: 0;
	font-size: 1.05rem;
}

/* HivePress pagination */

.hp-pagination .nav-links .page-numbers {
	min-width: 40px;
	min-height: 40px;
}

/* ==========================================================================
   10. HivePress forms
   ========================================================================== */

.hp-form {
	margin: 0 0 1.5rem;
}

.hp-form__field {
	margin-bottom: 1.1rem;
}

.hp-field__label,
.hp-form__label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--md-ink);
	font-size: 0.88rem;
	font-weight: 650;
}

.hp-form input[type="text"],
.hp-form input[type="email"],
.hp-form input[type="password"],
.hp-form input[type="search"],
.hp-form input[type="tel"],
.hp-form input[type="url"],
.hp-form input[type="number"],
.hp-form input[type="date"],
.hp-form input[type="time"],
.hp-form select,
.hp-form textarea {
	width: 100%;
	padding: 0.72rem 0.95rem;
	border: 1px solid var(--md-border-strong);
	border-radius: var(--md-radius-sm);
	background: #fff;
	color: var(--md-ink);
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.4;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hp-form textarea {
	min-height: 140px;
	resize: vertical;
}

.hp-form input:focus,
.hp-form select:focus,
.hp-form textarea:focus {
	border-color: var(--md-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(15, 80, 104, 0.12);
}

.hp-form input[type="checkbox"],
.hp-form input[type="radio"] {
	width: auto;
	margin-right: 0.5rem;
}

.hp-form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.25rem;
}

.hp-form__button,
.hp-form input[type="submit"] {
	padding: 0.72rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--md-primary);
	color: #fff;
	font-weight: 650;
	cursor: pointer;
}

.hp-form__button:hover,
.hp-form input[type="submit"]:hover {
	background: var(--md-primary-dark);
}

.hp-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.9rem;
}

.hp-form--narrow {
	max-width: 480px;
}

.hp-form__messages:empty {
	display: none;
}

.hp-form__messages {
	margin-bottom: 1rem;
}

.hp-form--wide {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
}

.hp-form--wide .hp-form__fields {
	display: flex;
	flex: 1;
	gap: 0.5rem;
	min-width: 0;
}

.hp-form--wide .hp-form__field {
	flex: 1;
	margin: 0;
	min-width: 0;
}

.hp-form--wide .hp-form__field input.hp-field,
.hp-form--wide .hp-form__field select.hp-field {
	height: 100%;
	margin: 0;
}

.hp-form .hp-field--location {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.hp-form .hp-field--location input {
	flex: 1;
}

.hp-form--wide .hp-form__footer {
	margin: 0;
}

.hp-form--wide .hp-form__button {
	height: 100%;
}

.hp-form--primary .hp-field__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.hp-form--primary .hp-form__field {
	position: relative;
}

/* Select2 support */

.select2-container .select2-selection--single {
	height: auto;
	min-height: 46px;
	padding: 0.45rem 0.15rem;
	border-color: var(--md-border-strong);
	border-radius: var(--md-radius-sm);
}

.select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 1.6;
}

.select2-container .select2-selection--single .select2-selection__arrow {
	top: 50%;
	transform: translateY(-50%);
}

/* ==========================================================================
   11. WordPress blocks
   ========================================================================== */

.alignwide {
	width: min(1200px, calc(100% + 2rem));
	max-width: none;
	margin-inline: auto;
}

.alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
}

/*
 * A full-width block nested inside columns must stay within its column.
 * Applying the viewport-wide rule there made the listing map wider than
 * tablet landscape viewports and pushed the whole page sideways.
 */
.wp-block-columns .alignfull {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.hp-map,
.hp-listing__map {
	width: 100%;
	max-width: 100%;
}

.wp-block-image img {
	border-radius: var(--md-radius-sm);
}

.wp-block-button__link {
	border-radius: 999px;
}

.wp-block-group.has-background,
.wp-block-column.has-background {
	border-radius: var(--md-radius);
}

.wp-block-quote {
	border-left-color: var(--md-accent);
}

.wp-block-table table {
	border: 1px solid var(--md-border);
}

.entry-content > * {
	margin-top: 0;
}

.entry-content > * + * {
	margin-top: 1.15rem;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.75em;
}

.page-links {
	clear: both;
	margin-top: 1.5rem;
	font-weight: 600;
}

/* ==========================================================================
   12. Sidebar and widgets
   ========================================================================== */

.md-sidebar .widget,
.widget-area .widget {
	margin-bottom: 1.5rem;
	padding: 1.35rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
}

.widget-title,
.widget .wp-block-heading {
	margin-top: 0;
	font-size: 1.05rem;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li + li {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--md-border);
}

.widget a {
	text-decoration: none;
}

.widget a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   13. Comments
   ========================================================================== */

.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--md-border);
}

.comments-title,
.comment-reply-title {
	font-size: 1.35rem;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	margin-bottom: 1.25rem;
	padding: 1.15rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
}

.comment-list .children {
	margin: 1rem 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.comment-author img {
	float: left;
	margin-right: 0.75rem;
	border-radius: 50%;
}

.comment-metadata {
	color: var(--md-ink-soft);
	font-size: 0.8rem;
}

.comment-content {
	clear: both;
	padding-top: 0.5rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.88rem;
	font-weight: 650;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.7rem 0.95rem;
	border: 1px solid var(--md-border-strong);
	border-radius: var(--md-radius-sm);
	font-family: inherit;
	font-size: 0.95rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--md-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(15, 80, 104, 0.12);
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer {
	margin-top: clamp(3rem, 6vw, 5rem);
	background: #0b2f3c;
	color: rgba(255, 255, 255, 0.72);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer__title {
	display: inline-block;
	margin-bottom: 0.85rem;
	color: #fff;
	font-size: 1.45rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	text-decoration: none;
}

.site-footer__title:hover {
	color: #f3b18b;
}

.site-footer__tagline {
	max-width: 36ch;
	margin-bottom: 1.25rem;
	font-size: 0.92rem;
}

.site-footer__heading {
	margin-bottom: 1rem;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-footer__list,
.site-footer .social-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list li + li {
	margin-top: 0.55rem;
}

.site-footer__list a {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.92rem;
	text-decoration: none;
}

.site-footer__list a:hover {
	color: #fff;
	text-decoration: underline;
}

.site-footer__count {
	margin-left: 0.3rem;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.8rem;
}

.site-footer__note {
	font-size: 0.9rem;
}

.site-footer .social-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.site-footer .social-menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	min-height: 38px;
	padding: 0.3rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.82rem;
	text-decoration: none;
}

.site-footer .social-menu a:hover {
	border-color: rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-block: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.82rem;
}

.site-footer__bottom p {
	margin: 0;
}

/* ==========================================================================
   15. Misc: skip link, alignment, embeds
   ========================================================================== */

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1.1rem;
	border-radius: var(--md-radius-sm);
	background: var(--md-primary);
	color: #fff;
	font-weight: 650;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
	color: #fff;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.screen-reader-text:focus {
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
}

.md-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.md-tags a {
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--md-muted-bg);
	color: var(--md-ink-soft);
	font-size: 0.8rem;
	text-decoration: none;
}

.md-tags a:hover {
	background: var(--md-primary-light);
	color: var(--md-primary-dark);
}

/* WordPress post navigation */

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 2.5rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius);
	background: var(--md-surface);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation a {
	text-decoration: none;
}

.md-nav-label {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--md-accent-dark);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.md-nav-title {
	color: var(--md-ink);
	font-weight: 650;
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.site-header__inner {
		gap: 1rem;
	}

	.primary-menu > li > a {
		padding-inline: 0.6rem;
		font-size: 0.86rem;
	}

	.site-header__actions .md-button {
		padding-inline: 0.9rem;
	}
}

@media (max-width: 960px) {
	:root {
		--md-header-height: 74px;
	}

	.site-header__inner {
		grid-template-columns: 1fr auto auto;
		gap: 0.75rem;
	}

	.site-branding {
		grid-column: 1;
		grid-row: 1;
	}

	.site-header__actions {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}

	.menu-toggle {
		grid-column: 3;
		grid-row: 1;
		display: inline-flex;
		justify-self: end;
	}

	.site-header__actions .md-button {
		padding: 0.55rem 0.85rem;
		font-size: 0.82rem;
	}

	.site-header__actions .md-icon {
		display: none;
	}

	.main-navigation {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: stretch;
		display: none;
		padding-bottom: 1.25rem;
	}

	.site-header.is-open .main-navigation {
		display: block;
	}

	.site-header.is-open .menu-toggle {
		background: var(--md-primary-light);
		color: var(--md-primary-dark);
	}

	.primary-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.primary-menu > li {
		border-top: 1px solid var(--md-border);
	}

	.primary-menu > li > a {
		display: flex;
		justify-content: space-between;
		padding: 0.8rem 0.25rem;
		border-radius: 0;
		font-size: 0.95rem;
	}

	.primary-menu > li > a:hover,
	.primary-menu > li.current-menu-item > a,
	.primary-menu > li.current_page_item > a {
		background: transparent;
		color: var(--md-primary);
	}

	.primary-menu > li.menu-item-has-children > a::after {
		display: none;
	}

	.submenu-toggle {
		position: absolute;
		top: 0.55rem;
		right: 0.25rem;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border-radius: 999px;
		color: var(--md-ink-soft);
	}

	.submenu-toggle:hover {
		background: var(--md-muted-bg);
		color: var(--md-primary);
	}

	.submenu-toggle svg {
		transition: transform 0.2s ease;
	}

	.is-submenu-open > .submenu-toggle svg {
		transform: rotate(180deg);
	}

	.sub-menu,
	.sub-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0 0 0.5rem;
		padding: 0 0 0 0.85rem;
		border: 0;
		border-left: 2px solid var(--md-border);
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.is-submenu-open > .sub-menu {
		display: block;
	}

	.md-hero__search .hp-form--wide {
		flex-direction: column;
		padding: 0.6rem;
	}

	.md-hero__search .hp-form__fields {
		flex-direction: column;
	}

	.md-hero__search .hp-form__field:first-child {
		flex: 1;
	}

	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 782px) {
	:root {
		--md-gutter: 18px;
	}

	body {
		font-size: 16px;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.md-hero__stats {
		gap: 1.5rem;
	}

	.md-entry--listing .entry-content {
		padding: 0.9rem;
		border-radius: var(--md-radius);
	}

	.hp-page {
		padding-inline: var(--md-gutter);
	}

	.hp-form--wide {
		flex-direction: column;
	}

	.hp-form--wide .hp-form__fields {
		flex-direction: column;
	}
}

@media (max-width: 600px) {
	.site-header__inner {
		gap: 0.5rem;
	}

	.custom-logo-link img,
	.site-branding img {
		max-width: 160px;
		max-height: 42px;
	}

	.site-header__cta-full {
		display: none;
	}

	.site-header__cta-short {
		display: inline;
	}

	.site-header__actions .md-button {
		padding: 0.5rem 0.8rem;
	}

	.site-description {
		display: none;
	}

	.menu-toggle__label {
		display: none;
	}

	.search-toggle {
		display: inline-flex;
	}

	.site-header__actions {
		gap: 0.45rem;
	}

	.md-hero__categories {
		display: none;
	}

	.md-hero__search {
		display: none;
	}

	body.md-search-open {
		overflow: hidden;
	}

	body.md-search-open .md-hero {
		overflow: visible;
	}

	/* The hero wrapper is a stacking context, so lift it while the search
	   sheet is open to guarantee the sheet is never painted under anything. */
	body.md-search-open .md-hero__inner {
		z-index: 1001;
	}

	body.md-search-open #md-search-modal {
		display: block;
		position: fixed;
		z-index: 1000;
		top: 4.75rem;
		left: 50%;
		width: calc(100% - 1.5rem);
		max-width: 480px;
		max-height: calc(100vh - 5.75rem);
		max-height: calc(100dvh - 5.75rem);
		overflow-y: auto;
		margin: 0;
		padding: 1rem;
		border-radius: 1rem;
		background: #fff;
		/* The spread shadow doubles as the dimmed backdrop, so the card and the
		   backdrop always paint in the same stacking context. */
		box-shadow: 0 30px 80px rgba(10, 30, 38, 0.35), 0 0 0 100vmax rgba(10, 30, 38, 0.62);
		transform: translateX(-50%);
		text-align: left;
	}

	.admin-bar body.md-search-open #md-search-modal {
		top: calc(46px + 4.75rem);
		max-height: calc(100vh - 46px - 5.75rem);
		max-height: calc(100dvh - 46px - 5.75rem);
	}

	body.md-search-open #md-search-modal .md-search-modal__head {
		display: flex;
	}

	body.md-search-open #md-search-modal .hp-form--wide {
		padding: 0;
		background: transparent;
		box-shadow: none;
	}

	body.md-search-open #md-search-modal .hp-form__fields {
		flex-direction: column;
	}

	body.md-search-open #md-search-modal .hp-form__field:first-child {
		flex: 1 1 auto;
	}

	body.md-search-open #md-search-modal .hp-form__button {
		width: 100%;
	}

	body.md-search-open #md-search-modal .md-search-form {
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	/* Mobile homepage: stack the two columns that sit side by side on desktop. */
	.wp-block-columns.is-not-stacked-on-mobile {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
		flex-basis: 100% !important;
		flex-grow: 1 !important;
		width: 100%;
	}

	/* Keep the sponsor banners inside the column instead of overflowing it. */
	.wp-block-columns.is-not-stacked-on-mobile .wp-block-image img {
		max-width: 100%;
		height: auto;
	}

	/* Category list: two compact tiles per row, no descriptions, quick to scan. */
	.wp-block-columns.is-not-stacked-on-mobile .hp-listing-categories .hp-row {
		margin-right: -0.5rem;
		margin-left: -0.5rem;
	}

	.wp-block-columns.is-not-stacked-on-mobile .hp-listing-categories .hp-grid__item {
		flex: 0 0 50%;
		max-width: 50%;
		padding-right: 0.5rem;
		padding-left: 0.5rem;
	}

	.hp-listing-category--view-block .hp-listing-category__description {
		display: none;
	}

	.hp-listing-category--view-block .hp-listing-category__content {
		padding: 0.35rem 0.5rem 0.5rem;
	}

	.hp-listing-category--view-block .hp-listing-category__name {
		font-size: 0.85rem;
		line-height: 1.25;
	}

	.hp-listing-category--view-block .hp-listing-category__item-count {
		font-size: 0.72rem;
	}

	/* Interleaved mobile homepage: banner, two categories, banner, two categories. */
	.md-home-interleaved > .wp-block-column:first-child {
		display: none;
	}

	.md-home-interleaved .hp-listing-categories .hp-row {
		align-items: stretch;
	}

	.md-home-interleaved .hp-listing-categories .hp-grid__item {
		padding: 0.45rem 0.5rem;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad {
		flex: 0 0 100%;
		max-width: 100%;
		margin: 0 !important;
		padding: 0.45rem 0.5rem;
		text-align: center;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad img {
		max-width: 240px;
		max-height: 160px;
		height: auto;
		margin-inline: auto;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad.md-stacked-ad {
		width: 220px !important;
		max-width: 220px !important;
		margin-inline: auto;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad.md-stacked-ad img {
		width: 100% !important;
		max-width: 100%;
		max-height: none;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad .wp-block-gallery {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.4rem;
	}

	.md-home-interleaved .hp-listing-categories .hp-row > .md-home-ad .wp-block-gallery .wp-block-image {
		margin-bottom: 0;
	}

	.md-hero {
		padding-block: 2.5rem 2rem;
	}

	.md-hero__title {
		font-size: clamp(2rem, 9vw, 2.75rem);
	}

	.md-hero__search .hp-form__button {
		width: 100%;
	}

	.md-hero__stats {
		flex-direction: column;
		gap: 0.5rem;
	}

	.md-hero__stats li {
		justify-content: center;
	}

	.md-grid {
		grid-template-columns: 1fr;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		text-align: left;
	}
}

/* ==========================================================================
   17. Emergency numbers page
   ========================================================================== */

.page-id-639 .md-section {
	padding-top: clamp(2.25rem, 4vw, 3.5rem);
}

.page-id-639 .md-entry__header {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
	text-align: center;
}

.page-id-639 .md-entry__title {
	margin-bottom: 0;
	color: var(--md-primary-dark);
	font-size: clamp(2.2rem, 5vw, 3.35rem);
	letter-spacing: -0.025em;
	line-height: 1.05;
}

.page-id-639 .md-entry__title::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: 1rem auto 0;
	border-radius: 999px;
	background: var(--md-accent);
}

.md-emergency {
	--md-emergency-pill-bg: #f2f7f8;
	--md-emergency-pill-border: #d6e4e8;
	--md-emergency-whatsapp-bg: #eaf7ef;
	--md-emergency-whatsapp-border: #c8e8d4;
	--md-emergency-whatsapp-ink: #17603a;
	max-width: 1120px;
	margin-inline: auto;
}

.md-emergency-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.md-emergency-icon {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.md-emergency__intro {
	max-width: 760px;
	margin: 0 auto 1.85rem;
	text-align: center;
}

.md-emergency__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.7rem;
	padding: 0.35rem 0.8rem;
	border: 1px solid #f0d6c7;
	border-radius: 999px;
	background: var(--md-accent-light);
	color: var(--md-accent-dark);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	line-height: 1.2;
	text-transform: uppercase;
}

.md-emergency__lead {
	margin: 0;
	color: var(--md-ink-soft);
	font-size: clamp(1.02rem, 1.7vw, 1.16rem);
	line-height: 1.65;
}

.md-emergency__lead a {
	color: var(--md-primary);
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.md-emergency__quick {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.9rem;
	margin-bottom: 1.25rem;
}

.md-emergency__quick-card {
	display: flex;
	flex-direction: column;
	gap: 0.22rem;
	min-width: 0;
	padding: 1.05rem 1.1rem 1.1rem;
	border: 1px solid var(--md-border);
	border-top: 4px solid var(--md-primary);
	border-radius: var(--md-radius);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
	color: var(--md-ink);
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.md-emergency__quick-card:hover {
	transform: translateY(-3px);
	border-color: var(--md-border-strong);
	box-shadow: var(--md-shadow);
}

.md-emergency__quick-card--all:hover {
	border-color: var(--md-primary-dark);
}

.md-emergency__quick-card--police:hover {
	border-top-color: var(--md-primary);
}

.md-emergency__quick-card--fire:hover {
	border-top-color: var(--md-accent);
}

.md-emergency__quick-card--medical:hover {
	border-top-color: #2f7d5c;
}

.md-emergency__quick-top {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
}

.md-emergency__quick-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 10px;
	background: var(--md-primary-light);
	color: var(--md-primary);
}

.md-emergency__quick-label {
	color: var(--md-ink-soft);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.md-emergency__quick-number {
	margin-top: 0.3rem;
	color: var(--md-primary-dark);
	font-size: clamp(1.22rem, 2.2vw, 1.55rem);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	white-space: nowrap;
}

.md-emergency__quick-note {
	color: var(--md-ink-soft);
	font-size: 0.78rem;
	line-height: 1.35;
}

.md-emergency__quick-card--all {
	border-top-color: var(--md-primary-dark);
	background: linear-gradient(145deg, var(--md-primary-dark), #0c4a60);
	color: #fff;
}

.md-emergency__quick-card--all .md-emergency__quick-icon {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.md-emergency__quick-card--all .md-emergency__quick-label,
.md-emergency__quick-card--all .md-emergency__quick-note {
	color: rgba(255, 255, 255, 0.76);
}

.md-emergency__quick-card--all .md-emergency__quick-number {
	color: #fff;
}

.md-emergency__quick-card--fire {
	border-top-color: var(--md-accent);
}

.md-emergency__quick-card--fire .md-emergency__quick-icon {
	background: var(--md-accent-light);
	color: var(--md-accent-dark);
}

.md-emergency__quick-card--medical {
	border-top-color: #2f7d5c;
}

.md-emergency__quick-card--medical .md-emergency__quick-icon {
	background: #e8f4ee;
	color: #2f7d5c;
}

.md-emergency__jump {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
}

.md-emergency__jump a {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--md-border);
	border-radius: 999px;
	background: var(--md-surface);
	color: var(--md-primary-dark);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.md-emergency__jump a:hover {
	border-color: var(--md-primary);
	background: var(--md-primary-light);
	color: var(--md-primary-dark);
}

.md-emergency__grid {
	display: grid;
	align-items: start;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.md-emergency-card {
	overflow: hidden;
	border: 1px solid var(--md-border);
	border-radius: var(--md-radius-lg);
	background: var(--md-surface);
	box-shadow: var(--md-shadow-sm);
	scroll-margin-top: 110px;
}

.md-emergency-card__header {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1.1rem 1.15rem;
	border-bottom: 1px solid var(--md-border);
	background: linear-gradient(135deg, var(--md-primary-light), var(--md-surface) 72%);
}

.md-emergency-card__header > div {
	min-width: 0;
}

.md-emergency-card__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2.45rem;
	height: 2.45rem;
	border-radius: 12px;
	background: var(--md-primary);
	box-shadow: 0 6px 14px rgba(15, 80, 104, 0.18);
	color: #fff;
}

.md-emergency-card__header h2 {
	margin: 0.05rem 0 0;
	font-size: 1.1rem;
	line-height: 1.25;
}

.md-emergency-card__header p {
	margin: 0.22rem 0 0;
	color: var(--md-ink-soft);
	font-size: 0.82rem;
	line-height: 1.4;
}

.md-emergency-card--fire .md-emergency-card__header {
	background: linear-gradient(135deg, var(--md-accent-light), var(--md-surface) 72%);
}

.md-emergency-card--fire .md-emergency-card__icon {
	background: var(--md-accent);
	box-shadow: 0 6px 14px rgba(226, 118, 63, 0.2);
}

.md-emergency-card--security .md-emergency-card__icon {
	background: var(--md-ink);
}

.md-emergency-card--helplines .md-emergency-card__icon {
	background: var(--md-primary-dark);
}

.md-emergency-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 1rem 1.15rem 1.15rem;
}

.md-emergency-subhead {
	margin: 0.1rem 0 -0.1rem;
	color: var(--md-primary);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

.md-emergency-subhead::after {
	content: "";
	display: block;
	width: 28px;
	height: 2px;
	margin-top: 0.35rem;
	border-radius: 999px;
	background: var(--md-accent);
}

.md-emergency-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.55rem 0.9rem;
	align-items: start;
	padding-bottom: 0.85rem;
	border-bottom: 1px dashed var(--md-border);
}

.md-emergency-row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.md-emergency-row__name {
	display: block;
	color: var(--md-ink);
	font-size: 0.92rem;
	font-weight: 800;
	line-height: 1.35;
}

.md-emergency-row__name a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.md-emergency-row__name a:hover {
	color: var(--md-primary);
}

.md-emergency-row__note {
	display: block;
	margin-top: 0.12rem;
	color: var(--md-ink-soft);
	font-size: 0.76rem;
	line-height: 1.4;
}

.md-emergency-row__numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.35rem;
	max-width: 100%;
}

.md-emergency-row__numbers a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.05rem;
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--md-emergency-pill-border);
	border-radius: 999px;
	background: var(--md-emergency-pill-bg);
	color: var(--md-primary-dark);
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1.15;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.md-emergency-row__numbers a:hover {
	border-color: var(--md-primary);
	background: var(--md-primary);
	color: #fff;
}

.md-emergency-row__numbers a.is-primary {
	border-color: #c7dde3;
	background: var(--md-primary-light);
	color: var(--md-primary-dark);
}

.md-emergency-row__numbers a.is-primary:hover {
	border-color: var(--md-primary);
	background: var(--md-primary);
	color: #fff;
}

.md-emergency-row__numbers a.is-whatsapp {
	border-color: var(--md-emergency-whatsapp-border);
	background: var(--md-emergency-whatsapp-bg);
	color: var(--md-emergency-whatsapp-ink);
}

.md-emergency-row__numbers a.is-whatsapp:hover {
	border-color: #1f7a4a;
	background: #1f7a4a;
	color: #fff;
}

.md-emergency a:focus-visible {
	outline: 3px solid var(--md-accent);
	outline-offset: 3px;
}

.md-emergency__note {
	margin: 1.5rem 0 0;
	padding: 1rem 1.15rem;
	border: 1px solid #f0d6c7;
	border-left: 4px solid var(--md-accent);
	border-radius: var(--md-radius);
	background: #fff8f3;
	color: var(--md-ink-soft);
	font-size: 0.86rem;
	line-height: 1.55;
}

.md-emergency__note strong {
	color: var(--md-ink);
}

.md-emergency__note a {
	color: var(--md-primary);
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (max-width: 1024px) {
	.md-emergency__quick {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.md-emergency__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.md-emergency__quick {
		grid-template-columns: 1fr;
	}

	.md-emergency__jump {
		justify-content: flex-start;
	}

	.md-emergency-row {
		grid-template-columns: 1fr;
	}

	.md-emergency-row__numbers {
		justify-content: flex-start;
	}

	.md-emergency-card__header {
		padding: 1rem;
	}

	.md-emergency-card__body {
		padding: 0.95rem 1rem 1rem;
	}

	.md-emergency__quick-card {
		padding: 1rem;
	}
}

@media (max-width: 420px) {
	.md-emergency-row__numbers a {
		padding: 0.28rem 0.5rem;
		font-size: 0.75rem;
	}
}

/* ==========================================================================
   17b. Stacked homepage advertisement
   ========================================================================== */

.md-stacked-ad {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid var(--md-border);
	border-radius: 0.65rem;
	background: #fff;
	box-shadow: var(--md-shadow-sm);
	line-height: 0;
}

.md-stacked-ad a {
	display: block;
	line-height: 0;
}

.md-stacked-ad img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* ==========================================================================
   17c. Mobile splash
   ========================================================================== */

.md-splash {
	display: none;
}

@media (max-width: 600px) {
	.md-hero__text {
		display: none;
	}

	.md-splash {
		position: fixed;
		inset: 0;
		z-index: 2000;
		display: none;
		align-items: center;
		justify-content: center;
		padding: 1.5rem;
		background: linear-gradient(135deg, #0f5068 0%, #4c9fbd 24%, #e6f6fb 46%, #ffd27a 72%, #e2763f 100%);
		color: var(--md-ink);
		text-align: center;
	}

	.md-splash.is-open {
		display: flex;
	}

	body.md-splash-open {
		overflow: hidden;
	}

	.md-splash__inner {
		position: relative;
		width: 100%;
		max-width: 420px;
		padding: 1.6rem 1.25rem 1.25rem;
		border-radius: 1rem;
		background: rgba(255, 255, 255, 0.94);
		box-shadow: 0 24px 60px rgba(15, 80, 104, 0.3);
	}

	.md-splash__logo {
		display: block;
		width: 100%;
		max-width: 280px;
		height: auto;
		margin: 0 auto 1rem;
	}

	.md-splash__title {
		margin: 0 0 0.5rem;
		font-size: 1.15rem;
		line-height: 1.3;
	}

	.md-splash__text {
		margin: 0 0 1.1rem;
		color: rgba(20, 39, 46, 0.8);
		font-size: 0.95rem;
		line-height: 1.5;
	}

	.md-splash__hint {
		margin: 0;
		color: rgba(20, 39, 46, 0.62);
		font-size: 0.78rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.md-splash__close {
		position: absolute;
		top: 0.6rem;
		right: 0.6rem;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 38px;
		padding: 0;
		border: 1px solid var(--md-border);
		border-radius: 999px;
		background: #fff;
		color: var(--md-ink);
		cursor: pointer;
	}
}

/* ==========================================================================
   18. Motion preferences
   ========================================================================== */

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
