/*
 * Jumpstart components.
 *
 * Rules:
 * - No hardcoded colors or font families. Use Elementor Kit globals:
 *   var(--e-global-color-primary), var(--e-global-color-<custom_id>),
 *   var(--e-global-typography-primary-font-family), ...
 * - One class per component, prefixed with .jp- (e.g. .jp-card, .jp-swiper-nav).
 *   Assign the class in Elementor > Advanced > CSS Classes instead of writing
 *   custom CSS inside widgets.
 */

/* Highlighted word inside a heading: Punya Lokasi? <span class="jp-hl">Cek Potensinya.</span> */
.jp-hl {
	color: var(--e-global-color-primary);
}

/* Soft shadow on big headings. Add class "jp-heading-shadow" to the Heading widget. */
.jp-heading-shadow .elementor-heading-title {
	text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.jp-hl--light {
	color: var(--e-global-color-surface);
}

/* Text editor without trailing paragraph margin. */
.jp-flush p:last-child {
	margin-bottom: 0;
}

/* Photo with the rounded white frame used in the "Dari Kantor" banner. */
.jp-photo img {
	border-radius: 24px;
	border: 1px solid var(--e-global-color-border);
}

/* Large solution photos (Solusi overview). */
.jp-photo--shadow img {
	border-radius: 16px;
	border: 0;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* FAQ: each item is a bordered card. */
.jp-faq .e-n-accordion {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.jp-faq .e-n-accordion-item {
	border: 1px solid var(--e-global-color-border);
	border-radius: 24px;
	background: var(--e-global-color-surface);
	overflow: hidden;
}

/* Testimonials: cards fill the (equal-height) slide; bar pager. Arrows are styled in the widget. */
.jp-testimonials .swiper-slide {
	display: flex;
}

.jp-testimonials .swiper-slide > .e-con {
	flex: 1;
}

.jp-testimonials .swiper-pagination-bullet,
.jp-slider .swiper-pagination-bullet {
	width: 52px;
	height: 4px;
	border-radius: 2px;
	opacity: 1;
}

/* Logo rows: continuous linear scroll. */
.jp-marquee .swiper-wrapper {
	transition-timing-function: linear !important;
}

.jp-marquee img {
	height: 48px;
	width: auto;
	object-fit: contain;
}

/* FAQ: the card border is on the item, so drop Elementor's inner borders. */
.jp-faq .e-n-accordion-item-title,
.jp-faq .e-n-accordion-item > .e-con {
	border: 0;
}

/* Buttons: keep icons vertically centred with the label. */
.elementor-button .elementor-button-content-wrapper {
	align-items: center;
}

.elementor-button .elementor-button-icon {
	display: inline-flex;
}

/* Mega menu cards (whole card is a link). */
.jp-mm-card {
	transition: border-color 0.2s, box-shadow 0.2s;
}

.jp-mm-card:hover {
	border-color: var(--e-global-color-primary);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Mega menu "Sumber" tabs (see assets/js/mega-tabs.js). */
.jp-mtabs .jp-mpanel:not(.is-active) {
	display: none;
}

.jp-mtabs .jp-mtab.is-active .elementor-button {
	background-color: var(--e-global-color-surface);
}

.jp-mtabs .jp-mtab .elementor-button {
	display: flex;
	width: 100%;
}

.jp-mtabs .jp-mtab .elementor-button-content-wrapper {
	justify-content: flex-start;
	text-align: left;
}

/* Flex child that may shrink below its content width (lets long text wrap). */
.jp-shrink {
	min-width: 0;
}

/* Product spec table (tools/build-v2.php jp_spec_table). Overrides Hello's striped table. */
.jp-spec {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--e-global-color-divider);
	border-radius: 8px;
	overflow: hidden;
}

.jp-spec th,
.jp-spec td,
.jp-spec tbody > tr:nth-child(odd) > td,
.jp-spec tbody > tr:nth-child(odd) > th {
	padding: 12px 20px;
	border: 0;
	border-top: 1px solid var(--e-global-color-divider);
	background-color: transparent;
	text-align: left;
	vertical-align: middle;
	font-weight: 400;
}

.jp-spec thead th {
	border-top: 0;
}

/* Zebra rows as in the design: header and even rows #F5F5F5, odd rows #FCFCFC. */
.jp-spec thead th,
.jp-spec tbody > tr:nth-child(even) > td {
	background-color: rgba(0, 0, 0, 0.04);
}

.jp-spec tbody > tr:nth-child(odd) > td {
	background-color: rgba(0, 0, 0, 0.012);
}

.jp-spec td:first-child {
	width: 50%;
	border-right: 1px solid var(--e-global-color-divider);
}

/* Uppercase heading (loop card titles come from the page title). */
.jp-upper .elementor-heading-title {
	text-transform: uppercase;
}

/* Clamp text to two lines (loop card excerpt). */
.jp-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Insight cards: same height in a row. */
.jp-posts .e-loop-item > .e-con {
	height: 100%;
}

/* Card slider (Nested Carousel): equal-height cards. */
.jp-slider .swiper-slide {
	display: flex;
	height: auto;
}

.jp-slider .swiper-slide > .e-con {
	flex: 1;
}

/* Tentang Kami hero: dashed ring with the illustration, two cards overlapping it (desktop). */
.jp-about-art img {
	width: 320px;
	height: 320px;
	border-radius: 50%;
	object-fit: cover;
}

@media (min-width: 1025px) {
	.jp-about-visual {
		min-height: 500px;
		justify-content: center;
		align-items: center;
	}

	.jp-about-visual::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 500px;
		height: 500px;
		border: 1.5px dashed var(--e-global-color-text);
		border-radius: 50%;
		transform: translate(-50%, -50%);
		pointer-events: none;
	}

	.jp-about-card {
		position: absolute;
		width: 310px;
		z-index: 1;
	}

	.jp-about-card--a {
		left: 0;
		top: 42%;
	}

	.jp-about-card--b {
		right: 0;
		top: 13%;
	}
}

/* Quote with a navy bar on the left (Our Leaders). */
.jp-quote-bar {
	border-left: 3px solid var(--e-global-color-secondary);
	padding-left: 24px;
}

/* Our Leaders: pager sits under the 300px photo on desktop. */
@media (min-width: 768px) {
	.jp-leaders .swiper-pagination {
		width: 300px !important;
		left: 0 !important;
	}
}

/* Ordered/unordered list inside a text widget. */
.jp-list ol,
.jp-list ul {
	margin: 0;
	padding-left: 24px;
}

/* Milestone timeline: grey line with a blue dot under each card. */
.jp-mstone::before {
	content: "";
	position: absolute;
	bottom: 6px;
	left: -24px;
	right: -24px;
	height: 1px;
	background: var(--e-global-color-border);
}

.swiper-slide:first-child > .jp-mstone::before {
	left: 50%;
}

.jp-mstone::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--e-global-color-accent);
	transform: translateX(-50%);
}

/* Form (Hubungi Kami): underline inputs, navy sub-headings, dropdown panels, machine checkbox cards. */
/* Field classes land on the input/subgroup, so the group is matched with :has(). */
.jp-form .elementor-field-group:has(.jp-hide-label) > .elementor-field-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.jp-form .elementor-field-textual {
	padding-left: 0;
	padding-right: 0;
	min-height: 56px;
}

.jp-form .elementor-field-textual::placeholder {
	color: var(--e-global-color-text);
	opacity: 1;
}

.jp-form .elementor-select-wrapper select {
	padding-left: 0;
}

.jp-form .elementor-select-wrapper select:invalid,
.jp-form .elementor-select-wrapper select option[value=""] {
	color: var(--e-global-color-text);
}

.jp-form .elementor-field-type-html h2 {
	margin: 24px 0 8px;
	color: var(--e-global-color-secondary);
	font-family: var(--e-global-typography-h4-font-family), sans-serif;
	font-size: var(--e-global-typography-h4-font-size);
	font-weight: 700;
	line-height: var(--e-global-typography-h4-line-height);
}

.jp-form .elementor-field-type-html p {
	margin: 0;
}

/* Dropdown panels (radio field class "jp-dd", see assets/js/form-dropdown.js).
   Panel title comes from --jp-dd-title, set in the form widget's custom CSS. */
.jp-form .jp-dd-group > .elementor-field-label {
	display: flex;
	flex-basis: 100%;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 56px;
	margin: 0;
	border-bottom: 1px solid var(--e-global-color-border);
	cursor: pointer;
}

.jp-form .jp-dd-group > .elementor-field-label::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin: 0 6px 4px 0;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
}

.jp-form .jp-dd-group.is-open > .elementor-field-label::after {
	margin-bottom: -4px;
	transform: rotate(-135deg);
}

.jp-form .jp-dd {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0 24px;
	width: 100%;
	margin-top: 24px;
	padding: 16px;
	border: 1px solid var(--e-global-color-border);
	border-radius: 8px;
	background: var(--e-global-color-surface);
}

.jp-form .jp-dd-group:not(.is-open) > .jp-dd {
	display: none;
}

.jp-form .jp-dd::before {
	content: var(--jp-dd-title, "");
	grid-column: 1 / -1;
	margin-bottom: 8px;
	color: var(--e-global-color-secondary);
	font-family: var(--e-global-typography-h4-font-family), sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.4;
}

.jp-form .jp-dd .elementor-field-option {
	position: relative;
	margin: 0;
	padding: 6px 0;
}

.jp-form .jp-dd input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.jp-form .jp-dd label {
	cursor: pointer;
}

.jp-form .jp-dd label:hover,
.jp-form .jp-dd input:checked + label {
	color: var(--e-global-color-secondary);
	font-weight: 600;
}

.jp-form .jp-dd input:focus-visible + label {
	outline: 2px solid var(--e-global-color-primary);
	outline-offset: 2px;
}

/* Machine checkbox cards: box drawn by ::before so the form's column gutters stay intact (column gap 48px). */
.jp-form .elementor-field-group:has(> .jp-machine-cards) {
	position: relative;
	padding-top: 16px;
	padding-bottom: 16px;
}

.jp-form .elementor-field-group:has(> .jp-machine-cards)::before {
	content: "";
	position: absolute;
	inset: 0 24px;
	border: 1px solid var(--e-global-color-border);
	border-radius: 8px;
	pointer-events: none;
}

.jp-form .elementor-field-group:has(> .jp-machine-cards) > .elementor-field-label {
	flex-basis: 100%;
	margin: 0 16px;
	color: var(--e-global-color-secondary) !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
}

.jp-form .elementor-field-group:has(> .jp-machine-cards) > .elementor-field-label::after {
	content: var(--jp-sub, "");
	display: block;
	margin-top: 4px;
	color: var(--e-global-color-text);
	font-size: var(--e-global-typography-text-font-size);
	font-weight: 400;
	line-height: var(--e-global-typography-text-line-height);
}

.jp-form .jp-machine-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 24px 16px 0;
}

.jp-form .jp-machine-cards .elementor-field-option {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--e-global-color-border);
	border-radius: 8px;
	background: #FAFAFA;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.jp-form .jp-machine-cards label {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
}

/* Machine photo per option, in option order (Vending, Coffee, Interactive, Lainnya). */
.jp-form .jp-machine-cards label::before {
	content: "";
	flex: none;
	width: 40px;
	height: 55px;
	background: center / contain no-repeat;
}

.jp-form .jp-machine-cards .elementor-field-option:nth-child(1) label::before { background-image: url(../img/mesin-vending.png); }
.jp-form .jp-machine-cards .elementor-field-option:nth-child(2) label::before { background-image: url(../img/mesin-coffee.png); }
.jp-form .jp-machine-cards .elementor-field-option:nth-child(3) label::before { background-image: url(../img/mesin-interactive.png); }
.jp-form .jp-machine-cards .elementor-field-option:nth-child(4) label::before { background-image: url(../img/mesin-lainnya.png); }

.jp-form .elementor-field-type-acceptance input,
.jp-form .jp-machine-cards input {
	width: 22px;
	height: 22px;
	margin: 0;
	flex: none;
}

.jp-form .elementor-field-type-acceptance .elementor-field-subgroup {
	display: flex;
	align-items: center;
	gap: 12px;
}

@media (max-width: 767px) {
	.jp-form .jp-machine-cards {
		grid-template-columns: 1fr;
	}
}

.jp-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Promo & Program hero: title inside a dashed ring. */
.jp-ring {
	width: 500px !important;
	height: 500px;
	max-width: 100%;
	border: 1.5px dashed var(--e-global-color-secondary);
	border-radius: 50%;
}

@media (max-width: 767px) {
	.jp-ring {
		width: 320px !important;
		height: 320px;
	}
}

/* Single promo: share icons follow the reader; article typography. */
.jp-share-sticky {
	position: sticky !important;
	top: 120px;
}

.jp-prose {
	color: var(--e-global-color-text);
	font-size: var(--e-global-typography-text-font-size);
	line-height: var(--e-global-typography-text-line-height);
}

.jp-prose h1,
.jp-prose h2,
.jp-prose h3,
.jp-prose h4 {
	margin: 48px 0 16px;
	color: var(--e-global-color-secondary);
	font-size: var(--e-global-typography-h4-font-size);
	font-weight: 700;
	line-height: var(--e-global-typography-h4-line-height);
	text-shadow: 0 4px 4px rgba(0, 0, 0, .25);
}

.jp-prose p {
	margin: 0 0 16px;
}

.jp-prose ol,
.jp-prose ul {
	margin: 0 0 16px;
	padding-left: 24px;
}

.jp-prose a {
	color: inherit;
	text-decoration: underline;
}

.jp-prose img {
	height: auto;
	border-radius: 12px;
}

/* Blog search box and Studi Kasus category dropdown (shortcodes in functions.php). */
.jp-search,
.jp-filter select {
	width: 250px;
	max-width: 100%;
	height: 40px;
	border: 1px solid var(--e-global-color-border);
	border-radius: 8px;
	background: var(--e-global-color-surface);
	color: var(--e-global-color-text);
	font-size: 14px;
}

.jp-search {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0 6px 0 16px;
}

.jp-search input {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
}

.jp-search input:focus {
	outline: none;
}

.jp-search input::placeholder {
	color: var(--e-global-color-text);
	opacity: 1;
}

.jp-search button {
	display: flex;
	padding: 4px;
	border: 0;
	background: none;
	color: var(--e-global-color-text);
	cursor: pointer;
}

.jp-filter {
	margin: 0;
}

.jp-filter select {
	padding: 0 40px 0 16px;
	appearance: none;
	background: var(--e-global-color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
	cursor: pointer;
}

/* Studi Kasus label on the card image. */
.e-loop-item .e-con:has(> .jp-badge-wrap) {
	position: relative;
}

.jp-badge-wrap {
	position: absolute !important;
	top: 28px;
	left: 28px;
	z-index: 1;
}

.jp-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 8px;
	background: #E5F0FF;
	color: #187BED;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.jp-badge--tempat-umum { background: #FFE9E2; color: #FF5400; }
.jp-badge--acara { background: #E3FBE6; color: #12A72A; }
.jp-badge--aktivasi-brand { background: #FCE6FF; color: #C800DC; }
.jp-badge--kemitraan { background: #FFE5E5; color: #E00000; }
.jp-badge--integrasi { background: #FFF6D6; color: #E8B100; }

/* Loop grid page numbers. */
.jp-pager .elementor-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.jp-pager .elementor-pagination .page-numbers {
	min-width: 36px;
	padding: 6px 10px;
	border: 1px solid var(--e-global-color-border);
	border-radius: 8px;
	color: var(--e-global-color-text);
	text-align: center;
}

.jp-pager .elementor-pagination .page-numbers.current {
	border-color: var(--e-global-color-primary);
	background: var(--e-global-color-primary);
	color: var(--e-global-color-surface);
}
