/**
 * GDL Core — estilos exclusivos de widgets Elementor.
 * El diseño principal permanece en metrindust-theme.
 */

.gdl-widget--empty {
  padding: 1.25rem;
  border: 1px dashed #c5d0de;
  background: #f7fafc;
  color: #515b6e;
  font-size: 0.95rem;
}

.gdl-product-card {
  display: block;
  height: 100%;
}

.gdl-product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.gdl-product-card__media {
  margin-bottom: 0.75rem;
}

.gdl-product-card__media img {
  width: 100%;
  height: auto;
  display: block;
}

.gdl-product-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.gdl-product-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text, #515b6e);
  margin-bottom: 0.5rem;
}

.gdl-product-card__cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--color-accent, #0090ff);
}

.gdl-contact-data__list li {
  margin-bottom: 0.75rem;
}

.gdl-contact-data__list a {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.gdl-card-post__cta {
  font-weight: 600;
  color: var(--color-accent, #0090ff);
}

/* Elementor editor comfort */
.elementor-editor-active .gdl-widget .swiper,
.elementor-editor-active .gdl-widget .owl-carousel {
  min-height: 120px;
}

/* Misma causa que elementor-compatibility.css: .reveal queda en opacity:0 en el canvas */
.elementor-editor-active .gdl-widget .reveal,
.elementor-editor-preview .gdl-widget .reveal {
  opacity: 1;
  transform: none;
}

/*
 * Certificaciones ISO (about-home__certs): forzar layout de la maqueta
 * dentro de Elementor (el Swiper de GDL no debe pelear con el grid ≥768px).
 */
.elementor-widget-gdl-about-intro .about-home__certs,
.elementor-widget-gdl-home-about .about-home__certs,
.elementor-widget-gdl-certificaciones.gdl-widget,
.gdl-about .about-home__certs,
.gdl-certs {
  width: 100%;
}

.elementor-widget-gdl-about-intro .about-home__certs-carousel:not(.is-carousel-active),
.elementor-widget-gdl-home-about .about-home__certs-carousel:not(.is-carousel-active),
.gdl-about .about-home__certs-carousel:not(.is-carousel-active),
.gdl-certs .about-home__certs-carousel:not(.is-carousel-active) {
  overflow: visible;
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .elementor-widget-gdl-about-intro .about-home__certs-carousel .swiper-wrapper,
  .elementor-widget-gdl-home-about .about-home__certs-carousel .swiper-wrapper,
  .gdl-about .about-home__certs-carousel .swiper-wrapper,
  .gdl-certs .about-home__certs-carousel .swiper-wrapper,
  .elementor-widget-gdl-certificaciones .about-home__certs-carousel .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
  }

  .elementor-widget-gdl-about-intro .about-home__certs-carousel .swiper-slide,
  .elementor-widget-gdl-home-about .about-home__certs-carousel .swiper-slide,
  .gdl-about .about-home__certs-carousel .swiper-slide,
  .gdl-certs .about-home__certs-carousel .swiper-slide,
  .elementor-widget-gdl-certificaciones .about-home__certs-carousel .swiper-slide {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
  }

  .elementor-widget-gdl-about-intro .about-home__certs-carousel .swiper-pagination,
  .elementor-widget-gdl-home-about .about-home__certs-carousel .swiper-pagination,
  .gdl-about .about-home__certs-carousel .swiper-pagination,
  .gdl-certs .about-home__certs-carousel .swiper-pagination,
  .elementor-widget-gdl-certificaciones .about-home__certs-carousel .swiper-pagination {
    display: none !important;
  }
}

/* Evitar que Elementor aplaste las placas ISO */
.elementor .cert-card img.cert-card__plate,
.gdl-about .cert-card img.cert-card__plate,
.gdl-certs .cert-card img.cert-card__plate {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.875rem;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  object-fit: contain;
}

.elementor .cert-card,
.gdl-about .cert-card,
.gdl-certs .cert-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(16, 50, 108, 0.18);
  padding: 1.5rem 1.5rem 1.25rem;
  height: 100%;
  text-align: center;
}

/* Owl hide-until-loaded: show container, hide clones until init */
.gdl-owl.owl-carousel:not(.owl-loaded) {
  display: block !important;
}

.gdl-owl.owl-carousel.owl-loaded {
  display: block !important;
}

/* Clientes partners: slider de logos (tarjeta blanca de referencia) */
.gdl-clientes .clients-logos-grid.owl-carousel {
  display: block !important;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: none;
  gap: 0;
  background: #ffffff;
  border: 1px solid rgba(17, 51, 115, 0.08);
  border-radius: 20px;
  box-shadow:
    0 4px 14px rgba(17, 51, 115, 0.06),
    0 10px 28px rgba(17, 51, 115, 0.08);
  padding: clamp(28px, 3.5vw, 40px) clamp(24px, 4vw, 48px);
}

.gdl-clientes .clients-logos-grid.owl-carousel .owl-stage-outer {
  overflow: hidden;
}

.gdl-clientes .clients-logos-grid.owl-carousel .owl-stage {
  display: flex;
  align-items: center;
}

.gdl-clientes .clients-logos-grid.owl-carousel .clients-logos-grid__cell {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.gdl-clientes .clients-logos-grid.owl-carousel .clients-logos-grid__cell img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

@media (max-width: 575.98px) {
  .gdl-clientes .clients-logos-grid.owl-carousel {
    border-radius: 16px;
    padding: 22px 16px;
  }

  .gdl-clientes .clients-logos-grid.owl-carousel .clients-logos-grid__cell img {
    max-height: 52px;
  }
}

/* Servicios: layout estable antes de Owl (maqueta .spec-home) */
.gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) {
  display: flex !important;
  gap: 1rem;
  overflow: hidden;
}

.gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) > .spec-home__item {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) > .spec-home__item {
    flex-basis: 50%;
    max-width: 50%;
  }
}

@media (min-width: 992px) {
  .gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) > .spec-home__item {
    flex-basis: 33.333%;
    max-width: 33.333%;
  }

  .gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) > .spec-home__item:nth-child(n + 4) {
    display: none;
  }
}

.gdl-servicios .spec-home__slider.owl-carousel:not(.owl-loaded) > .spec-home__item:first-child .spec-card__inner {
  min-height: 460px;
  border: 1.5px solid #1050b2;
}

/*
 * CTA: fallback de sombra en .page-cta__inner.
 * Si se edita en Estilo → Sombra, gana el CSS de Elementor (más específico / posterior).
 */
.elementor-widget-gdl-cta .page-cta__inner {
	box-shadow: 0 1px 0 rgba(38, 114, 255, 0.06), 0 16px 40px rgba(16, 50, 108, 0.08);
}

/* Contacto: quote media / waze vs reset .elementor img */
.elementor .gdl-contact-quote .quote-card__media img,
.elementor-widget-gdl-formulario-cf7 .quote-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
}

.elementor .gdl-contact-locations .location-card__waze img,
.elementor-widget-gdl-contact-locations .location-card__waze img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
}

/* Blog: cards vs reset .elementor img */
.elementor .gdl-blog-webinars .blog-webinar-card__media img,
.elementor-widget-gdl-blog-webinars .blog-webinar-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
}

.elementor .gdl-blog-page .blog-card__media img,
.elementor-widget-gdl-blog-page .blog-card__media img {
	width: 100%;
	height: auto;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	object-fit: cover;
}

/* Productos outro: logos vs reset .elementor img */
.elementor .gdl-prod-outro .prod-page-brands__slide img,
.elementor-widget-gdl-prod-outro .prod-page-brands__slide img {
	width: auto;
	max-width: 120px;
	max-height: 44px;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* Productos shop: imagen spotlight vs reset .elementor img (0,1,1) */
.elementor .prod-shop-spotlight__product-img,
.elementor-widget-gdl-productos .prod-shop-spotlight__product-img,
.elementor .gdl-productos--shop .prod-shop-spotlight__product-img {
	width: 100%;
	max-width: min(150px, 100%);
	height: auto;
	margin-top: clamp(-2.5rem, -4.2vw, -1.75rem);
	margin-bottom: 0;
	object-fit: contain;
	object-position: bottom center;
	display: block;
	border: none;
	border-radius: 0;
	box-shadow: none;
	filter: drop-shadow(2px 5px 8px rgba(17, 51, 115, 0.14));
}

@media (max-width: 991.98px) {
	.elementor .prod-shop-spotlight__product-img,
	.elementor-widget-gdl-productos .prod-shop-spotlight__product-img {
		max-width: 100%;
		width: auto;
		max-height: 88px;
		margin-top: 0;
		object-position: center;
	}
}

@media (max-width: 767.98px) {
	.elementor .prod-shop-spotlight__product-img,
	.elementor-widget-gdl-productos .prod-shop-spotlight__product-img {
		max-height: 150px;
		margin-top: 0;
	}
}

/* Nosotros / política: borde redondeado (Elementor suele anular border-radius en img) */
.gdl-about-policy .about-policy__media,
.elementor-widget-gdl-about-policy .about-policy__media {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(16, 50, 108, 0.1);
}

.gdl-about-policy .about-policy__image,
.elementor-widget-gdl-about-policy .about-policy__image,
.elementor-widget-gdl-about-policy .about-policy__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px !important;
  object-fit: cover;
}
