/* Listing pages. Measurements copied from Listing.dc.html (Paid/Featured) and ListingFree.dc.html (Free). */

.tdid-listing { overflow: hidden; }
.tdid-l-wrap { max-width: 1240px; margin: 0 auto; }

/* Breadcrumb */
.tdid-l-crumbs { background: var(--tdid-bg-light); padding: 14px 40px; font-size: 14px; }
.tdid-l-crumbs nav { max-width: 1240px; margin: 0 auto; }

/* ---------- Gallery: one big photo plus up to 4 small ---------- */
.tdid-l-gallery-wrap { padding: 28px 40px 0; }
.tdid-l-gallery {
	max-width: 1240px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 12px;
	height: 480px;
}
.tdid-l-gallery--5 { grid-template-rows: repeat(4, 1fr); }
.tdid-l-gallery--4 { grid-template-rows: repeat(3, 1fr); }
.tdid-l-gallery--3 { grid-template-rows: repeat(2, 1fr); }
.tdid-l-gallery--2 { grid-template-rows: 1fr; }
.tdid-l-gallery--1 { grid-template-columns: 1fr; }
.tdid-l-photo {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 14px;
	overflow: hidden;
	background: var(--tdid-chip) center / cover no-repeat;
	cursor: zoom-in;
	white-space: normal; /* Hello Elementor sets nowrap on buttons; let "All photos (N)" wrap */
}
.tdid-l-photo:focus-visible { outline: 3px solid var(--tdid-button); outline-offset: 2px; }
.tdid-l-photo--big { grid-row: 1 / -1; }
.tdid-l-allphotos {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	background: rgba(11,60,73,0.55);
	color: var(--tdid-white);
	font: 800 16px var(--tdid-font-body);
	text-align: center;
}

/* Photo viewer */
.tdid-l-lightbox {
	width: min(1100px, 94vw);
	max-height: 92vh;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #08262E;
	overflow: visible;
}
.tdid-l-lightbox::backdrop { background: rgba(4,20,25,0.85); }
.tdid-l-lightbox figure { margin: 0; text-align: center; }
.tdid-l-lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 16px 16px 0 0; }
.tdid-l-lightbox figcaption { padding: 10px; color: var(--tdid-white); font-size: 14px; font-weight: 700; }
.tdid-l-lightbox button {
	position: absolute;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: var(--tdid-white);
	color: var(--tdid-text);
	font: 700 30px/1 var(--tdid-font-body);
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.tdid-l-lightbox button:hover,
.tdid-l-lightbox button:focus { background: var(--tdid-chip); color: var(--tdid-text); }
.tdid-l-lightbox button:focus-visible { outline: 3px solid var(--tdid-accent); outline-offset: 2px; }
.tdid-l-lightbox__close { top: -18px; right: -18px; }
.tdid-l-lightbox__prev { top: 50%; left: -24px; transform: translateY(-50%); }
.tdid-l-lightbox__next { top: 50%; right: -24px; transform: translateY(-50%); }
.tdid-l-lightbox button[hidden] { display: none; }

/* ---------- Title block ---------- */
.tdid-l-head { padding: 36px 40px 0; }
.tdid-l-featured {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 20px;
	background: var(--tdid-accent);
	color: var(--tdid-white);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
}
.tdid-l-head h1 { margin: 14px 0 6px; font-size: 48px; line-height: 1.1; color: var(--tdid-text); }
.tdid-l-head--free h1 { margin: 0 0 16px; }
.tdid-l-tagline { margin: 0 0 16px; font-family: var(--tdid-font-script); font-size: 30px; color: var(--tdid-button); }
.tdid-l-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tdid-l-chip {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid #BFDCD9;
	border-radius: 24px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}
.tdid-l-chip:hover,
.tdid-l-chip:focus { border-color: var(--tdid-button); color: var(--tdid-text); }
.tdid-l-chip--area { background: var(--tdid-chip); border-color: var(--tdid-chip); }

/* ---------- Body: main column + contact card ---------- */
.tdid-l-body { padding: 36px 40px 72px; }
.tdid-l-head--free + .tdid-l-body { padding-top: 32px; }
.tdid-l-columns { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.tdid-l-main { flex: 2 1 560px; min-width: 0; }
.tdid-l-h2 { margin: 0 0 16px; font-size: 30px; color: var(--tdid-accent); }
.tdid-l-about { margin-bottom: 40px; font-size: 17px; line-height: 1.7; color: #33474F; }
.tdid-l-about p { margin: 0 0 16px; }
.tdid-l-about p:last-child { margin-bottom: 0; }

.tdid-l-onephoto {
	height: 380px;
	margin-bottom: 32px;
	border-radius: 18px;
	background: var(--tdid-chip) center / cover no-repeat;
}

.tdid-l-hours {
	margin-bottom: 40px;
	padding: 20px 24px;
	border-radius: 16px;
	background: var(--tdid-bg-light);
	font-size: 16px;
	line-height: 1.9;
}
.tdid-l-hours__row { display: flex; justify-content: space-between; gap: 16px; }
.tdid-l-hours__row--single { justify-content: flex-start; }
.tdid-l-hours__day { font-weight: 700; }

.tdid-l-map {
	position: relative;
	z-index: 0;
	height: 360px;
	border-radius: 18px;
	overflow: hidden;
	background: #CFE8E5;
}
.tdid-l-mapline { margin: 14px 0 0; font-size: 16px; }
.tdid-l-mapline a { font-weight: 700; }

/* Contact card (Paid and Featured) */
.tdid-l-contact {
	flex: 1 1 320px;
	max-width: 420px;
	padding: 28px;
	box-sizing: border-box;
	border: 1px solid var(--tdid-border);
	border-radius: 20px;
	background: var(--tdid-white);
	box-shadow: 0 6px 20px rgba(11,60,73,0.08);
}
.tdid-l-contact h2 { margin: 0 0 20px; font-size: 22px; color: var(--tdid-text); }
.tdid-l-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--tdid-muted); }
.tdid-l-label--follow { margin-bottom: 10px; }
.tdid-l-phone { margin: 0 0 18px; font-size: 18px; font-weight: 700; }
.tdid-l-phone a { text-decoration: none; }
.tdid-l-web { margin: 0 0 18px; font-size: 16px; overflow-wrap: anywhere; }
.tdid-l-web a { font-weight: 700; }
.tdid-l-address { margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
.tdid-l-btn,
.tdid-l-btn:visited {
	display: block;
	margin-bottom: 12px;
	padding: 14px 20px;
	border: 2px solid var(--tdid-button);
	border-radius: 28px;
	background: var(--tdid-button);
	color: var(--tdid-white);
	font-size: 15px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}
.tdid-l-btn:hover,
.tdid-l-btn:focus { background: var(--tdid-text); border-color: var(--tdid-text); color: var(--tdid-white); }
.tdid-l-btn--outline,
.tdid-l-btn--outline:visited { background: var(--tdid-white); color: var(--tdid-button); }
.tdid-l-btn--outline:hover,
.tdid-l-btn--outline:focus { background: var(--tdid-chip); border-color: var(--tdid-button); color: var(--tdid-text); }
.tdid-l-contact .tdid-l-btn--outline { margin-bottom: 24px; }
.tdid-l-socials { display: flex; flex-wrap: wrap; gap: 10px; }

/* Upgrade box (Free) */
.tdid-l-upgrade {
	flex: 1 1 280px;
	max-width: 340px;
	padding: 20px;
	box-sizing: border-box;
	border: 2px solid #BFE5E1;
	border-radius: 16px;
	background: var(--tdid-bg-light);
}
.tdid-l-upgrade h2 { margin: 0 0 8px; font-size: 18px; color: var(--tdid-text); }
.tdid-l-upgrade p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.tdid-l-upgrade .tdid-l-btn { margin: 0; padding: 12px 18px; font-size: 14px; }

/* ---------- More in [Category] ---------- */
.tdid-l-more {
	position: relative;
	padding: 72px 40px;
	background: var(--tdid-bg-light);
	text-align: center;
}
.tdid-l-more h2 { margin: 0 0 32px; font-size: 36px; color: var(--tdid-accent); }
.tdid-l-more__grid {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	text-align: left;
}
.tdid-l-more__card {
	flex: 1 1 260px;
	max-width: 360px;
	border: 1px solid var(--tdid-card-border);
	border-radius: 18px;
	overflow: hidden;
	background: var(--tdid-white);
}
.tdid-l-more__photo { height: 200px; background: var(--tdid-chip) center / cover no-repeat; }
.tdid-l-more__body { padding: 20px; }
.tdid-l-more__body h3 { margin: 0 0 6px; font-size: 20px; }
.tdid-l-more__body p { margin: 0 0 16px; font-size: 14px; }
.tdid-l-more__body a { font-weight: 700; }

/* ---------- One-column widths: contact card first (owner's choice), so tap-to-call
   and directions sit right under the business name instead of after the map ---------- */
@media (max-width: 960px) {
	.tdid-l-columns { flex-direction: column; align-items: stretch; }
	.tdid-l-contact { order: -1; max-width: none; flex-basis: auto; }
	.tdid-l-main { flex-basis: auto; }
	.tdid-l-upgrade { max-width: none; flex-basis: auto; }
}

/* ---------- Phones (gallery layout from the mockup's 720px rule) ---------- */
@media (max-width: 720px) {
	.tdid-l-crumbs { padding: 12px 16px; }
	.tdid-l-gallery-wrap { padding: 16px 16px 0; }
	.tdid-l-gallery { height: auto; grid-template-columns: repeat(4, 1fr); grid-template-rows: 260px 90px; gap: 8px; }
	.tdid-l-gallery--1 { grid-template-columns: 1fr; grid-template-rows: 260px; }
	.tdid-l-photo--big { grid-column: 1 / -1; grid-row: 1; }
	.tdid-l-gallery--2 .tdid-l-photo:not(.tdid-l-photo--big) { grid-column: 1 / -1; }
	.tdid-l-gallery--3 .tdid-l-photo:not(.tdid-l-photo--big) { grid-column: span 2; }
	.tdid-l-allphotos { font-size: 12px; }

	.tdid-l-head { padding: 24px 16px 0; }
	.tdid-l-head h1 { font-size: 32px; }
	.tdid-l-tagline { font-size: 24px; }
	.tdid-l-body { padding: 28px 16px 48px; }
	.tdid-l-columns { gap: 32px; }
	.tdid-l-h2 { font-size: 24px; }
	.tdid-l-about { font-size: 16px; }
	.tdid-l-onephoto { height: 240px; }
	.tdid-l-map { height: 260px; }
	.tdid-l-contact, .tdid-l-upgrade { max-width: none; padding: 22px; }

	.tdid-l-more { padding: 48px 16px; }
	.tdid-l-more h2 { font-size: 26px; }
	.tdid-l-more__card { max-width: none; }

	.tdid-l-lightbox__prev { left: 6px; }
	.tdid-l-lightbox__next { right: 6px; }
	.tdid-l-lightbox__close { top: 6px; right: 6px; }
}

/* ---------- Good to know (listing keywords) ---------- */
.tdid-l-mapline + .tdid-l-h2 { margin-top: 40px; }
.tdid-l-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tdid-l-keyword {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 20px;
	background: var(--tdid-bg-light, #F2FAF8);
	border: 1px solid #D5E7E5;
	color: var(--tdid-text);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.tdid-l-keyword::before { content: "✓"; color: var(--tdid-accent); font-weight: 800; }
.tdid-l-keyword:hover,
.tdid-l-keyword:focus { border-color: var(--tdid-button); color: var(--tdid-text); }

/* ---------- Upcoming events at [business] ---------- */
.tdid-l-events { padding: 8px 40px 64px; }
.tdid-l-events__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.tdid-l-events__head .tdid-l-h2 { margin-bottom: 18px; }
.tdid-l-events__all { font-size: 15px; font-weight: 700; color: var(--tdid-button); }
.tdid-l-events__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tdid-l-event { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--tdid-card-border, #E3ECEE); border-radius: 16px; background: var(--tdid-white, #FFFFFF); color: var(--tdid-text); text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s; }
.tdid-l-event:hover, .tdid-l-event:focus { border-color: var(--tdid-accent); box-shadow: 0 6px 18px rgba(14, 90, 100, 0.10); }
.tdid-l-event.is-featured { border: 2px solid var(--tdid-accent); }
.tdid-l-event__date { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 60px; border-radius: 12px; background: var(--tdid-chip, #DDF1F0); color: var(--tdid-accent); line-height: 1; }
.tdid-l-event__date span { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.tdid-l-event__date strong { margin-top: 4px; font-size: 24px; font-family: var(--tdid-font-display, 'Archivo Black', Arial, sans-serif); font-weight: 400; color: var(--tdid-text); }
.tdid-l-event__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tdid-l-event__when { font-size: 13px; font-weight: 700; color: var(--tdid-muted); }
.tdid-l-event__title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.tdid-l-event__more { align-self: flex-start; margin-top: 2px; padding: 3px 10px; border-radius: 12px; background: var(--tdid-bg-light, #F2FAF8); font-size: 12px; font-weight: 700; color: var(--tdid-accent); }
.tdid-l-events__empty { margin: 0; font-size: 15px; color: var(--tdid-muted); }
.tdid-l-events__add { margin: 20px 0 0; }
@media (max-width: 720px) {
	.tdid-l-events { padding: 0 16px 48px; }
	.tdid-l-events__grid { grid-template-columns: 1fr; }
}
