/*
 * Media Power — CSS propio (antes "CSS adicional" del Personalizador).
 * Se imprime en wp_head prioridad 100 (inc/mediapower-css.php), mismo punto
 * de la cascada que tenía wp-custom-css: ANTES de los CSS de página del tema.
 * Por eso las reglas llevan especificidad extra. Editar aquí, no en el Personalizador.
 */

/* =====================================================
   JP Financial — CSS adicional (Media Power, nov 2026)
   -----------------------------------------------------
   Índice
     1. Global · cabecera y menú móvil
     2. Home
     3. Servicios (page-id 114)
     4. Método (page-id 179)
     5. Contacto (page-id 162)

   Nota: este CSS se imprime ANTES que los CSS del tema
   hijo → las reglas llevan especificidad extra
   (html body…, clases duplicadas) para ganar sin
   depender del orden de carga.
   ===================================================== */


/* =====================================================
   1. GLOBAL · CABECERA Y MENÚ MÓVIL
   ===================================================== */

/* Menú móvil, submenú "Servicios":
   - el sub-menu lleva .elementor-nav-menu--dropdown y heredaba el fondo
     claro (#f8faf9) del dropdown antiguo de site-header.css
   - el panel de enlaces es absolute → el fondo oscuro no crece solo;
     con el submenú abierto hace falta más alto (~36px por servicio) */
@media (max-width: 920px) {
	html body.jp-site:not(.elementor-editor-active) .elementor-location-header .jp-native-header.elementor-section .jp-native-menu .jp-nav-menu-panel[aria-hidden="false"] .sub-menu.elementor-nav-menu--dropdown {
		background: transparent !important;
		box-shadow: none !important;
		border: 0 !important;
		border-radius: 0 !important;
	}

	html body.jp-site:not(.elementor-editor-active) .elementor-location-header .jp-native-header.elementor-section.elementor-section:has(.jp-native-menu .jp-nav-menu-toggle[aria-expanded="true"]):has(.menu-item.is-submenu-open) {
		min-height: 620px !important;
	}
}


/* =====================================================
   2. HOME
   ===================================================== */

/* Metodología (móvil/tablet vertical): todo va en posición absoluta;
   el título se partía en 4 líneas en 271px y pisaba el párrafo
   → más ancho para el título (3 líneas) */
@media (max-width: 920px), (min-width: 921px) and (max-width: 1024px) and (orientation: portrait) {
	html body.home.home .elementor-element.elementor-element-jp-methodology1 .jp-methodology-title {
		width: calc(100% - 48px) !important;
		max-width: 345px !important;
	}
}

/* Conócenos (móvil): home.css oculta los <br> del título y repone el espacio
   con ".jp-about-muted + .jp-about-muted::before", pero entre ambos span hay
   un <br> → no son hermanos contiguos → "ataduras,sin". Espacio tras el <br> */
html body.home.home .elementor-element.elementor-element-jpabout1 .jp-about-title br + .jp-about-muted::before {
	content: " ";
}


/* =====================================================
   3. SERVICIOS (page-id 114)
   ===================================================== */

/* Móvil/tablet: título y botones primero, índice de servicios después */
@media (max-width: 1024px) {
	html body.jp-services-page .elementor-element.jp-services-hero .jp-services-left { order: 1 !important; }
	html body.jp-services-page .elementor-element.jp-services-hero .jp-services-right { order: 2 !important; }
}

/* Móvil: hero y tarjetas de servicio sin "sticky". Cada bloque es más alto
   que la pantalla y la tarjeta siguiente tapaba los botones */
@media (max-width: 767px) {
	html body.jp-services-page .elementor-element.jp-services-hero,
	html body.jp-services-page .elementor-element.jp-service01,
	html body.jp-services-page .elementor-element.jp-service02,
	html body.jp-services-page .elementor-element.jp-service03,
	html body.jp-services-page .elementor-element.jp-service04 {
		position: relative !important;
		top: auto !important;
	}
}


/* =====================================================
   4. MÉTODO (page-id 179)
   ===================================================== */

/* Ancla "Ver hoja de ruta": que la cabecera fija no tape el título */
#hoja-de-ruta { scroll-margin-top: 120px; }

/* Tabla "Dos formas de hacer las cosas" (escritorio) */
@media (min-width: 1025px) {
	/* Misma fuente y tamaño que el texto de las tarjetas de los tres ejes */
	html body.jp-method-page .jp-method-table .jp-method-table-row:not(.jp-method-table-head) > div {
		font-family: "DM Sans", Inter, sans-serif;
		font-size: clamp(13px, 1vw, 18px);
		line-height: 1.25;
	}

	/* Columnas: "Aspecto" cabe "Recomendación"; Método JP más ancha */
	html body.jp-method-page .jp-method-table .jp-method-table-row {
		grid-template-columns: 200px 1fr 1.15fr;
	}
}


/* =====================================================
   5. CONTACTO (page-id 162)
   ===================================================== */

/* --- Cabecera --- */

/* Ocultar CTA "Hablar con un experto" solo en Contacto */
.page-id-162 .elementor-element-jpcta01 { display: none !important; }

/* --- Hero --- */

/* Tarjeta de reserva a ancho completo de su columna */
html body.jp-contact-page .jp-contact-booking-card { max-width: none; margin-left: 0; }
html body.jp-contact-page .jp-contact-booking-card h2 { max-width: none; text-wrap: balance; }
html body.jp-contact-page .jp-contact-booking-card p { max-width: none; }

/* Teléfonos: enlaces con el mismo aspecto que el resto de datos */
html body.jp-contact-page .jp-contact-hero .jp-contact-phone-value a {
	color: inherit;
	text-decoration: none;
}
html body.jp-contact-page .jp-contact-hero .jp-contact-phone-value a:hover {
	text-decoration: underline;
}

/* Mismo espacio entre correo / teléfono / dirección / horario */
@media (min-width: 1025px) {
	html body.jp-contact-page .jp-contact-hero .jp-contact-phone-value,
	html body.jp-contact-page .jp-contact-hero .jp-contact-address-value { margin-bottom: 28px; }
}
@media (min-width: 1025px) and (max-height: 850px) {
	html body.jp-contact-page .jp-contact-hero .jp-contact-phone-value,
	html body.jp-contact-page .jp-contact-hero .jp-contact-address-value { margin-bottom: 24px; }
}

/* --- Visítanos + FAQ --- */

/* Texto con tipografía de las preguntas del FAQ + recuadro */
.elementor-162 .elementor-element.elementor-element-jpc_visit_p.jp-contact-visit-text {
	background: #f5f4f0;
	border-radius: 12px;
	padding: 20px 24px;
	color: #111111;
	font-family: "Inter", sans-serif;
	font-weight: 600;
	font-size: 22px;
	line-height: 28.6px;
}

/* Quitar pastillas de subrayado (Visítanos + FAQ) */
html body.jp-contact-page .jp-contact-visit-title.jp-contact-visit-title .elementor-heading-title span,
html body.jp-contact-page .elementor-element.jp-contact-faq.jp-contact-faq .jp-faq-emphasis,
html body.jp-contact-page .elementor-element.jp-contact-faq.jp-contact-faq .elementor-heading-title em {
	background: transparent !important;
	padding: 0 !important;
	color: #00352d !important;
}

/* --- Tablet + móvil (≤1024) --- */
@media (max-width: 1024px) {
	/* Hero: tarjeta justo después del título (el tema ordena por clase) */
	html body.jp-contact-page .jp-contact-booking-widget.jp-contact-booking-widget { order: 3 !important; }

	/* Visítanos: tamaño de texto */
	.elementor-162 .elementor-element.elementor-element-jpc_visit_p.jp-contact-visit-text { font-size: 20px; line-height: 26px; }

	/* Visítanos: el kicker heredaba orden y color del hero */
	html body.jp-contact-page .jp-contact-visit-kicker.jp-contact-kicker { order: 0 !important; }
	html body.jp-contact-page .jp-contact-visit-kicker.jp-contact-kicker .elementor-heading-title { color: #00352d !important; }

	/* Visítanos: columnas apiladas, mapa debajo a todo el ancho */
	html body.jp-contact-page .jp-contact-visit .elementor-column { width: 100% !important; }
	html body.jp-contact-page .jp-contact-map { margin-top: 32px !important; }
	html body.jp-contact-page .jp-contact-map .elementor-custom-embed,
	html body.jp-contact-page .jp-contact-map .cmplz-placeholder-parent,
	html body.jp-contact-page .jp-contact-map iframe { width: 100% !important; }
}

/* --- Móvil (≤767) --- */
@media (max-width: 767px) {
	.elementor-162 .elementor-element.elementor-element-jpc_visit_p.jp-contact-visit-text {
		font-size: 18px;
		line-height: 24px;
		padding: 16px 18px;
	}
}
