/*
 * Meistari – adjustments that make the ported ts_insurex theme (insurex.css)
 * work with Helix Ultimate 2 / Bootstrap 5 / SP Page Builder 6.
 */

:root {
	--meistari-green: #346919;
	--meistari-green-dark: #275012;
}

body {
	color: #666;
}

/* ---------------------------------------------------------------- Header */

#sp-header-right .sppb-section {
	margin: 0;
}

/* Menu bar: right aligned items on the green bar, overlapping the hero */
section#sp-menu {
	position: sticky;
	top: 0;
	z-index: 99;
}

#sp-menu .sp-column {
	text-align: right;
}

#sp-menu .sp-megamenu-wrapper {
	justify-content: flex-end;
	align-items: center;
	min-height: 70px;
}

#sp-menu .sp-megamenu-parent {
	float: none;
	margin: 0;
}

#sp-menu .sp-megamenu-parent > li > a,
#sp-menu .sp-megamenu-parent > li > span {
	display: inline-block;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 60px;
	padding: 5px 15px;
	text-transform: uppercase;
}

#sp-menu .sp-megamenu-parent > li:hover > a,
#sp-menu .sp-megamenu-parent > li.active > a,
#sp-menu .sp-megamenu-parent > li.active:hover > a {
	color: #fff;
}

/* Mobile: burger on the green bar */
#sp-menu #offcanvas-toggler {
	display: flex;
	align-items: center;
	height: 70px;
	margin-left: auto;
	padding: 0 15px;
}

#sp-menu .burger-icon > span {
	background-color: #fff;
}

@media (min-width: 992px) {
	#sp-menu #offcanvas-toggler {
		display: none;
	}
}

.offcanvas-menu {
	background-color: var(--meistari-green);
}

.offcanvas-menu .offcanvas-inner .menu-child > li > a,
.offcanvas-menu .offcanvas-inner ul.menu > li > a,
.offcanvas-menu .offcanvas-inner ul.menu > li > span,
.offcanvas-menu .close-offcanvas {
	color: #fff;
}

/* ------------------------------------------------------------ Page title */

.sp-page-title {
	padding: 110px 0 70px;
	background-size: cover;
	background-position: center;
	position: relative;
}

.sp-page-title::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
}

.sp-page-title .container {
	position: relative;
	text-align: center;
}

.sp-page-title .sp-page-title-heading,
.sp-page-title h2 {
	color: #fff;
	font-size: 48px;
	line-height: 1.2;
	font-weight: 700;
	margin: 0;
}

.sp-page-title .breadcrumb {
	justify-content: center;
	background: none;
	margin: 10px 0 0;
	padding: 0;
}

.sp-page-title .breadcrumb > li,
.sp-page-title .breadcrumb > li + li::before,
.sp-page-title .breadcrumb > li > a,
.sp-page-title .breadcrumb > .active {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

/* ------------------------------------------------------------------ Hero */

.meistari-hero.sppb-carousel {
	margin-top: 0;
}

.meistari-hero .sppb-item {
	height: 700px;
}

.meistari-hero .sppb-item > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.meistari-hero .sppb-carousel-item-inner {
	position: absolute;
	inset: 0;
	height: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 37px;
	display: flex;
	align-items: center;
}

.meistari-hero .sppb-carousel-caption {
	position: static;
	width: 100%;
	padding: 90px 0 0;
	text-align: left;
}

.meistari-hero .sppb-carousel-text h2 {
	color: #fff;
	font-size: 60px;
	line-height: 72px;
	font-weight: 700;
	margin: 0 0 20px;
	text-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px;
}

.meistari-hero .sppb-carousel-content {
	color: #fff;
	font-size: 20px;
	line-height: 34px;
	text-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px;
}

.meistari-hero .sppb-carousel-content p {
	margin: 0 0 40px;
}

.meistari-hero .hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.meistari-hero a.slider-btn {
	display: inline-block;
	padding: 17px 40px;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: #fff;
	text-shadow: none;
	border-radius: 3px;
	border: 2px solid transparent;
	background: var(--meistari-green);
	transition: color 400ms, background-color 400ms, border-color 400ms;
}

.meistari-hero a.slider-btn:hover {
	background: #1f1f1f;
	color: #fff;
}

.meistari-hero a.slider-btn.btn-border {
	background: none;
	border-color: #fff;
}

.meistari-hero a.slider-btn.btn-border:hover {
	background: var(--meistari-green-dark);
	border-color: transparent;
}

.meistari-hero .sppb-carousel-arrow {
	opacity: 0;
	transition: opacity 300ms;
}

.meistari-hero:hover .sppb-carousel-arrow {
	opacity: 1;
}

@media (max-width: 991px) {
	.meistari-hero .sppb-item {
		height: 520px;
	}

	.meistari-hero .sppb-carousel-text h2 {
		font-size: 40px;
		line-height: 48px;
	}

	.meistari-hero .sppb-carousel-content {
		font-size: 16px;
		line-height: 26px;
	}
}

@media (max-width: 575px) {
	.meistari-hero .sppb-item {
		height: 440px;
	}

	.meistari-hero .sppb-carousel-text h2 {
		font-size: 30px;
		line-height: 38px;
	}

	.meistari-hero .sppb-carousel-content br,
	.meistari-hero .slider-btn.btn-border {
		display: none;
	}
}

/* ---------------------------------------------------------- SI news block */

.latest-post-right .sppb-addon-title {
	font-size: 20px;
	line-height: 1.3;
	text-transform: uppercase;
	margin-bottom: 30px;
}

.latest-post-right .sppb-addon-article {
	display: flex;
	gap: 25px;
	min-height: 120px;
}

.latest-post-right .sppb-addon-article .article-img {
	flex: 0 0 auto;
}

.latest-post-right .sppb-addon-article img {
	width: auto;
	max-width: 200px;
	height: 120px;
	object-fit: cover;
	float: none;
	margin: 0;
}

.latest-post-right .sppb-article-meta {
	padding-left: 0;
	text-align: center;
}

.latest-post-right .sppb-article-meta span.article-day {
	padding-left: 0;
	margin-bottom: -6px;
	font-style: italic;
}

.latest-post-right .sppb-article-meta span.article-month {
	margin-left: 0 !important;
	font-size: 12px;
}

.latest-post-right .sppb-addon-article .sppb-article-introtext {
	font-size: 14px;
	line-height: 22px;
	max-height: 120px;
}

.latest-post-right .sppb-addon-article h3 {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 28px;
}

@media (max-width: 575px) {
	.latest-post-right .sppb-addon-article img {
		max-width: 120px;
		height: 90px;
	}
}

/* --------------------------------------------------------------- Footer */

#sp-footer,
.ts-footer {
	background: #f5f5f5;
}

#sp-footer .container-inner {
	border-top: 0;
	padding: 0;
}

#sp-footer a,
.ts-footer a {
	color: #8f8f8f;
}

#sp-footer a:hover,
.ts-footer a:hover {
	color: var(--meistari-green);
}

/* Go to top */
.sp-scroll-up {
	background: var(--meistari-green);
	color: #fff;
}

.sp-scroll-up:hover {
	background: var(--meistari-green-dark);
	color: #fff;
}

.sp-page-title .mod-breadcrumbs__divider {
	display: none;
}

.sp-page-title .breadcrumb {
	padding: 0 !important;
}

.latest-post-right .si-news-desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

@media (max-width: 991px) {
	#sp-menu .sp-megamenu-wrapper,
	#sp-menu #offcanvas-toggler {
		min-height: 57px;
		height: 57px;
	}

	#sp-menu #offcanvas-toggler {
		background: none;
		width: auto;
	}

	#sp-menu .burger-icon {
		width: 28px;
	}

	.meistari-hero .sppb-item .sppb-carousel-item-inner {
		padding: 0 20px;
	}
}

.offcanvas-menu .offcanvas-inner ul.menu > li > a,
.offcanvas-menu .offcanvas-inner ul.menu > li > span {
	display: block;
	padding: 10px 0;
	font-size: 18px;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Header contact blocks (phone / email / address) – match the old ts_insurex layout */
.header-contact-info .sppb-row {
	margin-left: -15px;
	margin-right: -15px;
}

.header-contact-info .sppb-column {
	padding-top: 10px;
}

.header-contact-info .sppb-addon-feature .sppb-addon-content,
.header-contact-info .sppb-addon-feature .sppb-media,
.header-contact-info .sppb-addon-feature .sppb-media-body,
.header-contact-info .sppb-addon-feature .sppb-addon-title,
.header-contact-info .sppb-addon-feature .sppb-addon-text {
	text-align: left;
}

.header-contact-info .sppb-media > .pull-left {
	float: left;
	margin: 0 15px 0 0;
}

.header-contact-info .sppb-media-body {
	overflow: hidden;
}

.header-contact-info .sppb-icon-container {
	line-height: 30px;
}

.header-contact-info .sppb-addon-title {
	margin: 0;
	font-size: 16px;
	line-height: 16px;
	font-weight: 700;
}

.header-contact-info .sppb-addon-text {
	margin: 0;
	font-size: 14px;
	line-height: 30px;
}

/* Phones: logo centered, then phone / email / address side by side, icon above text */
@media (max-width: 767px) {
	#sp-section-1.logo-area {
		padding: 15px 0 12px;
	}

	#sp-section-1 #sp-logo .logo {
		display: flex;
		justify-content: center;
		margin-bottom: 12px;
	}

	#sp-section-1 #sp-logo .logo img {
		margin: 0;
	}

	.header-contact-info {
		max-width: none;
		margin: 0 !important;
	}

	.header-contact-info .sppb-row-container {
		padding-left: 0;
		padding-right: 0;
	}

	.header-contact-info .sppb-row {
		display: flex;
		flex-wrap: nowrap;
		margin: 0;
	}

	.header-contact-info .sppb-row > [class*="sppb-col-"] {
		flex: 1 1 0 !important;
		width: auto;
		max-width: none;
		min-width: 0;
		padding: 0 4px;
		position: relative;
	}

	.header-contact-info .sppb-row > [class*="sppb-col-"]:first-child {
		display: none;
	}

	/* thin dividers between the three blocks */
	.header-contact-info .sppb-row > [class*="sppb-col-"]::after {
		display: none !important;
	}

	.header-contact-info .sppb-row > [class*="sppb-col-"]:nth-child(n+3)::before {
		content: "";
		position: absolute;
		left: 0;
		top: 8px;
		bottom: 8px;
		width: 1px;
		background: #ddd;
	}

	.header-contact-info .sppb-column {
		padding-top: 0;
	}

	.header-contact-info .sppb-addon-wrapper,
	.header-contact-info [id^="sppb-addon-wrapper-"] {
		margin: 0 !important;
	}

	.header-contact-info .sppb-addon-feature .sppb-media {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.header-contact-info .sppb-media > .pull-left {
		float: none;
		margin: 0 0 4px;
	}

	.header-contact-info .sppb-icon-container {
		line-height: 1;
	}

	.header-contact-info .sppb-media-body {
		overflow: visible;
		width: 100%;
	}

	.header-contact-info .sppb-addon-feature .sppb-addon-content,
	.header-contact-info .sppb-addon-feature .sppb-media-body,
	.header-contact-info .sppb-addon-feature .sppb-addon-title,
	.header-contact-info .sppb-addon-feature .sppb-addon-text {
		text-align: center;
	}

	.header-contact-info .sppb-addon-title {
		margin-top: 0 !important;
		font-size: 13px !important;
		line-height: 18px !important;
		white-space: nowrap;
	}

	.header-contact-info .sppb-icon {
		margin-top: 0 !important;
	}

	/* the email address is the longest value */
	.header-contact-info .sppb-row > [class*="sppb-col-"]:nth-child(3) {
		flex-grow: 1.35 !important;
	}

	.header-contact-info .sppb-addon-text {
		font-size: 12px !important;
		line-height: 18px !important;
	}
}

/* Hero slider arrows – the old Revolution Slider "preview1" style, 20px in from the edges */
.meistari-hero .sppb-carousel-arrow {
	position: absolute;
	top: 50%;
	bottom: auto;
	width: 100px;
	height: 100px;
	margin-top: -50px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, 0.15);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	text-decoration: none;
	z-index: 5;
	transition: opacity 300ms, background-color 300ms, color 300ms;
}

.meistari-hero .sppb-carousel-arrow.left {
	left: 20px;
	right: auto;
}

.meistari-hero .sppb-carousel-arrow.right {
	right: 20px;
	left: auto;
}

/* :focus-visible, not :focus – a mouse click must not leave the arrow highlighted */
.meistari-hero .sppb-carousel-arrow:hover,
.meistari-hero .sppb-carousel-arrow:focus-visible {
	background: #fff;
	color: #aaa;
}

.meistari-hero .sppb-carousel-arrow i {
	color: inherit;
	font-size: inherit;
	line-height: 1;
}

@media (max-width: 1199px) {
	.meistari-hero .sppb-carousel-arrow {
		width: 80px;
		height: 80px;
		margin-top: -40px;
		font-size: 24px;
	}
}

@media (max-width: 991px) {
	.meistari-hero .sppb-carousel-arrow {
		width: 60px;
		height: 60px;
		margin-top: -30px;
		font-size: 20px;
	}
}

@media (max-width: 767px) {
	.meistari-hero .sppb-carousel-arrow {
		width: 40px;
		height: 40px;
		margin-top: -20px;
		font-size: 12px;
	}
}

@media (hover: none) {
	.meistari-hero .sppb-carousel-arrow {
		opacity: 1;
	}
}

.header-contact-info .sppb-addon-title {
	display: block;
}

.meistari-hero .sppb-carousel-arrow i {
	position: static;
	margin: 0;
	transform: none;
}

/* Tablets: the three contact blocks side by side (the first, empty column is only a desktop spacer) */
@media (min-width: 768px) and (max-width: 991px) {
	.header-contact-info .sppb-row {
		display: flex;
		flex-wrap: nowrap;
	}

	.header-contact-info .sppb-row > [class*="sppb-col-"] {
		flex: 1 1 0;
		max-width: none;
		width: auto;
	}

	.header-contact-info .sppb-row > [class*="sppb-col-"]:first-child {
		display: none;
	}
}

@media (max-width: 359px) {
	.header-contact-info .sppb-addon-title {
		font-size: 12px !important;
		white-space: normal;
		overflow-wrap: normal;
		word-break: normal;
	}

	.header-contact-info .sppb-addon-text {
		font-size: 11px !important;
	}
}
