/**
 * Estilos base de los widgets.
 */

/* Título ------------------------------------------------------------- */

.mango-heading-title {
	margin: 0;
	padding: 0;
	line-height: 1.2;
}

.mango-heading-title a {
	color: inherit;
	text-decoration: none;
}

/* Texto -------------------------------------------------------------- */

.mango-text-editor > *:first-child { margin-top: 0; }
.mango-text-editor > *:last-child { margin-bottom: 0; }

.mango-drop-cap {
	float: left;
	line-height: 0.8;
	padding-right: 8px;
	font-weight: 700;
}

/* Imagen ------------------------------------------------------------- */

.mango-image {
	margin: 0;
}

.mango-image-el {
	display: inline-block;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.mango-image-caption {
	display: block;
	font-size: 0.875em;
	opacity: 0.8;
	margin-top: 8px;
}

/* Botón -------------------------------------------------------------- */

.mango-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2;
	background-color: var(--mango-color-primary, #5b3df5);
	color: #fff;
	border-radius: var(--mango-button-radius, 6px);
	transition: all 0.3s;
}

.mango-button:hover {
	opacity: 0.92;
	color: #fff;
}

.mango-button-xs { padding: 8px 14px; font-size: 0.75rem; }
.mango-button-sm { padding: 10px 18px; font-size: 0.875rem; }
.mango-button-md { padding: 13px 24px; font-size: 1rem; }
.mango-button-lg { padding: 16px 32px; font-size: 1.125rem; }
.mango-button-xl { padding: 20px 42px; font-size: 1.25rem; }

/* Separador ---------------------------------------------------------- */

.mango-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.mango-divider-separator {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.mango-divider-line {
	flex: 1 1 auto;
	border-top: 1px solid #d8dbe3;
	display: block;
}

.mango-divider-element {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

/* Espaciador --------------------------------------------------------- */

.mango-spacer {
	width: 100%;
	height: 50px;
}

/* Icono -------------------------------------------------------------- */

.mango-icon-wrapper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mango-color-primary, #5b3df5);
	text-decoration: none;
	transition: all 0.3s;
}

.mango-icon-wrapper.mango-view-stacked {
	background-color: var(--mango-color-primary, #5b3df5);
	color: #fff;
}

.mango-icon-wrapper.mango-view-framed {
	border: 2px solid currentColor;
}

.mango-shape-circle { border-radius: 50%; }
.mango-shape-square { border-radius: 4px; }

/* Caja de imagen / icono --------------------------------------------- */

.mango-image-box,
.mango-icon-box {
	display: flex;
	gap: 16px;
}

.mango-position-top {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.mango-position-left { flex-direction: row; align-items: flex-start; }
.mango-position-right { flex-direction: row-reverse; align-items: flex-start; }

.mango-image-box-title,
.mango-icon-box-title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	line-height: 1.3;
}

.mango-image-box-title a,
.mango-icon-box-title a {
	color: inherit;
	text-decoration: none;
}

.mango-image-box-description,
.mango-icon-box-description {
	margin: 0;
}

.mango-icon-box-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mango-color-primary, #5b3df5);
	flex: none;
	text-decoration: none;
}

.mango-icon-box-icon.mango-view-stacked {
	background-color: var(--mango-color-primary, #5b3df5);
	color: #fff;
}

.mango-icon-box-icon.mango-view-framed {
	border: 2px solid currentColor;
}

.mango-image-box-img img {
	display: inline-block;
}

/* Lista de iconos ---------------------------------------------------- */

.mango-icon-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mango-icon-list-items.mango-list-inline {
	flex-direction: row;
	flex-wrap: wrap;
}

.mango-icon-list-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mango-icon-list-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.mango-icon-list-icon {
	display: inline-flex;
	color: var(--mango-color-primary, #5b3df5);
	flex: none;
}

/* Iconos sociales ---------------------------------------------------- */

.mango-social-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.mango-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	color: #fff;
	background-color: #2b2f3a;
	text-decoration: none;
	transition: opacity 0.3s, transform 0.3s;
}

.mango-social-icon:hover {
	transform: translateY(-2px);
	color: #fff;
}

.mango-shape-rounded .mango-social-icon { border-radius: 8px; }
.mango-shape-circle .mango-social-icon { border-radius: 50%; }
.mango-shape-square .mango-social-icon { border-radius: 0; }

/* Aviso -------------------------------------------------------------- */

.mango-alert {
	position: relative;
	padding: 16px 20px;
	border-left: 4px solid;
	border-radius: 4px;
}

.mango-alert-title {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.mango-alert-description { display: block; }

.mango-alert-info { background: #eaf3ff; border-color: #2f7fd6; color: #14385c; }
.mango-alert-success { background: #e8f8ee; border-color: #27a35c; color: #144a2b; }
.mango-alert-warning { background: #fff5e5; border-color: #e0912f; color: #5c3c0d; }
.mango-alert-danger { background: #fdeaea; border-color: #d64545; color: #5c1717; }

.mango-alert-dismiss {
	position: absolute;
	top: 8px;
	right: 10px;
	border: none;
	background: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
}

/* Valoración --------------------------------------------------------- */

.mango-star-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.mango-stars {
	display: inline-flex;
	gap: 2px;
}

.mango-star {
	display: inline-flex;
	font-size: 22px;
}

.mango-star-full { color: #f5b301; }
.mango-star-empty { color: #dcdfe8; }

/* Contador y progreso ------------------------------------------------ */

.mango-counter {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mango-counter-number-wrapper {
	font-size: 2.75rem;
	font-weight: 700;
	line-height: 1.1;
	display: flex;
	gap: 2px;
	justify-content: inherit;
}

.mango-counter-title { font-size: 1rem; }

.mango-progress { width: 100%; }

.mango-progress-title {
	margin-bottom: 8px;
	font-weight: 600;
}

.mango-progress-track {
	width: 100%;
	height: 28px;
	background-color: #eceef4;
	border-radius: 4px;
	overflow: hidden;
}

.mango-progress-fill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	height: 100%;
	padding: 0 10px;
	color: #fff;
	font-size: 0.8125rem;
	background-color: var(--mango-color-primary, #5b3df5);
	transition: width 1.2s ease-out;
	white-space: nowrap;
}

/* Pestañas ----------------------------------------------------------- */

.mango-tabs {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.mango-tabs-vertical {
	flex-direction: row;
	align-items: flex-start;
}

.mango-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.mango-tabs-vertical .mango-tabs-nav {
	flex-direction: column;
	flex: 0 0 240px;
}

.mango-tab-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 20px;
	border: none;
	border-bottom: 3px solid transparent;
	background: #f4f5f9;
	font: inherit;
	cursor: pointer;
	color: inherit;
	transition: all 0.25s;
}

.mango-tab-title.is-active {
	background: #fff;
	border-bottom-color: var(--mango-color-primary, #5b3df5);
	font-weight: 600;
}

.mango-tabs-vertical .mango-tab-title {
	border-bottom: none;
	border-left: 3px solid transparent;
	justify-content: flex-start;
	width: 100%;
}

.mango-tabs-vertical .mango-tab-title.is-active {
	border-left-color: var(--mango-color-primary, #5b3df5);
}

.mango-tabs-content { flex: 1 1 auto; }

.mango-tab-content {
	display: none;
	padding: 20px;
	background: #fff;
}

.mango-tab-content.is-active { display: block; }

/* Acordeón ----------------------------------------------------------- */

.mango-accordion {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.mango-accordion-item {
	border: 1px solid #e3e6ee;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.mango-accordion-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 16px 20px;
	border: none;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
	color: inherit;
}

.mango-accordion-title {
	margin: 0;
	font-size: 1.0625rem;
}

.mango-accordion-icon {
	display: inline-flex;
	font-size: 18px;
	color: var(--mango-color-primary, #5b3df5);
	flex: none;
}

.mango-accordion-item .mango-icon-opened { display: none; }
.mango-accordion-item.is-open .mango-icon-opened { display: inline-flex; }
.mango-accordion-item.is-open .mango-icon-closed { display: none; }

.mango-accordion-content { padding: 0 20px 18px; }

/* Testimonio --------------------------------------------------------- */

.mango-testimonial {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: #fff;
}

.mango-testimonial-content {
	font-size: 1.0625rem;
	line-height: 1.7;
}

.mango-testimonial-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mango-testimonial-center {
	align-items: center;
	text-align: center;
}

.mango-testimonial-center .mango-testimonial-meta {
	flex-direction: column;
}

.mango-testimonial-above .mango-testimonial-meta {
	order: -1;
}

.mango-testimonial-image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
}

.mango-testimonial-author {
	display: flex;
	flex-direction: column;
}

.mango-testimonial-name { font-weight: 700; }
.mango-testimonial-job { font-size: 0.875rem; opacity: 0.75; }

/* Galería ------------------------------------------------------------ */

.mango-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.mango-gallery-item {
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
}

.mango-gallery-item img {
	width: 100%;
	transition: transform 0.4s, opacity 0.4s;
}

.mango-gallery-hover-zoom .mango-gallery-item:hover img { transform: scale(1.08); }
.mango-gallery-hover-fade .mango-gallery-item:hover img { opacity: 0.75; }
.mango-gallery-hover-lift .mango-gallery-item { transition: transform 0.3s, box-shadow 0.3s; }
.mango-gallery-hover-lift .mango-gallery-item:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(15, 18, 34, 0.15); }

@media (max-width: 767px) {
	.mango-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Vídeo y mapa ------------------------------------------------------- */

.mango-video-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
}

.mango-video-wrapper::before {
	content: "";
	display: block;
	padding-bottom: 56.25%;
}

.mango-ratio-219::before { padding-bottom: 42.85%; }
.mango-ratio-43::before { padding-bottom: 75%; }
.mango-ratio-11::before { padding-bottom: 100%; }
.mango-ratio-916::before { padding-bottom: 177.77%; }

.mango-video-wrapper iframe,
.mango-video-wrapper video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.mango-map iframe {
	width: 100%;
	height: 360px;
	border: none;
	display: block;
}

.mango-map {
	overflow: hidden;
	border-radius: 8px;
}

/* Lightbox ----------------------------------------------------------- */

.mango-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 12, 20, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	cursor: zoom-out;
}

.mango-lightbox img {
	max-width: 92vw;
	max-height: 92vh;
	border-radius: 6px;
}

.mango-lightbox-close {
	position: absolute;
	top: 18px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 34px;
	cursor: pointer;
	line-height: 1;
}

/* HTML y shortcode --------------------------------------------------- */

.mango-html > *:first-child,
.mango-shortcode > *:first-child { margin-top: 0; }
