/* ==========================================================================
   Global layout: utility bar, sticky header, menus, footer, floating actions
   ========================================================================== */

/* Utility bar -------------------------------------------------------------- */
.jdc-utility {
	background: var(--jdc-espresso);
	color: #D8D1C7;
	font-size: 13px;
	letter-spacing: .03em;
}
.jdc-utility__inner {
	max-width: var(--jdc-container);
	margin: 0 auto;
	padding: 9px var(--jdc-gutter);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 6px 24px;
}
.jdc-utility__status { display: flex; align-items: center; gap: 10px; }
.jdc-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--jdc-gold); flex: none; }
.jdc-utility__contact { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.jdc-utility a { color: var(--jdc-gold-light); }
.jdc-utility a:hover { color: var(--jdc-white); }
@media (max-width: 720px) {
	.jdc-utility { font-size: 12px; letter-spacing: .01em; }
	.jdc-utility__inner { flex-wrap: nowrap; gap: 12px; }
	.jdc-utility__status { min-width: 0; }
	.jdc-utility__status [data-jdc-status] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.jdc-utility__contact { flex: none; }
	.jdc-utility__address { display: none; }
}

/* Header ------------------------------------------------------------------- */
.jdc-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--jdc-marble);
	border-bottom: 1px solid var(--jdc-rule);
	transition: box-shadow .3s;
}
.admin-bar .jdc-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .jdc-header { top: 0; } }
.jdc-header.is-stuck { box-shadow: 0 10px 30px -24px rgba(42, 33, 24, .45); }

.jdc-header__inner {
	max-width: var(--jdc-container);
	margin: 0 auto;
	padding: 12px var(--jdc-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.jdc-header__logo { display: block; flex: none; width: clamp(124px, 11vw, 150px); }
.jdc-header__logo img { width: 100%; height: auto; }
.jdc-header__actions { display: flex; align-items: center; gap: 10px; }

.jdc-header__toggle {
	display: none;
	width: 46px; height: 46px;
	border: 1px solid var(--jdc-rule-btn);
	border-radius: 50%;
	background: var(--jdc-white);
	color: var(--jdc-ink);
	align-items: center; justify-content: center;
}
.jdc-header__toggle .jdc-icon { width: 22px; height: 22px; }
.jdc-header__toggle .is-open, .jdc-header__toggle[aria-expanded="true"] .is-closed { display: none; }
.jdc-header__toggle[aria-expanded="true"] .is-open { display: block; }

/* Desktop nav */
.jdc-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.jdc-nav__link {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 16px; border: 0; border-radius: var(--jdc-r-pill);
	background: transparent; color: var(--jdc-ink);
	font-family: var(--jdc-font-body); font-size: 15px; line-height: 1.6;
	transition: background .2s, color .2s;
}
button.jdc-nav__link { padding-right: 14px; }
.jdc-nav__link:hover, .jdc-nav__link.is-active, .jdc-nav__item.is-active > .jdc-nav__link { background: var(--jdc-rule-soft); color: var(--jdc-ink); }
.jdc-nav__chev { width: 16px; height: 16px; transition: transform .2s; }
.jdc-nav__item { position: relative; }
.jdc-nav__item.is-open .jdc-nav__chev { transform: rotate(180deg); }

/* Dropdown */
.jdc-drop {
	position: absolute; top: 100%; left: 50%; z-index: 40;
	padding-top: 10px;
	transform: translateX(-50%);
}
.jdc-drop[hidden] { display: none; }
.jdc-drop__panel {
	width: 320px; padding: 10px;
	background: var(--jdc-white);
	border: 1px solid var(--jdc-rule-soft);
	border-radius: var(--jdc-r-card);
	box-shadow: 0 1px 2px rgba(42, 33, 24, .06), 0 30px 60px -24px rgba(42, 33, 24, .35);
	animation: jdcRise .25s var(--jdc-ease) both;
}
.jdc-drop__item {
	display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center;
	padding: 12px; border-radius: 14px; color: var(--jdc-ink);
}
.jdc-drop__item:hover, .jdc-drop__item.is-active { background: var(--jdc-marble); color: var(--jdc-ink); }
.jdc-drop__media {
	width: 48px; height: 48px; border-radius: 50%;
	background: var(--jdc-sand) center / cover no-repeat;
	color: var(--jdc-gold-text);
	display: flex; align-items: center; justify-content: center;
}
.jdc-drop__media .jdc-icon { width: 24px; height: 24px; }
.jdc-drop__title { display: block; font-family: var(--jdc-font-heading); font-size: 20px; font-weight: 500; line-height: 1.1; }
.jdc-drop__desc { display: block; margin-top: 3px; font-size: 13px; color: var(--jdc-muted); }

/* Mobile nav */
.jdc-mnav {
	display: grid;
	padding: 8px var(--jdc-gutter) 24px;
	border-top: 1px solid var(--jdc-rule);
	font-family: var(--jdc-font-heading);
	font-size: 26px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
}
.jdc-mnav[hidden] { display: none; }
.jdc-mnav__link { padding: 12px 0; border-bottom: 1px solid var(--jdc-rule-soft); color: var(--jdc-ink); }
.jdc-mnav__link.is-active, .jdc-mnav__sublink.is-active { color: var(--jdc-crimson); }
.jdc-mnav__group { padding: 12px 0; border-bottom: 1px solid var(--jdc-rule-soft); }
.jdc-mnav__label { color: var(--jdc-ink); }
.jdc-mnav__sub { display: grid; gap: 4px; margin-top: 8px; padding-left: 16px; border-left: 2px solid var(--jdc-gold); }
.jdc-mnav__sublink { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 21px; color: var(--jdc-ink); }
.jdc-mnav__sublink .jdc-icon { width: 20px; height: 20px; color: var(--jdc-gold-text); }
.jdc-mnav__book { margin-top: 18px; width: 100%; font-family: var(--jdc-font-body); }
.jdc-mnav__call { margin-top: 10px; width: 100%; font-family: var(--jdc-font-body); }
@media (max-width: 350px) { .jdc-header__book { display: none; } }

@media (max-width: 1079px) {
	.jdc-nav, .jdc-header__call { display: none; }
	.jdc-header__toggle { display: inline-flex; }
}
@media (min-width: 1080px) {
	.jdc-mnav { display: none !important; }
}
@media (max-width: 420px) {
	.jdc-header__inner { gap: 12px; }
	.jdc-header__book { padding: 0 16px; font-size: 14px; }
}
@media (max-width: 400px) {
	.jdc-header__logo { width: 104px; }
	.jdc-header__actions { gap: 8px; }
	.jdc-header__book { height: 42px; padding: 0 14px; font-size: 13px; }
	.jdc-header__toggle { width: 42px; height: 42px; }
}

/* Footer ------------------------------------------------------------------- */
.jdc-footer { background: var(--jdc-espresso); color: var(--jdc-dark-text); }
.jdc-footer__inner {
	max-width: var(--jdc-container);
	margin: 0 auto;
	padding: clamp(56px, 7vw, 96px) var(--jdc-gutter) 28px;
}
.jdc-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	font-size: 15px;
	line-height: 1.8;
}
@media (min-width: 640px) { .jdc-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; } }
@media (min-width: 1080px) { .jdc-footer__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.jdc-footer__brand { display: grid; justify-items: start; gap: 14px; }
.jdc-footer__logo { display: block; width: min(100%, 200px); }
.jdc-footer__logo img { width: 100%; height: auto; }
.jdc-footer__slogan { margin: 0; font-family: var(--jdc-font-heading); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--jdc-dark-heading); }
.jdc-footer__social {
	display: inline-flex; align-items: center; gap: 12px;
	margin-top: 8px; padding: 8px 18px 8px 8px;
	border: 1px solid var(--jdc-dark-rule-strong); border-radius: var(--jdc-r-pill);
	line-height: 1.3; color: var(--jdc-dark-heading);
	transition: border-color .2s, background .2s;
}
.jdc-footer__social-icon {
	flex: none; width: 40px; height: 40px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(201, 160, 99, .16); color: var(--jdc-gold-light);
	transition: background .2s, color .2s;
}
.jdc-footer__social-icon .jdc-icon { width: 20px; height: 20px; }
.jdc-footer__social-label { display: block; font-size: 14px; font-weight: 600; }
.jdc-footer__social-handle { display: block; font-size: 13px; color: var(--jdc-dark-muted); }
.jdc-footer__social:hover { border-color: var(--jdc-gold); color: var(--jdc-white); }
.jdc-footer__social:hover .jdc-footer__social-icon { background: var(--jdc-gold); color: var(--jdc-ink); }
.jdc-footer__label {
	margin-bottom: 14px;
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--jdc-gold);
}
.jdc-footer__link { color: var(--jdc-dark-heading); }
.jdc-footer__link:hover { color: var(--jdc-gold-light); }
.jdc-footer__phone { display: flex; align-items: center; gap: 14px; color: var(--jdc-dark-heading); font-size: 21px; font-weight: 500; line-height: 1.3; }
.jdc-footer__phone:hover { color: var(--jdc-gold-light); }
.jdc-footer__phone-icon {
	flex: none; width: 44px; height: 44px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--jdc-dark-rule-strong); color: var(--jdc-gold-light);
}
.jdc-footer__phone-icon .jdc-icon { width: 20px; height: 20px; }
.jdc-footer__phone-label { display: block; font-size: 12px; font-weight: 400; letter-spacing: .04em; color: var(--jdc-dark-muted); }
.jdc-footer__cta { width: 100%; max-width: 280px; margin-top: 22px; justify-content: center; }
.jdc-footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	margin-top: 56px; padding-top: 24px;
	border-top: 1px solid var(--jdc-dark-rule);
	font-size: 13px; color: var(--jdc-dark-muted);
}
.jdc-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* Phones: leave room under the footer so the floating call / top buttons never cover the last links. */
@media (max-width: 760px) { .jdc-footer__inner { padding-bottom: 104px; } }
.jdc-footer__links a { color: var(--jdc-dark-muted); }
.jdc-footer__links a:hover { color: var(--jdc-white); }

/* Floating actions --------------------------------------------------------- */
.jdc-float {
	position: fixed;
	right: clamp(16px, 2vw, 28px);
	bottom: clamp(16px, 2vw, 28px);
	z-index: 50;
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	gap: 12px;
}
.jdc-float__call {
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--jdc-ink); color: var(--jdc-marble);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 14px 30px -10px rgba(26, 23, 20, .55);
	transition: background .22s;
}
.jdc-float__call .jdc-icon { width: 28px; height: 28px; }
.jdc-float__call:hover { background: var(--jdc-crimson); color: var(--jdc-white); }
.jdc-float__top {
	width: 52px; height: 52px; border-radius: 50%;
	background: var(--jdc-white); color: var(--jdc-ink);
	border: 1px solid var(--jdc-rule);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 12px 28px -10px rgba(42, 33, 24, .35);
	animation: jdcRise .35s var(--jdc-ease) both;
}
.jdc-float__top[hidden] { display: none; }
.jdc-float__top .jdc-icon { width: 24px; height: 24px; }
.jdc-float__top:hover { background: var(--jdc-ink); color: var(--jdc-marble); }

/* Touch targets: small inline links get a 44px-tall tap area without moving anything
   (padding grows the hit box, the matching negative margin keeps the layout). */
.jdc-utility a,
.jdc-footer__link,
.jdc-footer__links a,
.jdc-note a,
.jdc-visit__list a,
.jdc-next__emergency a,
.jdc-map__empty a,
.jdc-crumbs a {
	display: inline-block;
	padding-block: 12px;
	margin-block: -12px;
}
.jdc-footer__link, .jdc-footer__links a, .jdc-crumbs a { padding-block: 13px; margin-block: -13px; }

/* Reading progress (single post) ------------------------------------------ */
.jdc-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.admin-bar .jdc-progress { top: var(--wp-admin--admin-bar--height, 32px); }
.jdc-progress span {
	display: block; height: 100%; width: 0;
	background: linear-gradient(90deg, var(--jdc-gold), var(--jdc-crimson));
	transition: width .1s linear;
}

/* 404 */
.jdc-404__body { max-width: 760px; margin-top: clamp(36px, 5vw, 64px); padding-bottom: var(--jdc-section-y); }
.jdc-404__body .jdc-h1 { margin-top: 22px; }
.jdc-404__body .jdc-lead { margin-top: 24px; }
