/* Make Elementor's wrappers transparent to the original design (site.css). */

/* Theme Builder wraps <header class="header"> in its own element: make that the sticky one. */
.elementor-location-header { position: sticky; top: 0; z-index: 1000; }
.admin-bar .elementor-location-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .elementor-location-header { top: 46px; } }

/* Containers marked .dl-block behave like the plain divs/sections of the original markup. */
.e-con.dl-block,
.e-con.dl-block > .e-con-inner {
	display: block;
	--padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0;
	--gap: 0; --row-gap: 0; --column-gap: 0;
	padding: 0;
	max-width: none;
}
.e-con.dl-block.container {
	max-width: 1300px;
	margin: auto;
	--padding-left: 14px; --padding-right: 14px;
	padding-left: 14px; padding-right: 14px;
}
.e-con.dl-block.wp-block-hb-g-section { margin-bottom: 60px; margin-bottom: var(--j-margin-section); }
.e-con.dl-block > .elementor-element { width: 100%; }
.e-con.dl-block > .elementor-widget { margin-block-end: 0; }
.e-con.dl-block.wp-block-hb-g-section > .e-con:last-child { margin-bottom: 0; }
.e-con.dl-block > .elementor-widget-text-editor:last-child :is(p, ul, ol):last-child { margin-bottom: 0; }

/* Heading widget -> same look as the original h1-h5. */
.dl-block .elementor-heading-title { line-height: 120%; margin-bottom: 20px; font-weight: 700; color: inherit; }
.dl-block h2.elementor-heading-title { padding-bottom: 10px; }

/* Image widget inside content sections. */
.dl-block .elementor-widget-image { text-align: center; margin-bottom: 20px; }
.dl-block .elementor-widget-image img { border-radius: 16px; border-radius: var(--j-rounded-large); height: auto; }

/* ---- Blog templates (Theme Builder: Blog Archive, Single Post) ---- */

/* Hero built from Elementor containers (.hero > .text-block > .top), same look as the HTML heroes. */
.e-con.hero {
	--display: flex; --flex-direction: column; --align-items: center; --gap: 20px; --row-gap: 20px;
	--padding-top: 40px; --padding-bottom: 40px; --padding-left: 14px; --padding-right: 14px;
	margin-bottom: 40px;
}
.e-con.hero .e-con { --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0; }
.e-con.hero .e-con.text-block { --flex-direction: column; --align-items: center; --gap: 20px; --row-gap: 20px; max-width: 1080px; }
.e-con.hero .e-con.top { --flex-direction: column; --align-items: center; --gap: 10px; --row-gap: 10px; }
.e-con.hero .e-con.image-bg { max-width: 880px; width: 100%; }
.e-con.hero .elementor-heading-title { line-height: 120%; margin: 0; color: inherit; }
.e-con.hero .elementor-widget-text-editor p { margin: 0; }
.e-con.hero .elementor-widget-theme-post-featured-image img { border-radius: 16px; border-radius: var(--j-rounded-large); width: 100%; height: auto; }
.dl-post-meta .elementor-icon-list-text, .dl-post-meta a { color: var(--j-text-blocks-color); font-size: 14px; }
.dl-post-meta .elementor-icon-list-icon svg { fill: var(--j-secondary-color); }
.dl-post-meta a:hover { color: var(--j-secondary-color); }

/* Post cards */
.dl-blog .elementor-posts-container { margin-bottom: 0; }
.dl-blog .elementor-post {
	background: var(--j-blocks-color); border-radius: 16px; border-radius: var(--j-rounded-large);
	overflow: hidden; transition: transform .2s ease, background-color .2s ease;
}
.dl-blog .elementor-post:hover { background: var(--j-blocks-hover-bg); transform: translateY(-3px); }
.dl-blog .elementor-post__thumbnail__link { margin-bottom: 0 !important; }
/* Image box in the site's image shape (1280x900 = 64:45), so the whole picture shows instead of a cropped strip.
   Elementor sizes the box with padding-bottom and offsets/zooms the image; replace that with aspect-ratio + cover. */
.dl-blog .elementor-post__thumbnail,
.dl-latest .elementor-post__thumbnail { padding-bottom: 0 !important; aspect-ratio: 64 / 45; position: relative; overflow: hidden; }
/* !important: Elementor centres the image with a more specific rule (top/left 50% + translate). */
.dl-blog .elementor-post__thumbnail img,
.dl-latest .elementor-post__thumbnail img {
	position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important;
	object-fit: cover; transform: none !important; max-width: none;
}
.dl-blog .elementor-post__thumbnail img { border-radius: 0; transition: transform .3s ease; }
.dl-blog .elementor-post:hover .elementor-post__thumbnail img { transform: scale(1.03) !important; }

/* Homepage testimonials carousel (Elementor Pro Reviews widget): 3 per view, 2 on tablet, 1 on phone. */
.dl-reviews .elementor-main-swiper { padding: 4px 2px 0; }
.dl-reviews .swiper-slide { height: auto; }
.dl-reviews .elementor-testimonial {
	height: 100%; display: flex; flex-direction: column;
	background: var(--j-blocks-color); border: 0; border-radius: 16px; border-radius: var(--j-rounded-large); overflow: hidden;
}
.dl-reviews .elementor-testimonial__header { background: none; padding: 22px 22px 0; }
.dl-reviews .elementor-testimonial__header::after { display: none; }
.dl-reviews .elementor-testimonial__name { color: var(--j-text-color); font-size: 17px; font-weight: 700; }
.dl-reviews .elementor-testimonial__title { color: var(--j-footer-text); font-size: 13px; }
.dl-reviews .elementor-star-rating { margin-top: 6px; }
.dl-reviews .elementor-star-rating i::before,
.dl-reviews .elementor-star-full { color: var(--j-secondary-color); }
.dl-reviews .elementor-testimonial__icon { display: none; }
.dl-reviews .elementor-testimonial__content { padding: 14px 22px 24px; flex: 1; }
.dl-reviews .elementor-testimonial__text { color: var(--j-text-blocks-color); font-size: 15px; line-height: 150%; font-style: italic; }
.elementor-element.dl-reviews .swiper .elementor-swiper-button { color: var(--j-secondary-color); font-size: 26px; background: var(--j-header-color); border-radius: 50%; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.dl-reviews .elementor-swiper-button svg { fill: var(--j-secondary-color); width: 18px; height: 18px; }
.dl-reviews .swiper-pagination-bullet { background: var(--j-text-blocks-color); opacity: .35; width: 10px; height: 10px; }
.dl-reviews .swiper-pagination-bullet-active { background: var(--j-secondary-color); opacity: 1; }
.dl-reviews .swiper-pagination { position: static; margin-top: 20px; }
/* Phones: swipe + dots; the arrows would sit on top of the single card's text. */
@media (max-width: 767px) {
	.elementor-element.dl-reviews .swiper .elementor-swiper-button { display: none; }
	.dl-reviews .elementor-main-swiper { width: 100%; }
}

/* Homepage "Latest from the Blog" */
.dl-home-blog-more { display: flex; justify-content: center; margin-top: 30px; }
.dl-home-blog-more .btn { width: auto; flex: 0 0 auto; padding: 14px 32px; text-decoration: none; }
.dl-blog .elementor-post__text { padding: 18px 20px 22px; }
.dl-blog .elementor-post__title { font-size: 19px; line-height: 125%; margin: 0 0 8px; padding: 0; border: 0; }
.dl-blog .elementor-post__title a { color: var(--j-text-color); }
.dl-blog .elementor-post__title a:hover { color: var(--j-secondary-color); }
.dl-blog .elementor-post__meta-data { color: var(--j-footer-text); font-size: 13px; margin-bottom: 12px; }
.dl-blog .elementor-post__excerpt p { color: var(--j-text-blocks-color); font-size: 15px; line-height: 145%; margin: 0 0 14px; }
.dl-blog .elementor-post__read-more { color: var(--j-secondary-color); font-size: 14px; font-weight: 600; text-transform: uppercase; }
.dl-blog .elementor-pagination { margin-top: 36px; text-align: center; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.dl-blog .elementor-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px;
	border-radius: 8px; background: var(--j-blocks-color); color: var(--j-text-color); font-weight: 600;
}
.dl-blog .elementor-pagination .page-numbers.current,
.dl-blog .elementor-pagination a.page-numbers:hover { background: var(--j-accent-color); color: #fff; }
.dl-blog .elementor-pagination .page-numbers.dots { background: none; }
.dl-blog .elementor-posts-nothing-found { color: var(--j-text-color); text-align: center; }

/* Single post layout: article | 320px sidebar; one column below 1025px (sidebar under the article). */
.e-con.dl-block.dl-post-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px;
	max-width: 1200px; margin-left: auto; margin-right: auto; align-items: start;
}
.e-con.dl-block.dl-post-layout > .e-con { width: auto; min-width: 0; }
@media (max-width: 1024px) {
	.e-con.dl-block.dl-post-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (min-width: 1025px) {
	.e-con.dl-block.dl-sidebar { position: sticky; top: 110px; }
	.admin-bar .e-con.dl-block.dl-sidebar { top: 142px; }
}

/* Sidebar: Latest Posts box */
.e-con.dl-block.dl-sidebar-box {
	background: var(--j-blocks-color); border-radius: 16px; border-radius: var(--j-rounded-large);
	padding: 22px 20px 20px;
}
.dl-sidebar-box .elementor-heading-title {
	font-size: 20px; line-height: 120%; margin: 0 0 18px; padding: 0 0 10px;
	border-bottom: 3px solid var(--j-accent-color); color: var(--j-text-color);
}
.dl-latest .elementor-post { align-items: center; }
.dl-latest .elementor-post__thumbnail__link { margin-right: 14px !important; margin-bottom: 0 !important; }
.dl-latest .elementor-post__thumbnail img { border-radius: 8px; border-radius: var(--j-rounded-medium); }
.dl-latest .elementor-post__title { font-size: 15px; line-height: 130%; margin: 0 0 6px; padding: 0; border: 0; font-weight: 600; }
.dl-latest .elementor-post__title a { color: var(--j-text-color); }
.dl-latest .elementor-post__title a:hover { color: var(--j-secondary-color); }
.dl-latest .elementor-post__meta-data { color: var(--j-footer-text); font-size: 12px; margin: 0; }
/* With no other posts the widget renders nothing: say so instead of an empty box. */
.dl-sidebar-box:not(:has(.elementor-post)) .dl-all-posts::before {
	content: "No other posts yet."; display: block; color: var(--j-text-blocks-color); font-weight: 400; margin-bottom: 10px;
}
.dl-sidebar-box .dl-all-posts { margin: 18px 0 0; }
.dl-sidebar-box .dl-all-posts a { color: var(--j-secondary-color); font-weight: 600; font-size: 14px; text-transform: uppercase; }

/* Single post body: headings/lists come from the site CSS (.wp-block-hb-g-section); add links, images, quotes. */
.dl-post-content p { margin: 0 0 20px; line-height: 150%; }
.dl-post-content a { color: var(--j-secondary-color); text-decoration: underline; }
.dl-post-content img { border-radius: 16px; border-radius: var(--j-rounded-large); height: auto; max-width: 100%; }
.dl-post-content figure { margin: 0 0 20px; }
.dl-post-content blockquote { border-left: 4px solid var(--j-accent-color); margin: 0 0 20px; padding: 6px 0 6px 18px; font-style: italic; }
.dl-post-content h2, .dl-post-content h3 { margin-top: 30px; }

.e-con.dl-block.dl-post-nav { margin-top: 40px; }
.dl-post-nav .elementor-post-navigation { border-top: 1px solid var(--j-header-divider); padding-top: 24px; }
.dl-post-nav .post-navigation__prev--label, .dl-post-nav .post-navigation__next--label { color: var(--j-footer-text); font-size: 13px; text-transform: uppercase; }
.dl-post-nav .post-navigation__prev--title, .dl-post-nav .post-navigation__next--title { color: var(--j-text-color); font-weight: 700; }
.dl-post-nav .post-navigation__arrow-wrapper { color: var(--j-secondary-color); }
.dl-post-nav a:hover .post-navigation__prev--title, .dl-post-nav a:hover .post-navigation__next--title { color: var(--j-secondary-color); }

/* Footer template wrapper. */
.elementor-location-footer { position: relative; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* Tables in blog posts wrap inside the article column on desktop; on phones they scroll sideways like the site's tables. */
.dl-post-content .wp-block-table { max-width: 100%; }
.dl-post-content .wp-block-table table { min-width: 0; }
@media (max-width: 767px) { .dl-post-content .wp-block-table table { min-width: 560px; } }
