/**
 * Triggers
 */
.jah-modal-trigger {
	cursor: pointer;
}

.jah-modal-trigger.elementor-widget-icon-box,
.jah-modal-trigger .elementor-icon-box-wrapper {
	cursor: pointer;
}

.jah-modal-trigger:focus-visible {
	outline: 2px solid #0069a6;
	outline-offset: 3px;
}

/**
 * Modal shell
 */
html.jah-modal-open {
	overflow: hidden;
}

.jah-modal[hidden],
.jah-contenido-modals[hidden] {
	display: none !important;
}

.jah-contenido-modals:not([hidden]) {
	display: contents;
}

.jah-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.jah-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 62, 116, 0.45);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	cursor: pointer;
}

.jah-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(760px, 100%);
	max-height: min(88vh, 860px);
	overflow: hidden;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(2, 62, 116, 0.28);
	padding: 0;
	font-family: "Roboto", sans-serif;
	color: #4c5760;
}

.jah-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: #f1f5f9;
	color: #023e74;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.jah-modal__close:hover,
.jah-modal__close:focus {
	background: #023e74;
	color: #fff;
	outline: none;
}

/**
 * Header: image + title
 */
.jah-contenido-modal__header {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 28px 48px 12px 28px;
	flex-shrink: 0;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
	border-bottom: 1px solid #e2e8f0;
}

.jah-contenido-modal__media {
	flex: 0 0 auto;
	margin: 0;
	text-align: left;
}

.jah-contenido-modal__img {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: contain;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #e2e8f0;
	padding: 4px;
}

.jah-modal__title {
	font-family: "Poppins", sans-serif !important;
	font-size: clamp(20px, 2.4vw, 26px) !important;
	font-weight: 700 !important;
	color: #023e74 !important;
	margin: 0 !important;
	line-height: 1.25 !important;
	flex: 1 1 auto;
}

/**
 * Scrollable body
 */
.jah-contenido-modal__body {
	flex: 1 1 auto;
	overflow: auto;
	padding: 18px 28px 8px;
	font-size: 15px;
	line-height: 1.55;
	-webkit-overflow-scrolling: touch;
}

.jah-contenido-modal__body p {
	margin: 0 0 12px;
}

.jah-contenido-modal__body strong {
	color: #023e74;
}

.jah-modal-lead {
	font-size: 1.06em;
	margin-bottom: 14px !important;
	color: #023e74;
}

.jah-modal-section {
	font-family: "Poppins", sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #023e74 !important;
	margin: 22px 0 10px !important;
	padding-bottom: 6px;
	border-bottom: 2px solid #e2e8f0;
	letter-spacing: 0.01em;
}

.jah-modal-section:first-child {
	margin-top: 8px !important;
}

.jah-modal-list {
	margin: 0 0 10px !important;
	padding-left: 1.2em !important;
	list-style: disc;
}

.jah-modal-list > li {
	margin-bottom: 8px;
	padding-left: 2px;
}

.jah-modal-list--nested {
	margin-top: 8px !important;
	margin-bottom: 4px !important;
	padding-left: 1.1em !important;
	list-style: circle;
}

.jah-modal-list--nested > li {
	margin-bottom: 6px;
	color: #475569;
	font-size: 14px;
}

.jah-modal-callout {
	margin: 12px 0 16px;
	padding: 14px 16px;
	background: #f1f5f9;
	border-left: 3px solid #0069a6;
	border-radius: 0 8px 8px 0;
	font-size: 14px;
	line-height: 1.5;
}

.jah-modal-callout p {
	margin: 0 0 8px;
	color: #023e74;
}

.jah-modal-callout p:last-child {
	margin-bottom: 0;
}

.jah-modal-note {
	font-size: 13px;
	color: #64748b;
}

/**
 * Sticky actions
 */
.jah-contenido-modal__actions {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 28px 20px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}

.jah-contenido-modal__download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: 6px;
	border: 2px solid #0069a6;
	background: rgba(0, 105, 166, 0.08);
	color: #023e74 !important;
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	line-height: 1.2;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jah-contenido-modal__download-btn:hover,
.jah-contenido-modal__download-btn:focus {
	background: #0069a6;
	border-color: #0069a6;
	color: #fff !important;
	outline: none;
}

.jah-contenido-modal__cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 6px;
	background: #d98904;
	color: #fff !important;
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	line-height: 1.2;
	transition: background 0.2s ease, box-shadow 0.2s ease;
	margin-left: auto;
}

.jah-contenido-modal__cta-btn:hover,
.jah-contenido-modal__cta-btn:focus {
	background: #b87203;
	color: #fff !important;
	outline: none;
	box-shadow: 0 8px 20px rgba(217, 137, 4, 0.35);
}

@media (max-width: 767px) {
	.jah-modal {
		padding: 10px;
		align-items: flex-start;
	}

	.jah-modal__dialog {
		max-height: 94vh;
		width: 100%;
		border-radius: 10px;
	}

	.jah-contenido-modal__header {
		flex-direction: row;
		padding: 22px 44px 12px 16px;
		gap: 12px;
	}

	.jah-contenido-modal__img {
		width: 72px;
		height: 72px;
	}

	.jah-contenido-modal__body {
		padding: 14px 16px 8px;
		font-size: 14px;
	}

	.jah-contenido-modal__actions {
		flex-direction: column;
		align-items: stretch;
		padding: 14px 16px 16px;
	}

	.jah-contenido-modal__download-btn,
	.jah-contenido-modal__cta-btn {
		width: 100%;
		margin-left: 0;
	}
}

/**
 * Modales construidos con Elementor (cuerpo completo en el builder).
 */
.jah-contenido-modal--elementor .jah-modal__dialog {
	width: min(960px, 100%);
	max-height: min(90vh, 900px);
	overflow: auto;
	padding: 0;
}

.jah-contenido-modal--elementor .jah-modal__close {
	z-index: 20;
	box-shadow: 0 2px 8px rgba(2, 62, 116, 0.15);
}

.jah-contenido-modal__elementor {
	flex: 1 1 auto;
	min-height: 0;
}

.jah-contenido-modal__elementor > .elementor {
	width: 100%;
}

.jah-contenido-modal--elementor .jah-modal__dialog::-webkit-scrollbar {
	width: 8px;
}

.jah-contenido-modal--elementor .jah-modal__dialog::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}
