### search_filters = {FOCUS_FILTER_POLITICAL}
### search_filters = {FOCUS_FILTER_RESEARCH}
### search_filters = {FOCUS_FILTER_INDUSTRY}
### search_filters = {FOCUS_FILTER_STABILITY}
### search_filters = {FOCUS_FILTER_WAR_SUPPORT}
### search_filters = {FOCUS_FILTER_MANPOWER}
### search_filters = {FOCUS_FILTER_ANNEXATION}
### search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
### search_filters = {FOCUS_FILTER_SPA_CARLIST_UPRISING}
### search_filters = {FOCUS_FILTER_SPA_ANARCHIST_UPRISING}

focus_tree = {
	id = spanish_focus
	
	country = {
		factor = 0
		
		modifier = {
			add = 10
			tag = SPR
			has_dlc = "La Resistance"
		}
	}

	default = no

	continuous_focus_position = { x = 100 y = 2000 }

	initial_show_position = {
		x = 33
		y = 0
		offset = {
			x = -16
			y = 0
			trigger = {
				has_global_flag = spanish_civil_war
				has_completed_focus = SPA_a_great_spain
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		offset = {
			x = -19
			y = 0
			trigger = {
				has_global_flag = spanish_civil_war
				has_completed_focus = SPR_the_popular_front
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
	}

#  #  ##  ### ###  ##  #  #  ##  #   ###  ## ###     ###  #  # ### #   ###     #  # ###  
## # #  #  #   #  #  # ## # #  # #    #  #    #      #  # #  #  #  #   #  #    #  # #  # 
# ## ####  #   #  #  # # ## #### #    #   #   #      ###  #  #  #  #   #  # ## #  # ###  
#  # #  #  #   #  #  # #  # #  # #    #    #  #      #  # #  #  #  #   #  #    #  # #    
#  # #  #  #  ###  ##  #  # #  # ### ### ##   #      ###   ##  ### ### ###      ##  #    


	focus = {
		id = SPA_a_great_spain

		available = {
			NOT = {
				has_country_flag = SPR_spanish_elections_flag
			}
		}
		cancel_if_invalid = yes
		
		bypass = {
			has_global_flag = spanish_civil_war
		}
		mutually_exclusive = { focus = SPR_the_popular_front }

		allow_branch = {
			if = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				OR = {
					NOT = {
						has_global_flag = spanish_civil_war
					}
					AND = {
						NOT = { has_completed_focus = SPR_the_popular_front }
						has_global_flag = spanish_civil_war
					}
				}
			}
		}
		
		
		icon = GFX_a_great_spainmod
		x = 31
		y = 0
		offset = {
			x = -14
			y = 0
			trigger = {
				has_completed_focus = SPA_a_great_spain
				has_global_flag = spanish_civil_war
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {

			add_popularity = {
			    ideology = fascism
			    popularity = 0.1
			}
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
			hidden_effect = {
				every_owned_state = {
					limit = {
						NOT = {
							state = 290
							state = 699
							state = 783
							state = 297
						}
					}
					SPA_garrison_control_cost_calculation = yes
				}
			}
			add_political_power = 50
		}
	}

	focus = {
		id = SPA_hand_over_the_ceda_campaign_chest
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPA_a_great_spain }
		
		icon = GFX_focus_generic_concessions
		x = -15
		y = 1
		offset = {
			x = 15
			y = 0
			trigger = {
				has_completed_focus = SPA_a_great_spain
				has_global_flag = spanish_civil_war
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		relative_position_id = SPA_a_great_spain
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_political_power = 250
		}
	}

	focus = {
		id = SPA_negotiate_carlist_support
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPA_hand_over_the_ceda_campaign_chest }
		
		icon = GFX_goal_generic_military_deal
		x = 0
		y = 1
		relative_position_id = SPA_hand_over_the_ceda_campaign_chest
		cost = 4

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			set_country_flag = SPA_negotiate_carlist_support_flag
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.15
			}
			add_to_variable = { var = spa_civil_war_divisions_counter_var value = 5 }
			custom_effect_tooltip = SPA_negotiate_carlist_support_tt
			custom_effect_tooltip = SPA_negotiate_carlist_support_tt_2
		}
	}

	focus = {
		id = SPA_the_army_of_africa
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPA_negotiate_carlist_support }
		
		icon = GFX_goal_generic_special_forces
		x = 0
		y = 1
		relative_position_id = SPA_negotiate_carlist_support
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			army_experience = 10
			add_to_variable = { var = spa_civil_war_divisions_counter_var value = 5 }
			custom_effect_tooltip = SPA_the_army_of_africa_tt
		# Ceuta
		1018 = {
			set_variable = { var = SPA_garrison_control value = 4 }
			set_state_flag = SPA_nationalist_guaranteed_state
		}
		# Melilla
		1019 = {
			set_variable = { var = SPA_garrison_control value = 4 }
			set_state_flag = SPA_nationalist_guaranteed_state
		}
		}
	}

	focus = {
		id = SPA_secure_the_northern_garrisons
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPA_the_army_of_africa }
		
		icon = GFX_goal_generic_position_armies
		x = 0
		y = 1
		relative_position_id = SPA_the_army_of_africa
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			custom_effect_tooltip = SPA_secure_the_northern_garrisons_tt
			hidden_effect = {
				every_owned_state = {
					limit = {
						check_variable = { var = SPA_garrison_control value = 1 compare = equals }
						OR = {
							state = 171
							state = 174
							state = 788
							state = 791
							state = 176
							state = 166
							state = 172
						}
					}
					set_state_flag = SPA_northern_garrisons_state_flag
					add_to_variable = { var = SPA_garrison_control value = 3 }
					SPR = { add_to_variable = { var = spa_civil_war_divisions_counter_var value = 3 } }
					SPR = { subtract_from_variable = { var = spr_civil_war_divisions_counter_var value = 3 } }
					SPA_garrison_control_cost_calculation = yes
				}
				every_owned_state = {
					limit = {
						check_variable = { var = SPA_garrison_control value = 2 compare = equals }
						OR = {
							state = 171
							state = 174
							state = 788
							state = 791
							state = 176
							state = 166
							state = 172
						}
					}
					set_state_flag = SPA_northern_garrisons_state_flag
					add_to_variable = { var = SPA_garrison_control value = 2 }
					SPR = { add_to_variable = { var = spa_civil_war_divisions_counter_var value = 2 } }
					SPR = { subtract_from_variable = { var = spr_civil_war_divisions_counter_var value = 2 } }
					SPA_garrison_control_cost_calculation = yes
				}
				every_owned_state = {
					limit = {
						check_variable = { var = SPA_garrison_control value = 3 compare = equals }
						OR = {
							state = 171
							state = 174
							state = 788
							state = 791
							state = 176
							state = 166
							state = 172
						}
					}
					set_state_flag = SPA_northern_garrisons_state_flag
					add_to_variable = { var = SPA_garrison_control value = 1 }
					SPR = { add_to_variable = { var = spa_civil_war_divisions_counter_var value = 1 } }
					SPR = { subtract_from_variable = { var = spr_civil_war_divisions_counter_var value = 1 } }
					SPA_garrison_control_cost_calculation = yes
				}
			}
		}
	}

	focus = {
		id = SPA_sin_paquito
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_secure_the_northern_garrisons }
		mutually_exclusive = { focus = SPA_con_paquito }
		
		icon = GFX_goal_generic_forceful_treaty
		x = -1
		y = 1
		relative_position_id = SPA_secure_the_northern_garrisons
		cost = 4

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_political_power = 75
			set_global_flag = SPR_sin_paquito
		}
	}

	focus = {
		id = SPA_con_paquito
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPA_secure_the_northern_garrisons }
		mutually_exclusive = { focus = SPA_sin_paquito }
		
		icon = GFX_goal_generic_dangerous_deal
		x = 1
		y = 1
		relative_position_id = SPA_secure_the_northern_garrisons
		cost = 4

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			custom_effect_tooltip = SPA_con_paquito_tt
			random_unit_leader = {
				limit = {
					has_id = 1108
				}
				add_unit_leader_trait = trait_SPA_nationalist_sympathies
			}
		}
	}

###  ### ###  #  # ###  #   ###  ##   ##  #  #     ###  #  # ### #   ###     #  # ###  
#  # #   #  # #  # #  # #    #  #  # #  # ## #     #  # #  #  #  #   #  #    #  # #  # 
###  ##  ###  #  # ###  #    #  #    #### # ##     ###  #  #  #  #   #  # ## #  # ###  
#  # #   #    #  # #  # #    #  #  # #  # #  #     #  # #  #  #  #   #  #    #  # #    
#  # ### #     ##  ###  ### ###  ##  #  # #  #     ###   ##  ### ### ###      ##  #    

	focus = {
		id = SPR_the_popular_front
		available = {
			NOT = {
				has_country_flag = SPR_spanish_elections_flag
			}
		}
		
		bypass = {
			has_global_flag = spanish_civil_war
		}
		mutually_exclusive = { focus = SPA_a_great_spain }
		cancel_if_invalid = yes
		allow_branch = {
			if = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				OR = {
					NOT = {
						has_global_flag = spanish_civil_war
					}
					AND = {
						NOT = { has_completed_focus = SPA_a_great_spain }
						has_global_flag = spanish_civil_war
					}
				}
			}
		}
		
		icon = GFX_the_popular_frontmod
		x = 33
		y = 0
		offset = {
			x = -19
			y = 0
			trigger = {
				has_completed_focus = SPR_the_popular_front
				has_global_flag = spanish_civil_war
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = 0.1
			}
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
			hidden_effect = {
				every_owned_state = {
					limit = {
						NOT = {
							state = 290
							state = 699
							state = 783
							state = 297
						}
					}
					SPR_garrison_control_cost_calculation = yes
				}
			}
		}
	}

	focus = {
		id = SPR_secure_the_guardia_de_asalto
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPR_the_popular_front }
		mutually_exclusive = { focus = SPR_secure_the_guardia_civil }
		
		icon = GFX_goal_generic_political_pressure
		x = 13
		y = 1
		offset = {
			x = -14
			y = 0
			trigger = {
				has_completed_focus = SPR_the_popular_front
				has_global_flag = spanish_civil_war
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		relative_position_id = SPR_the_popular_front
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			army_experience = 5
			if = {
				limit = {
					difficulty > 1
					is_ai = no
				}
				custom_effect_tooltip = SPR_secure_the_guardia_de_asalto_tt_2
				add_to_variable = { var = spa_civil_war_divisions_counter_var value = -10 }
				add_to_variable = { var = spr_civil_war_divisions_counter_var value = 5 }
			}
			else = {
				custom_effect_tooltip = SPR_secure_the_guardia_de_asalto_tt
				add_to_variable = { var = spa_civil_war_divisions_counter_var value = -6 }
				add_to_variable = { var = spr_civil_war_divisions_counter_var value = 3 }
			}
			set_country_flag = SPR_secure_the_guardia_de_asalto_flag
			custom_effect_tooltip = SPR_secure_the_guardia_get_both_types_tt
			custom_effect_tooltip = SPR_remove_after_civil_war_tt
		}
	}

	focus = {
		id = SPR_secure_the_guardia_civil
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_popular_front }
		mutually_exclusive = { focus = SPR_secure_the_guardia_de_asalto }
		
		icon = GFX_focus_generic_support_the_left_right
		x = 15
		y = 1
		offset = {
			x = -14
			y = 0
			trigger = {
				has_completed_focus = SPR_the_popular_front
				has_global_flag = spanish_civil_war
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
		}
		relative_position_id = SPR_the_popular_front
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			add_stability = 0.05
			if = {
				limit = {
					difficulty > 1
					is_ai = no
				}
				custom_effect_tooltip = SPR_secure_the_guardia_civil_tt_2
				add_to_variable = { var = spa_civil_war_divisions_counter_var value = -5 }
				add_to_variable = { var = spr_civil_war_divisions_counter_var value = 10 }
			}
			else = {
				custom_effect_tooltip = SPR_secure_the_guardia_civil_tt
				add_to_variable = { var = spa_civil_war_divisions_counter_var value = -3 }
				add_to_variable = { var = spr_civil_war_divisions_counter_var value = 6 }
			}
			set_country_flag = SPR_secure_the_guardia_civil_flag
			custom_effect_tooltip = SPR_secure_the_guardia_get_both_types_tt
			custom_effect_tooltip = SPR_remove_after_civil_war_tt
		}
	}

	focus = {
		id = SPR_train_the_union_youth
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPR_secure_the_guardia_de_asalto focus = SPR_secure_the_guardia_civil }
		
		icon = GFX_goal_generic_more_territorial_claims
		x = 1
		y = 1
		relative_position_id = SPR_secure_the_guardia_de_asalto
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
			add_to_variable = { var = spr_civil_war_divisions_counter_var value = 5 }
			custom_effect_tooltip = SPR_train_the_union_youth_tt
			custom_effect_tooltip = SPR_remove_after_civil_war_tt
		}
	}

	focus = {
		id = SPR_enlarge_the_weapon_caches
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPR_train_the_union_youth }
		
		icon = GFX_goal_generic_military_sphere
		x = 0
		y = 1
		relative_position_id = SPR_train_the_union_youth
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			army_experience = 5
			custom_effect_tooltip = SPR_enlarge_the_weapon_caches_tt
			add_political_power = 50
		}
	}

	focus = {
		id = SPR_distribute_arms_to_the_people
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPR_enlarge_the_weapon_caches }
		
		icon = GFX_goal_generic_small_arms
		x = 0
		y = 1
		relative_position_id = SPR_enlarge_the_weapon_caches
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
			add_political_power = 75
			add_to_variable = { var = spr_civil_war_divisions_counter_var value = 10 }
			custom_effect_tooltip = SPR_distribute_arms_to_the_people_tt
			custom_effect_tooltip = SPR_remove_after_civil_war_tt
		}
	}

	focus = {
		id = SPR_disband_the_army
		available = {
		}
		bypass = {
			has_global_flag = spanish_civil_war
		}
		prerequisite = { focus = SPR_distribute_arms_to_the_people }
		
		icon = GFX_goal_generic_forceful_treaty
		x = 0
		y = 1
		relative_position_id = SPR_distribute_arms_to_the_people
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			add_political_power = 200
			set_country_flag = SPR_disband_the_army_flag
			custom_effect_tooltip = SPR_disband_the_army_tt
			hidden_effect = { country_event = lar_spain.2 }
		}
	}

#  #  ##  ### ###  ##  #  #  ##  #   ###  ## ###  ##            ###  ##   ##  ##  ###  ## ###  ## 
## # #  #  #   #  #  # ## # #  # #    #  #    #  #              #   #  # #   #  #  #  #    #  #   
# ## ####  #   #  #  # # ## #### #    #   #   #   #      ##     ##  ####  #  #     #   #   #   #  
#  # #  #  #   #  #  # #  # #  # #    #    #  #    #            #   #  #   # #  #  #    #  #    # 
#  # #  #  #  ###  ##  #  # #  # ### ### ##   #  ##             #   #  # ##   ##  ### ##   #  ##  

	focus = {
		id = SPA_the_phalanx_ascendant
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_sin_paquito }
		mutually_exclusive = { focus = SPA_unify_the_nationalist_front focus = SPA_supremacy_of_the_communion }
		
		icon = GFX_the_phalanx_ascendantmod
		x = -10
		y = 1
		relative_position_id = SPA_sin_paquito
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_popularity = {
			    ideology = fascism
			    popularity = 0.1
			}
			activate_mission = SPA_carlist_uprising_mission
		}
	}

	focus = {
		id = SPA_bolster_offensive_infrastructure
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_phalanx_ascendant }
		
		icon = GFX_goal_generic_construct_infrastructure
		x = -5
		y = 1
		relative_position_id = SPA_the_phalanx_ascendant
		cost = 5

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_bolster_offensive_infrastructure_1inf }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					NOT = {
						has_global_flag = spanish_civil_war
					}
				}
				custom_effect_tooltip = SPA_bolster_offensive_infrastructure_tt
			}
			if = {
				limit = {
					has_global_flag = spanish_civil_war
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
						is_core_of = ROOT
						any_neighbor_state = {
							owner = { has_war_with = ROOT }
						}
					}
					set_state_flag = SPA_bolster_offensive_infrastructure_1inf
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
						is_core_of = ROOT
						NOT = { has_state_flag = SPA_bolster_offensive_infrastructure_1inf }
						any_neighbor_state = {
							owner = { has_war_with = ROOT }
						}
					}
					set_state_flag = SPA_bolster_offensive_infrastructure_1inf
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
						is_core_of = ROOT
						NOT = { has_state_flag = SPA_bolster_offensive_infrastructure_1inf }
						any_neighbor_state = {
							owner = { has_war_with = ROOT }
						}
					}
					set_state_flag = SPA_bolster_offensive_infrastructure_1inf
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPA_the_fifth_column
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_bolster_offensive_infrastructure }
		
		icon = GFX_focus_prc_infiltration
		x = -1
		y = 1
		relative_position_id = SPA_bolster_offensive_infrastructure
		cost = 4

		available_if_capitulated = yes

		completion_reward = {
			division_template = {
				name = "Fifth Columnist Brigade"
				template_counter = 33
				priority = 1
				division_names_group = SPR_INF_01
				is_locked = yes
				regiments = {
					infantry = { x = 0 y = 0 }
					infantry = { x = 0 y = 1 }
					infantry = { x = 0 y = 2 }
				}
			}
			custom_effect_tooltip = SPA_the_fifth_column_tt
		}
	}

	focus = {
		id = SPA_emergency_munitions_corporations
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_bolster_offensive_infrastructure }
		
		
		icon = GFX_goal_generic_construct_mil_factory
		x = 1
		y = 1
		relative_position_id = SPA_bolster_offensive_infrastructure
		cost = 7.2

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_emergency_munitions_corporations_1mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_emergency_munitions_corporations_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_emergency_munitions_corporations_1mil }
				}
				set_state_flag = SPA_emergency_munitions_corporations_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_emergency_munitions_corporations_1mil }
				}
				set_state_flag = SPA_emergency_munitions_corporations_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_the_corpo_truppe_volontarie
		available = {
			NOT = { has_global_flag = scw_over }
			has_volunteers_amount_from = {
				tag = ITA
				count > 0
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_phalanx_ascendant focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_focus_befriend_italy
		x = 4
		y = 1
		relative_position_id = SPA_the_phalanx_ascendant
		cost = 4

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			ITA = {
				add_timed_idea = { idea = SPA_spanish_civil_war_commitments days = 730 }
				add_opinion_modifier = { target = ROOT modifier = SPA_spanish_civil_war_commitments }
			}
			add_tech_bonus = {
				name = SPA_the_corpo_truppe_volontarie
				bonus = 1.0
				uses = 1
				category = infantry_weapons
			}
			add_tech_bonus = {
				name = SPA_the_corpo_truppe_volontarie
				bonus = 1.0
				uses = 1
				category = artillery
			}
		}
	}

	focus = {
		id = SPA_the_condor_legion
		available = {
			NOT = { has_global_flag = scw_over }
			has_volunteers_amount_from = {
				tag = GER
				count > 0
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_phalanx_ascendant focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_focus_chi_mission_to_germany
		x = 6
		y = 1
		relative_position_id = SPA_the_phalanx_ascendant
		cost = 4

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			GER = {
				add_timed_idea = { idea = SPA_spanish_civil_war_commitments days = 730 }
				add_opinion_modifier = { target = ROOT modifier = SPA_spanish_civil_war_commitments }
			}
			add_tech_bonus = {
				name = SPA_the_condor_legion
				bonus = 1.0
				uses = 1
				category = light_fighter
			}
			add_tech_bonus = {
				name = SPA_the_condor_legion
				bonus = 1.0
				uses = 1
				category = cas_bomber
			}
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPA_wilhelm_ritter_von_thoma
		}
	}

	focus = {
		id = SPA_equipment_shipments
		available = {
			NOT = { has_global_flag = scw_over }
			OR = {
				has_volunteers_amount_from = {
					tag = ITA
					count > 0
				}
				has_volunteers_amount_from = {
					tag = GER
					count > 0
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_corpo_truppe_volontarie }
		prerequisite = { focus = SPA_the_condor_legion }
		
		icon = GFX_goal_generic_build_tank
		x = 1
		y = 1
		relative_position_id = SPA_the_corpo_truppe_volontarie
		cost = 4

		available_if_capitulated = yes

		completion_reward = {
			GER = {
				add_timed_idea = { idea = SPR_equipment_shipments days = 730 }
				add_ai_strategy = { type = send_lend_lease_desire id = SPA value = 200 }
			}
			ITA = {
				add_timed_idea = { idea = SPR_equipment_shipments days = 730 }
				add_ai_strategy = { type = send_lend_lease_desire id = SPA value = 200 }
			}
			add_timed_idea = { idea = SPR_equipment_shipments_spain days = 730 }
		}
	}

	focus = {
		id = SPA_obtain_training_staff
		available = {
			NOT = { has_global_flag = scw_over }
			OR = {
				has_volunteers_amount_from = {
					tag = ITA
					count > 0
				}
				has_volunteers_amount_from = {
					tag = GER
					count > 0
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_equipment_shipments }
		
		icon = GFX_focus_generic_military_academy
		x = -1
		y = 1
		relative_position_id = SPA_equipment_shipments
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			army_experience = 50
			add_timed_idea = { idea = SPA_foreign_training_staff days = 730 }
		}
	}

	focus = {
		id = SPA_doctrinal_advancements
		available = {
			NOT = { has_global_flag = scw_over }
			OR = {
				has_volunteers_amount_from = {
					tag = ITA
					count > 0
				}
				has_volunteers_amount_from = {
					tag = GER
					count > 0
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_equipment_shipments }
		
		icon = GFX_goal_generic_army_doctrines
		x = 1
		y = 1
		relative_position_id = SPA_equipment_shipments
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 1
				category = air_doctrine
			}
		}
	}

	focus = {
		id = SPA_secure_the_national_defense_council
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_the_phalanx_ascendant }
		
		icon = GFX_goal_generic_political_pressure
		x = 0
		y = 1
		relative_position_id = SPA_the_phalanx_ascendant
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.2
		}
	}

	focus = {
		id = SPA_shatter_republican_morale
		available = {
		AND = {
		D01 = {
		casualties_inflicted_by = {
			opponent = SPR
			thousands > 80
		}
		}
		controls_province = 3938
		network_strength = {
			target = D01
			value > 15
		}
		}
		}
		bypass = {
			OR = {
			D01 = {
			exists = no
			}
			NOT = {
			D01 = {
			has_idea = SPR_death_before_surrender
			}
			}
			}
		}
		prerequisite = { focus = SPA_secure_the_national_defense_council }
		
		icon = GFX_SPA_shatter_republican_morale
		x = -2
		y = 1
		relative_position_id = SPA_secure_the_national_defense_council
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {

			D01 = {
			remove_ideas = SPR_death_before_surrender
			}
			
		}
	}

	focus = {
		id = SPA_crush_the_anarchist_spirit
		available = {
		AND = {
		D03 = {
		casualties_inflicted_by = {
			opponent = SPR
			thousands > 40
		}
		}
		controls_province = 9764
		network_strength = {
			target = D03
			value > 15
		}
		}
		}
		bypass = {
			OR = {
			D03 = {
			exists = no
			}
			NOT = {
			D03 = {
			has_idea = SPR_death_before_surrender
			}
			}
			}
		}
		prerequisite = { focus = SPA_shatter_republican_morale }
		
		icon = GFX_SPA_crush_the_anarchist_spirit
		x = -1
		y = 1
		relative_position_id = SPA_shatter_republican_morale
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			D03 = {
			remove_ideas = SPR_death_before_surrender
			}
		}
	}

	focus = {
		id = SPA_suspend_the_constitution
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_secure_the_national_defense_council }
		
		icon = GFX_suspend_the_constitutionmod
		x = 0
		y = 1
		relative_position_id = SPA_secure_the_national_defense_council
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_political_power = 120
			add_popularity = {
			    ideology = democratic
			    popularity = -1
			}
			hidden_effect = {
				set_temp_variable = {
					var = suspend_the_constitution_var
					value = party_popularity@democratic
				}
				multiply_temp_variable = {
					var = suspend_the_constitution_var
					value = -0.5
				}
			}
			custom_effect_tooltip = ENG_alliance_with_germany_tt
			add_stability = suspend_the_constitution_var
		}
	}

	focus = {
		id = SPA_primo_de_rivera_prisoner_exchange
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_secure_the_national_defense_council }
		
		icon = GFX_jose_antonio_primo_de_rivera_presente
		x = 2
		y = 1
		relative_position_id = SPA_secure_the_national_defense_council
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_war_support = 0.05
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPR_SPA_jose_antonio_primo_de_rivera
		}
	}

	focus = {
		id = SPA_eliminate_the_carlists
		available = {
		}
		bypass = {
			OR = {
				has_war_with = SPB
				has_global_flag = SPR_carlist_uprising_flag
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPA_suspend_the_constitution }
		
		icon = GFX_focus_spa_eliminate_the_carlists
		x = -1
		y = 1
		relative_position_id = SPA_suspend_the_constitution
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			add_timed_idea = { idea = SPA_eliminate_the_carlists days = 60 }
			custom_effect_tooltip = SPR_crush_the_revolution_tt
			if = {
				limit = {
					NOT = { has_war_with = SPB }
				}
				hidden_effect = { country_event = lar_spain.7 }
			}
		}
	}

	focus = {
		id = SPA_break_carlist_will
		available = {
		AND = {
		D02 = {
		casualties_inflicted_by = {
			opponent = SPR
			thousands > 45
		}
		}
		controls_province = 3933
		network_strength = {
			target = D02
			value > 15
		}
		}
		}
		bypass = {
			OR = {
			D02 = {
			exists = no
			}
			NOT = {
			D02 = {
			has_idea = SPA_death_before_surrender
			}
			}
			}
		}
		prerequisite = { focus = SPA_eliminate_the_carlists }
		
		icon = GFX_SPA_break_carlist_will
		x = -3
		y = 1
		relative_position_id = SPA_eliminate_the_carlists
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			D02 = {
			remove_ideas = SPA_death_before_surrender
			}
		}
	}

	focus = {
		id = SPA_absorb_carlist_and_bourbon_remnants
		available = {
			NOT = { country_exists = SPB }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_eliminate_the_carlists }
		
		icon = GFX_absorb_carlists
		x = -1
		y = 1
		relative_position_id = SPA_eliminate_the_carlists
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.1
			}
			add_manpower = 25000
			add_political_power = 60
		}
	}

	focus = {
		id = SPA_establish_the_directory
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_suspend_the_constitution }
		prerequisite = { focus = SPA_primo_de_rivera_prisoner_exchange }
		
		icon = GFX_guerra_civil_espanola
		x = 1
		y = 1
		relative_position_id = SPA_suspend_the_constitution
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.05
			custom_effect_tooltip = SPA_establish_the_directory_tt
			hidden_effect = {
				drop_cosmetic_tag = yes
				set_cosmetic_tag = SPA_directory
			}
			if = {
				limit = {
					NOT = { has_global_flag = spanish_civil_war }
				}
				effect_tooltip = {
					create_country_leader = {
						name = "Emilio Mola"
						desc = "POLITICS_EMILIO_MOLA_DESC"
						picture = "GFX_portrait_emilio_mola"
						expire = "1965.1.1"
						ideology = despotism
						traits = {
							the_director
						}
					}
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_country_leader_role = {
					character = SPA_emilio_mola
					country_leader = {
						ideology = despotism
						traits = { the_director }
						expire = "1965.1.1"
					}
					promote_leader = yes 
				}
				hidden_effect = {
					add_country_leader_role = {
						character = SPA_emilio_mola
						country_leader = {
							ideology = falangism
							traits = { the_director }
							expire = "1965.1.1"
						}
						promote_leader = yes 
					}
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				add_country_leader_role = {
					character = SPA_emilio_mola
					country_leader = {
						ideology = falangism
						traits = { the_director }
						expire = "1965.1.1"
					}
					promote_leader = yes 
				}
				hidden_effect = {
					add_country_leader_role = {
						character = SPA_emilio_mola
						country_leader = {
							ideology = despotism
							traits = { the_director }
							expire = "1965.1.1"
						}
						promote_leader = yes 
					}
				}
			}
		}
	}

	focus = {
		id = SPA_a_one_party_state
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_establish_the_directory }
		prerequisite = { focus = SPA_eliminate_the_carlists }
		
		icon = GFX_falange_española
		x = -1
		y = 1
		relative_position_id = SPA_establish_the_directory
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			set_politics = {
				ruling_party = fascism
			}
			set_party_name = { ideology = fascism long_name = SPR_fascism_falange_party_long name = SPR_fascism_falange_party }
			add_popularity = {
			    ideology = fascism
			    popularity = 1
			}
			hidden_effect = {
				set_temp_variable = {
					var = a_one_party_state_var
					value = party_popularity@democratic
				}
				add_to_temp_variable = {
					var = a_one_party_state_var
					value = party_popularity@neutrality
				}
				add_to_temp_variable = {
					var = a_one_party_state_var
					value = party_popularity@communism
				}
				multiply_temp_variable = {
					var = a_one_party_state_var
					value = -0.5
				}
			}
			custom_effect_tooltip = SPA_a_one_party_state_tt
			add_stability = a_one_party_state_var
		}
	}

	focus = {
		id = SPA_expand_conscription
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_establish_the_directory focus = SPA_extol_the_martyrs_of_the_war }
		
		icon = GFX_goal_generic_axis_build_infantry
		x = 3
		y = 1
		relative_position_id = SPA_establish_the_directory
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_ideas = SPA_expand_conscription
		}
	}

	focus = {
		id = SPA_safeguard_the_freedom_of_worship
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_establish_the_directory focus = SPA_extol_the_martyrs_of_the_war }
		
		icon = GFX_focus_generic_strike_at_democracy1
		x = 5
		y = 1
		relative_position_id = SPA_establish_the_directory
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
			add_stability = 0.1
			add_political_power = 60
		}
	}

	focus = {
		id = SPA_prepare_the_pyrenees_defenses
		available = {
			has_full_control_of_state = 792
			has_full_control_of_state = 172
			has_full_control_of_state = 166
			has_full_control_of_state = 794
			has_full_control_of_state = 165
		}
		bypass = {
		}
		prerequisite = { focus = SPA_establish_the_directory focus = SPA_extol_the_martyrs_of_the_war }
		
		icon = GFX_goal_generic_fortify_city
		x = 4
		y = 2
		relative_position_id = SPA_establish_the_directory
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_prepare_the_pyrenees_defenses_tt
			hidden_effect = {
				792 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 6756
						}
						level = 2
						instant_build = yes
					}
				}
				172 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3737
							id = 3931
						}
						level = 2
						instant_build = yes
					}
				}
				166 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 11838
						}
						level = 2
						instant_build = yes
					}
				}
				794 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 915
							id = 899
						}
						level = 2
						instant_build = yes
					}
				}
				165 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3899
							id = 3898
							id = 11779
							id = 9824
						}
						level = 2
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPA_the_national_syndicalist_state
		bypass = {
		}
		prerequisite = { focus = SPA_a_one_party_state }
		
		
		icon = GFX_the_national_syndicalist_statemod
		x = -1
		y = 1
		relative_position_id = SPA_a_one_party_state
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_political_power = 100
			custom_effect_tooltip = SPA_the_national_syndicalist_state_tt
			hidden_effect = {
				
				SPR = {
					add_state_core = 1018
					add_state_core = 1019
				}
				drop_cosmetic_tag = yes
				set_cosmetic_tag = SPA_NSCW
				SPA_emilio_mola = {
					remove_country_leader_role = { ideology = despotism }
					remove_country_leader_role = { ideology = falangism }
				}
			}
			promote_character = {
			  character = SPA_jose_antonio_primo_de_rivera
			  ideology = falangism
			}
		}
	}

	focus = {
		id = SPA_seek_fascist_support
		available = {
			has_global_flag = scw_over
			is_in_faction = no
			OR = {
				AND = {
					GER = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				AND = {
					ITA = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
			}
			NOT = { has_global_flag = POR_iberian_summit_in_progress_flag }
		}
		bypass = {
			OR = {
				AND = {
					NOT = { GER = { has_government = fascism } }
					NOT = { ITA = { has_government = fascism } }
				}
				is_in_faction_with = GER
				is_in_faction_with = ITA
			}
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_SPR_seek_fascist_support
		x = 1
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_expand_the_axis_gold_trade
			if = {
				limit = {
					GER = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				GER = { country_event = generic.2 }
			}
			if = {
				limit = {
					ITA = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				ITA = { country_event = generic.2 }
			}
		}
	}

	focus = {
		id = SPA_strengthen_the_supreme_reality_of_spain
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state }
		prerequisite = { focus = SPA_absorb_carlist_and_bourbon_remnants }
		
		icon = GFX_focus_spa_strengthen_the_supreme_reality_of_spain
		x = 0
		y = 2
		relative_position_id = SPA_absorb_carlist_and_bourbon_remnants
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
			add_stability = 0.1
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
			}
		}
	}

focus = {
		id = SPA_fighters_for_our_cause
		icon = GFX_goal_generic_air_fighter
		prerequisite = { focus = SPA_strengthen_the_supreme_reality_of_spain }

		x = 1
		y = 1
		relative_position_id = SPA_strengthen_the_supreme_reality_of_spain
		cost = 5

		available = {
			AND = {
			has_tech = range_improvements
			has_tech = basic_medium_airframe
			}
			
		}

		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_AIR_XP}

		completion_reward = {
			air_experience = 30

			add_equipment_to_stockpile = { 
				type = transport_plane_equipment
				amount = 25 
				producer = ROOT
			}
			add_equipment_to_stockpile = { 
				type = medium_plane_airframe_1
				amount = 350
				producer = GER
				variant_name = "He 111"
			}
			add_equipment_to_stockpile = { 
				type = small_plane_airframe_1
				amount = 350
				producer = GER
				variant_name = "Bf 109 D"
			}
			
			random_core_state = {
				limit = {
					is_fully_controlled_by = SPA
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}
	
	focus = {
		id = SPA_the_will_to_empire
		available = {
			has_full_control_of_state = 290
			has_country_leader = {
				character = SPA_jose_antonio_primo_de_rivera
				ruling_only = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_strengthen_the_supreme_reality_of_spain }
		
		icon = GFX_SPA_the_will_to_empire
		x = -1
		y = 7
		relative_position_id = SPA_strengthen_the_supreme_reality_of_spain
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			set_rule = {
				can_create_factions = yes
			}
			set_rule = {
				can_send_volunteers = yes
			}
			set_rule = {
				can_guarantee_other_ideologies = yes
			} 
			add_political_power = 200
			290 = {
				if = {
					limit = {
						290 = {
							free_building_slots = {
								building = industrial_complex
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
			add_country_leader_trait = empire_builder
			add_country_leader_trait = SPR_spanish_destiny
		}
	}

	focus = {
		id = SPA_ministry_open
		available = {

		}

		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_SPR_Popular_laws
		x = 40
		y =1
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_political_power = 200
		}
	}

	focus = {
		id = SPA_ministry_of_the_army
		available = {

		}

		prerequisite = { focus = SPA_ministry_open }
		
		icon = GFX_spa_ejercito_tierra
		x = -16
		y =1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			41 = { 
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			add_extra_state_shared_building_slots = 2
			}
			add_tech_bonus = {
				name = SPA_equipment_modernization
				bonus = 1.0
				uses = 1
				category = infantry_weapons
			}
		
		add_ideas = SPA_the_national_crusaders

		}
	}

	focus = {
		id = SPA_forge_the_falangist_army
		available = {

		}

		prerequisite = { focus = SPA_ministry_of_the_army }
		
		icon = GFX_forge_the_falangist_army
		x = 0
		y = 1
		relative_position_id = SPA_ministry_of_the_army
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_national_crusaders
				add_idea = SPA_the_national_crusaders_2
			}
		}
	}

	focus = {
		id = SPA_march_of_the_falangist_soldier
		available = {

		}

		prerequisite = { focus = SPA_forge_the_falangist_army }
		
		icon = GFX_falangist_army
		x = 0
		y = 2
		relative_position_id = SPA_forge_the_falangist_army
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_national_crusaders_2
				add_idea = SPA_the_national_crusaders_3
			}
		}
	}

	focus = {
		id = SPA_phalanx_firepower
		available = {

		}

		prerequisite = { focus = SPA_march_of_the_falangist_soldier }
		mutually_exclusive = { focus = SPA_steel_battalions_of_the_falange }

		icon = GFX_SPA_phalanx_firepower
		x = -2
		y = 1
		relative_position_id = SPA_march_of_the_falangist_soldier
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_phalanx_firepower_idea
		}
	}

	focus = {
		id = SPA_god_of_war_servant_of_spain

		prerequisite = { focus = SPA_phalanx_firepower }
		
		icon = GFX_god_of_war_servant_of_spain
		x = -1
		y = 1
		relative_position_id = SPA_phalanx_firepower
		cost = 10

		available = { has_tech = artillery3 }

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_phalanx_firepower_idea
				add_idea = SPA_phalanx_firepower_2
			}
			add_equipment_to_stockpile = { 
				type = artillery_equipment_2
				amount = 5000
				producer = SPR
			}
			add_tech_bonus = {
				name = SPA_artillery_modernization
				bonus = 1.0
				uses = 2
				category = artillery
			}
		}
	}

	focus = {
		id = SPA_steel_battalions_of_the_falange
		available = {

		}
		mutually_exclusive = { focus = SPA_phalanx_firepower }
		prerequisite = { focus = SPA_march_of_the_falangist_soldier }	
		
		icon = GFX_steel_battalions_of_the_falange
		x = 2
		y = 1
		relative_position_id = SPA_march_of_the_falangist_soldier
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPR_steel_phalanx
		}
	}

	focus = {
		id = SPA_the_steel_falange
		available = {

		}

		prerequisite = { focus = SPA_steel_battalions_of_the_falange }
		
		icon = GFX_the_steel_phalanx
		x = 1
		y = 1
		relative_position_id = SPA_steel_battalions_of_the_falange
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPR_steel_phalanx
				add_idea = SPR_steel_phalanx_2
			}
			add_equipment_to_stockpile = { 
				type = medium_tank_chassis_1
				amount = 5000
				producer = SPR
			}
		}
	}

	focus = {
		id = SPA_guardians_of_the_nation
		available = {

		}

		prerequisite = { focus = SPA_steel_battalions_of_the_falange focus = SPA_phalanx_firepower }
		
		icon = GFX_guardians_of_the_nation
		x = 0
		y = 2
		relative_position_id = SPA_march_of_the_falangist_soldier
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_national_crusaders_3
				add_idea = SPA_the_national_crusaders_4
			}
		}
	}

	focus = {
		id = SPA_mandatory_pre_military_training
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_forge_the_falangist_army }
		
		
		icon = GFX_focus_generic_military_academy
		x = -2
		y = 1
		relative_position_id = SPA_forge_the_falangist_army
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_mandatory_pre_military_training_1
		}
	}

	focus = {
		id = SPA_all_shall_serve
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_mandatory_pre_military_training }
		
		icon = GFX_focus_generic_military_mission
		x =-1
		y = 1
		relative_position_id = SPA_mandatory_pre_military_training
		cost = 7.2

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_war_support = 0.1
			swap_ideas = {
				remove_idea = SPA_mandatory_pre_military_training_1
				add_idea = SPA_mandatory_pre_military_training_2
			}
		}
	}

	focus = {
		id = SPA_legionary_spirit
		available = {

		}

		prerequisite = { focus = SPA_forge_the_falangist_army }
		
		icon = GFX_legionary_spirit
		x = 2
		y = 1
		relative_position_id = SPA_forge_the_falangist_army
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_legionary_spirit_idea
		}
	}

	focus = {
		id = SPA_ministry_of_the_airforce
		available = {

		}

		prerequisite = { focus = SPA_ministry_open}
		
		icon = GFX_ministry_of_the_airforce
		x = -4
		y = 1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {

		add_ideas = SPA_supremacy_of_the_spanish_heavens
			add_tech_bonus = {
				name = SPA_expand_the_air_branch
				bonus = 1.0
				uses = 1
				category = light_fighter
				category = cas_bomber
			}
		}
	}

	focus = {
		id = SPA_phalanx_in_the_air
		available = {

		}

		prerequisite = { focus = SPA_ministry_of_the_airforce}
		
		icon = GFX_phalanx_in_the_air
		x = 0
		y = 1
		relative_position_id = SPA_ministry_of_the_airforce
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_supremacy_of_the_spanish_heavens
				add_idea = SPA_supremacy_of_the_spanish_heavens_2
			}
		}
	}

	focus = {
		id = SPA_coastal_airfield_network
		available = {
			controls_state = 171
			controls_state = 165
			controls_state = 169
			controls_state = 41
			controls_state = 172
		}

		prerequisite = { focus = SPA_phalanx_in_the_air }
		mutually_exclusive = { focus = SPA_wings_of_science }
		
		icon = GFX_focus_generic_air_bases
		x = -1
		y = 1
		relative_position_id = SPA_phalanx_in_the_air
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
						171 = {
							add_building_construction = {
								type = air_base
								level = 5
								instant_build = yes
							}	
			}

			165 = {
							add_building_construction = {
								type = air_base
								level = 3
								instant_build = yes
							}	
			}

			169 = {
							add_building_construction = {
								type = air_base
								level = 2
								instant_build = yes
							}	
			}

			41 = {
							add_building_construction = {
								type = air_base
								level = 4
								instant_build = yes
							}	
			}

			172 = {
							add_building_construction = {
								type = air_base
								level = 5
								instant_build = yes
							}	
			}

		}
	}

	focus = {
		id = SPA_wings_of_science
		available = {
		controls_state = 166
			166 = {
				air_facility < 1
				land_facility < 1
				nuclear_facility < 1
			}
		}

		prerequisite = { focus = SPA_phalanx_in_the_air }
		mutually_exclusive = { focus = SPA_coastal_airfield_network }
		
		icon = GFX_focus_generic_air_research_boost
		x = 1
		y = 1
		relative_position_id = SPA_phalanx_in_the_air
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			166 = {
			add_building_construction = {
				type = 	air_facility
				level = 1
				instant_build = yes						
			}
			}

			add_breakthrough_progress = {
				specialization = specialization_air
				value = 0.5
			}
		}
	}

	focus = {
		id = SPA_waves_of_iron_and_fire
		available = {

		}

		prerequisite = { focus = SPA_coastal_airfield_network focus = SPA_wings_of_science }
		
		icon = GFX_goal_generic_air_naval_bomber
		x = -1
		y = 1
		relative_position_id = SPA_coastal_airfield_network
		cost = 5

		available_if_capitulated = yes

		completion_reward = {

		add_ideas = SPA_waves_of_iron_and_fire_idea

		}
	}

	focus = {
		id = SPA_armada_celestial_skies
		available = {

		}

		prerequisite = { focus = SPA_waves_of_iron_and_fire }
		
		icon = GFX_spa_carrier
		x = 0
		y = 1
		relative_position_id = SPA_waves_of_iron_and_fire
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_waves_of_iron_and_fire_idea
				add_idea = SPA_waves_of_iron_and_fire_idea_2
			}
		}
	}

	focus = {
		id = SPA_guardians_of_the_spanish_skies
		available = {

		}

		prerequisite = { focus = SPA_coastal_airfield_network focus = SPA_wings_of_science }
		
		icon = GFX_goal_generic_air_fighter
		x = 1
		y = 1
		relative_position_id = SPA_coastal_airfield_network
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_supremacy_of_the_spanish_heavens_2
				add_idea = SPA_supremacy_of_the_spanish_heavens_3
			}
			create_equipment_variant = {
				name = "Rayo. 202"
				type = cv_small_plane_airframe_2
				#design_team = mio:GER_heinkel_organization #Dornier is Medium Airframe MIO now
				modules = {
					fixed_main_weapon_slot = light_mg_4x
					fixed_auxiliary_weapon_slot_1 = empty
					fixed_auxiliary_weapon_slot_2 = empty
					fixed_auxiliary_weapon_slot_3 = empty
					engine_type_slot = engine_2_2x
					special_type_slot_1 = fuel_tanks_small
					special_type_slot_2 = empty
					special_type_slot_3 = empty
					special_type_slot_4 = empty
				}
				icon = "GFX_GER_tactical_bomber1_medium"
			}
		}
	}

	focus = {
		id = SPA_supremacy_above_all
		available = {

		}

		prerequisite = { focus = SPA_guardians_of_the_spanish_skies }
		
		icon = GFX_focus_BRA_air_force
		x = 0
		y = 1
		relative_position_id = SPA_guardians_of_the_spanish_skies
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_supremacy_of_the_spanish_heavens_3
				add_idea = SPA_supremacy_of_the_spanish_heavens_4
			}
		}
	}


	focus = {
		id = SPA_strike_from_above
		available = {

		}

		prerequisite = { focus = SPA_wings_of_science focus = SPA_coastal_airfield_network }
		
		icon = GFX_goal_generic_air_bomber
		x = 1
		y = 1
		relative_position_id = SPA_wings_of_science
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_strike_from_above_idea
		}
	}

	focus = {
		id = SPA_sky_as_our_arsenal
		available = {

		}

		prerequisite = { focus = SPA_strike_from_above }
		
		icon = GFX_spa_bombs
		x = 0
		y = 1
		relative_position_id = SPA_strike_from_above
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_strike_from_above_idea
				add_idea = SPA_strike_from_above_idea_2
			}
		}
	}


	focus = {
		id = SPA_eagles_of_the_new_state
		available = {

		}

		prerequisite = { focus = SPA_armada_celestial_skies }
		prerequisite = { focus = SPA_supremacy_above_all }
		prerequisite = { focus = SPA_sky_as_our_arsenal }
		
		icon = GFX_Spain_Armed_Forces
		x = 0
		y = 1
		relative_position_id = SPA_supremacy_above_all
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_supremacy_of_the_spanish_heavens_4
				add_idea = SPA_supremacy_of_the_spanish_heavens_5
			}
		}
	}

	focus = {
		id = SPA_ministry_of_the_navy
		available = {

		}

		prerequisite = { focus = SPA_ministry_open }
		
		icon = GFX_ministry_of_the_navy
		x = -10
		y = 1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_trident_of_the_falange
		}
	}

	focus = {
		id = SPA_glory_and_wealth_on_the_sea_lanes
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_ministry_of_the_navy }
		
		icon = GFX_goal_generic_navy_doctrines_tactics
		x = 0
		y = 1
		relative_position_id = SPA_ministry_of_the_navy
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 25
			add_tech_bonus = {
				name = SPA_glory_and_wealth_on_the_sea_lanes
				bonus = 1
				uses = 1
				category = cl_tech
				category = ca_tech
			}
			add_tech_bonus = {
				name = SPA_glory_and_wealth_on_the_sea_lanes
				bonus = 1
				uses = 1
				category = dd_tech
			}
			add_tech_bonus = {
				name = SPA_glory_and_wealth_on_the_sea_lanes
				bonus = 1
				uses = 1
				category = ss_tech
			}
		}
	}

	focus = {
		id = SPA_improve_domestic_naval_facilities
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_glory_and_wealth_on_the_sea_lanes }
		
		icon = GFX_goal_generic_construct_naval_dockyard
		x = -2
		y = 1
		relative_position_id = SPA_glory_and_wealth_on_the_sea_lanes
		cost = 5

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPA_improve_domestic_naval_facilities_3DY }
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
			}
		}

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_improve_domestic_naval_facilities_3DY
			}
		}
	}


	focus = {
		id = SPA_commerce_protection
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_glory_and_wealth_on_the_sea_lanes }
		
		icon = GFX_goal_generic_navy_cruiser
		x = 2
		y = 1
		relative_position_id = SPA_glory_and_wealth_on_the_sea_lanes
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_commerce_protection
				bonus = 1
				uses = 1
				category = cl_tech
				category = ca_tech
			}
			add_doctrine_cost_reduction = {
				name = SPA_commerce_protection
				cost_reduction = 0.5
				uses = 2
				category = convoy_defense_tree
			}
		}
	}

	focus = {
		id = SPA_a_great_maritime_power
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_improve_domestic_naval_facilities }
		prerequisite = { focus = SPA_commerce_protection }
		
		icon = GFX_goal_generic_navy_battleship
		x = 2
		y = 1
		relative_position_id = SPA_improve_domestic_naval_facilities
		cost = 7.2

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPA_a_great_maritime_power_4DY }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_trident_of_the_falange
				add_idea = SPA_trident_of_the_falange_2
			}
			navy_experience = 50
			add_tech_bonus = {
				name = SPA_a_great_maritime_power
				bonus = 1
				uses = 1
				category = bb_tech
			}
			add_tech_bonus = {
				name = SPA_a_great_maritime_power
				bonus = 1
				uses = 1
				category = cv_tech
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				set_state_flag = SPA_a_great_maritime_power_4DY
			}
			swap_ideas = {
				remove_idea = SPA_trident_of_the_falange
				add_idea = SPA_trident_of_the_falange_2
			}
		}
	}

	focus = {
		id = SPA_legacy_of_lepanto
		available = {

		}

		prerequisite = { focus = SPA_a_great_maritime_power}
		
		icon = GFX_legacy_of_lepanto
		x = 0
		y = 1
		relative_position_id = SPA_a_great_maritime_power
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_trident_of_the_falange_2
				add_idea = SPA_trident_of_the_falange_3
			}
		}
	}

	focus = {
		id = SPA_invincible_armada
		available = {

		}

		prerequisite = { focus = SPA_legacy_of_lepanto}
		prerequisite = { focus = SPA_waves_of_iron_and_fire}
		
		icon = GFX_the_falangist_armada
		x = 1
		y = 1
		relative_position_id = SPA_legacy_of_lepanto
		cost = 14.4

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_trident_of_the_falange_3
				add_idea = SPA_trident_of_the_falange_4
			}
		}
	}

	focus = {
		id = SPA_ministry_of_intelligence
		available = {

		}

		prerequisite = { focus = SPA_ministry_open}
		
		icon = GFX_ministry_of_Intelligence
		x = 4
		y = 1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {

		add_ideas = SPA_the_eternal_watch

		}
	}

	focus = {
		id = SPA_foreign_espionage
		available = {

		}

		prerequisite = { focus = SPA_ministry_of_intelligence}
		mutually_exclusive = { focus = SPA_falangist_secret_police }
		
		icon = GFX_Espionage_2
		x = 1
		y = 1
		relative_position_id = SPA_ministry_of_intelligence
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas =	SPA_foreign_espionage_idea
		}
	}

	focus = {
		id = SPA_falangist_secret_police
		available = {

		}
      
		prerequisite = { focus = SPA_ministry_of_intelligence}
		mutually_exclusive = { focus = SPA_foreign_espionage }
		
		icon = GFX_Espionage
		x = -1
		y = 1
		relative_position_id = SPA_ministry_of_intelligence
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_falangist_secret_police_idea
		}
	}

	focus = {
		id = SPA_national_syndicalist_directorate
		available = {

		}

		prerequisite = { focus = SPA_falangist_secret_police focus = SPA_foreign_espionage}
		
		icon = GFX_focus_generic_secret_service_agency
		x = 1
		y = 1
		relative_position_id = SPA_falangist_secret_police
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_eternal_watch
				add_idea = SPA_the_eternal_watch_2
			}
		}
	}

	focus = {
		id = SPA_eye_of_the_state
		available = {

		}

		prerequisite = { focus = SPA_falangist_secret_police}
		
		icon = GFX_focus_generic_vatican_agents
		x = -1
		y = 1
		relative_position_id = SPA_falangist_secret_police
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_falangist_secret_police_idea
				add_idea = SPA_falangist_secret_police_idea_2
			}
		}
	}

	focus = {
		id = SPA_network_beyond_the_pyrenees
		available = {

		}

		prerequisite = { focus = SPA_foreign_espionage}
		
		icon = GFX_ministry_of_Intelligence
		x = 3
		y = 1
		relative_position_id = SPA_falangist_secret_police
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_foreign_espionage_idea
				add_idea = SPA_foreign_espionage_idea_2
			}
		}
	}

	focus = {
		id = SPA_iron_net_of_the_falange
		available = {

		}

		prerequisite = { focus = SPA_eye_of_the_state}
		
		icon = GFX_SPA_iron_net_of_the_falange
		x = 0
		y = 1
		relative_position_id = SPA_eye_of_the_state
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_falangist_secret_police_idea_2
				add_idea = SPA_falangist_secret_police_idea_3
			}
		}
	}

	focus = {
		id = SPA_big_brother
		available = {

		}

		prerequisite = { focus = SPA_iron_net_of_the_falange}
		
		icon = GFX_SPA_big_brother
		x = 0
		y = 1
		relative_position_id = SPA_iron_net_of_the_falange
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_falangist_secret_police_idea_3
				add_idea = SPA_falangist_secret_police_idea_4
			}
		}
	}

	focus = {
		id = SPA_cypher_bureau
		available = {

		}

		prerequisite = { focus = SPA_national_syndicalist_directorate}
		
		icon = GFX_cypher_bureau
		x = 0
		y = 1
		relative_position_id = SPA_national_syndicalist_directorate
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_eternal_watch_2
				add_idea = SPA_the_eternal_watch_3
			}
		}
	}

	focus = {
		id = SPA_break_their_codes
		available = {

		}

		prerequisite = { focus = SPA_cypher_bureau}
		
		icon = GFX_ministry_of_Intelligence
		x = 0
		y = 1
		relative_position_id = SPA_cypher_bureau
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_eternal_watch_3
				add_idea = SPA_the_eternal_watch_4
			}
		}
	}

	focus = {
		id = SPA_saboteurs_of_the_falange
		available = {

		}

		prerequisite = { focus = SPA_network_beyond_the_pyrenees}
		
		icon = GFX_Saboteurs_of_the_falange
		x = 0
		y = 1
		relative_position_id = SPA_network_beyond_the_pyrenees
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_foreign_espionage_idea_2
				add_idea = SPA_foreign_espionage_idea_3
			}
		}
	}

	focus = {
		id = SPA_falange_in_the_shadows
		available = {

		}

		prerequisite = { focus = SPA_saboteurs_of_the_falange}
		
		icon = GFX_Falange_in_the_shadows
		x = 0
		y = 1
		relative_position_id = SPA_saboteurs_of_the_falange
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_foreign_espionage_idea_3
				add_idea = SPA_foreign_espionage_idea_4
			}
		}
	}

	focus = {
		id = SPA_stomp_out_the_masons
		available = {

		}

		prerequisite = { focus = SPA_break_their_codes}
		prerequisite = { focus = SPA_big_brother focus = SPA_falange_in_the_shadows}

		
		icon = GFX_stomp_out_the_masons
		x = 0
		y = 1
		relative_position_id = SPA_break_their_codes
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
		remove_ideas = SPA_masonic_influence
		}
	}

	focus = {
		id = SPA_ministry_of_economy
		available = {

		}

		prerequisite = { focus = SPA_ministry_open }
		
		icon = GFX_ministry_of_economy
		x = 10
		y = 1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_falangist_economic_miracle
		}
	}

	focus = {
		id = SPA_syndicalize_production
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_ministry_of_economy }
		
		icon = GFX_syndicalize_productionmod
		x = 0
		y = 1
		relative_position_id = SPA_ministry_of_economy
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_syndicalize_production_1civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			every_state = {
				limit	= {	has_state_flag = SPA_syndicalize_production_1mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					NOT = {
						has_idea = SPA_recovering_from_civil_war
						has_idea = SPA_recovering_from_civil_war_2
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			add_tech_bonus = {
				name = SPA_syndicalize_production
				bonus = 1.0
				uses = 1
				category = industry
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_syndicalize_production_1civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_syndicalize_production_1civ }
				}
				set_state_flag = SPA_syndicalize_production_1mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_labor_syndicate
		available = {

		}

		prerequisite = { focus = SPA_ministry_of_economy}
		
		icon = GFX_SPA_the_labour_syndicate
		x = -2
		y = 1
		relative_position_id = SPA_ministry_of_economy
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_manpower = -150000
		add_timed_idea = { idea = SPA_national_recovery_1 days = 1825 }
		}
	}

	focus = {
		id = SPA_synthetic_rubber_program
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_labor_syndicate }
		
		icon = GFX_focus_generic_rubber
		x = 0
		y = 1
		relative_position_id = SPA_labor_syndicate
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			790 = {
				add_resource = {
					type = rubber
					amount = 3
				}
            }
			165 = {
				add_resource = {
					type = rubber
					amount = 3
				}
            }
			792 = {
				add_resource = {
					type = rubber
					amount = 2
				}
            }
			169 = {
				add_resource = {
					type = rubber
					amount = 2
				}
            }
			41 = {
				add_resource = {
					type = rubber
					amount = 1
				}
            }
			112 = {
				add_resource = {
					type = rubber
					amount = 2
				}
            }
			180 = {
				add_resource = {
					type = rubber
					amount = 2
				}
            }
		}
	}

	focus = {
		id = SPA_the_spanish_black_gold
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_synthetic_rubber_program }
		
		icon = GFX_focus_PER_invite_oil_nations
		x = 0
		y = 1
		relative_position_id = SPA_synthetic_rubber_program
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			792 = {
				add_resource = {
					type = oil
					amount = 4
				}
            }
			790 = {
				add_resource = {
					type = oil
					amount = 2
				}
            }
			165 = {
				add_resource = {
					type = oil
					amount = 4
				}
            }
			169 = {
				add_resource = {
					type = oil
					amount = 3
				}
            }
			112 = {
				add_resource = {
					type = oil
					amount = 4
				}
            }
			180 = {
				add_resource = {
					type = oil
					amount = 3
				}
            }


		}
	}

		focus = {
		id = SPA_exploit_our_iron_reserves
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_the_spanish_black_gold }
		
		icon = GFX_spanish_iron
		x = 1
		y = 1
		relative_position_id = SPA_the_spanish_black_gold
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
        792 = { add_resource = { type = steel amount = 8 } } # País Vasco
        790 = { add_resource = { type = steel amount = 6 } } # Asturias
        176 = { add_resource = { type = steel amount = 5 } } # Castilla y León
        171 = { add_resource = { type = steel amount = 3 } } # Galicia
        169 = { add_resource = { type = steel amount = 3 } } # Sevilla
        789 = { add_resource = { type = steel amount = 3 } } # Córdoba
        170 = { add_resource = { type = steel amount = 3 } } # Extremadura
        795 = { add_resource = { type = steel amount = 2 } } # Beira
        179 = { add_resource = { type = steel amount = 2 } } # Alentejo
		}
	}

		focus = {
		id = SPA_veins_of_southern_chrome
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_iberian_atlas_aluminum_plan }
		
		icon = GFX_focus_generic_chromium
		x = 1
		y = 1
		relative_position_id = SPA_iberian_atlas_aluminum_plan
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			171 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }
			790 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }
			792 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }
			170 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }
			165 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }
			112 = {
				add_resource = {
					type = chromium
					amount = 2
				}
            }
			795 = {
				add_resource = {
					type = chromium
					amount = 3
				}
            }

		}
	}

		focus = {
		id = SPA_the_falangist_miracle
		available = {

		}

		prerequisite = { focus = SPA_exploit_our_iron_reserves }
		prerequisite = { focus = SPA_veins_of_southern_chrome }
		
		icon = GFX_jose_antonio_primo_de_rivera_presente_economy
		x = 1
		y = 1
		relative_position_id = SPA_exploit_our_iron_reserves
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
        remove_ideas = SPA_recovering_from_civil_war_3
			swap_ideas = {
				remove_idea = SPA_falangist_economic_miracle
				add_idea = SPA_falangist_economic_miracle_2
			}
		}
	}

	focus = {
		id = SPA_ministry_of_national_education
		available = {

		}

		prerequisite = { focus = SPA_ministry_open }
		
		icon = GFX_ministry_of_education
		x = 16
		y = 1
		relative_position_id = SPA_ministry_open
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_the_national_syndicalist_youth
		}
	}

	focus = {
		id = SPA_technocratic_education_syndicate
		available = {

		}

		prerequisite = { focus = SPA_ministry_of_national_education }
		
		icon = GFX_SPA_syndicate_of_national_education
		x = 0
		y = 1
		relative_position_id = SPA_ministry_of_national_education
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
        add_research_slot = 1
		}
	}

	focus = {
		id = SPA_engineering_in_service_of_iberia
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_engineering_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		698 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_technocratic_education_syndicate }
		
		icon = GFX_focus_por_iberian_summit
		x = -2
		y = 2
		relative_position_id = SPA_technocratic_education_syndicate
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}




	focus = {
		id = SPA_polithecnic_institute
		available = {

		}

		prerequisite = { focus = SPA_technocratic_education_syndicate }
		
		icon = GFX_focus_generic_improve_the_administration
		x = 0
		y = 1
		relative_position_id = SPA_technocratic_education_syndicate
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_national_syndicalist_youth
				add_idea = SPA_the_national_syndicalist_youth_2
			}
		}
	}

	focus = {
		id = SPA_reeducate_the_youth
		available = {

		}

		prerequisite = { focus = SPA_technocratic_education_syndicate }
		
		icon = GFX_Education_Reform
		x = 2
		y = 1
		relative_position_id = SPA_technocratic_education_syndicate
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_forged_in_discipline_idea
		}
	}

	focus = {
		id = SPA_church_school_concordat
		available = {

		}

		prerequisite = { focus = SPA_reeducate_the_youth }
		
		icon = GFX_SPR_catholic_teaching
		x = 1
		y = 1
		relative_position_id = SPA_reeducate_the_youth
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_forged_in_discipline_idea
				add_idea = SPA_forged_in_discipline_idea_2
			}
			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}
		}
	}

	focus = {
		id = SPA_humanities_first
		available = {

		}

		mutually_exclusive = { focus = SPA_science_first }
		prerequisite = { focus = SPA_church_school_concordat }
		
		icon = GFX_spanish_schools
		x = 1
		y = 1
		relative_position_id = SPA_church_school_concordat
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_forged_in_discipline_idea_2
				add_idea = SPA_forged_in_discipline_idea_3
			}
		}
	}

	focus = {
		id = SPA_control_the_universities
		available = {

		}

		prerequisite = { focus = SPA_polithecnic_institute }
		
		icon = GFX_SPA_control_the_universities
		x = 0
		y = 1
		relative_position_id = SPA_polithecnic_institute
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_popularity = {
				ideology = fascism
				popularity = 0.1
			}
		add_war_support = 0.15
		}
	}

	focus = {
		id = SPA_science_under_the_eagle_and_the_cross
		available = {
		custom_trigger_tooltip = {
		tooltip =  SPA_science_under_the_eagle_and_the_cross_tt
		16 = {
			OR = {
				is_controlled_by = SPR
				is_controlled_by = FCF
			}
		}
		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_control_the_universities }
		
		icon = GFX_Fall_of_Paris
		x = -2
		y = 1
		relative_position_id = SPA_control_the_universities
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}


	focus = {
		id = SPA_nuclear_program
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_science_under_the_eagle_and_the_cross }
		prerequisite = { focus = SPA_the_falangist_miracle }
		
		icon = GFX_SPA_nuclear_program
		x = -2
		y = 2
		relative_position_id = SPA_science_under_the_eagle_and_the_cross
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_ideas = SPA_harnessing_the_atom_for_spain
			sp:sp_nuclear_reactor  = {
			add_project_progress_ratio = 0.25
			}
			add_breakthrough_progress = {
				specialization = specialization_nuclear
				value = 0.5
			}
		}
	}

	focus = {
		id = SPA_science_first
		available = {

		}
        
		mutually_exclusive = { focus = SPA_humanities_first }
		prerequisite = { focus = SPA_control_the_universities }
		
		icon = GFX_SPA_science_first
		x = 0
		y = 1
		relative_position_id = SPA_control_the_universities
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		add_research_slot = 1
		}
	}


	focus = {
		id = SPA_the_future_of_the_nation
		available = {

		}

		prerequisite = { focus = SPA_science_first focus = SPA_humanities_first }
		
		icon = GFX_SPA_future_of_the_nation
		x = 2
		y = 1
		relative_position_id = SPA_science_first
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_the_national_syndicalist_youth_2
				add_idea = SPA_the_national_syndicalist_youth_3
			}
		}
	}

		focus = {
		id = SPA_iberian_tungsten
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_labor_syndicate }
		
		icon = GFX_focus_generic_tungsten
		x = 2
		y = 1
		relative_position_id = SPA_labor_syndicate
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			171 = {
				add_resource = {
					type = tungsten
					amount = 6
				}
            }
			174 = {
				add_resource = {
					type = tungsten
					amount = 5
				}
            }
			170 = {
				add_resource = {
					type = tungsten
					amount = 4
				}
            }
			790 = {
				add_resource = {
					type = tungsten
					amount = 2
				}
            }
			180 = {
				add_resource = {
					type = tungsten
					amount = 6
				}
            }
			181 = {
				add_resource = {
					type = tungsten
					amount = 5
				}
            }
			112 = {
				add_resource = {
					type = tungsten
					amount = 2
				}
            }
		}
	}

		focus = {
		id = SPA_iberian_atlas_aluminum_plan
		available = {
		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}
		}

		prerequisite = { focus = SPA_iberian_tungsten }
		
		icon = GFX_focus_generic_aluminum
		x = 0
		y = 1
		relative_position_id = SPA_iberian_tungsten
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			171 = {
				add_resource = {
					type = aluminium
					amount = 5
				}
            }
			790 = {
				add_resource = {
					type = aluminium
					amount = 4
				}
            }
			792 = {
				add_resource = {
					type = aluminium
					amount = 3
				}
            }
			165 = {
				add_resource = {
					type = aluminium
					amount = 4
				}
            }
			170 = {
				add_resource = {
					type = aluminium
					amount = 3
				}
            }
			112 = {
				add_resource = {
					type = aluminium
					amount = 3
				}
            }
			181 = {
				add_resource = {
					type = aluminium
					amount = 3
				}
            }
		}
	}


		focus = {
		id = SPA_state_corporatism
		available = {

		}

		prerequisite = { focus = SPA_syndicalize_production }
		
		icon = GFX_SPR_falangist_propaganada
		x = 2
		y = 1
		relative_position_id = SPA_syndicalize_production
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			random_owned_state = {
				limit = {
					is_core_of = ROOT
					is_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = { type = industrial_complex level = 1 instant_build = yes }
				add_building_construction = { type = arms_factory level = 1 instant_build = yes }
			}
			random_owned_state = {
				limit = {
					is_core_of = ROOT
					is_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = { type = industrial_complex level = 1 instant_build = yes }
				add_building_construction = { type = arms_factory level = 1 instant_build = yes }
			}
		}
	}

	focus = {
		id = SPA_regional_agrarian_commissions
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_ministry_of_economy }
		
		icon = GFX_goal_generic_consumer_goods
		x = 2
		y = 1
		relative_position_id = SPA_ministry_of_economy
		cost = 5

		available_if_capitulated = yes
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_regional_agrarian_commissions_1civ }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			add_ideas = SPA_regional_agrarian_commissions
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_regional_agrarian_commissions_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_regional_agrarian_commissions_1civ }
				}
				set_state_flag = SPA_regional_agrarian_commissions_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_unite_iberia
		available = {
			OR = {
				AND = {
					country_exists = POR
					POR = {
						NOT = { is_in_faction_with = ROOT }
						NOT = { is_subject_of = ROOT }
						NOT = { has_war_with = ROOT }
					}
					NOT = {
						any_state = {
							is_core_of = POR
							NOT = { is_owned_by = POR }
						}
					}
				}
			}
		}
		bypass = {
			NOT = { country_exists = POR }
			POR = {
				all_core_state = {
					is_controlled_by = SPR
				}
			}
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_focus_generic_attack_portugal
		x = 6
		y = 2
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			every_state = {
				limit = {
					NOT = {
						OR = {
							is_claimed_by = ROOT
							is_core_of = ROOT
							is_owned_by = ROOT
						}
					}
					is_core_of = POR
				}
				add_claim_by = ROOT
			}

			if = {
				limit = {
					POR = {
						NOT = { is_in_faction_with = ROOT }
						NOT = { is_subject_of = ROOT }
						NOT = { has_war_with = ROOT }
					}
				}
				create_wargoal = {
				    type = annex_everything
				    target = POR
				    expire = 0
				}
			}
			if = {
				limit = {
					ENG = {
						owns_state = 118
					}
				}
		
			}
		}

	}

	focus = {
		id = SPA_absorb_the_portuguese_empire
		available = {
			POR = {
				all_core_state = {
					is_controlled_by = ROOT
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_unite_iberia }
		
		icon = GFX_focus_generic_free_iberia
		x = 0
		y = 1
		relative_position_id = SPA_unite_iberia
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			every_state = {
				limit = {
					is_core_of = POR
				}
				add_core_of = SPR
			}

		custom_effect_tooltip =  SPA_portuguese_generals_tt
		hidden_effect = {
        add_state_core = 118
		}


			if = {
				limit = {
					country_exists = BRA
					BRA = {
						NOT = { is_subject_of = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
			}
			if = {
				limit = {
					country_exists = MZB
					MZB = {
						NOT = { is_subject_of = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
				create_wargoal = {
				    type = annex_everything
				    target = MZB
				    expire = 0
				}
			}
			if = {
				limit = {
					country_exists = ANG
					ANG = {
						NOT = { is_subject_of = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
				create_wargoal = {
				    type = annex_everything
				    target = ANG
				    expire = 0
				}
			}
			if = {
				limit = {
					country_exists = GNB
					GNB = {
						NOT = { is_subject_of = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
				create_wargoal = {
				    type = annex_everything
				    target = GNB
				    expire = 0
				}
			}

		}
	}

	
	focus = {
		id = SPA_reclaim_spanish_africa
		available = {
			NOT = {
				is_in_faction_with = FRA
			}
		}
		bypass = {
			FRA = {
				exists = no
			}
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_reclaim_spanish_africamod
		x = 0
		y =1
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_state_claim = 1017
			add_state_claim = 29
			add_state_claim = 806
			create_wargoal = {
				type = take_state_focus
				target = FRA
				generator = { 461 462 459 460 513 458 665 }
				expire = 0
			}
		custom_effect_tooltip = SPA_fallofparis_tt
		}
	}

	focus = {
	id = SPA_recover_the_Benelux
	icon = GFX_focus_BEL_dietsland
	cost = 5
	x = -4
	y = 2
	relative_position_id = SPA_the_will_to_empire

	prerequisite = { focus = SPA_the_will_to_empire }

	bypass = {
		AND = {
			6 = { is_owned_and_controlled_by = SPR }  # Vlaanderen
			34 = { is_owned_and_controlled_by = SPR }  # Wallonie
			980  = { is_owned_and_controlled_by = SPR }  # Ardennes
			977 = { is_owned_and_controlled_by = SPR }  # Antwerpen
			8  = { is_owned_and_controlled_by = SPR }  # Luxembourg
			35  = { is_owned_and_controlled_by = SPR }  # Brabant
			7 = { is_owned_and_controlled_by = SPR }  # Holland
			36 = { is_owned_and_controlled_by = SPR }  # Friesland
		}
	}

	available = {
		NOT = { is_in_faction_with = BEL }
		NOT = { is_in_faction_with = HOL }
		NOT = { is_in_faction_with = LUX }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_claim = 6  # Vlaanderen
		add_state_claim = 34  # Wallonie
		add_state_claim = 980   # Ardennes
		add_state_claim = 977  # Antwerpen
		add_state_claim = 8   # Luxembourg
		add_state_claim = 35   # Brabant
		add_state_claim = 7  # Holland
		add_state_claim = 36  # Friesland

		create_wargoal = {
			type = take_state_focus
			target = BEL
			generator = { 94 95 6 10 7 }
			expire = 0
		}
		create_wargoal = {
			type = take_state_focus
			target = LUX
			generator = { 8 }
			expire = 0
		}
		create_wargoal = {
			type = take_state_focus
			target = HOL
			generator = { 98 99 }
			expire = 0
		}
		custom_effect_tooltip = SPA_spanisheastindies_tt
	}
	}

	focus = {
	id = SPA_recover_Athens
	icon = GFX_focus_generic_attack_greece
	cost = 5
	x = -6
	y = 2
	relative_position_id = SPA_the_will_to_empire

	prerequisite = { focus = SPA_the_will_to_empire }

	bypass = {
		OR = {
			187 = { is_owned_and_controlled_by = SPR } # Aegean Islands
			47 = { is_owned_and_controlled_by = SPR } # Attica
			182 = { is_owned_and_controlled_by = SPR } # Crete
		}
	}

	available = {
		NOT = { is_in_faction_with = GRE }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_claim = 187
		add_state_claim = 47
		add_state_claim = 182
		create_wargoal = {
			type = take_state_focus
			target = GRE
			generator = { 118 149 180 }
			expire = 0
		}
	}
	}

	focus = {
		id = SPA_demands_gibraltar
		available = {
		}
		bypass = {
			if = {
				118 = { is_controlled_by = SPR }
			}
		}
		prerequisite = { focus = SPA_the_will_to_empire }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		icon = GFX_SPA_demands_gibraltar
		x = -8
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 2

		available_if_capitulated = yes

		completion_reward = {
			118 = {
				controller = {
				country_event = { id = lar_spain.93 hours = 6 random_hours = 18 }
				}
			}
		}
	}

focus = {
		id = SPA_demands_malta
		available = {
		}
		bypass = {
			if = {
				116 = { is_controlled_by = SPR }
			}
		}
		prerequisite = { focus = SPA_demands_gibraltar }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		icon = GFX_SPA_demands_malta
		x = 0
		y = 1
		relative_position_id = SPA_demands_gibraltar
		cost = 2

		available_if_capitulated = yes

		completion_reward = {
			118 = {
				controller = {
				country_event = { id = lar_spain.97 hours = 6 random_hours = 18 }
				}
			}
		}
	}


	focus = {
		id = SPA_claim_the_aragonese_possessions
		available = {
			NOT = {
				is_in_faction_with = ITA
			}
		}
		bypass = {
			ITA = {
				exists = no
			}
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_focus_attack_italy
		x = 4
		y = 2
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_state_claim = 1
			add_state_claim = 116
			add_state_claim = 182
			add_state_claim = 183
			add_state_claim = 114
			add_state_claim = 115
			add_state_claim = 156
			add_state_claim = 849
			add_state_claim = 117
			add_state_claim = 448
			add_state_claim = 449
			add_state_claim = 450
			add_state_claim = 451
			add_state_claim = 661
			add_state_claim = 662
			add_state_claim = 663
			create_wargoal = {
				type = take_state_focus
				target = ITA
				generator = { 114 115 156 849 117 448 449 450 451 661 662 663 }
				expire = 0
			}
		}
	}

	focus = {
	id = SPA_cores_Rosellon
	icon = GFX_SPA_recover_the_rosellon
	cost = 5
	x = 2
	y = 1
	relative_position_id = SPA_reclaim_spanish_africa

	prerequisite = { focus = SPA_reclaim_spanish_africa }

	bypass = {
		1017 = { is_core_of = SPA }  # Midi-Pyrénées (vanilla ID assumed)
	}

	available = {
		1017 = { is_controlled_by = SPA }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_core = 1017
		set_province_name = { id = 9853 name = "Perpiñán"}
	}
}

	focus = {
	id = SPA_integrate_french_basque
	icon = GFX_SPA_french_vascongadas
	cost = 5
	x = -2
	y = 1
	relative_position_id = SPA_reclaim_spanish_africa

	prerequisite = { focus = SPA_reclaim_spanish_africa }

	bypass = {
		806 = { is_core_of = SPA } # Pyrénées-Atlantiques (vanilla ID)
	}

	available = {
		806 = { is_controlled_by = SPA }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_core = 806
	}
}

	focus = {
		id = SPA_Spanish_subjects
		icon = GFX_SPA_restore_european_subjects
		cost = 5.8
		x = 0
		y = 2
		relative_position_id = SPA_reclaim_spanish_africa

		prerequisite = { focus = SPA_demands_malta}
		prerequisite = { focus = SPA_recover_Athens	}	
		prerequisite = { focus = SPA_recover_the_Benelux }
		prerequisite = { focus = SPA_reclaim_spanish_africa }
		prerequisite = { focus = SPA_claim_the_aragonese_possessions }
		prerequisite = { focus = SPA_unite_iberia }

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_spanish_subjects_tt
			custom_effect_tooltip =  SPA_german_subjects_tt
			add_political_power = -40

		}
	}

	focus = {
	id = SPA_integrate_bourgogne
	icon = GFX_prosperity_of_the_empiremod
	cost = 5
	x = -3
	y = 1
	relative_position_id = SPA_Spanish_subjects

	prerequisite = { focus = SPA_Spanish_subjects }

	bypass = {
		27 = { is_core_of = SPA } # Pyrénées-Atlantiques (vanilla ID)
	}

	available = {
		27 = { is_controlled_by = SPR }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_core = 27
	}
}

	focus = {
	id = SPA_spanish_road
	icon = GFX_spa_glories_of_the_past
	cost = 5
	x = 3
	y = 1
	relative_position_id = SPA_Spanish_subjects

	prerequisite = { focus = SPA_Spanish_subjects }

	bypass = {
	}

	available = {
		17 = { is_controlled_by = SPR }
		159 = { is_controlled_by = SPR }
	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_core = 17
		add_state_core = 159
	}
}

	focus = {
		id = SPA_reassert_american_dominancetwo
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_reassert_american_dominancemod
		x = 8
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		custom_effect_tooltip = SPA_reassert_american_dominance_tt
		add_political_power = 750
		}
	}

	focus = {
		id = SPA_bringback_viceroyalties
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_reassert_american_dominancetwo }
		
		icon = GFX_focus_CHL_restore_the_old_kingdom
		x = 2
		y = 1
		relative_position_id = SPA_reassert_american_dominancetwo
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_bringback_viceroyalties_tt
			
		}
	}

	focus = {
		id = SPA_retake_the_americas
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_reassert_american_dominancetwo }
		prerequisite = { focus = SPA_bringback_viceroyalties }

		icon = GFX_SPA_retake_the_americas
		x = 0
		y = 2
		relative_position_id = SPA_reassert_american_dominancetwo
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					NOT = { is_in_faction_with = USA }
				}
				create_wargoal = {
				    type = take_state_focus
				    target = USA
				    generator = { 378 379 380 377 376 375 }
				    expire = 0
				}
				create_wargoal = {
				    type = take_state_focus
				    target = PHI
				    generator = { 378 379 380 377 376 375 }
				    expire = 0
				}
			}

			custom_effect_tooltip = SPA_settle_old_score_tt
			hidden_effect = {
			add_state_claim = 638
			add_state_claim = 629
			add_state_claim = 375
			add_state_claim = 376
			add_state_claim = 379
			add_state_claim = 380
			add_state_claim = 382
			add_state_claim = 366
			add_state_claim = 385
			add_state_claim = 388
			add_state_claim = 381
			add_state_claim = 390
			add_state_claim = 387
			add_state_claim = 391
			add_state_claim = 392
			add_state_claim = 383
			add_state_claim = 374
			add_state_claim = 371
			add_state_claim = 372
			add_state_claim = 373
			add_state_claim = 370
			add_state_claim = 367
			add_state_claim = 384
			add_state_claim = 377
			add_state_claim = 378
			add_state_claim = 623
			add_state_claim = 327
			add_state_claim = 624
			add_state_claim = 625
			add_state_claim = 628
			add_state_claim = 626
			add_state_claim = 627
			add_state_claim = 727
			}


		}
	}

	focus = {
		id = SPA_return_viceroyalty_new_spain
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_retake_the_americas }
		available = {

			custom_trigger_tooltip = {
			tooltip = SPA_ownsusa_tt
			638 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			629 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			375 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			376 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			379 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			380 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			382 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			366 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			385 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			388 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			381 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			390 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			387 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			391 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			392 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			383 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			374 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			371 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			372 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			373 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			370 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			367 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			384 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			377 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			378 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			389 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			386 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }
			727 = { OR = { is_controlled_by = SPR is_controlled_by = VNS } }	
			}	
		}
		
		icon = GFX_focus_mex_redeem_aztlan
		x = -1
		y = 1
		relative_position_id = SPA_retake_the_americas
		cost = 7.15

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_return_viceroyalty_new_spain_tt
			add_political_power = -50
			add_stability = -0.05
			hidden_effect = {
			SPR = {
			remove_state_claim = 638
			remove_state_claim = 629
			remove_state_claim = 375
			remove_state_claim = 376
			remove_state_claim = 379
			remove_state_claim = 380
			remove_state_claim = 382
			remove_state_claim = 366
			remove_state_claim = 385
			remove_state_claim = 388
			remove_state_claim = 381
			remove_state_claim = 390
			remove_state_claim = 387
			remove_state_claim = 391
			remove_state_claim = 392
			remove_state_claim = 383
			remove_state_claim = 374
			remove_state_claim = 371
			remove_state_claim = 372
			remove_state_claim = 373
			remove_state_claim = 370
			remove_state_claim = 367
			remove_state_claim = 384
			remove_state_claim = 377
			remove_state_claim = 378
			remove_state_claim = 623
			remove_state_claim = 327
			remove_state_claim = 624
			remove_state_claim = 625
			remove_state_claim = 628
			remove_state_claim = 626
			remove_state_claim = 627
			remove_state_claim = 727
				} 

				VNS = {
				set_state_owner = 638   
				set_state_owner = 629  
				set_state_owner = 375  
				set_state_owner = 376    
				set_state_owner = 379  
				set_state_owner = 380   
				set_state_owner = 382   
				set_state_owner = 366    
				set_state_owner = 385  
				set_state_owner = 388   
				set_state_owner = 381   
				set_state_owner = 390   
				set_state_owner = 387   
				set_state_owner = 391  
				set_state_owner = 392
				set_state_owner = 389
				set_state_owner = 386
				set_state_owner = 383   
				set_state_owner = 374  
				set_state_owner = 371  
				set_state_owner = 372
				set_state_owner = 373
				set_state_owner = 370
				set_state_owner = 367
				set_state_owner = 384
				set_state_owner = 377
				set_state_owner = 378
				set_state_owner = 638
				set_state_owner = 623
				set_state_owner = 327
				set_state_owner = 624
				set_state_owner = 625
				set_state_owner = 628
				set_state_owner = 626
				set_state_owner = 627
				set_state_owner = 727

				set_state_controller = 638   
				set_state_controller = 629  
				set_state_controller = 375  
				set_state_controller = 376    
				set_state_controller = 379  
				set_state_controller = 380   
				set_state_controller = 382   
				set_state_controller = 366    
				set_state_controller = 385  
				set_state_controller = 388   
				set_state_controller = 381   
				set_state_controller = 390   
				set_state_controller = 387   
				set_state_controller = 391  
				set_state_controller = 392  
				set_state_controller = 383   
				set_state_controller = 374  
				set_state_controller = 371  
				set_state_controller = 372
				set_state_controller = 373
				set_state_controller = 370
				set_state_controller = 367
				set_state_controller = 384
				set_state_controller = 377
				set_state_controller = 378
				set_state_controller = 638
				set_state_controller = 389
				set_state_controller = 386
				set_state_controller = 623
				set_state_controller = 327
				set_state_controller = 624
				set_state_controller = 625
				set_state_controller = 628
				set_state_controller = 626
				set_state_controller = 627
				set_state_controller = 727

				add_state_core = 638   
				add_state_core = 629  
				add_state_core = 375  
				add_state_core = 376    
				add_state_core = 379  
				add_state_core = 380   
				add_state_core = 382   
				add_state_core = 366    
				add_state_core = 385  
				add_state_core = 388   
				add_state_core = 381   
				add_state_core = 390   
				add_state_core = 387   
				add_state_core = 391  
				add_state_core = 392  
				add_state_core = 383   
				add_state_core = 374  
				add_state_core = 371  
				add_state_core = 372
				add_state_core = 373
				add_state_core = 370
				add_state_core = 367
				add_state_core = 384
				add_state_core = 377
				add_state_core = 378
				add_state_core = 638
				add_state_core = 389
				add_state_core = 386
				add_state_core = 623
				add_state_core = 327
				add_state_core = 624
				add_state_core = 625
				add_state_core = 628
				add_state_core = 626
				add_state_core = 627
				add_state_core = 727

				}
				}
			
			
		}
	}

focus = {
	id = SPA_take_canada

	prerequisite = { focus = SPA_return_viceroyalty_new_spain }
	icon = GFX_focus_attack_canada
	x = 1
	y = 1
	relative_position_id = SPA_return_viceroyalty_new_spain
	cost = 5
	available_if_capitulated = yes

	available = { }

	bypass = {
		OR = {
			CAN = {
				is_subject_of = SPR
			}
			NOT = { country_exists = CAN }
			CAN = {
				all_core_state = {
					is_owned_and_controlled_by = SPA
				}
			}
		}
	}

	completion_reward = {
		create_wargoal = {
			type = take_state_focus
			target = CAN
			generator = { 118 }
			expire = 0
		}
	}
}

	focus = {
		id = SPA_embrace_pan_hispanism

		icon = GFX_focus_CHL_promote_pan_hispanic_rhetoric

		relative_position_id = SPA_return_viceroyalty_new_spain
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = SPA_return_viceroyalty_new_spain
		}
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
			is_subject = no
			VNS = {
			is_subject_of = SPR
			}
			VNG = {
			is_subject_of = SPR
			}
			VBR = {
			is_subject_of = SPR
			}
			VRP = {
			is_subject_of = SPR
			}
			VPE = {
			is_subject_of = SPR
			}

			custom_trigger_tooltip = {
				tooltip = SPA_embrace_pan_hispanic_nationalism_tt
				VNS = {
					all_core_state = {
						is_controlled_by = VNS
					}
				}

				VNG = {
					all_core_state = {
						is_controlled_by = VNG
					}
				}
				VPE = {
					all_core_state = {
						is_controlled_by = VPE
					}
				}
				VRP = {
					all_core_state = {
						is_controlled_by = VRP
					}
				}
				VBR = {
					all_core_state = {
						is_controlled_by = VBR
					}
				}
			}
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			add_stability = -0.1
			add_political_power = -100

			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {
						is_core_of = VNS
						is_core_of = VNG
						is_core_of = VBR
						is_core_of = VPE
						is_core_of = VRP
					}
				}
				add_core_of = SPR
			}

			SPR = {
			
			}

			hidden_effect = {
				news_event = { 
					id = lar_spain.100
					days = 1
					random_days = 2
				}
			}
				annex_country= {
					target = VNS
					transfer_troops = yes
					}
				annex_country= {
					target = VPE
					transfer_troops = yes
					}
				annex_country= {
					target = VNG
					transfer_troops = yes
					}
				annex_country= {
					target = VRP
					transfer_troops = yes
					}
				annex_country= {
					target = VBR
					transfer_troops = yes
					}

		}
	}

	focus = {
		id = SPA_embrace_the_spanish_destiny
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_victory_or_death
		x = -10
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_embrace_the_spanish_destiny
		}
	}



	focus = {
		id = SPA_viceroyalty_new_america
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_embrace_pan_hispanism }
		
		icon = GFX_SPA_falangedom_new_america
		x = -1
		y = 1
		relative_position_id = SPA_embrace_pan_hispanism
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_viceroyalty_new_america_tt
			
		}
	}

	focus = {
		id = SPA_invite_franco
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_embrace_the_spanish_destiny }
		
		icon = GFX_goal_SPA_invitar_paquito
		x = 0
		y = 2
		relative_position_id = SPA_embrace_the_spanish_destiny
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_invite_franco_tt
			
		}
	}

	focus = {
		id = SPA_pardon_carlist_generals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_invite_franco }
		
		icon = GFX_focus_spa_fuse_the_parties
		x = 0
		y = 1
		relative_position_id = SPA_invite_franco
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_pardon_carlist_generals_tt
			
		}
	}

	focus = {
		id = SPA_pardon_socialist_generals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_invite_franco }
		
		icon = GFX_spanish_republican_officer
		x = 2
		y = 1
		relative_position_id = SPA_invite_franco
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_pardon_socialist_generals_tt
			
		}
	}

	focus = {
		id = SPA_pardon_communist_generals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_pardon_socialist_generals }
		
		icon = GFX_reprofessionalize_the_militarymod
		x = -1
		y = 1
		relative_position_id = SPA_pardon_socialist_generals
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_pardon_communist_generals_tt
			
		}
	}

	focus = {
		id = SPA_pardon_anarquist_generals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_pardon_communist_generals }
		
		icon = GFX_plant_the_seeds_of_revolutionmod
		x = -1
		y = 1
		relative_position_id = SPA_pardon_communist_generals
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_pardon_anarquist_generals_tt
			
		}
	}

	focus = {
		id = SPA_spain_united
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_pardon_anarquist_generals }
		prerequisite = { focus = SPA_pardon_communist_generals }
		
		icon = GFX_a_united_spain
		x = 1
		y = 2
		relative_position_id = SPA_pardon_anarquist_generals
		cost = 14.4

		available_if_capitulated = yes

		completion_reward = {
		add_ideas = SPA_united_iberia
			
		}
	}

	focus = {
		id = SPA_integrate_italian_generals
		available = {
		OR = {
		AND = {
		ITA = {
		exists = no
		}
		all_core_state = {
		limit = {
		is_core_of = ITA
		}
		is_controlled_by = SPR
		}
		}
		AND = {
		ITA = {
		exists = no
		}
		NAP = {
		exists = yes
		is_subject_of = SPR
		all_core_state = {
		is_controlled_by = NAP
		}
		}}
		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_pardon_socialist_generals }
		prerequisite = { focus = SPA_Spanish_subjects }
		prerequisite = { focus = SPA_pardon_carlist_generals }
		
		icon = GFX_focus_ITA_strengthen_ascari_corps
		x = 1
		y = 1
		relative_position_id = SPA_pardon_socialist_generals
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_integrate_italian_generals_tt
			
		}
	}

	focus = {
		id = SPA_integrate_benelux_generals
		available = {
		OR = {
		AND = {
		HOL = {
		exists = no
		all_core_state = {
		is_controlled_by = SPR
		}
		}
		BEL = {
		exists = no
		all_core_state = {
		is_controlled_by = SPR
		}
		}
		LUX = {
		exists = no
		all_core_state = {
		is_controlled_by = SPR
		}
		}
		}
		AND = {
		HOL = {
		exists = no
		}
		BEL = {
		exists = no
		}
		LUX = {
		exists = no
		}
		SNT = {
		exists = yes
		is_subject_of = SPR
		all_core_state = {
		is_controlled_by = SNT
		}
		}
		}
		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_integrate_italian_generals }
		
		icon = GFX_focus_generic_influence_benelux
		x = 0
		y = 1
		relative_position_id = SPA_integrate_italian_generals
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_integrate_benelux_generals_tt
			
		}
	}

	focus = {
		id = SPA_integrate_greek_generals
		available = {
		OR = {
		AND = {
		GRE = {
		exists = no
		all_core_state = {
		is_controlled_by = SPR
		}
		}
		}

		47 = { is_core_of = SPR }

		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_integrate_benelux_generals }
		
		icon = GFX_focus_GRE_resurrecting_the_megali_idea
		x = 0
		y = 1
		relative_position_id = SPA_integrate_benelux_generals
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_integrate_greek_generals_tt
			
		}
	}


		focus = {
		id = SPA_jew_greenland
		available = {
		}
		bypass = {
			101 = { is_owned_and_controlled_by = SPA }
		}
		prerequisite = { focus = SPA_take_canada }
		
		icon = GFX_SPA_steal_greenland
		x = 1
		y = 1
		relative_position_id = SPA_take_canada
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
		set_state_owner = 101
    	set_state_controller = 101
		add_named_threat = { threat = 15 name = SPA_steals_greenland_th }
		}
	}

	focus = {
		id = SPA_viceroyalty_northern_america
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_embrace_pan_hispanism }
		prerequisite = { focus = SPA_take_canada }
		
		icon = GFX_SPA_falangedom_north_america
		x = 1
		y = 1
		relative_position_id = SPA_embrace_pan_hispanism
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_viceroyalty_north_america_tt
			
		}
	}

	focus = {
		id = SPA_embrace_pan_americanism
		available = {
		VNC = {
		exists = yes
		is_subject_of = SPR
		}
		VNA = {
		exists = yes
		is_subject_of = SPR
		}
		101 = {
		is_controlled_by = SPR
		}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_viceroyalty_northern_america }
		prerequisite = { focus = SPA_viceroyalty_new_america }
		prerequisite = { focus = SPA_jew_greenland }


		icon = GFX_focus_BRA_north_and_south_america
		x = 0
		y = 1
		relative_position_id = SPA_viceroyalty_northern_america
		cost = 7.2

		available_if_capitulated = yes

		completion_reward = {
		custom_effect_tooltip = SPA_embrace_pan_americanism_tt
			hidden_effect = {
			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {
						is_core_of = VNA
						is_core_of = VNC
						is_core_of = GRN
					}
				}
				add_core_of = SPR
			}
				annex_country= {
					target = VNA
					}
				annex_country= {
					target = VNC
					}
		}
		}
	}

	focus = {
		id = SPA_the_national_and_popular_army_of_spain
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_fuse_the_parties }
		
		icon = GFX_goal_generic_army_doctrines
		x = -2
		y = 0
		relative_position_id = SPA_join_the_axis
		cost = 10

		available_if_capitulated = yes
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_the_national_and_popular_army_of_spain_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			army_experience = 10
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_the_national_and_popular_army_of_spain_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_the_army_of_africa_model
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_and_popular_army_of_spain }
		
		icon = GFX_goal_generic_army_artillery
		x = 1
		y = 1
		relative_position_id = SPA_the_national_and_popular_army_of_spain
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			army_experience = 25
			add_doctrine_cost_reduction = {
				name = SPA_the_army_of_africa_model
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
		}
	}

	focus = {
		id = SPA_equipment_modernization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_army_of_africa_model }
		
		icon = GFX_goal_generic_small_arms
		x = -1
		y = 2
		relative_position_id = SPA_the_army_of_africa_model
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_equipment_modernization
				bonus = 1.0
				uses = 2
				category = infantry_weapons
			}
		}
	}

	focus = {
		id = SPA_artillery_modernization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_equipment_modernization }
		
		icon = GFX_goal_generic_army_artillery2
		x = -1
		y = 1
		relative_position_id = SPA_equipment_modernization
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_artillery_modernization
				bonus = 1.0
				uses = 2
				category = artillery
			}
		}
	}

	focus = {
		id = SPA_expand_the_air_branch
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_equipment_modernization }
		
		icon = GFX_goal_generic_air_doctrine
		x = 0
		y = 2
		relative_position_id = SPA_equipment_modernization
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			air_experience = 50
			add_doctrine_cost_reduction = {
				name = SPA_expand_the_air_branch
				cost_reduction = 0.5
				uses = 1
				category = air_doctrine
			}
			add_tech_bonus = {
				name = SPA_expand_the_air_branch
				bonus = 1.0
				uses = 1
				category = light_fighter
				category = cas_bomber
			}
		}
	}

	focus = {
		id = SPA_expand_the_special_forces
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_equipment_modernization }
		
		icon = GFX_goal_generic_special_forces
		x = 1
		y = 1
		relative_position_id = SPA_equipment_modernization
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_expand_the_special_forces
				bonus = 1.0
				uses = 1
				category = marine_tech
			}
			add_tech_bonus = {
				name = SPA_expand_the_special_forces
				bonus = 1.0
				uses = 1
				category = mountaineers_tech
			}
		}
	}

	focus = {
		id = SPA_motorization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_army_of_africa_model }
		
		icon = GFX_goal_generic_army_motorized
		x = 0
		y = 1
		relative_position_id = SPA_the_army_of_africa_model
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_equipment_modernization
				bonus = 2.0
				uses = 1
				category = motorized_equipment
			}
		}
	}

	focus = {
		id = SPA_an_armored_corps
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_motorization }
		prerequisite = { focus = SPA_join_the_axis }
		
		icon = GFX_goal_generic_army_tanks
		x = 1
		y = 1
		relative_position_id = SPA_motorization
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_an_armored_corps
				bonus = 1.0
				uses = 1
				category = armor
			}
		}
	}

	focus = {
		id = SPA_join_the_axis
		available = {
			has_global_flag = scw_over
			is_in_faction = no
			OR = {
				AND = {
					GER = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				AND = {
					ITA = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
			}
			NOT = { has_completed_focus = SPA_the_latin_bloc }
			NOT = { has_global_flag = POR_iberian_summit_in_progress_flag }
		}
		bypass = {
			OR = {
				AND = {
					NOT = { GER = { has_government = fascism } }
					NOT = { ITA = { has_government = fascism } }
				}
				is_in_faction_with = GER
				is_in_faction_with = ITA
			}
		}
		prerequisite = { focus = SPA_fuse_the_parties }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_goal_support_fascism
		x = 0
		y = 1
		relative_position_id = SPA_prepare_the_pyrenees_defenses
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					GER = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				GER = { country_event = generic.2 }
			}
			if = {
				limit = {
					ITA = {
						has_government = fascism
						is_faction_leader = yes
					}
				}
				ITA = { country_event = generic.2 }
			}
		}
	}

	focus = {
		id = SPA_fascist_economic_aid
		available = {
			any_country = {
				is_in_faction_with = ROOT
				has_government = fascism
				is_major = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_join_the_axis }
		prerequisite = { focus = SPA_national_recovery }
		mutually_exclusive = { focus = SPA_autarky }
		
		icon = GFX_goal_generic_construction
		x = 1
		y = 1
		relative_position_id = SPA_join_the_axis
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_ideas = SPA_fascist_economic_aid
			swap_ideas = {
				remove_idea = SPA_recovering_from_civil_war
				add_idea = SPA_recovering_from_civil_war_2
			}
			add_tech_bonus = {
				name = SPA_fascist_economic_aid
				bonus = 1.0
				uses = 1
				category = industry
			}
		}
	}

	focus = {
		id = SPA_facilitate_pyrenees_freight_transports
		available = {
			has_full_control_of_state = 793
			has_full_control_of_state = 794
			has_full_control_of_state = 165
			has_full_control_of_state = 176
			has_full_control_of_state = 792
			has_full_control_of_state = 41
			any_allied_country = {
				is_major = yes
				has_government = fascism
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_fascist_economic_aid }
		
		icon = GFX_goal_generic_construct_infrastructure
		x = 0
		y = 1
		relative_position_id = SPA_fascist_economic_aid
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			custom_effect_tooltip = SPA_facilitate_pyrenees_freight_transports_tt
			hidden_effect = {
				793 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
				794 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
				165 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
				176 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
				792 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
				41 = {
					add_building_construction = {
						type = infrastructure
						level = 5
						instant_build = yes
					}
				}
			}
			build_railway = { #Madrid - Zaragoza - Pyrinnes
				path = {
					3938 9767 6993 9785 11766 813 3816 9813 11821 915
				}
			}
			build_railway = { #Zaragoza - Barcelona - French Border
				path = {
					3816 3954 13223 6966 6812 9764 854 9824 
				}
			}
			build_railway = { #Madrid - Valladolid - Burgos - Bilbao - French Border
				path = {
					3938 3794 9800 9846 11825 6936 903 885 11852 13233 740 6756
				}
			}
		}
	}

	focus = {
		id = SPA_improve_cross_country_railways
		available = {
			any_allied_country = {
				is_major = yes
				has_government = fascism
			}
			has_full_control_of_state = 169
			has_full_control_of_state = 789
			has_full_control_of_state = 175
			has_full_control_of_state = 170
			has_full_control_of_state = 173
			has_full_control_of_state = 168
		}
		bypass = {
		}
		prerequisite = { focus = SPA_fascist_economic_aid focus = SPA_spanish_austerity }
		
		icon = GFX_goal_generic_construct_infrastructure
		x = 1
		y = 2
		relative_position_id = SPA_fascist_economic_aid
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			build_railway = { #Madrid - Crodoba - Sevilla
				path = {
					3938 13224 13229 6800 6832 6948 3810 3871 875 1178 7183
				}
			}
			build_railway = { #Madrid - Granada
				path = {
					13229 9778 9828 12083 4095 1176
				}
			}
			build_railway = { #Madrid - Murcia - Valencia
				path = {
					3938 6914 9757 942 832 9903 1093 10024 4098 9889 6959 6906
				}
			}
		}
	}

	focus = {
		id = SPA_support_the_war_industry
		available = {
			any_country = {
				is_in_faction_with = ROOT
				has_government = fascism
				is_major = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_facilitate_pyrenees_freight_transports }
		prerequisite = { focus = SPA_improve_cross_country_railways }
		
		icon = GFX_goal_generic_construct_civ_factory
		x = 0
		y = 2
		relative_position_id = SPA_facilitate_pyrenees_freight_transports
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_support_the_war_industry_1civ }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_recovering_from_civil_war_2
				add_idea = SPA_recovering_from_civil_war_3
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_support_the_war_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_support_the_war_industry_1civ }
				}
				set_state_flag = SPA_support_the_war_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_support_the_war_industry_1civ }
				}
				set_state_flag = SPA_support_the_war_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPA_italian_shipbuilding_expertise
		available = {
			is_in_faction_with = ITA
		}
		bypass = {
		}
		prerequisite = { focus = SPA_support_the_war_industry }
		
		icon = GFX_focus_generic_navy_battleship2
		x = -1
		y = 1
		relative_position_id = SPA_support_the_war_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_ideas = SPA_italian_shipbuilding_expertise
			add_tech_bonus = {
				name = SPA_italian_shipbuilding_expertise
				bonus = 1
				uses = 1
				category = bb_tech
			}
		}
	}

	focus = {
		id = SPA_the_duty_to_work
		available = {
			any_country = {
				is_in_faction_with = ROOT
				has_government = fascism
				is_major = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_support_the_war_industry }
		
		icon = GFX_goal_generic_construct_military
		x = 0
		y = 2
		relative_position_id = SPA_support_the_war_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_ideas = SPA_the_duty_to_work
		}
	}

	focus = {
		id = SPA_expand_the_war_industry
		available = {
			any_country = {
				is_in_faction_with = ROOT
				has_government = fascism
				is_major = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_support_the_war_industry focus = SPA_expand_the_axis_gold_trade }
		
		icon = GFX_goal_generic_construct_mil_factory
		x = 1
		y = 1
		relative_position_id = SPA_support_the_war_industry
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_expand_the_war_industry_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_expand_the_war_industry_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_expand_the_war_industry_2mil }
				}
				set_state_flag = SPA_expand_the_war_industry_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_national_recovery
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_fuse_the_parties }
		
		icon = GFX_goal_generic_consumer_goods
		x = -2
		y = 0
		relative_position_id = SPA_join_the_allies
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_national_recovery_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		completion_reward = {
			add_timed_idea = { idea = SPA_national_recovery_1 days = 1825 }
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_national_recovery_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_autarky
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_national_recovery }
		mutually_exclusive = { focus = SPA_fascist_economic_aid }
		
		icon = GFX_goal_generic_oil_refinery
		x = 1
		y = 1
		relative_position_id = SPA_national_recovery
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			if = {
				limit = {
					NOT = { has_idea = closed_economy }
				}
				add_ideas = closed_economy
			}
			swap_ideas = {
				remove_idea = SPA_national_recovery_1
				add_idea = SPA_national_recovery_2
			}
			add_tech_bonus = {
				name = HOL_make_use_of_our_riches
				bonus = 1.0
				uses = 2
				category = excavation_tech
			}
			add_tech_bonus = {
				name = HOL_expand_curacao_oil_refineries
				bonus = 1.0
				uses = 1
				category = synth_resources
			}
		}
	}

	focus = {
		id = SPA_spanish_austerity
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_autarky }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_goal_generic_construct_civilian
		x = 0
		y = 1
		relative_position_id = SPA_autarky
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_national_recovery_2
				add_idea = SPA_national_recovery_3
			}
			if = {
				limit = {
					NOT = {
						has_idea = SPA_recovering_from_civil_war
						has_idea = SPA_recovering_from_civil_war_2
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
		}
	}

	focus = {
		id = SPA_reduce_reliance_on_foreign_resources
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_spanish_austerity }
		
		icon = GFX_goal_generic_construction2
		x = 1
		y = 1
		relative_position_id = SPA_spanish_austerity
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_reduce_reliance_on_foreign_resources
				bonus = 1.5
				uses = 2
				category = excavation_tech
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPA_expand_the_axis_gold_trade
		available = {
			NOT = { has_completed_focus = SPA_the_stabilization_plan }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_spanish_austerity }
		mutually_exclusive = { focus = SPA_capitalist_economic_aid }
		
		icon = GFX_focus_usa_reestablish_the_gold_standard
		x = 0
		y = 2
		relative_position_id = SPA_spanish_austerity
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_expand_the_axis_gold_trade
		}
	}

	focus = {
		id = SPA_ensure_agricultural_self_sufficiency
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_expand_the_axis_gold_trade }
		
		icon = GFX_goal_generic_construct_civ_factory
		x = 0
		y = 2
		relative_position_id = SPA_expand_the_axis_gold_trade
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			remove_ideas = SPA_recovering_from_civil_war_3
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ }
				}
				set_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}

			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ }
				}
				set_state_flag = SPA_ensure_agricultural_self_sufficiency_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

#  #  ##  ### ###  ##  #  #  ##  #   ###  ## ###  ##            ### ###   ##  #  #  ##   ##  
## # #  #  #   #  #  # ## # #  # #    #  #    #  #              #   #  # #  # ## # #  # #  # 
# ## ####  #   #  #  # # ## #### #    #   #   #   #      ##     ##  ###  #### # ## #    #  # 
#  # #  #  #   #  #  # #  # #  # #    #    #  #    #            #   #  # #  # #  # #  # #  # 
#  # #  #  #  ###  ##  #  # #  # ### ### ##   #  ##             #   #  # #  # #  #  ##   ##  

	focus = {
		id = SPA_unify_the_nationalist_front
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_con_paquito }
		mutually_exclusive = { focus = SPA_the_phalanx_ascendant focus = SPA_supremacy_of_the_communion }
		
		icon = GFX_focus_spa_unify_the_nationalist_front
		x = -1
		y = 1
		relative_position_id = SPA_con_paquito
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.1
			activate_mission = SPA_carlist_uprising_mission
		}
	}

	focus = {
		id = SPA_save_the_alcazar
		available = {
		}
		bypass = {
			OR = {
				controls_province = 858
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_focus_spa_save_the_alcazar
		x = -2
		y = 1
		relative_position_id = SPA_unify_the_nationalist_front
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			activate_mission = SPA_save_the_alcazar_mission
		}
	}

	focus = {
		id = SPA_martyrdom_for_primo_de_rivera
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_save_the_alcazar }
		
		icon = GFX_goal_generic_secret_weapon
		x = -1
		y = 1
		relative_position_id = SPA_save_the_alcazar
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_war_support = 0.1
			add_popularity = {
			    ideology = fascism
			    popularity = 0.05
			}
		}
	}

	focus = {
		id = SPA_caudillo_of_spain
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_save_the_alcazar }
		
		icon = GFX_focus_spa_caudillo_of_spain
		x = 1
		y = 1
		relative_position_id = SPA_save_the_alcazar
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.05
			add_country_leader_role = {
				character = "SPA_francisco_franco"
				country_leader = {
				  ideology=despotism
				  traits = { caudillo_1 }
				  expire="1965.1.1"
				}
				promote_leader = yes
			}
			add_country_leader_role = {
				character = "SPA_francisco_franco"
				country_leader = {
				  ideology=fascism_ideology
				  traits = { caudillo_1 }
				  expire="1965.1.1"
				}
				promote_leader = yes
			}
		}
	}

	focus = {
		id = SPA_extol_the_martyrs_of_the_war
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_martyrdom_for_primo_de_rivera }
		prerequisite = { focus = SPA_caudillo_of_spain }
		
		icon = GFX_goal_generic_propaganda
		x = 1
		y = 1
		relative_position_id = SPA_martyrdom_for_primo_de_rivera
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_SPA_CARLIST_UPRISING}
		completion_reward = {
			add_war_support = 0.1
		}
	}

	focus = {
		id = SPA_consolidate_the_north
		available = {
			controls_state = 166
			controls_state = 172
			controls_state = 176
			controls_state = 792
			controls_state = 790
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_goal_generic_position_armies
		x = 0
		y = 1
		relative_position_id = SPA_unify_the_nationalist_front
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			166 = {
				if = {
					limit = {
						166 = {
							free_building_slots = {
								building = arms_factory
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			172 = {
				if = {
					limit = {
						172 = {
							free_building_slots = {
								building = arms_factory
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			176 = {
				if = {
					limit = {
						176 = {
							free_building_slots = {
								building = arms_factory
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			792 = {
				if = {
					limit = {
						792 = {
							free_building_slots = {
								building = arms_factory
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			790 = {
				if = {
					limit = {
						790 = {
							free_building_slots = {
								building = arms_factory
								size > 0
								include_locked = yes
							}
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			add_days_mission_timeout = {
				mission = SPA_carlist_uprising_mission
				days = 70
			}
		}
	}

	focus = {
		id = SPA_foment_a_carlist_split
		available = {
		}
		bypass = {
			has_global_flag = SPR_carlist_uprising_flag
		}
		prerequisite = { focus = SPA_consolidate_the_north }
		
		icon = GFX_goal_generic_military_deal
		x = 0
		y = 2
		relative_position_id = SPA_consolidate_the_north
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_SPA_CARLIST_UPRISING}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_carlism_1
				add_idea = SPA_carlism_2
			}
			add_days_mission_timeout = {
				mission = SPA_carlist_uprising_mission
				days = 140
			}
		}
	}

	focus = {
		id = SPA_a_methodical_approach
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_goal_generic_more_territorial_claims
		x = 2
		y = 1
		relative_position_id = SPA_unify_the_nationalist_front
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_a_methodical_approach
			custom_effect_tooltip = SPR_seize_public_transport_tt
		}
	}

	focus = {
		id = SPA_tackle_the_vulnerable_fronts
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_a_methodical_approach }
		
		icon = GFX_goal_generic_major_war
		x = -1
		y = 1
		relative_position_id = SPA_a_methodical_approach
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_tackle_the_vulnerable_fronts_tt
		}
	}

	focus = {
		id = SPA_integrate_the_requetes
		available = {
		}
		bypass = {
			has_global_flag = SPR_carlist_uprising_flag
		}
		prerequisite = { focus = SPA_tackle_the_vulnerable_fronts }
		prerequisite = { focus = SPA_foment_a_carlist_split }
		
		icon = GFX_goal_generic_military_sphere
		x = 0
		y = 2
		relative_position_id = SPA_tackle_the_vulnerable_fronts
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.1
			}
			if = {
				limit = {
					NOT = {
						has_idea = SPA_carlism_2
						has_idea = SPA_carlism_5
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_carlism_2
						add_idea = SPA_carlism_3
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_carlism_2
				}
				swap_ideas = {
					remove_idea = SPA_carlism_2
					add_idea = SPA_carlism_3
				}
			}
			if = {
				limit = {
					has_idea = SPA_carlism_5
				}
				swap_ideas = {
					remove_idea = SPA_carlism_5
					add_idea = SPA_carlism_4
				}
			}
		}
	}

	focus = {
		id = SPA_portuguese_aid
		available = {
			NOT = { has_war_with = POR }
			any_enemy_country = {
				NOT = {
					has_volunteers_amount_from = {
						tag = POR
						count > 0
					}
				}
			}
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_a_methodical_approach }
		
		icon = GFX_focus_generic_befriend_portugal
		x = 1
		y = 1
		relative_position_id = SPA_a_methodical_approach
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			effect_tooltip = {
				add_manpower = 20000
				POR = {
					add_timed_idea = { idea = SPA_spanish_civil_war_commitments days = 730 }
					add_opinion_modifier = { target = ROOT modifier = SPA_spanish_civil_war_commitments }
				}
			}
			custom_effect_tooltip = SPA_the_iberian_pact_tt_2
			POR = { country_event = { id = lar_spain.22 hours = 12 random_hours = 36 } }
		}
	}

	focus = {
		id = SPA_the_iberian_pact
		available = {
			has_global_flag = scw_over
			has_war = no
			is_in_faction = no
			POR = {
				has_war = no
				is_in_faction = no
			}
			NOT = { has_global_flag = POR_iberian_summit_in_progress_flag }
		}
		bypass = {
			POR = { is_in_faction = yes }
		}
		prerequisite = { focus = SPA_portuguese_aid }
		
		icon = GFX_goal_generic_major_alliance
		x = 0
		y = 1
		relative_position_id = SPA_portuguese_aid
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_the_iberian_pact_tt
			custom_effect_tooltip = SPA_the_iberian_pact_tt_2
			POR = { country_event = { id = lar_spain.25 hours = 12 random_hours = 36 } }
		}
	}

	focus = {
		id = SPA_the_latin_bloc
		available = {
			has_global_flag = scw_over
			NOT = { has_completed_focus = SPA_join_the_axis }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_iberian_pact }
		
		icon = GFX_goal_generic_alliance
		x = 0
		y = 1
		relative_position_id = SPA_the_iberian_pact
		cost = 10

		available_if_capitulated = yes

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		completion_reward = {
			set_rule = {
				can_create_factions = yes
			}
			create_faction = SPA_latin_bloc
			every_other_country = {
				limit = {
					OR = {
						original_tag = POR
						original_tag = CAT
						original_tag = NAV
						original_tag = GLC
						tag = VIC
						original_tag = ITA
					}
					is_in_faction = no
				}
				country_event = { id = lar_spain.30 hours = 12 random_hours = 36 }
			}
			hidden_effect = { news_event = { id = lar_news.19 hours = 6 } }
		}
	}

	focus = {
		id = SPA_utilize_the_intellectuals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_integrate_the_requetes focus = SPA_confirm_the_fueros }
		
		icon = GFX_focus_research
		x = 3
		y = 1
		relative_position_id = SPA_integrate_the_requetes
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPA_banish_the_party_leaders
		available = {
		}
		bypass = {
			has_global_flag = SPR_carlist_uprising_flag
		}
		prerequisite = { focus = SPA_extol_the_martyrs_of_the_war }
		prerequisite = { focus = SPA_foment_a_carlist_split }
		
		icon = GFX_focus_generic_support_the_left_right
		x = 1
		y = 1
		relative_position_id = SPA_extol_the_martyrs_of_the_war
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SPA_CARLIST_UPRISING}
		completion_reward = {
			add_political_power = 200
			custom_effect_tooltip = remove_political_advisor
			show_ideas_tooltip = SPA_manuel_hedilla
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPA_raimundo_fernandez_cuesta
			add_days_mission_timeout = {
				mission = SPA_carlist_uprising_mission
				days = 140
			}
		}
	}

	focus = {
		id = SPA_fuse_the_parties
		available = {
		}
		bypass = {
			has_global_flag = SPR_carlist_uprising_flag
		}
		prerequisite = { focus = SPA_banish_the_party_leaders }
		prerequisite = { focus = SPA_safeguard_the_freedom_of_worship }
		
		icon = GFX_focus_spa_fuse_the_parties
		x = -1
		y = 1
		relative_position_id = SPA_banish_the_party_leaders
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			set_party_name = { ideology = fascism long_name = SPR_fascism_francoist_party_long name = SPR_fascism_francoist_party }
			set_party_name = { ideology = neutrality long_name = SPR_fascism_francoist_party_long name = SPR_fascism_francoist_party }
			if = {
				limit = {
					NOT = {
						has_idea = SPA_carlism_2
						has_idea = SPA_carlism_3
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_carlism_2
						add_idea = SPA_carlism_3
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_carlism_2
				}
				swap_ideas = {
					remove_idea = SPA_carlism_2
					add_idea = SPA_carlism_5
				}
			}
			if = {
				limit = {
					has_idea = SPA_carlism_3
				}
				swap_ideas = {
					remove_idea = SPA_carlism_3
					add_idea = SPA_carlism_4
				}
			}
			custom_effect_tooltip = SPA_fuse_the_parties_tt
			if = {
				limit = {
					has_global_flag = scw_early_end
				}
				set_global_flag = nationalist_victory
				set_global_flag = scw_over
				country_event = { id = lar_news.1 hours = 6 }
			}
		}
	}

	focus = {
		id = SPA_join_the_allies
		available = {
			has_global_flag = scw_over
			is_in_faction = no
			OR = {
				AND = {
					ENG = {
						has_government = democratic
						is_faction_leader = yes
					}
				}
				AND = {
					USA = {
						has_government = democratic
						is_faction_leader = yes
					}
				}
			}
			NOT = { has_completed_focus = SPA_the_latin_bloc }
			NOT = { has_government = fascism }
			fascism < 0.4		
			NOT = { has_global_flag = POR_iberian_summit_in_progress_flag }
		}
		bypass = {
			OR = {
				AND = {
					NOT = { USA = { has_government = democratic } }
					NOT = { ENG = { has_government = democratic } }
				}
				is_in_faction_with = USA
				is_in_faction_with = ENG
			}
		}
		prerequisite = { focus = SPA_fuse_the_parties }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_goal_support_democracy
		x = 0
		y = 1
		relative_position_id = SPA_fuse_the_parties
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					ENG = {
						has_government = democratic
						is_faction_leader = yes
					}
				}
				ENG = { country_event = { id = generic.2 hours = 6 } }
			}
			if = {
				limit = {
					USA = {
						has_government = democratic
						is_faction_leader = yes
					}
				}
				USA = { country_event = { id = generic.2 hours = 6 } }
			}
			hidden_effect = { news_event = { id = lar_news.11 days = 1 } }
		}
	}

	focus = {
		id = SPA_the_stabilization_plan
		available = {
			NOT = { has_completed_focus = SPA_expand_the_axis_gold_trade }
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_join_the_allies }
		prerequisite = { focus = SPA_national_recovery }
		
		icon = GFX_goal_generic_neutrality_focus
		x = 2
		y = 1
		relative_position_id = SPA_join_the_allies
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					NOT = {
						has_idea = SPA_recovering_from_civil_war
						has_idea = SPA_recovering_from_civil_war_2
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
		}
	}

	focus = {
		id = SPA_expand_spanish_bases
		available = {
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_stabilization_plan }
		
		icon = GFX_goal_generic_construct_military
		x = 0
		y = 1
		relative_position_id = SPA_the_stabilization_plan
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			171 = { #Galicia
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 758
					instant_build = yes
				}							
			}
			790 = { #Asturias
				add_building_construction = {
					type = naval_base
					level = 1
					province = 11707
					instant_build = yes
				}							
			}
			792 = { #Basque
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 740
					instant_build = yes
				}							
			}
			165 = { #Catalonia
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 9764
					instant_build = yes
				}							
			}
			167 = { #Valencia
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 6906
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 4098
					instant_build = yes
				}						
			}
			168 = { #Murcia
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 10024
					instant_build = yes
				}							
			}
			173 = { #Granada
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 747
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 9979
					instant_build = yes
				}						
			}
			169 = { #Sevilla
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 1048
					instant_build = yes
				}							
			}
			41 = { #Madrid
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}							
			}
			177 = { #Baleares
				add_building_construction = {
					type = naval_base
					level = 1
					province = 9793
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					level = 1
					province = 7114
					instant_build = yes
				}							
			}
			178 = { #Canary Islands
				add_building_construction = {
					type = naval_base
					level = 1
					province = 13071
					instant_build = yes
				}							
			}
		}
	}

	focus = {
		id = SPA_capitalist_economic_aid
		available = {
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_expand_spanish_bases }
		prerequisite = { focus = SPA_reduce_reliance_on_foreign_resources }
		mutually_exclusive = { focus = SPA_expand_the_axis_gold_trade }
		
		icon = GFX_focus_generic_the_giant_wakes
		x = 0
		y = 2
		relative_position_id = SPA_expand_spanish_bases
		cost = 10

		available_if_capitulated = yes
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_capitalist_economic_aid_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_capitalist_economic_aid
				bonus = 1.0
				uses = 1
				category = industry
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_capitalist_economic_aid_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			remove_ideas = SPA_recovering_from_civil_war_3
			swap_ideas = {
				remove_idea = SPA_national_recovery_3
				add_idea = SPA_national_recovery_4
			}
		}
	}

	focus = {
		id = SPA_improve_living_standards
		available = {
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_capitalist_economic_aid }
		
		icon = GFX_goal_generic_consumer_goods
		x = -1
		y = 1
		relative_position_id = SPA_capitalist_economic_aid
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			add_stability = 0.15
			add_political_power = 120
			if = {
				limit = {
					NOT = {
						has_idea = SPA_national_recovery_4
						has_idea = SPA_national_recovery_6
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_national_recovery_4
						add_idea = SPA_national_recovery_5
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_national_recovery_4
				}
				swap_ideas = {
					remove_idea = SPA_national_recovery_4
					add_idea = SPA_national_recovery_5
				}
			}
			if = {
				limit = {
					has_idea = SPA_national_recovery_6
				}
				swap_ideas = {
					remove_idea = SPA_national_recovery_6
					add_idea = SPA_national_recovery_7
				}
			}
		}
	}

	focus = {
		id = SPA_domestic_industrial_developments
		available = {
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_capitalist_economic_aid }
		
		icon = GFX_goal_generic_production
		x = 1
		y = 1
		relative_position_id = SPA_capitalist_economic_aid
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					NOT = {
						has_idea = SPA_national_recovery_4
						has_idea = SPA_national_recovery_5
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_national_recovery_4
						add_idea = SPA_national_recovery_6
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_national_recovery_4
				}
				swap_ideas = {
					remove_idea = SPA_national_recovery_4
					add_idea = SPA_national_recovery_6
				}
			}
			if = {
				limit = {
					has_idea = SPA_national_recovery_5
				}
				swap_ideas = {
					remove_idea = SPA_national_recovery_5
					add_idea = SPA_national_recovery_7
				}
			}
		}
	}

	focus = {
		id = SPA_the_spanish_miracle
		available = {
			OR = {
				is_in_faction_with = ENG
				is_in_faction_with = USA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_improve_living_standards }
		prerequisite = { focus = SPA_domestic_industrial_developments }
		
		icon = GFX_focus_spa_the_spanish_miracle
		x = 1
		y = 1
		relative_position_id = SPA_improve_living_standards
		cost = 20

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_the_spanish_miracle_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			every_state = {
				limit	= {	has_state_flag = SPA_the_spanish_miracle_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_the_spanish_miracle_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_the_spanish_miracle_2civ }
				}
				set_state_flag = SPA_the_spanish_miracle_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_the_spanish_miracle_2civ }
				}
				set_state_flag = SPA_the_spanish_miracle_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_the_spanish_miracle_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_the_spanish_miracle_2mil }
				}
				set_state_flag = SPA_the_spanish_miracle_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_adopt_the_26_points
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_fuse_the_parties }
		
		icon = GFX_focus_generic_treaty
		x = 6
		y = 1
		relative_position_id = SPA_fuse_the_parties
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_popularity = {
			    ideology = fascism
			    popularity = 0.1
			}
			if = {
				limit = {
					NOT = {
						has_idea = war_economy
						has_idea = tot_economic_mobilisation
					}
				}
				add_ideas = war_economy
			}
			if = {
				limit = {
					has_idea = limited_conscription
				}
				add_ideas = extensive_conscription
			}
			if = {
				limit = {
					has_idea = volunteer_only
				}
				add_ideas = limited_conscription
			}
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
			}
		}
	}

	focus = {
		id = SPA_direct_the_universities
		available = {
			num_of_factories > 50
		}
		bypass = {
		}
		prerequisite = { focus = SPA_adopt_the_26_points }
		
		icon = GFX_focus_research2
		x = -1
		y = 1
		relative_position_id = SPA_adopt_the_26_points
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPA_dictator_for_life

		available = {
			has_country_leader = {
				character = SPA_francisco_franco
				ruling_only = yes
			}
		}

		bypass = {
		}

		prerequisite = { focus = SPA_adopt_the_26_points }
		mutually_exclusive = { focus = SPA_restore_the_monarchy }
		
		icon = GFX_goal_generic_political_pressure
		x = 1
		y = 1
		relative_position_id = SPA_adopt_the_26_points
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.05
			swap_ruler_traits = { remove = caudillo_1 add = caudillo_2 }
			hidden_effect = {
				if = {
					limit = {
						has_government = neutrality
					}
					remove_trait = {
						character = SPA_francisco_franco
						ideology = fascism_ideology
						trait = caudillo_1
					}
					add_trait = {
						character = SPA_francisco_franco
						ideology = fascism_ideology
						trait = caudillo_2
					}
				}
				if = {
					limit = {
						has_government = fascism
					}
					remove_trait = {
						character = SPA_francisco_franco
						ideology = despotism
						trait = caudillo_1
					}
					add_trait = {
						character = SPA_francisco_franco
						ideology = despotism
						trait = caudillo_2
					}
				}
			}
		}
	}

	focus = {
		id = SPA_invest_in_naval_infrastructure
		available = {
			has_completed_focus = SPA_unify_the_nationalist_front
		}
		bypass = {
		}
		prerequisite = { focus = SPA_expand_spanish_bases focus = SPA_dictator_for_life focus = SPA_restore_the_monarchy }
		
		icon = GFX_goal_generic_navy_doctrines_tactics
		x = -3
		y = 2
		relative_position_id = SPA_dictator_for_life
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPA_invest_in_naval_infrastructure_3DY }
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
			}
		}

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_invest_in_naval_infrastructure_3DY
			}
		}
	}

	focus = {
		id = SPA_expand_the_slipways
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_invest_in_naval_infrastructure }
		
		icon = GFX_goal_generic_construct_naval_dockyard
		x = 0
		y = 1
		relative_position_id = SPA_invest_in_naval_infrastructure
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPA_expand_the_slipways_3DY }
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_expand_the_slipways_3DY
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_expand_the_slipways_3DY }
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_expand_the_slipways_3DY
			}
		}
	}

	focus = {
		id = SPA_the_plan_imperial
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_expand_the_slipways }
		
		icon = GFX_goal_generic_navy_battleship
		x = 0
		y = 2
		relative_position_id = SPA_expand_the_slipways
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 50
			add_ideas = SPA_the_plan_imperial
			add_tech_bonus = {
				name = SPA_glory_and_wealth_on_the_sea_lanes
				bonus = 1
				uses = 1
				category = bb_tech
			}
			add_tech_bonus = {
				name = SPA_glory_and_wealth_on_the_sea_lanes
				bonus = 1
				uses = 1
				category = cv_tech
			}
		}
	}

	focus = {
		id = SPA_restart_small_scale_shipbuilding
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_invest_in_naval_infrastructure }
		
		icon = GFX_focus_generic_destroyer
		x = 1
		y = 2
		relative_position_id = SPA_invest_in_naval_infrastructure
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 25
			add_tech_bonus = {
				name = SPA_restart_small_scale_shipbuilding
				bonus = 1
				uses = 1
				category = cl_tech
				category = ca_tech
			}
			add_tech_bonus = {
				name = SPA_restart_small_scale_shipbuilding
				bonus = 1
				uses = 1
				category = dd_tech
			}
			add_tech_bonus = {
				name = SPA_restart_small_scale_shipbuilding
				bonus = 1
				uses = 1
				category = ss_tech
			}
		}
	}

	focus = {
		id = SPA_la_division_azul
		available = {
			has_completed_focus = SPA_adopt_the_26_points
		}
		bypass = {
		}
		prerequisite = { focus = SPA_dictator_for_life focus = SPA_restore_the_monarchy }
		
		icon = GFX_goal_rhineland
		x = 0
		y = 1
		relative_position_id = SPA_dictator_for_life
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_la_division_azul
			if = {
				limit = {
					has_government = neutrality
				}
				set_rule = {
					can_send_volunteers = yes
				}
			}
		}
	}

	focus = {
		id = SPA_the_tangiers_enclave
		available = {
			has_full_control_of_state = 290
		}
		bypass = {
		}
		prerequisite = { focus = SPA_la_division_azul }
		prerequisite = { focus = SPA_stamp_out_the_maquis }
		
		icon = GFX_goal_generic_position_armies
		x = 0
		y = 1
		relative_position_id = SPA_la_division_azul
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					ENG = { has_government = democratic }
				}
				effect_tooltip = {
					290 = {
						add_extra_state_shared_building_slots = 3
						add_building_construction = {
							type = industrial_complex
							level = 2
							instant_build = yes
						}
					}
				}
				custom_effect_tooltip = SPA_the_tangiers_enclave_tt
				ENG = { country_event = { id = lar_spain.36 hours = 6 random_hours = 18 } }
			}
			else = {
				290 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPA_demand_french_north_africa
		available = {
			any_country = {
				original_tag = FRA
				has_focus_tree = vichy_french_focus
				owns_state = 461
				owns_state = 462
				owns_state = 459
				owns_state = 460
				owns_state = 513
				owns_state = 514
				owns_state = 458
				owns_state = 665
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_tangiers_enclave }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_goal_generic_territory_or_war
		x = 0
		y = 1
		relative_position_id = SPA_the_tangiers_enclave
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			random_other_country = {
				limit = {
					original_tag = FRA
					has_focus_tree = vichy_french_focus
					owns_state = 461
					owns_state = 462
					owns_state = 459
					owns_state = 460
					owns_state = 513
					owns_state = 514
					owns_state = 458
					owns_state = 665
				}
				country_event = { id = lar_spain.39 hours = 6 random_hours = 18 }
			}
		}
	}

	focus = {
		id = SPA_restore_the_monarchy

		available = {
			OR = {
				has_government = neutrality
				has_government = fascism
			}
		}

		prerequisite = { focus = SPA_adopt_the_26_points focus = SPA_settle_the_succession_question }
		mutually_exclusive = { focus = SPA_dictator_for_life }
		
		icon = GFX_goal_tfv_strengthen_commonwealth_ties
		x = 3
		y = 1
		relative_position_id = SPA_adopt_the_26_points
		cost = 10

		available_if_capitulated = yes

		bypass = {
			has_country_leader = {
				character = SPA_karl_pius_von_habsburg
				ruling_only = yes
			}
		}

		completion_reward = {
			if = {
				limit = {
					has_completed_focus = SPA_supremacy_of_the_communion
				}
				custom_effect_tooltip = SPA_restore_the_monarchy_tt
				hidden_effect = {
					drop_cosmetic_tag = yes
					set_cosmetic_tag = SPB_kingdom
				}
				news_event = { id = lar_news.17 hours = 3 }
			}
			if = {
				limit = {
					NOT = { has_completed_focus = SPA_supremacy_of_the_communion }
				}
				news_event = { id = lar_news.18 hours = 6 }
			}
		}
	}

	focus = {
		id = SPA_stamp_out_the_maquis
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_dictator_for_life focus = SPA_restore_the_monarchy }
		
		icon = GFX_goal_generic_more_territorial_claims
		x = 2
		y = 1
		relative_position_id = SPA_dictator_for_life
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
		}
	}

	focus = {
		id = SPA_defenses_against_strategic_bombing
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_stamp_out_the_maquis }
		
		icon = GFX_focus_generic_air_defense
		x = 0
		y = 1
		relative_position_id = SPA_stamp_out_the_maquis
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			every_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					is_in_home_area = yes
				}
				add_building_construction = {
					type = anti_air_building
					level = 1
					instant_build = yes
				}
			}
			171 = { #Galicia
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}						
			}
			792 = { #Basque
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}						
			}
			41 = { #Madrid
				add_building_construction = {
					type = air_base
					level = 1
					instant_build = yes
				}						
			}
		}
	}

	focus = {
		id = SPA_defenses_against_invasion
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_defenses_against_strategic_bombing }
		
		icon = GFX_focus_generic_coastal_fort
		x = 0
		y = 1
		relative_position_id = SPA_defenses_against_strategic_bombing
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_defenses_against_invasion_tt
			every_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					is_in_home_area = yes
				}
				add_building_construction = {
					type = coastal_bunker
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_retake_gibraltar
		available = {
			NOT = {
				is_in_faction_with = ENG
				has_war_with = ENG
				controls_state = 118
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_demand_french_north_africa }
		prerequisite = { focus = SPA_defenses_against_invasion }
		
		icon = GFX_focus_attack_britain
		x = 1
		y = 1
		relative_position_id = SPA_demand_french_north_africa
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			create_wargoal = {
				type = take_state_focus
				target = ENG
				generator = { 118 }
				expire = 0
			}
		}
	}

	focus = {
		id = SPA_claim_west_africa
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_retake_gibraltar }
		
		icon = GFX_goal_generic_occupy_states_ongoing_war
		x = 0
		y = 1
		relative_position_id = SPA_retake_gibraltar
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_state_claim = 557
			add_state_claim = 272
			add_state_claim = 780
			add_state_claim = 556
			add_state_claim = 779
			add_state_claim = 778
			add_state_claim = 781
			add_state_claim = 777
			add_state_claim = 776
			add_state_claim = 773
			add_state_claim = 774
			add_state_claim = 660
			add_state_claim = 539
			add_state_claim = 772
			IF = {
				limit = {
					any_country = {
						original_tag = FRA
						OR = {
							owns_state = 557
							owns_state = 272
							owns_state = 780
							owns_state = 556
							owns_state = 779
							owns_state = 778
							owns_state = 781
							owns_state = 777
							owns_state = 776
							owns_state = 773
							owns_state = 774
							owns_state = 660
							owns_state = 539
							owns_state = 772
						}
					}
				}
				every_country = {
					limit = {
						original_tag = FRA
						OR = {
							owns_state = 557
							owns_state = 272
							owns_state = 780
							owns_state = 556
							owns_state = 779
							owns_state = 778
							owns_state = 781
							owns_state = 777
							owns_state = 776
							owns_state = 773
							owns_state = 774
							owns_state = 660
							owns_state = 539
							owns_state = 772
						}
					}
					ROOT = {
						create_wargoal = {
							type = take_state_focus
							target = PREV
							generator = { 557 272 780 556 779 778 781 777 776 773 774 660 539 772 }
							expire = 0
						}
					}
				}
				
			}
		}
	}

#  #  ##  ### ###  ##  #  #  ##  #   ###  ## ###  ##             ##   ##  ###  #   ###  ## ###  ## 
## # #  #  #   #  #  # ## # #  # #    #  #    #  #              #  # #  # #  # #    #  #    #  #   
# ## ####  #   #  #  # # ## #### #    #   #   #   #      ##     #    #### ###  #    #   #   #   #  
#  # #  #  #   #  #  # #  # #  # #    #    #  #    #            #  # #  # #  # #    #    #  #    # 
#  # #  #  #  ###  ##  #  # #  # ### ### ##   #  ##              ##  #  # #  # ### ### ##   #  ##  

	focus = {
		id = SPA_supremacy_of_the_communion
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_negotiate_carlist_support }
		mutually_exclusive = { focus = SPA_the_phalanx_ascendant focus = SPA_unify_the_nationalist_front }
		
		icon = GFX_focus_spa_supremacy_of_the_communion
		x = 9
		y = 1
		relative_position_id = SPA_con_paquito
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPA_luis_hernando_de_larramendi
			show_ideas_tooltip = SPA_martin_de_riquer
			show_ideas_tooltip = SPA_mauricio_de_sivatte
			custom_effect_tooltip = remove_theorist
			show_ideas_tooltip = SPA_agustin_munoz_grandes
			create_field_marshal = {
				name = "Manuel Fal Conde"
				gfx = "GFX_portrait_SPA_manuel_fal_conde"
				traits = { trait_SPA_carlist_loyalties }
				skill = 3
			    attack_skill = 2
			    defense_skill = 3
			    planning_skill = 2
			    logistics_skill = 3
			}
			add_war_support = 0.05
			swap_ideas = {
				remove_idea = SPA_carlism_1
				add_idea = SPA_disjointed_carlist_juntas
			}
			activate_mission = SPA_fascist_crackdown_mission
			#remove_ideas = SPA_carlism_1
			#add_ideas = SPA_disjointed_carlist_juntas
		}
	}

	focus = {
		id = SPA_prepare_the_carlist_insurrection
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_supremacy_of_the_communion }
		
		icon = GFX_goal_generic_occupy_states_ongoing_war
		x = -3
		y = 1
		relative_position_id = SPA_supremacy_of_the_communion
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CARLIST_UPRISING}
		completion_reward = {
			custom_effect_tooltip = SPA_prepare_the_carlist_insurrection_tt
			hidden_effect = {
				if = {
					limit = {
						OR = {
							controls_state = 172
							controls_state = 176
						}
					}
					every_state = {
						limit = {
							OR = {
								state = 172
								state = 176
							}
							NOT = { has_state_flag = SPA_carlist_cell_flag }
							is_controlled_by = ROOT
						}
						set_state_flag = SPA_carlist_cell_flag
					}
				}
			}
		}
	}

	focus = {
		id = SPA_contact_the_union_militar_espanola
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_prepare_the_carlist_insurrection }
		
		icon = GFX_goal_generic_major_alliance
		x = 0
		y = 1
		relative_position_id = SPA_prepare_the_carlist_insurrection
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_doctrine_cost_reduction = {
				name = SPA_contact_the_union_militar_espanola
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
			country_event = { id = lar_spain.33 hours = 6 random_hours = 6 }
		}
	}

	focus = {
		id = SPA_head_the_junta_nacional
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_supremacy_of_the_communion }
		
		icon = GFX_goal_generic_political_pressure
		x = -1
		y = 1
		relative_position_id = SPA_supremacy_of_the_communion
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_stability = 0.05
			create_country_leader = {
				name = "Manuel Fal Conde"
				desc = "POLITICS_MANUEL_FAL_CONDE_DESC"
				picture = "GFX_portrait_SPA_manuel_fal_conde"
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					jefe
				}
			}
		}
	}

	focus = {
		id = SPA_unite_the_requetes
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_head_the_junta_nacional }
		
		icon = GFX_goal_generic_military_sphere
		x = 0
		y = 1
		relative_position_id = SPA_head_the_junta_nacional
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			remove_ideas = SPA_disjointed_carlist_juntas
		}
	}

	focus = {
		id = SPA_the_war_in_the_north
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_supremacy_of_the_communion }
		
		icon = GFX_goal_generic_position_armies
		x = 1
		y = 1
		relative_position_id = SPA_supremacy_of_the_communion
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_doctrine_cost_reduction = {
				name = SPA_the_war_in_the_north
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
			if = {
				limit = {
					NOT = {
						has_decision = SPA_galicia_offensive
						has_decision = SPA_asturias_offensive
						has_decision = SPA_leon_offensive
						has_decision = SPA_valladolid_offensive
						has_decision = SPA_burgos_offensive
						has_decision = SPA_pais_vasco_offensive
						has_decision = SPA_navarra_offensive
						has_decision = SPA_western_aragon_offensive
						has_decision = SPA_eastern_aragon_offensive
						has_decision = SPA_catalunya_offensive
						has_decision = SPA_salamanca_offensive
						has_decision = SPA_madrid_offensive
						has_decision = SPA_guadalajara_offensive
						has_decision = SPA_valencia_offensive
						has_decision = SPA_extremadura_offensive
						has_decision = SPA_ciudad_real_offensive
						has_decision = SPA_murcia_offensive
						has_decision = SPA_sevilla_offensive
						has_decision = SPA_cordoba_offensive
						has_decision = SPA_granada_offensive
					}
					has_country_flag = SPR_preparing_offensive_in_progress_flag
				}
				clr_country_flag = SPR_preparing_offensive_in_progress_flag
			}
			790 = {
				clr_state_flag = SPR_unplanned_offensive_flag
				remove_dynamic_modifier = {
					modifier = unplanned_offensive
				}
			}
			792 = {
				clr_state_flag = SPR_unplanned_offensive_flag
				remove_dynamic_modifier = {
					modifier = unplanned_offensive
				}
			}
		}
	}

	focus = {
		id = SPA_revive_the_spirit_of_the_carlist_wars
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPA_the_war_in_the_north }
		
		icon = GFX_goal_generic_propaganda
		x = 0
		y = 1
		relative_position_id = SPA_the_war_in_the_north
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.1
		}
	}

	focus = {
		id = SPA_arms_modernization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_revive_the_spirit_of_the_carlist_wars }
		
		icon = GFX_goal_generic_build_tank
		x = 2
		y = 1
		relative_position_id = SPA_revive_the_spirit_of_the_carlist_wars
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_arms_modernization
				bonus = 1.0
				uses = 1
				category = infantry_weapons
			}
			add_tech_bonus = {
				name = SPA_arms_modernization
				bonus = 1.0
				uses = 1
				category = artillery
			}
		}
	}

	focus = {
		id = SPA_no_compromise_on_carlist_ideals
		available = {
		}
		bypass = {
			OR = {
				has_war_with = SPA
				has_global_flag = SPR_carlist_uprising_flag
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPA_contact_the_union_militar_espanola }
		prerequisite = { focus = SPA_unite_the_requetes }
		
		icon = GFX_focus_spa_no_compromise_on_carlist_ideals
		x = 1
		y = 1
		relative_position_id = SPA_contact_the_union_militar_espanola
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR FOCUS_FILTER_SPA_CARLIST_UPRISING}
		completion_reward = {
			set_party_name = { ideology = neutrality long_name = SPR_neutrality_party_long name = SPR_neutrality_party }
			add_timed_idea = { idea = SPA_no_compromise_on_carlist_ideals days = 60 }
			custom_effect_tooltip = SPA_no_compromise_on_carlist_ideals_tt_2
			custom_effect_tooltip = SPA_no_compromise_on_carlist_ideals_tt
			if = {
				limit = {
					NOT = { has_war_with = SPA }
				}
				hidden_effect = { country_event = lar_spain.8 }
			}
		}
	}

	focus = {
		id = SPA_the_crusade_against_democracy
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_unite_the_requetes }
		prerequisite = { focus = SPA_revive_the_spirit_of_the_carlist_wars }
		
		icon = GFX_focus_generic_strike_at_democracy2
		x = 1
		y = 1
		relative_position_id = SPA_unite_the_requetes
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			set_country_flag = { flag = SPA_the_crusade_against_democracy_timer_flag value = 1 days = 69 }
			add_ideas = SPA_crusade_against_democracy_1
			add_doctrine_cost_reduction = {
				name = SPA_the_crusade_against_democracy
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
		}
	}

	focus = {
	id = SPA_Bring_subjects_together
	icon = GFX_goal_SPA_carlismodos
	cost = 5
	x = 0
	y = 2
	relative_position_id = SPA_Spanish_subjects

	prerequisite = { focus = SPA_Spanish_subjects }	

	available = {
		SNT = {
		exists = yes
		is_subject_of = SPR
		}
		NAP = {
		exists = yes
		is_subject_of = SPR
		}  
		ATH = {
		exists = yes
		is_subject_of = SPR
		}  

	}

	available_if_capitulated = yes

	completion_reward = {
		add_political_power = 50
		SNT = {
		add_opinion_modifier = { target = SPR modifier = good_netherlands }
		}
		NAP = {
		add_opinion_modifier = { target = SPR modifier = good_naples }
		}
		ATH = {
		add_opinion_modifier = { target = SPR modifier = good_athens } 
		}
	}
}


	focus = {
	id = SPA_inquisition
	icon = GFX_SPA_spanish_inquisition
	cost = 5
	x = 14
	y = 1
	relative_position_id = SPA_the_will_to_empire

	prerequisite = { focus = SPA_the_will_to_empire }	

	available = { 
		has_completed_focus = SPA_the_will_to_empire
	}

	available_if_capitulated = yes

	completion_reward = {
		add_ideas = SPA_inquisicion
		
	}
	}

	focus = {
	id = SPA_scandinavia
	icon = GFX_focus_generic_nordic_territory
	cost = 5
	x = 4
	y = 2
	relative_position_id = SPA_look_towards_asia

	prerequisite = { focus = SPA_inquisition }	

	available = { 
		has_completed_focus = SPA_inquisition
	}

	available_if_capitulated = yes

	completion_reward = {
	custom_effect_tooltip = SPA_scandinavia_tt	
		
	}
	}

	focus = {
	id = SPA_attack_denmark
	icon = GFX_focus_generic_attack_denmark
	cost = 5
	x = -1
	y = 1
	relative_position_id = SPA_scandinavia

	prerequisite = { focus = SPA_scandinavia }	

	bypass = {
		OR = {
		if = {
			DEN = {
				exists = no
			}
		}
			DEN = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}
		}
		AND = {
		OR = {
		if = {
			ICE = {
				exists = no
			}
		}
			ICE = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}
		}
		}

	}

	available_if_capitulated = yes

	completion_reward = {
		if = {
			limit = {
			DEN = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = DEN
				generator = { 37 }
				expire = 0
			}
		}
		if = {
			limit = {
			ICE = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = ICE
				generator = { 100 }
				expire = 0
			}
		}
	}
	}

	focus = {
	id = SPA_attack_sweden
	icon = GFX_focus_generic_attack_sweden
	cost = 5
	x = -3
	y = 1
	relative_position_id = SPA_scandinavia

	prerequisite = { focus = SPA_scandinavia }	

	bypass = {
		OR = {
		if = {
			SWE = {
				exists = no
			}
		}
			SWE = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}

	available = { 
	}

	available_if_capitulated = yes

	completion_reward = {
		if = {
			limit = {
			SWE = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = SWE
				generator = { 141 }
				expire = 0
			}
		}
	}
	}

	focus = {
	id = SPA_attack_norway
	icon = GFX_focus_generic_attack_norway
	cost = 5
	x = -4
	y = 2
	relative_position_id = SPA_scandinavia

	prerequisite = { focus = SPA_scandinavia }	

	bypass = {
		OR = {
		if = {
			NOR = {
				exists = no
			}
		}
			NOR = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}

	available = { 
	}
	available_if_capitulated = yes

	completion_reward = {
		if = {
			limit = {
			NOR = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = NOR
				generator = { 110 }
				expire = 0
			}
		}
	}
	}

	focus = {
	id = SPA_attack_finland
	icon = GFX_focus_generic_attack_finland
	cost = 5
	x = 0
	y = 2
	relative_position_id = SPA_scandinavia

	prerequisite = { focus = SPA_scandinavia }	
	bypass = {
		OR = {
		if = {
			FIN = {
				exists = no
			}
		}
			FIN = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}
	available = { 
	}

	available_if_capitulated = yes

	completion_reward = {
		if = {
			limit = {
			FIN = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = FIN
				generator = { 111 }
				expire = 0
			}
		}
	}
	}


	focus = {
	id = SPA_look_towards_asia
	icon = GFX_focus_usa_focus_on_asia
	cost = 5
	x = -1
	y = 4
	relative_position_id = SPA_inquisition
	prerequisite = { focus = SPA_inquisition }
	prerequisite = { focus = SPA_pardon_socialist_generals }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
	custom_effect_tooltip =  SPA_focus_on_china_tt
	custom_effect_tooltip =  SPA_focus_on_japan_tt
	custom_effect_tooltip =  SPA_focus_on_persia_tt
	custom_effect_tooltip =  SPA_focus_on_middle_east_tt

	}
	}

	focus = {
	id = SPA_unify_china
	icon = GFX_focus_chi_one_china_policy
	cost = 5
	x = -2
	y = 1
	relative_position_id = SPA_look_towards_asia

	prerequisite = { focus = SPA_look_towards_asia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
		if = {
			limit = {
			CHI = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = CHI
				generator = { 613 }
				expire = 0
			}
		}
		if = {
			limit = {
			GXC = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = GXC
				generator = { 594 }
				expire = 0
			}
		}
		if = {
			limit = {
			YUN = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = YUN
				generator = { 325 }
				expire = 0
			}
		}
		if = {
			limit = {
			XSM = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = XSM
				generator = { 754 }
				expire = 0
			}
		}
		if = {
			limit = {
			VIN = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = VIN
				generator = { 671 }
				expire = 0
			}
		}
		if = {
			limit = {
			LAO = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = LAO
				generator = { 670 }
				expire = 0
			}
		}
		if = {
			limit = {
			PRC = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = PRC
				generator = { 622 }
				expire = 0
			}
		}
		if = {
			limit = {
			SIK = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = SIK
				generator = { 287 }
				expire = 0
			}
		}
		if = {
			limit = {
			CAM = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = CAM
				generator = { 741 }
				expire = 0
			}
		}
		if = {
			limit = {
			SHX = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = SHX
				generator = { 615 }
				expire = 0
			}
		}
		if = {
			limit = {
			MEN = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = MEN
				generator = { 611 }
				expire = 0
			}

		}
		if = {
			limit = {
			TIB = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = TIB
				generator = { 757 }
				expire = 0
			}

		}
		if = {
			limit = {
			MON = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = MON
				generator = { 330 }
				expire = 0
			}

		}
	}
	}

	focus = {
	id = SPA_attack_japan
	icon = GFX_focus_AST_war_japan
	cost = 5
	x = -1
	y = 2
	relative_position_id = SPA_look_towards_asia
	prerequisite = { focus = SPA_look_towards_asia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	bypass = {
		OR = {
		if = {
			KOR = {
				exists = no
			}
		}
			KOR = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}
		}
		AND = {
		OR = {
		if = {
			JAP = {
				exists = no
			}
		}
			JAP = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}
		}
		}

	}
	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
		create_wargoal = {
				type = take_state_focus
				target = JAP
				generator = { 525 }
				expire = 0
			}
		if = {
			limit = {
			KOR = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = KOR
				generator = { 532 }
				expire = 0
			}
		}

	}
	}

	focus = {
	id = SPA_guardian_of_the_mediterranean
	icon = GFX_SPA_guardian_of_the_mediterranean
	cost = 7.2
	x = -2
	y = 1
	relative_position_id = SPA_inquisition

		prerequisite = {
			 focus = SPA_inquisition
			  }

	available = {

		custom_trigger_tooltip = {
		tooltip = SPA_guardian_of_the_mediterranean_tt

		has_full_control_of_state = 290
		has_full_control_of_state = 461   
		has_full_control_of_state = 462  
		has_full_control_of_state = 783
		has_full_control_of_state = 699
		}
		controls_state = 118

		custom_trigger_tooltip = {
		tooltip = SPA_portuguese_resources_tt
		180 ={
		is_controlled_by = SPR
		}
		112 ={
		is_controlled_by = SPR
		}
		181 ={
		is_controlled_by = SPR
		}
		795 ={
		is_controlled_by = SPR
		}
		179 ={
		is_controlled_by = SPR
		}
		}

	}

	available_if_capitulated = yes

	completion_reward = {
		add_state_core = 461
		add_state_core = 462
		add_state_core = 783
		add_state_core = 699
		add_state_core = 290
		
	}
}

	focus = {
	id = SPA_Integrate_ecuatiorial_guinea
	icon = GFX_focus_ARG_demand_spanish_compensation
	cost = 5
	x = 0
	y = 1
	relative_position_id = SPA_guardian_of_the_mediterranean

	prerequisite = { focus = SPA_guardian_of_the_mediterranean }	

	available = {

		has_full_control_of_state = 297   

	}

	available_if_capitulated = yes

	completion_reward = {
	297 = {
		add_compliance = 100
	}
			297 = { 
				add_building_construction = {
					type = infrastructure
					level = 3
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 6
			}
		
	}
}

	focus = {
	id = SPA_establish_spanish_africa
	icon = GFX_spanish_africa
	cost = 5
	x = 0
	y = 1
	relative_position_id = SPA_Integrate_ecuatiorial_guinea

	prerequisite = { focus = SPA_Integrate_ecuatiorial_guinea }	

	available = {

		has_full_control_of_state = 297   

	}

	available_if_capitulated = yes

	completion_reward = {
	custom_effect_tooltip =  SPA_spanishafrica_tt
		
	}
}

	focus = {
	id = SPA_develop_african_posessions
	icon = GFX_focus_CONGO_gold_and_diamonds
	cost = 10
	x = -2
	y = 1
	relative_position_id = SPA_Integrate_ecuatiorial_guinea

	prerequisite = { focus = SPA_Integrate_ecuatiorial_guinea }	

	available = {

		has_full_control_of_state = 290
		has_full_control_of_state = 461
		has_full_control_of_state = 462
		has_full_control_of_state = 783
		has_full_control_of_state = 699

	}

	available_if_capitulated = yes

	completion_reward = {
			290 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 4
			}
			461 = { 
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 4
			}
			699 = { 
				add_extra_state_shared_building_slots = 4
			}

	}
}

	focus = {
	id = SPA_putdown_the_islamic_threat
	icon = GFX_focus_generic_attack_turkey
	cost = 5
	x = 1
	y = 1
	relative_position_id = SPA_inquisition
	bypass = {
		OR = {
		if = {
			TUR = {
				exists = no
			}
		}
			TUR = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}
	prerequisite = { focus = SPA_inquisition }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
		NOT = { is_in_faction_with = TUR }
	}

	available_if_capitulated = yes
	completion_reward = {
		create_wargoal = {
				type = take_state_focus
				target = TUR
				generator = { 118 }
				expire = 0
			}

	}
	}

	focus = {
	id = SPA_focus_on_middle_east
	icon = GFX_focus_ETH_an_arabic_base
	cost = 5
	x = 0
	y = 1
	relative_position_id = SPA_look_towards_asia
	prerequisite = { focus = SPA_look_towards_asia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
		if = {
			limit = {
			SAU = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = SAU
				generator = { 292 }
				expire = 0
			}
		}
		if = {
			limit = {
			KUW = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = KUW
				generator = { 656 }
				expire = 0
			}
		}
		if = {
			limit = {
			FSA = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = FSA
				generator = { 992 }
				expire = 0
			}
		}
		if = {
			limit = {
			OMA = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = OMA
				generator = { 294 }
				expire = 0
			}
		}
		if = {
			limit = {
			IRQ = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = IRQ
				generator = { 291 }
				expire = 0
			}
		}
		if = {
			limit = {
			YEM = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = YEM
				generator = { 293 }
				expire = 0
			}
		}
		if = {
			limit = {
			IMO = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = IMO
				generator = { 294 }
				expire = 0
			}
		}

		if = {
			limit = {
			BHR = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = BHR
				generator = { 1014 }
				expire = 0
			}
		}
		if = {
			limit = {
			QAT = {
			exists = yes
			}
			}
		create_wargoal = {
				type = take_state_focus
				target = QAT
				generator = { 765 }
				expire = 0
			}
		}
	}
	}

	focus = {
	id = SPA_go_after_iran
	icon = GFX_focus_generic_attack_iran
	cost = 5
	x = 2
	y = 1
	relative_position_id = SPA_look_towards_asia
	bypass = {
		OR = {
		if = {
			PER = {
				exists = no
			}
		}
			PER = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}
	prerequisite = { focus = SPA_look_towards_asia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
		create_wargoal = {
				type = take_state_focus
				target = PER
				generator = { 118 }
				expire = 0
			}

	}
	}

	focus = {
	id = SPA_go_after_afghanistan
	icon = GFX_focus_generic_attack_afghanistan
	cost = 5
	x = 1
	y = 2
	relative_position_id = SPA_look_towards_asia
	prerequisite = { focus = SPA_look_towards_asia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	bypass = {
		OR = {
		if = {
			AFG = {
				exists = no
			}
		}
			AFG = {
				all_core_state = {
					is_controlled_by = SPA
				}
			}

		}

	}

	available = {
	}

	available_if_capitulated = yes
	completion_reward = {
		create_wargoal = {
				type = take_state_focus
				target = AFG
				generator = { 118 }
				expire = 0
			}

	}
	}


	focus = {
	id = SPA_purify_anatolia
	icon = GFX_National_Catholicism
	cost = 5
	x = 1
	y = 1
	relative_position_id = SPA_putdown_the_islamic_threat
	mutually_exclusive = { focus = SPA_integrate_the_holy_land }
	prerequisite = { focus = SPA_putdown_the_islamic_threat }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		available = {
			custom_trigger_tooltip = {
			tooltip = SPA_purify_anatolia_tt
			TUR = { all_core_state = { is_controlled_by = SPR } }
			controls_state = 353
			controls_state = 350
			controls_state = 800
			controls_state = 352
			}
		}

	available_if_capitulated = yes
	completion_reward = {
	every_state = {
		limit = {
		is_core_of = TUR
		} 
		add_compliance = 50
	}

	}
	}

	focus = {
	id = SPA_establish_spanish_byzantium
	icon =  GFX_focus_TUR_misak_i_milli
	cost = 5
	x = -1
	y = 1
	relative_position_id = SPA_purify_anatolia
	prerequisite = { focus = SPA_purify_anatolia }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {

		custom_trigger_tooltip = {
		tooltip = SPA_establish_spanish_byzantiumgreece_tt
		controls_state = 186
		controls_state = 185
		controls_state = 731
		controls_state = 184
		controls_state = 164
		}

		custom_trigger_tooltip = {
		tooltip = SPA_establish_spanish_byzantiumcyprus_tt
		controls_state = 183
		}

		custom_trigger_tooltip = {
		tooltip = SPA_purify_anatolia_tt
		TUR = { all_core_state = { is_controlled_by = SPR } }
		controls_state = 353
		controls_state = 350
		controls_state = 800
		controls_state = 352
		}

	}

	available_if_capitulated = yes
	completion_reward = {
	effect_tooltip = {
	custom_effect_tooltip = SPA_establish_spanish_byzantiumdecision_tt
	}
	}
	}


	focus = {
	id = SPA_integrate_the_holy_land
	icon = GFX_call_of_god
	cost = 5
	x = -1
	y = 1
	relative_position_id = SPA_putdown_the_islamic_threat
	mutually_exclusive = { focus = SPA_purify_anatolia }
	prerequisite = { focus = SPA_putdown_the_islamic_threat }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
		controls_state = 797
	}

	available_if_capitulated = yes
	completion_reward = {
	set_province_name = { id = 9833 name = "Constantinople"}
	add_state_core = 797
	

	}
	}	

	focus = {
	id = SPA_vivaespana
	icon = GFX_focus_spa_supremacy_of_the_communion
	cost = 10
	x = 0
	y = 1
	relative_position_id = SPA_Bring_subjects_together
	prerequisite = { focus = SPA_Bring_subjects_together }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
		SNT = {
		exists = yes
		is_subject_of = SPR
		}
		NAP = {
		exists = yes
		is_subject_of = SPR
		}
		ATH = {
		exists = yes
		is_subject_of = SPR
		}
	}

	available_if_capitulated = yes
	completion_reward = {
	custom_effect_tooltip = SPA_corenetherlands_tt
	custom_effect_tooltip = SPA_coreathens_tt
	custom_effect_tooltip = SPA_corenaples_tt
	hidden_effect = {
			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {
						is_core_of = SNT
						is_core_of = ATH
						is_core_of = NAP
					}
				}
				add_core_of = SPR
			}	
				annex_country= {
					target = SNT
					transfer_troops = yes
					}	
				annex_country= {
					target = NAP
					transfer_troops = yes
					}	
				annex_country= {
					target = ATH
					transfer_troops = yes
					}	
	}
	}
	}

	focus = {
	id = SPA_horadelavenganza
	icon = GFX_goal_generic_attack_allies
	cost = 5
	x = 0
	y = 1
	relative_position_id = SPA_vivaespana
	prerequisite = { focus = SPA_vivaespana }
	prerequisite = { focus = SPA_integrate_benelux_generals }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

	available = {
		NOT = { is_in_faction_with = ENG }
		NOT = { is_in_faction_with = SOV }
	}

	available_if_capitulated = yes
	completion_reward = {
		create_wargoal = {
				type = take_state_focus
				target = ENG
				generator = { 118 }
				expire = 0
			}
		create_wargoal = {
				type = take_state_focus
				target = SOV
				generator = { 118 }
				expire = 0
			}
	custom_effect_tooltip = SPA_horadelavenganzabrit_tt
	custom_effect_tooltip = SPA_horadelavenganzaoce_tt
	custom_effect_tooltip = SPA_horadelavenganzaind_tt
	custom_effect_tooltip = SPA_horadelavenganzasov_tt
	}
	}

	focus = {
		id = SPA_expand_the_requetes
		available = {
			custom_trigger_tooltip = {
			    tooltip = SPA_the_crusade_against_democracy_timer_tt
			   	NOT = { has_country_flag = SPA_the_crusade_against_democracy_timer_flag }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_crusade_against_democracy }
		prerequisite = { focus = SPA_no_compromise_on_carlist_ideals }
		
		icon = GFX_goal_generic_small_arms
		x = -1
		y = 1
		relative_position_id = SPA_the_crusade_against_democracy
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			set_country_flag = { flag = SPA_the_crusade_against_democracy_timer_flag value = 1 days = 69 }
			if = {
				limit = {
					NOT = {
						has_idea = SPA_crusade_against_democracy_1
						has_idea = SPA_crusade_against_democracy_4
						has_idea = SPA_crusade_against_democracy_5
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_crusade_against_democracy_1
						add_idea = SPA_crusade_against_democracy_2
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_1
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_1
					add_idea = SPA_crusade_against_democracy_2
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_4
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_4
					add_idea = SPA_crusade_against_democracy_6
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_5
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_5
					add_idea = SPA_crusade_against_democracy_8
				}
			}
		}
	}

	focus = {
		id = SPA_militarize_the_masses
		available = {
			custom_trigger_tooltip = {
			    tooltip = SPA_the_crusade_against_democracy_timer_tt
			   	NOT = { has_country_flag = SPA_the_crusade_against_democracy_timer_flag }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_expand_the_requetes }
		
		icon = GFX_goal_generic_axis_build_infantry
		x = 0
		y = 1
		relative_position_id = SPA_expand_the_requetes
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			set_country_flag = { flag = SPA_the_crusade_against_democracy_timer_flag value = 1 days = 69 }
			if = {
				limit = {
					NOT = {
						has_idea = SPA_crusade_against_democracy_2
						has_idea = SPA_crusade_against_democracy_6
						has_idea = SPA_crusade_against_democracy_8
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_crusade_against_democracy_2
						add_idea = SPA_crusade_against_democracy_3
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_2
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_2
					add_idea = SPA_crusade_against_democracy_3
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_6
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_6
					add_idea = SPA_crusade_against_democracy_7
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_8
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_8
					add_idea = SPA_crusade_against_democracy_9
				}
			}
		}
	}

	focus = {
		id = SPA_defenders_of_catholicism
		available = {
			custom_trigger_tooltip = {
			    tooltip = SPA_the_crusade_against_democracy_timer_tt
			   	NOT = { has_country_flag = SPA_the_crusade_against_democracy_timer_flag }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_crusade_against_democracy }
		
		icon = GFX_goal_generic_defence
		x = 1
		y = 1
		relative_position_id = SPA_the_crusade_against_democracy
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			set_country_flag = { flag = SPA_the_crusade_against_democracy_timer_flag value = 1 days = 69 }
			if = {
				limit = {
					NOT = {
						has_idea = SPA_crusade_against_democracy_1
						has_idea = SPA_crusade_against_democracy_2
						has_idea = SPA_crusade_against_democracy_3
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_crusade_against_democracy_1
						add_idea = SPA_crusade_against_democracy_4
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_1
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_1
					add_idea = SPA_crusade_against_democracy_4
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_2
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_2
					add_idea = SPA_crusade_against_democracy_6
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_3
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_3
					add_idea = SPA_crusade_against_democracy_7
				}
			}
		}
	}

	focus = {
		id = SPA_battle_rites
		available = {
			custom_trigger_tooltip = {
			    tooltip = SPA_the_crusade_against_democracy_timer_tt
			   	NOT = { has_country_flag = SPA_the_crusade_against_democracy_timer_flag }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_defenders_of_catholicism }
		
		icon = GFX_goal_generic_attack_allies

		x = 0
		y = 1
		relative_position_id = SPA_defenders_of_catholicism
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			set_country_flag = { flag = SPA_the_crusade_against_democracy_timer_flag value = 1 days = 69 }
			if = {
				limit = {
					NOT = {
						has_idea = SPA_crusade_against_democracy_4
						has_idea = SPA_crusade_against_democracy_6
						has_idea = SPA_crusade_against_democracy_7
					}
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_crusade_against_democracy_4
						add_idea = SPA_crusade_against_democracy_5
					}
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_4
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_4
					add_idea = SPA_crusade_against_democracy_5
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_6
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_6
					add_idea = SPA_crusade_against_democracy_8
				}
			}
			if = {
				limit = {
					has_idea = SPA_crusade_against_democracy_7
				}
				swap_ideas = {
					remove_idea = SPA_crusade_against_democracy_7
					add_idea = SPA_crusade_against_democracy_9
				}
			}
		}
	}

	focus = {
		id = SPA_cultivate_fanaticism
		available = {
			custom_trigger_tooltip = {
			    tooltip = SPA_the_crusade_against_democracy_timer_tt
			   	NOT = { has_country_flag = SPA_the_crusade_against_democracy_timer_flag }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_militarize_the_masses }
		prerequisite = { focus = SPA_battle_rites }
		
		icon = GFX_goal_generic_secret_weapon
		x = 1
		y = 1
		relative_position_id = SPA_militarize_the_masses
		cost = 20

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPA_crusade_against_democracy_9
				add_idea = SPA_crusade_against_democracy_10
			}
			if = { 
				limit = {
					has_dlc = "Waking the Tiger"
				}
				custom_effect_tooltip = cost_reduced_last_stand 
			}
		}
	}

	focus = {
		id = SPA_the_third_dimension_of_warfare
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_crusade_against_democracy }
		prerequisite = { focus = SPA_arms_modernization }
		
		icon = GFX_goal_generic_air_doctrine
		x = 3
		y = 1
		relative_position_id = SPA_the_crusade_against_democracy
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			air_experience = 25
			add_doctrine_cost_reduction = {
				name = SPA_the_third_dimension_of_warfare
				cost_reduction = 0.5
				uses = 2
				category = air_doctrine
			}
		}
	}

	focus = {
		id = SPA_a_modern_fighter_fleet
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_third_dimension_of_warfare }
		
		icon = GFX_goal_generic_air_fighter
		x = 0
		y = 1
		relative_position_id = SPA_the_third_dimension_of_warfare
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			air_experience = 50
			add_tech_bonus = {
				name = SPA_a_modern_fighter_fleet
				bonus = 1.0
				uses = 2
				category = light_fighter
				category = cat_heavy_fighter
			}
		}
	}

	focus = {
		id = SPA_confirm_the_fueros
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_no_compromise_on_carlist_ideals }
		
		icon = GFX_focus_generic_treaty
		x = -1
		y = 1
		relative_position_id = SPA_no_compromise_on_carlist_ideals
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.1
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
			}
		}
	}

	focus = {
		id = SPA_encourage_local_industrialization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_confirm_the_fueros }
		
		icon = GFX_goal_generic_construct_civ_factory
		x = -1
		y = 1
		relative_position_id = SPA_confirm_the_fueros
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_encourage_local_industrialization_1civ }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_encourage_local_industrialization
				bonus = 1.0
				uses = 1
				category = industry
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_encourage_local_industrialization_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_encourage_local_industrialization_1civ }
				}
				set_state_flag = SPA_encourage_local_industrialization_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_encourage_local_industrialization_1civ }
				}
				set_state_flag = SPA_encourage_local_industrialization_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_encourage_local_mining
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_encourage_local_industrialization }
		
		icon = GFX_goal_generic_construction2
		x = 0
		y = 1
		relative_position_id = SPA_encourage_local_industrialization
		cost = 10

		available_if_capitulated = yes
		search_filters = {}
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_encourage_local_mining_1inf }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					OR = {
						state = 792
						state = 166
						state = 173
						state = 788
						state = 791
						state = 171
						state = 170
						state = 41
					}
				}
				set_state_flag = SPA_encourage_local_mining_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_encourage_local_mining_1inf }
					OR = {
						state = 792
						state = 166
						state = 173
						state = 788
						state = 791
						state = 171
						state = 170
						state = 41
					}
				}
				set_state_flag = SPA_encourage_local_mining_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPA_settle_the_succession_question
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_confirm_the_fueros }
		
		icon = GFX_goal_generic_forceful_treaty
		x = 1
		y = 2
		relative_position_id = SPA_confirm_the_fueros
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_stability = 0.1
			country_event = { id = lar_spain.34 }
		}
	}

	focus = {
		id = SPA_dios_patria_rey
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_settle_the_succession_question }
		
		icon = GFX_goal_generic_national_unity
		x = 3
		y = 1
		relative_position_id = SPA_settle_the_succession_question
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_stability = 0.05
			add_war_support = 0.05
			swap_ideas = {
				remove_idea = SPA_recovering_from_civil_war
				add_idea = SPA_recovering_from_civil_war_2
			}
		}
	}

	focus = {
		id = SPA_restore_the_empire
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_dios_patria_rey }
		
		icon =  GFX_goal_generic_demand_territory
		x = 0
		y = 1
		relative_position_id = SPA_dios_patria_rey
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_restore_the_empire_1mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_restore_the_empire_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_restore_the_empire_1mil }
				}
				set_state_flag = SPA_restore_the_empire_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_restore_the_empire_1mil }
				}
				set_state_flag = SPA_restore_the_empire_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_strengthen_the_empire
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_restore_the_empire }
		
		icon =  GFX_goal_generic_demand_territory
		x = -2
		y = 1
		relative_position_id = SPA_restore_the_empire
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_restore_the_empire_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_restore_the_empire_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_restore_the_empire_2civ }
				}
				set_state_flag = SPA_restore_the_empire_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_prosperity_of_the_empire
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_strengthen_the_empire }
		
		icon =  GFX_goal_generic_demand_territory
		x = 0
		y = 1
		relative_position_id = SPA_strengthen_the_empire
		cost = 10

		available_if_capitulated = yes

		search_filters = {}
		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPA_prosperity_of_the_empire_1inf }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPA_prosperity_of_the_empire_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_prosperity_of_the_empire_1inf }
				}
				set_state_flag = SPA_prosperity_of_the_empire_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_prosperity_of_the_empire_1inf }
				}
				set_state_flag = SPA_prosperity_of_the_empire_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_press_the_gibraltar_claim
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_restore_the_empire }
		
		icon = GFX_focus_attack_britain
		x = -1
		y = 3
		relative_position_id = SPA_restore_the_empire
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			create_wargoal = {
				type = take_state_focus
				target = ENG
				generator = { 118 }
				expire = 0
			}
		}
	}

	focus = {
		id = SPA_claim_the_french_throne
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_restore_the_empire }
		
		icon = GFX_focus_chi_reach_out_to_france
		x = 0
		y = 1
		relative_position_id = SPA_restore_the_empire
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					FRA = {
						has_completed_focus = FRA_the_legitimate_heir
					}
				}
				FRA = { country_event = { id = lar_spain.42 hours = 6 random_hours = 6 } }
			}
			else = {
				create_wargoal = {
					type = annex_everything
					target = FRA
				}
			}
		}
	}

	focus = {
		id = SPA_retake_the_spanish_netherlands
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_claim_the_french_throne }
		
		icon = GFX_goal_generic_occupy_states_ongoing_war
		x = 0
		y = 1
		relative_position_id = SPA_claim_the_french_throne
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			create_wargoal = {
			    type = annex_everything
			    target = HOL
			    expire = 0
			}
			create_wargoal = {
			    type = annex_everything
			    target = BEL
			    expire = 0
			}
			create_wargoal = {
			    type = annex_everything
			    target = LUX
			    expire = 0
			}
		}
	}

	focus = {
		id = SPA_restore_the_iberian_union
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_restore_the_empire }
		
		icon = GFX_focus_generic_befriend_portugal
		x = 1
		y = 3
		relative_position_id = SPA_restore_the_empire
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			POR = { country_event = { id = lar_spain.45 hours = 6 random_hours = 6 } }
		}
	}

	focus = {
		id = SPA_the_war_of_vengeance
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_press_the_gibraltar_claim }
		prerequisite = { focus = SPA_restore_the_iberian_union }
		
		icon = GFX_focus_spa_the_war_of_vengeance
		x = 1
		y = 1
		relative_position_id = SPA_press_the_gibraltar_claim
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			create_wargoal = {
			    type = take_state_focus
			    target = USA
			    generator = { 378 379 380 377 376 375 }
			    expire = 0
			}
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = PHI
			    expire = 0
			}
			create_wargoal = {
			    type = annex_everything
			    target = CUB
			    expire = 0
			}
		}
	}

	focus = {
		id = SPA_found_the_academia_vazquez_de_mella
		available = {
			num_of_factories > 50
		}
		bypass = {
		}
		prerequisite = { focus = SPA_dios_patria_rey }
		
		icon = GFX_focus_research2
		x = 2
		y = 1
		relative_position_id = SPA_dios_patria_rey
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPA_a_fleet_worthy_of_a_king
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_restore_the_empire }
		
		icon = GFX_goal_generic_construct_naval_dockyard
		x = 3
		y = 1
		relative_position_id = SPA_restore_the_empire
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPA_a_fleet_worthy_of_a_king_3DY }
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 25
			add_tech_bonus = {
				name = SPA_a_fleet_worthy_of_a_king
				bonus = 1
				uses = 1
				category = dd_tech
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_a_fleet_worthy_of_a_king_3DY
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPA_a_fleet_worthy_of_a_king_3DY }
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
				set_state_flag = SPA_a_fleet_worthy_of_a_king_3DY
			}
		}
	}

	focus = {
		id = SPA_rebuild_the_battlefleet
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_a_fleet_worthy_of_a_king }
		
		icon = GFX_goal_generic_navy_battleship
		x = 0
		y = 1
		relative_position_id = SPA_a_fleet_worthy_of_a_king
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_ideas = SPA_rebuild_the_battlefleet
			add_tech_bonus = {
				name = SPA_rebuild_the_battlefleet
				bonus = 1
				uses = 2
				category = bb_tech
			}
		}
	}

	focus = {
		id = SPA_imperial_security
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_rebuild_the_battlefleet }
		
		icon = GFX_goal_generic_navy_doctrines_tactics
		x = 0
		y = 1
		relative_position_id = SPA_rebuild_the_battlefleet
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 50
			add_tech_bonus = {
				name = SPA_imperial_security
				bonus = 1
				uses = 2
				category = cl_tech
				category = ca_tech
			}
			add_doctrine_cost_reduction = {
				name = SPA_imperial_security
				cost_reduction = 0.5
				uses = 1
				category = naval_doctrine
			}
		}
	}


###  ### ###  #  # ###  #   ###  ##   ##  #  #  ##             ##  #  #  ##  ###   ##  #  # ###  ## ###  ## 
#  # #   #  # #  # #  # #    #  #  # #  # ## # #              #  # ## # #  # #  # #  # #  #  #  #    #  #   
###  ##  ###  #  # ###  #    #  #    #### # ##  #      ##     #### # ## #### ###  #    ####  #   #   #   #  
#  # #   #    #  # #  # #    #  #  # #  # #  #   #            #  # #  # #  # #  # #  # #  #  #    #  #    # 
#  # ### #     ##  ###  ### ###  ##  #  # #  # ##             #  # #  # #  # #  #  ##  #  # ### ##   #  ##  

	focus = {
		id = SPR_regional_defense_council_of_aragon
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_disband_the_army }
		mutually_exclusive = { focus = SPR_the_anti_fascist_workers_revolution focus = SPR_maintain_the_second_republic }
		
		icon = GFX_focus_spr_regional_defense_council_of_aragon
		x = -11
		y = 1
		relative_position_id = SPR_disband_the_army
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL}
		completion_reward = {
			create_field_marshal = {
				name = "Buenaventura Durruti"
				gfx = "GFX_portrait_SPR_buenaventura_durruti"
				traits = { infantry_officer offensive_doctrine aggressive_assaulter }
				skill = 3
			    attack_skill = 3
			    defense_skill = 3
			    planning_skill = 2
			    logistics_skill = 2
			}
			create_corps_commander = {
				name = "Eduardo Medrano Rivas"
				gfx = "GFX_portrait_SPR_eduardo_medrano_rivas"
				traits = { infantry_leader }
				skill = 3
			    attack_skill = 3
			    defense_skill = 2
			    planning_skill = 2
			    logistics_skill = 3
			}
			create_corps_commander = {
				name = "Lina Ódena"
				gfx = "GFX_portrait_SPR_lina_odena"
				traits = { adaptable }
				female = yes
				skill = 2
			    attack_skill = 2
			    defense_skill = 2
			    planning_skill = 2
			    logistics_skill = 1
			}
			create_corps_commander = {
				name = "Cipriano Mera"
				gfx = "GFX_portrait_SPR_cipriano_mera"
				traits = { trait_cautious }
				skill = 2
			    attack_skill = 1
			    defense_skill = 2
			    planning_skill = 2
			    logistics_skill = 2
			}
			add_stability = -0.1
			add_war_support = 0.1
			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}
			add_ideas = SPR_anarchist_society_1
			activate_mission = SPR_government_crackdown_mission
		}
	}

	focus = {
		id = SPR_appropriate_the_means_of_production
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_regional_defense_council_of_aragon }
		
		icon = GFX_focus_generic_support_the_left_right
		x = -1
		y = 1
		relative_position_id = SPR_regional_defense_council_of_aragon
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			swap_ideas = {
				remove_idea = SPR_anarchist_society_1
				add_idea = SPR_anarchist_society_2
			}
		}
	}

	focus = {
		id = SPR_autogestion
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_appropriate_the_means_of_production }
		
		icon = GFX_goal_generic_production
		x = -1
		y = 1
		relative_position_id = SPR_appropriate_the_means_of_production
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_2
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_2
					add_idea = SPR_anarchist_society_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_5
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_5
					add_idea = SPR_anarchist_society_6
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_8
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_8
					add_idea = SPR_anarchist_society_9
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_11
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_11
					add_idea = SPR_anarchist_society_12
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_13
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_13
					add_idea = SPR_anarchist_society_14
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_2
						add_idea = SPR_anarchist_society_3
					}
				}
			}
		}
	}

	focus = {
		id = SPR_collectivization_and_workers_control
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_autogestion }
		prerequisite = { focus = SPR_seize_public_transport }
		prerequisite = { focus = SPR_agrarian_collectivization }
		
		icon = GFX_focus_eng_concessions_to_the_trade_unions
		x = 0
		y = 2
		relative_position_id = SPR_autogestion
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_3
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_3
					add_idea = SPR_anarchist_society_4
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_6
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_6
					add_idea = SPR_anarchist_society_7
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_9
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_9
					add_idea = SPR_anarchist_society_10
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_12
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_12
					add_idea = SPR_anarchist_society_15
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_14
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_14
					add_idea = SPR_anarchist_society_16
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_3
						add_idea = SPR_anarchist_society_4
					}
				}
			}
		}
	}

	focus = {
		id = SPR_arm_the_people
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_regional_defense_council_of_aragon }
		
		icon = GFX_goal_generic_military_sphere
		x = 1
		y = 1
		relative_position_id = SPR_regional_defense_council_of_aragon
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.1
			swap_ideas = {
				remove_idea = SPR_disbanded_army_1
				add_idea = SPR_disbanded_army_2
			}
		}
	}

	focus = {
		id = SPR_the_maximum_concession
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = scw_over
				tag = SPC
			}
		}
		prerequisite = { focus = SPR_appropriate_the_means_of_production }
		prerequisite = { focus = SPR_arm_the_people }
		
		icon =  GFX_focus_generic_concessions
		x = 1
		y = 1
		relative_position_id = SPR_appropriate_the_means_of_production
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPR_the_maximum_concession
			add_days_mission_timeout = {
				mission = SPR_government_crackdown_mission
				days = 70
			}
		}
	}

	focus = {
		id = SPR_seize_public_transport
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_the_maximum_concession }
		
		icon = GFX_goal_generic_army_motorized
		x = -1
		y = 1
		relative_position_id = SPR_the_maximum_concession
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPR_anarchist_public_transport
			custom_effect_tooltip = SPR_seize_public_transport_tt
		}
	}

	focus = {
		id = SPR_agrarian_collectivization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_maximum_concession }
		
		icon = GFX_goal_generic_national_unity
		x = 1
		y = 1
		relative_position_id = SPR_the_maximum_concession
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_2
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_2
					add_idea = SPR_anarchist_society_5
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_5
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_5
					add_idea = SPR_anarchist_society_8
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_3
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_3
					add_idea = SPR_anarchist_society_6
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_6
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_6
					add_idea = SPR_anarchist_society_9
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_4
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_4
					add_idea = SPR_anarchist_society_7
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_7
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_7
					add_idea = SPR_anarchist_society_10
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_2
						add_idea = SPR_anarchist_society_5
					}
				}
			}
		}
	}

	focus = {
		id = SPR_mujeres_libres
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_seize_public_transport }
		prerequisite = { focus = SPR_agrarian_collectivization }
		
		icon = GFX_goal_generic_improve_relations
		x = 1
		y = 1
		relative_position_id = SPR_seize_public_transport
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_5
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_5
					add_idea = SPR_anarchist_society_11
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_8
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_8
					add_idea = SPR_anarchist_society_13
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_6
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_6
					add_idea = SPR_anarchist_society_12
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_9
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_9
					add_idea = SPR_anarchist_society_14
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_7
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_7
					add_idea = SPR_anarchist_society_15
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_10
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_10
					add_idea = SPR_anarchist_society_16
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_5
						add_idea = SPR_anarchist_society_11
					}
				}
			}
		}
	}

	focus = {
		id = SPR_literacy_programs
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_collectivization_and_workers_control }
		prerequisite = { focus = SPR_mujeres_libres }
		
		icon = GFX_focus_research
		x = 1
		y = 1
		relative_position_id = SPR_collectivization_and_workers_control
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_shared_burdens
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_arm_the_people }
		prerequisite = { focus = SPR_appropriate_the_means_of_production }
		
		icon = GFX_goal_generic_consumer_goods
		x = 1
		y = 1
		relative_position_id = SPR_arm_the_people
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_2
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_2
					add_idea = SPR_anarchist_society_5
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_5
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_5
					add_idea = SPR_anarchist_society_8
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_3
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_3
					add_idea = SPR_anarchist_society_6
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_6
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_6
					add_idea = SPR_anarchist_society_9
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_4
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_4
					add_idea = SPR_anarchist_society_7
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_7
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_7
					add_idea = SPR_anarchist_society_10
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_15
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_15
					add_idea = SPR_anarchist_society_16
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_17
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_17
					add_idea = SPR_anarchist_society_18
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_18
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_18
					add_idea = SPR_anarchist_society_19
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_2
						add_idea = SPR_anarchist_society_5
					}
				}
			}
		}
	}

	focus = {
		id = SPR_international_brigades
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_arm_the_people focus = SPR_arm_the_workers_militias }
		
		icon = GFX_goal_generic_allies_build_infantry
		x = 4
		y = 1
		relative_position_id = SPR_arm_the_people
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			if = {
				limit = {
					has_completed_focus = SPR_the_anti_fascist_workers_revolution
					has_character = SPR_mate_zalka
				}
				custom_effect_tooltip = SPR_international_brigades_tt
			}
			else_if = {
				limit = {
					has_completed_focus = SPR_the_anti_fascist_workers_revolution
					NOT = {
						has_character = SPR_mate_zalka
					}
				}
				create_field_marshal = {
					name = "Máté Zalka"
					gfx = "GFX_portrait_SPR_mate_zalka"
					traits = {  }
					skill = 2
				    attack_skill = 2
				    defense_skill = 1
				    planning_skill = 2
				    logistics_skill = 2
				}
			}
			add_ideas = SPR_international_brigades
			custom_effect_tooltip = SPR_seize_public_transport_tt
		}
	}

	focus = {
		id = SPR_seize_the_gold_reserves
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = scw_over
				has_global_flag = SPR_anarchist_uprising_flag
				has_global_flag = SPR_gold_reserves_flag
			}
		}
		prerequisite = { focus = SPR_the_maximum_concession focus = SPR_hinder_nkvd_interference }
		
		icon = GFX_focus_usa_reestablish_the_gold_standard
		x = 5
		y = 1
		relative_position_id = SPR_the_maximum_concession
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_timed_idea = { idea = SPR_seized_gold_reserves  days = 730 }
			set_global_flag = SPR_gold_reserves_flag
		}
	}

	focus = {
		id = SPR_foreign_arms_purchases
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_seize_the_gold_reserves }
		
		icon = GFX_goal_generic_small_arms
		x = -2
		y = 1
		relative_position_id = SPR_seize_the_gold_reserves
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_foreign_arms_purchases_tt
		}
	}

	focus = {
		id = SPR_masters_of_our_own_fate
		available = {
		}
		bypass = {
			OR = {
				has_war_with = SPD
				has_global_flag = SPR_anarchist_uprising_flag
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPR_seize_the_gold_reserves }
		
		icon = GFX_focus_spr_masters_of_our_own_fate
		x = 0
		y = 1
		relative_position_id = SPR_seize_the_gold_reserves
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			effect_tooltip = {
				if = {
					limit = {
						has_completed_focus = SPR_regional_defense_council_of_aragon
					}
					set_politics = {
						ruling_party = neutrality
					}
					set_party_name = { ideology = communism long_name = SPR_communism_independent_party_long name = SPR_communism_independent_party }
					create_country_leader = {
						name = "Julián Gorkin"
						desc = "POLITICS_JULIAN_GORKIN_DESC"
						picture = "GFX_portrait_SPR_julian_gorkin"
						expire = "1965.1.1"
						ideology = anarchist_communism
						traits = {
							militant_socialist
						}
					}
					create_country_leader = {
						name = "Anarchist Commune"
						desc = "POLITICS_ANARCHIST_COMMUNE_DESC"
						picture = "GFX_portrait_SPR_anarchist_commune"
						expire = "1965.1.1"
						ideology = anarchism
						traits = {
							our_right_to_survive
						}
					}
					add_popularity = {
					    ideology = fascism
					    popularity = -1
					}
					add_popularity = {
					    ideology = communism
					    popularity = -0.25
					}
					if = {
						limit = {
							democratic > 0.01
						}
						set_political_party = {
						    ideology = democratic
						    popularity = 1
						}
					}
				}
				if = {
					limit = {
						has_completed_focus = SPR_the_anti_fascist_workers_revolution
					}
					set_politics = {
						ruling_party = communism
					}
					set_party_name = { ideology = communism long_name = SPR_communism_independent_party_long name = SPR_communism_independent_party }
					create_country_leader = {
						name = "Julián Gorkin"
						desc = "POLITICS_JULIAN_GORKIN_DESC"
						picture = "GFX_portrait_SPR_julian_gorkin"
						expire = "1965.1.1"
						ideology = anarchist_communism
						traits = {
							militant_socialist
						}
					}
					create_field_marshal = {
						name = "José Rovira"
						portrait_path = GFX_portrait_Jose_Rovira
						traits = { infantry_officer politically_connected }
						skill = 3
					    attack_skill = 2
					    defense_skill = 2
					    planning_skill = 2
					    logistics_skill = 3
					}
					create_corps_commander = {
						name = "Carmel Rosa Baserba"
						portrait_path = GFX_portrait_Carmel_Rosa_Baserba
						traits = { trait_cautious infantry_officer }
						skill = 3
					    attack_skill = 2
					    defense_skill = 2
					    planning_skill = 2
					    logistics_skill = 2
					}
					create_corps_commander = {
						name = "Luis Rastrollo"
						portrait_path = GFX_portrait_Luis_Rastrollo
						traits = { politically_connected }
						skill = 1
					    attack_skill = 1
					    defense_skill = 2
					    planning_skill = 1
					    logistics_skill = 1
					}
					custom_effect_tooltip = SPR_masters_of_our_own_fate_tt_4
					add_popularity = {
					    ideology = fascism
					    popularity = -1
					}
					add_popularity = {
					    ideology = communism
					    popularity = -0.05
					}
					if = {
						limit = {
							democratic > 0.01
						}
						set_political_party = {
						    ideology = democratic
						    popularity = 1
						}
					}
					drop_cosmetic_tag = yes
					set_cosmetic_tag = SPC_poum
				}
				if = {
					limit = {
						has_completed_focus = SPR_regional_defense_council_of_aragon
					}
					remove_ideas = SPR_the_maximum_concession
					add_ideas = closed_economy
				}
			}
			if = {
				limit = {
					NOT = { has_global_flag = spanish_civil_war }
				}
				effect_tooltip = { add_timed_idea = { idea = SPR_masters_of_our_own_fate_tooltip days = 60 } }
			}
			else = {
				add_timed_idea = { idea = SPR_masters_of_our_own_fate days = 60 }
			}
			if = {
				limit = {
					has_completed_focus = SPR_regional_defense_council_of_aragon
				}
				custom_effect_tooltip = SPR_masters_of_our_own_fate_tt_2
			}
			if = {
				limit = {
					has_completed_focus = SPR_the_anti_fascist_workers_revolution
				}
				custom_effect_tooltip = SPR_masters_of_our_own_fate_tt_3
			}
			custom_effect_tooltip = SPR_masters_of_our_own_fate_tt
			if = {
				limit = {
					NOT = { has_war_with = SPD }
				}
				hidden_effect = { country_event = lar_spain.10 }
			}
		}
	}



	focus = {
		id = SPR_all_must_bear_the_torch
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_mujeres_libres }
		prerequisite = { focus = SPR_masters_of_our_own_fate }
		prerequisite = { focus = SPR_collectivization_and_workers_control }
		
		icon = GFX_focus_spr_torchbearers_of_tomorrow
		x = 1
		y = 1
		relative_position_id = SPR_mujeres_libres
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_ideas = SPR_collectivized_society
			if = {
				limit = {
					NOT = { has_idea = closed_economy }
				}
				add_ideas = closed_economy
			}
			if = {
				limit = {
					NOT = {
						has_idea = disarmed_nation
						has_idea = volunteer_only
					}
				}
				add_ideas = volunteer_only
			}
			if = {
				limit = {
					has_idea = SPR_anarchist_society_15
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_15
					add_idea = SPR_anarchist_society_17
				}
			}
			if = {
				limit = {
					has_idea = SPR_anarchist_society_16
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_16
					add_idea = SPR_anarchist_society_18
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_15
						add_idea = SPR_anarchist_society_17
					}
				}
			}
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
			}
		}
	}

	focus = {
		id = SPR_the_threats_abound
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_all_must_bear_the_torch }
		
		icon = GFX_goal_generic_defence
		x = -1
		y = 1
		relative_position_id = SPR_all_must_bear_the_torch
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPR_the_threats_abound_1
		}
	}

	focus = {
		id = SPR_portuguese_anarchism
		available = {
			any_state = {
				is_fully_controlled_by = ROOT
				any_neighbor_state = {
					is_owned_by = POR
				}
			}
		}
		bypass = {
			owns_state = 180
			owns_state = 181
			owns_state = 112
			owns_state = 179
			owns_state = 795
		}

		will_lead_to_war_with = POR
		prerequisite = { focus = SPR_the_threats_abound }
		
		icon = GFX_focus_generic_attack_portugal
		x = -2
		y = 1
		relative_position_id = SPR_the_threats_abound
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					POR = { has_civil_war = yes }
				}
				every_country = {
					limit = {
						original_tag = POR
					}
					ROOT = {
						create_wargoal = {
							type = annex_everything
						    target = PREV
						    expire = 0
						}
					}
				}
			}
			else = {
				POR = { country_event = { id = lar_spain.48 hours = 6 random_hours = 18 } }
			}
		}
	}

	focus = {
		id = SPR_regional_defense_council_of_iberia
		available = {
			owns_state = 180
			owns_state = 181
			owns_state = 112
			owns_state = 179
			owns_state = 795
		}
		bypass = {
		}
		prerequisite = { focus = SPR_portuguese_anarchism }
		
		icon = GFX_goal_generic_alliance
		x = 0
		y = 1
		relative_position_id = SPR_portuguese_anarchism
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_regional_defense_council_of_iberia_tt
			hidden_effect = {
				drop_cosmetic_tag = yes
				set_cosmetic_tag = SPC_regional_defense_council_of_iberia
			}
			every_state = {
				limit = {
					is_core_of = POR
				}
				add_core_of = ROOT
			}
		}
	}

	focus = {
		id = SPR_a_new_way_of_warfare
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_threats_abound }
		
		icon = GFX_goal_generic_army_tanks
		x = 0
		y = 1
		relative_position_id = SPR_the_threats_abound
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_a_new_way_of_warfare
				bonus = 1.0
				uses = 1
				category = light_fighter
			}
			add_tech_bonus = {
				name = SPR_a_new_way_of_warfare
				bonus = 1.0
				uses = 1
				category = armor
			}
		}
	}

	focus = {
		id = SPR_communal_military_strategies
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_a_new_way_of_warfare }
		
		icon = GFX_goal_generic_army_doctrines
		x = 0
		y = 1
		relative_position_id = SPR_a_new_way_of_warfare
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			remove_ideas = SPR_disbanded_army_2
			add_doctrine_cost_reduction = {
				name = SPR_communal_military_strategies
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPR_council_of_theorists
		}
	}

	focus = {
		id = SPR_maintaining_the_fire
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_all_must_bear_the_torch }
		
		icon = GFX_goal_generic_propaganda
		x = 1
		y = 1
		relative_position_id = SPR_all_must_bear_the_torch
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.15
		}
	}

	focus = {
		id = SPR_freedom_of_thought
		available = {
			num_of_factories > 50
		}
		bypass = {
		}
		prerequisite = { focus = SPR_maintaining_the_fire }
		
		icon = GFX_focus_research2
		x = 0
		y = 1
		relative_position_id = SPR_maintaining_the_fire
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_torchbearers_of_tomorrow
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_a_new_way_of_warfare }
		prerequisite = { focus = SPR_collective_recovery_efforts }
		
		icon = GFX_goal_generic_demand_territory
		x = 2
		y = 1
		relative_position_id = SPR_a_new_way_of_warfare
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_ideas = SPR_torchbearers_of_tomorrow
			swap_ideas = {
				remove_idea = SPR_the_threats_abound_1
				add_idea = SPR_the_threats_abound_2
			}
		}
	}

	focus = {
		id = SPR_the_inevitable_counterblow
		available = {
			has_country_leader = {
				name = "Anarchist Commune"
				ruling_only = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPR_regional_defense_council_of_iberia }
		prerequisite = { focus = SPR_torchbearers_of_tomorrow }
		
		icon = GFX_goal_generic_construct_military
		x = 2
		y = 1
		relative_position_id = SPR_regional_defense_council_of_iberia
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL}
		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
			add_ideas = SPR_the_inevitable_counterblow
			add_country_leader_trait = anarchist_zeal
			hidden_effect = {
				news_event = { id = lar_news.22 hours = 6 }
			}
		}
	}

	focus = {
		id = SPR_improve_military_infrastructure
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_inevitable_counterblow }
		
		icon = GFX_goal_generic_construct_infrastructure
		x = -2
		y = 1
		relative_position_id = SPR_the_inevitable_counterblow
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_ideas = SPR_improve_military_infrastructure
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					free_building_slots = {
						building = infrastructure
						size > 1
					}
				}
				set_state_flag = SPR_improve_military_infrastructure_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_improve_military_infrastructure_1inf }
					free_building_slots = {
						building = infrastructure
						size > 1
					}
				}
				set_state_flag = SPR_improve_military_infrastructure_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_improve_military_infrastructure_1inf }
					free_building_slots = {
						building = infrastructure
						size > 1
					}
				}
				set_state_flag = SPR_improve_military_infrastructure_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_improve_military_infrastructure_1inf }
					free_building_slots = {
						building = infrastructure
						size > 1
					}
				}
				set_state_flag = SPR_improve_military_infrastructure_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_fortify_the_pyrenees
		available = {
			has_full_control_of_state = 792
			has_full_control_of_state = 172
			has_full_control_of_state = 166
			has_full_control_of_state = 794
			has_full_control_of_state = 165
		}
		bypass = {
		}
		prerequisite = { focus = SPR_improve_military_infrastructure }
		
		icon = GFX_goal_generic_fortify_city
		x = 0
		y = 1
		relative_position_id = SPR_improve_military_infrastructure
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_fortify_the_pyrenees_tt
			hidden_effect = {
				792 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 6756
						}
						level = 3
						instant_build = yes
					}
				}
				172 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3737
							id = 3931
						}
						level = 3
						instant_build = yes
					}
				}
				166 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 11838
						}
						level = 3
						instant_build = yes
					}
				}
				794 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 915
							id = 899
						}
						level = 3
						instant_build = yes
					}
				}
				165 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3899
							id = 3898
							id = 11779
							id = 9824
						}
						level = 3
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPR_fortify_la_linea_de_la_concepcion
		available = {
			has_full_control_of_state = 169
			has_full_control_of_state = 173
		}
		bypass = {
		}
		prerequisite = { focus = SPR_fortify_the_pyrenees }
		
		icon = GFX_goal_generic_fortify_city
		x = -1
		y = 1
		relative_position_id = SPR_fortify_the_pyrenees
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_fortify_la_linea_de_la_concepcion_tt
			hidden_effect = {
				169 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 13228
							id = 10094
						}
						level = 3
						instant_build = yes
					}
				}
				173 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 7153
						}
						level = 3
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPR_fortify_the_coastlines
		available = {
			NOT = {
				any_state = {
					is_core_of = ROOT
					is_in_home_area = yes
					is_coastal = yes
					NOT = { is_controlled_by = ROOT }
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPR_fortify_the_pyrenees }
		
		icon = GFX_focus_generic_coastal_fort
		x = 1
		y = 1
		relative_position_id = SPR_fortify_the_pyrenees
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_fortify_the_coastlines_tt_1
			custom_effect_tooltip = SPR_fortify_the_coastlines_tt_2
			hidden_effect = {
				171 = {
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 1
						instant_build = yes
					}
				}
				790 = {
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 1
						instant_build = yes
					}
				}
				792 = {
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 1
						instant_build = yes
					}
				}
				every_owned_state = {
					limit = {
						is_controlled_by = ROOT
						is_core_of = ROOT
						is_in_home_area = yes
					}
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_naval_base = yes
						}
						level = 2
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						province = {
							all_provinces = yes
							limit_to_naval_base = yes
						}
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPR_militarize_the_industry
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_inevitable_counterblow }
		
		icon = GFX_goal_generic_construct_mil_factory
		x = 0
		y = 1
		relative_position_id = SPR_the_inevitable_counterblow
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPR_militarize_the_industry_1mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_militarize_the_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_militarize_the_industry_1mil }
				}
				set_state_flag = SPR_militarize_the_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_militarize_the_industry_1mil }
				}
				set_state_flag = SPR_militarize_the_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_militarize_the_industry_1mil }
				}
				set_state_flag = SPR_militarize_the_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_communal_autarky
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_militarize_the_industry }
		
		icon = GFX_goal_generic_construction2
		x = 0
		y = 1
		relative_position_id = SPR_militarize_the_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPR_anarchist_society_17
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_17
					add_idea = SPR_anarchist_society_18
				}
			}
			else_if = {
				limit = {
					has_idea = SPR_anarchist_society_18
				}
				swap_ideas = {
					remove_idea = SPR_anarchist_society_18
					add_idea = SPR_anarchist_society_19
				}
			}
			else = {
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPR_anarchist_society_17
						add_idea = SPR_anarchist_society_18
					}
				}
			}
			remove_ideas = SPA_recovering_from_civil_war
			add_tech_bonus = {
				name = SPR_communal_autarky
				bonus = 1
				uses = 1
				category = excavation_tech
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPR_faith_in_the_cause
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_torchbearers_of_tomorrow }
		
		icon = GFX_goal_tfv_saf_anti_colonialist_crusade
		x = 0
		y = 1
		relative_position_id = SPR_torchbearers_of_tomorrow
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.1
		}
	}

	focus = {
		id = SPR_militarize_the_people
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_inevitable_counterblow }
		prerequisite = { focus = SPR_faith_in_the_cause }
		
		icon = GFX_goal_generic_military_deal
		x = 2
		y = 1
		relative_position_id = SPR_the_inevitable_counterblow
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
			swap_ideas = {
				remove_idea = SPR_the_threats_abound_2
				add_idea = SPR_the_threats_abound_3
			}
		}
	}

	focus = {
		id = SPR_anarchism_knows_no_borders
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_militarize_the_people }
		
		icon = GFX_focus_spr_anarchism_knows_no_borders
		x = 0
		y = 1
		relative_position_id = SPR_militarize_the_people
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_ideas = SPR_anarchism_knows_no_borders
		}
	}

	focus = {
		id = SPR_plant_the_seeds_of_revolution
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_anarchism_knows_no_borders }
		
		icon = GFX_focus_prc_infiltration
		x = -1
		y = 1
		relative_position_id = SPR_anarchism_knows_no_borders
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_plant_the_seeds_of_revolution_tt
			division_template = {
				name = "Anarchist Militia"
				priority = 1
				is_locked = yes
				division_names_group = SPD_INF_06
				regiments = {
					infantry = { x = 0 y = 0 }
					infantry = { x = 0 y = 1 }
					infantry = { x = 0 y = 2 }
				}
			}
		}
	}

	focus = {
		id = SPR_global_defense_council
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_anarchism_knows_no_borders }
		
		icon = GFX_goal_generic_alliance
		x = 1
		y = 1
		relative_position_id = SPR_anarchism_knows_no_borders
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_global_defense_council_tt
			hidden_effect = {
				drop_cosmetic_tag = yes
				set_cosmetic_tag = SPC_global_defense_council
			}
			custom_effect_tooltip = SPR_global_defense_council_tt_2
		}
	}

###  ### ###  #  # ###  #   ###  ##   ##  #  #  ##             ##   ##  #   # #   # #  # #  # ###  ## ###  ## 
#  # #   #  # #  # #  # #    #  #  # #  # ## # #              #  # #  # ## ## ## ## #  # ## #  #  #    #  #   
###  ##  ###  #  # ###  #    #  #    #### # ##  #      ##     #    #  # # # # # # # #  # # ##  #   #   #   #  
#  # #   #    #  # #  # #    #  #  # #  # #  #   #            #  # #  # #   # #   # #  # #  #  #    #  #    # 
#  # ### #     ##  ###  ### ###  ##  #  # #  # ##              ##   ##  #   # #   #  ##  #  # ### ##   #  ##  

	focus = {
		id = SPR_the_anti_fascist_workers_revolution
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_disband_the_army }
		mutually_exclusive = { focus = SPR_regional_defense_council_of_aragon focus = SPR_maintain_the_second_republic }
		
		icon = GFX_focus_spr_the_anti_fascist_workers_revolution
		x = 0
		y = 1
		relative_position_id = SPR_disband_the_army
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_popularity = {
				ideology = communism
				popularity = 0.1
			}
			activate_mission = SPR_anarchist_uprising_mission
		}
	}

	focus = {
		id = SPR_strengthen_the_euzko_gudarostea
		available = {
			has_full_control_of_state = 792
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_anti_fascist_workers_revolution focus = SPR_maintain_the_second_republic }
		
		icon = GFX_goal_generic_allies_build_infantry
		x = 6
		y = 1
		relative_position_id = SPR_the_anti_fascist_workers_revolution
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			custom_effect_tooltip = SPR_strengthen_the_euzko_gudarostea_tt
			hidden_effect = {
				division_template = {
					name = "Euzko Gudarosteko Eskuadroia"
					priority = 1
					division_names_group = SPD_INF_05
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
					}
				}
				# Basque
				792 = {
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
					create_unit = {
						division = "division_template = \"Euzko Gudarosteko Eskuadroia\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
			}
		}
	}

	focus = {
		id = SPR_fortify_the_iron_ring
		available = {
			has_full_control_of_state = 792
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_strengthen_the_euzko_gudarostea }
		
		icon = GFX_goal_generic_fortify_city
		x = 0
		y = 1
		relative_position_id = SPR_strengthen_the_euzko_gudarostea
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_timed_idea = { idea = SPR_fortify_the_iron_ring days = 730 }
			792 = {
				add_building_construction = {
					type = bunker
					province = {
						id = 740
					}
					level = 3
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPA_crown_jose_antonio
		available = {
		}
		bypass = {
		}
		prerequisite = {
			 focus = SPA_integrate_greek_generals
			 focus = SPA_horadelavenganza
			 focus = SPA_embrace_pan_americanism
			  }

		
		icon = GFX_SPA_crown_primoderivera
		x = 0
		y = 2
		relative_position_id = SPA_horadelavenganza
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_crown_jose_antonio_tt
			custom_effect_tooltip = SPA_crown_jose_antonio_one_tt
			hidden_effect = {
				drop_cosmetic_tag = yes
				set_cosmetic_tag = ISF_SPR
				SPA_jose_antonio_primo_de_rivera = {
					remove_country_leader_role = { ideology = despotism }
					remove_country_leader_role = { ideology = falangism }
				}
				promote_character = {
			  	character = SPR_emperador_jose_antonio
			  	ideology = falangism
				}
			}
		}
	}

	focus = {
		id = SPR_arm_the_workers_militias
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = scw_over
				has_global_flag = SPR_anarchist_uprising_flag
			}
		}
		prerequisite = { focus = SPR_the_anti_fascist_workers_revolution }
		
		icon = GFX_goal_generic_military_sphere
		x = -1
		y = 1
		relative_position_id = SPR_the_anti_fascist_workers_revolution
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.1
			swap_ideas = {
				remove_idea = SPR_disbanded_army_1
				add_idea = SPR_disbanded_army_2
			}
		}
	}

	focus = {
		id = SPR_hinder_nkvd_interference
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		cancel = {
			has_completed_focus = SPR_the_stalinist_doctrine
		}
		prerequisite = { focus = SPR_arm_the_workers_militias }
		prerequisite = { focus = SPR_demand_ministerial_positions }
		mutually_exclusive = { focus = SPR_the_stalinist_doctrine }
		
		icon = GFX_focus_generic_support_the_left_right
		x = -1
		y = 1
		relative_position_id = SPR_arm_the_workers_militias
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			set_party_name = { ideology = communism long_name = SPR_communism_independent_party_long name = SPR_communism_independent_party }
			add_stability = 0.05
			SOV = {
				add_opinion_modifier = { target = ROOT modifier = SPR_hinder_nkvd_interference }
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = -200
				}
				add_ai_strategy = {
					type = befriend
					id = ROOT
					value = -200
				}
				add_ai_strategy = {
					type = support
					id = ROOT
					value = -200
				}
			}
			custom_effect_tooltip = remove_political_advisor
			show_ideas_tooltip = SPR_alexander_orlov
			custom_effect_tooltip = SPR_hinder_nkvd_interference_tt
			hidden_effect = {
				set_variable = { var = SPR_communists_uprising_mission_var value = days_mission_timeout@SPR_anarchist_uprising_mission }
				remove_mission = SPR_anarchist_uprising_mission
				activate_mission = SPR_government_crackdown_mission
			}
		}
	}

	focus = {
		id = SPR_demand_ministerial_positions
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = scw_over
				has_global_flag = SPR_anarchist_uprising_flag
			}
		}
		prerequisite = { focus = SPR_the_anti_fascist_workers_revolution }
		
		icon = GFX_focus_eng_concessions_to_the_trade_unions
		x = 1
		y = 1
		relative_position_id = SPR_the_anti_fascist_workers_revolution
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_ideas = SPR_demand_ministerial_positions
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPR_dolores_ibarruri
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPR_jesus_hernandez_tomas
		}
	}

	focus = {
		id = SPR_the_stalinist_doctrine
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_demand_ministerial_positions }
		prerequisite = { focus = SPR_arm_the_workers_militias }
		mutually_exclusive = { focus = SPR_hinder_nkvd_interference }
		
		icon = GFX_focus_generic_soviet_politics
		x = 1
		y = 1
		relative_position_id = SPR_demand_ministerial_positions
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_stability = -0.1
			add_political_power = 120
			SOV = { add_opinion_modifier = { target = ROOT modifier = SPR_the_stalinist_doctrine } }
			custom_effect_tooltip = available_military_high_command
			show_ideas_tooltip = SPR_wilhelm_zaisser
		}
	}

	focus = {
		id = SPR_subvert_the_stalinists
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_hinder_nkvd_interference }
		
		icon = GFX_goal_generic_more_territorial_claims
		x = -1
		y = 1
		relative_position_id = SPR_hinder_nkvd_interference
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_stability = 0.05
			add_political_power = 120
		}
	}

	focus = {
		id = SPR_class_war
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_subvert_the_stalinists }
		
		icon = GFX_focus_spr_class_war
		x = 0
		y = 1
		relative_position_id = SPR_subvert_the_stalinists
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_ideas = SPR_class_war_1
		}
	}

	focus = {
		id = SPR_secularize_the_new_state
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_hinder_nkvd_interference focus = SPR_the_stalinist_doctrine }
		
		icon = GFX_focus_mex_triumph_over_the_cristeros
		x = 2
		y = 1
		relative_position_id = SPR_hinder_nkvd_interference
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_stability = -0.1
			add_political_power = 200
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
		}
	}

	focus = {
		id = SPR_appropriate_church_riches
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_secularize_the_new_state }
		
		icon = GFX_goal_generic_construct_civilian
		x = 0
		y = 1
		relative_position_id = SPR_secularize_the_new_state
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_timed_idea = { idea = SPR_appropriate_church_riches days = 730 }
		}
	}

	focus = {
		id = SPR_an_army_of_all_classes
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_stalinist_doctrine }
		
		icon = GFX_focus_YUG_pan_slavic_congress
		x = 1
		y = 2
		relative_position_id = SPR_the_stalinist_doctrine
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_ideas = SPR_an_army_of_all_classes_1
		}
	}

	focus = {
		id = SPR_relocate_the_gold_reserves
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = scw_over
				has_global_flag = SPR_gold_reserves_flag
			}
		}
		prerequisite = { focus = SPR_the_stalinist_doctrine focus = SPR_the_future_of_the_republic }
		
		icon = GFX_focus_usa_reestablish_the_gold_standard
		x = 3
		y = 1
		relative_position_id = SPR_the_stalinist_doctrine
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_stability = -0.05
			add_ideas = SPR_relocate_the_gold_reserves
			custom_effect_tooltip = SPR_relocate_the_gold_reserves_tt
			country_event = lar_spain.51
			set_global_flag = SPR_gold_reserves_flag
		}
	}

	focus = {
		id = SPR_reaffirm_the_popular_front_strategy
		available = {
		}
		bypass = {
			OR = {
				has_global_flag = SPR_anarchist_uprising_flag
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPR_the_stalinist_doctrine focus = SPR_the_future_of_the_republic }
		
		icon = GFX_goal_generic_propaganda
		x = 5
		y = 1
		relative_position_id = SPR_the_stalinist_doctrine
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_war_support = 0.05
			add_timed_idea = { idea = SPR_popular_front_1 days = 730 }
		}
	}

	focus = {
		id = SPR_anti_fascist_unity
		available = {
			NOT = { has_global_flag = scw_over }
			NOT = { has_global_flag = SPR_anarchist_uprising_flag }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_reaffirm_the_popular_front_strategy }
		
		icon = GFX_goal_generic_improve_relations
		x = 3
		y = 1
		relative_position_id = SPR_reaffirm_the_popular_front_strategy
		cost = 5

		available_if_capitulated = yes
		completion_reward = {
			custom_effect_tooltip = SPR_anti_fascist_unity_tt
			add_days_mission_timeout = {
				mission = SPR_anarchist_uprising_mission
				days = 140
			}
		}
	}

	focus = {
		id = SPR_crush_the_revolution
		available = {
		}
		bypass = {
			OR = {
				has_war_with = SPC
				has_global_flag = SPR_anarchist_uprising_flag
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPR_reaffirm_the_popular_front_strategy }
		
		icon = GFX_focus_spr_crush_the_revolution
		x = 0
		y = 1
		relative_position_id = SPR_reaffirm_the_popular_front_strategy
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_SPA_CIVIL_WAR}
		completion_reward = {
			custom_effect_tooltip = remove_political_advisor
			show_ideas_tooltip = SPR_jesus_hernandez_tomas
			add_timed_idea = { idea = SPR_crush_the_revolution days = 60 }
			swap_ideas = {
				remove_idea = SPR_popular_front_1
				add_idea = SPR_popular_front_2
			}
			custom_effect_tooltip = SPR_crush_the_revolution_tt
			if = {
				limit = {
					NOT = { has_war_with = SPC }
				}
				hidden_effect = { country_event = lar_spain.9 }
			}
		}
	}

	focus = {
		id = SPR_united_under_socialism
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_class_war }
		prerequisite = { focus = SPR_masters_of_our_own_fate }
		
		icon = GFX_goal_tripartite_pact
		x = 0
		y = 1
		relative_position_id = SPR_class_war
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_war_support = 0.1
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
				add_dynamic_modifier = { modifier = semi_autonomous_state }
			}
		}
	}

	focus = {
		id = SPR_wealth_redistribution
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_united_under_socialism }
		
		icon = GFX_goal_generic_consumer_goods
		x = -1
		y = 1
		relative_position_id = SPR_united_under_socialism
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_ideas = SPR_wealth_redistribution
		}
	}

	focus = {
		id = SPR_collective_recovery_efforts
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_wealth_redistribution focus = SPR_maintaining_the_fire }
		
		icon = GFX_goal_generic_construct_infrastructure
		x = -2
		y = 1
		relative_position_id = SPR_wealth_redistribution
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_timed_idea = { idea = SPR_collective_recovery_efforts days = 730 }
			every_state = {
				limit	= {
					is_core_of = ROOT
					is_in_home_area = yes
					is_controlled_by = ROOT
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_repair_and_expand_the_dockyards
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_collective_recovery_efforts }
		
		icon = GFX_goal_generic_construct_naval_dockyard
		x = 0
		y = 1
		relative_position_id = SPR_collective_recovery_efforts
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_repair_and_expand_the_dockyards_2DY }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				set_state_flag = SPR_repair_and_expand_the_dockyards_2DY
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_repair_and_expand_the_dockyards_2DY }
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				set_state_flag = SPR_repair_and_expand_the_dockyards_2DY
			}
		}
	}

	focus = {
		id = SPR_the_peoples_fleet
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_repair_and_expand_the_dockyards }
		
		icon = GFX_goal_generic_navy_doctrines_tactics
		x = 0
		y = 1
		relative_position_id = SPR_repair_and_expand_the_dockyards
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			navy_experience = 75
			add_tech_bonus = {
				name = SPR_the_peoples_fleet
				bonus = 1
				uses = 1
				category = cl_tech
				category = ca_tech
			}
			add_tech_bonus = {
				name = SPR_the_peoples_fleet
				bonus = 1
				uses = 1
				category = dd_tech
			}
			add_tech_bonus = {
				name = SPR_the_peoples_fleet
				bonus = 1
				uses = 1
				category = ss_tech
			}
			add_doctrine_cost_reduction = {
				name = SPR_the_peoples_fleet
				cost_reduction = 0.5
				uses = 1
				category = submarine_doctrine
			}
		}
	}

	focus = {
		id = SPR_land_redistribution
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_united_under_socialism }
		
		icon = GFX_goal_generic_construction2
		x = 1
		y = 1
		relative_position_id = SPR_united_under_socialism
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_land_redistribution_1slot }
				add_extra_state_shared_building_slots = 1
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 1
				set_state_flag = SPR_land_redistribution_1slot
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_land_redistribution_1slot }
				}
				add_extra_state_shared_building_slots = 1
				set_state_flag = SPR_land_redistribution_1slot
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_land_redistribution_1slot }
				}
				add_extra_state_shared_building_slots = 1
				set_state_flag = SPR_land_redistribution_1slot
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_land_redistribution_1slot }
				}
				add_extra_state_shared_building_slots = 1
				set_state_flag = SPR_land_redistribution_1slot
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_land_redistribution_1slot }
				}
				add_extra_state_shared_building_slots = 1
				set_state_flag = SPR_land_redistribution_1slot
			}
		}
	}

	focus = {
		id = SPR_expand_the_means_of_production
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_land_redistribution }
		
		icon = GFX_focus_generic_industry_3
		x = 0
		y = 1
		relative_position_id = SPR_land_redistribution
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPR_expand_the_means_of_production_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			every_state = {
				limit	= {	has_state_flag = SPR_expand_the_means_of_production_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_expand_the_means_of_production
				bonus = 1.0
				uses = 1
				category = industry
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_expand_the_means_of_production_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_expand_the_means_of_production_2civ }
				}
				set_state_flag = SPR_expand_the_means_of_production_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_invite_socialist_intellectuals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_class_war focus = SPR_an_army_of_all_classes }
		
		icon = GFX_focus_research
		x = 3
		y = 1
		relative_position_id = SPR_class_war
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_solidify_government_control
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_an_army_of_all_classes }
		
		icon = GFX_focus_generic_self_management
		x = 0
		y = 1
		relative_position_id = SPR_an_army_of_all_classes
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			set_politics = {
				ruling_party = communism
			}
			add_stability = 0.1
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
				add_dynamic_modifier = { modifier = semi_autonomous_state }
			}
		}
	}

	focus = {
		id = SPR_reeducate_the_bourgeoisie
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_invite_socialist_intellectuals }
		prerequisite = { focus = SPR_solidify_government_control }
		
		icon = GFX_goal_generic_political_pressure
		x = 2
		y = 1
		relative_position_id = SPR_invite_socialist_intellectuals
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
			add_stability = 0.05
			add_political_power = 60
		}
	}

	focus = {
		id = SPR_the_spanish_red_army
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_reeducate_the_bourgeoisie }
		
		icon = GFX_goal_generic_army_doctrines
		x = 0
		y = 1
		relative_position_id = SPR_reeducate_the_bourgeoisie
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			army_experience = 25
			remove_ideas = SPR_disbanded_army_2
			add_tech_bonus = {
				name = SPR_the_spanish_red_army
				bonus = 1
				uses = 1
				category = motorized_equipment
			}
			add_doctrine_cost_reduction = {
				name = SPR_the_spanish_red_army
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
		}
	}

	focus = {
		id = SPR_expand_soviet_aid
		available = {
			NOT = { has_war_with = SOV }
			NOT = { has_global_flag = scw_over }
			SOV = { has_government = communism }
			has_volunteers_amount_from = {
			    tag = SOV
			    count > 0
			}
		}
		bypass = {
			AND = {
				has_completed_focus = SPR_the_stalinist_doctrine
				has_global_flag = scw_over
			}
		}
		prerequisite = { focus = SPR_relocate_the_gold_reserves }
		prerequisite = { focus = SPR_crush_the_revolution }
		
		icon = GFX_goal_support_communism
		x = 1
		y = 2
		relative_position_id = SPR_relocate_the_gold_reserves
		cost = 5

		ai_will_do = {
			base = 1
			modifier = {
				factor = 3
				is_historical_focus_on = no
				SOV = {
					is_ai = no
				}
			}
			modifier = {
				factor = 3
				surrender_progress > 0.4
				is_historical_focus_on = no
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				SOV = {
					is_ai = yes
				}
			}
			modifier = {
				factor = 0
				surrender_progress < 0.4
				any_country = {
					NOT = { tag = SOV }
					ROOT = {
						has_volunteers_amount_from = {
						    tag = PREV
						    count > 0
						}
					}
				}
			}
		}

		available_if_capitulated = yes

		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
			SOV = {
				add_timed_idea = { idea = SPA_spanish_civil_war_commitments days = 730 }
				add_opinion_modifier = { target = ROOT modifier = SPA_spanish_civil_war_commitments }
			}
			custom_effect_tooltip = SPR_expand_soviet_aid_tt
		}
	}

	focus = {
		id = SPR_soviet_equipment_shipments
		available = {
			NOT = { has_war_with = SOV }
			SOV = { has_government = communism }
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_expand_soviet_aid }

		icon = GFX_goal_generic_build_tank
		x = -1
		y = 1
		relative_position_id = SPR_expand_soviet_aid
		cost = 5

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_soviet_equipment_shipments_1mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
			SOV = {
				add_timed_idea = { idea = SPR_equipment_shipments days = 730 }
				add_ai_strategy = { type = send_lend_lease_desire id = SPR value = 200 }
			}
			add_timed_idea = { idea = SPR_equipment_shipments_spain days = 730 }
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_soviet_equipment_shipments_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_soviet_equipment_shipments_1mil }
				}
				set_state_flag = SPR_soviet_equipment_shipments_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_soviet_equipment_shipments_1mil }
				}
				set_state_flag = SPR_soviet_equipment_shipments_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_soviet_military_advisors
		available = {
			NOT = { has_war_with = SOV }
			SOV = { has_government = communism }
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_expand_soviet_aid }

		icon = GFX_focus_generic_military_mission
		x = 1
		y = 1
		relative_position_id = SPR_expand_soviet_aid
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			army_experience = 25
			add_war_support = 0.1
			add_ideas = SPR_soviet_military_advisors
			custom_effect_tooltip = SPR_seize_public_transport_tt
		}
	}

	focus = {
		id = SPR_soviet_industrial_aid
		available = {
			NOT = { has_war_with = SOV }
			SOV = { has_government = communism }
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_soviet_equipment_shipments focus = SPR_soviet_military_advisors }

		icon = GFX_focus_generic_join_comintern
		x = 0
		y = 1
		relative_position_id = SPR_soviet_equipment_shipments
		cost = 5

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_soviet_industrial_aid_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}

		search_filters = {FOCUS_FILTER_RESEARCH FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_soviet_industrial_aid
				bonus = 1.0
				uses = 1
				category = industry
			}
			add_timed_idea = { idea = SPR_soviet_industrial_aid days = 730 }
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_soviet_industrial_aid_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_soviet_technological_advancements
		available = {
			NOT = { has_war_with = SOV }
			SOV = { has_government = communism }
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_soviet_equipment_shipments focus = SPR_soviet_military_advisors }

		icon = GFX_focus_generic_socialist_science
		x = 2
		y = 1
		relative_position_id = SPR_soviet_equipment_shipments
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
			add_to_tech_sharing_group = spr_research
			SOV = { add_to_tech_sharing_group = spr_research }
			add_tech_bonus = {
				name = SPR_soviet_technological_advancements
				bonus = 1
				uses = 1
				category = infantry_weapons
			}
			add_tech_bonus = {
				name = SPR_soviet_technological_advancements
				bonus = 1
				uses = 1
				category = armor
			}
		}
	}

	focus = {
		id = SPR_soviet_recovery_aid
		available = {
			NOT = { has_war_with = SOV }
			SOV = { has_government = communism }
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_soviet_industrial_aid }
		prerequisite = { focus = SPR_soviet_technological_advancements }

		icon = GFX_goal_generic_soviet_construction
		x = 1
		y = 1
		relative_position_id = SPR_soviet_industrial_aid
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPR_soviet_recovery_aid_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_timed_idea = { idea = SPR_soviet_recovery_aid days = 1095 }
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_soviet_recovery_aid_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_all_must_do_their_part
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_collective_recovery_efforts }
		prerequisite = { focus = SPR_expand_the_means_of_production }

		icon = GFX_goal_generic_consumer_goods
		x = 3
		y = 1
		relative_position_id = SPR_collective_recovery_efforts
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			swap_ideas = {
				remove_idea = SPR_class_war_1
				add_idea = SPR_class_war_2
			}
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = semi_autonomous_state }
			}
		}
	}

	focus = {
		id = SPR_the_red_tide
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_all_must_do_their_part }

		icon = GFX_goal_generic_army_artillery
		x = -1
		y = 2
		relative_position_id = SPR_all_must_do_their_part
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPR_class_war_2
				add_idea = SPR_class_war_3
			}
		}
	}

	focus = {
		id = SPR_arm_the_tide
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_red_tide }

		icon = GFX_goal_generic_small_arms
		x = -1
		y = 1
		relative_position_id = SPR_the_red_tide
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_arm_the_tide
				bonus = 1.0
				uses = 2
				category = infantry_weapons
			}
			add_tech_bonus = {
				name = SPR_arm_the_tide
				bonus = 1.0
				uses = 2
				category = artillery
			}
		}
	}

	focus = {
		id = SPR_against_fascism
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_red_tide }

		icon = GFX_focus_generic_anti_fascist_diplomacy
		x = 0
		y = 2
		relative_position_id = SPR_the_red_tide
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			every_country = {
				limit = {
					capital_scope = { is_on_continent = europe }
					has_government = fascism
				}
				ROOT = {
					create_wargoal = {
					    type = puppet_wargoal_focus
					    target = PREV
					    expire = 0
					}
				}
			}
		}
	}

	focus = {
		id = SPR_doctrinal_advancements
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_red_tide }
		prerequisite = { focus = SPR_lessons_from_the_civil_war }

		icon = GFX_goal_generic_air_doctrine
		x = 1
		y = 1
		relative_position_id = SPR_the_red_tide
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 1
				category = air_doctrine
			}
		}
	}

	focus = {
		id = SPR_lessons_from_the_civil_war
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_all_must_do_their_part }

		icon = GFX_goal_generic_army_doctrines
		x = 0
		y = 1
		relative_position_id = SPR_all_must_do_their_part
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			remove_ideas = SPR_disbanded_army_2
			add_doctrine_cost_reduction = {
				name = SPA_doctrinal_advancements
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
		}
	}

	focus = {
		id = SPR_nationalize_the_industry
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_land_redistribution focus = SPR_reeducate_the_bourgeoisie }

		icon = GFX_goal_generic_construct_civ_factory
		x = 2
		y = 2
		relative_position_id = SPR_land_redistribution
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_nationalize_the_industry_1civ }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			add_stability = -0.1
			add_tech_bonus = {
				name = SPR_nationalize_the_industry
				bonus = 1.0
				uses = 1
				category = industry
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_nationalize_the_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_nationalize_the_industry_1civ }
				}
				set_state_flag = SPR_nationalize_the_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_nationalize_the_industry_1civ }
				}
				set_state_flag = SPR_nationalize_the_industry_1civ
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_beacon_of_socialism
		available = {
			num_of_factories > 50
		}
		bypass = {
		}
		prerequisite = { focus = SPR_nationalize_the_industry }

		icon = GFX_focus_research2
		x = -1
		y = 1
		relative_position_id = SPR_nationalize_the_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_increase_arms_production
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_nationalize_the_industry }

		icon = GFX_goal_generic_construct_mil_factory
		x = 1
		y = 1
		relative_position_id = SPR_nationalize_the_industry
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_increase_arms_production_1mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_increase_arms_production_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_increase_arms_production_1mil }
				}
				set_state_flag = SPR_increase_arms_production_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_increase_arms_production_1mil }
				}
				set_state_flag = SPR_increase_arms_production_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_exploit_spains_riches
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_beacon_of_socialism }
		prerequisite = { focus = SPR_increase_arms_production }
		
		icon = GFX_goal_generic_construction2
		x = 1
		y = 1
		relative_position_id = SPR_beacon_of_socialism
		cost = 10

		available_if_capitulated = yes
		search_filters = {}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPR_unify_the_london_bureau
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_lessons_from_the_civil_war }
		prerequisite = { focus = SPR_beacon_of_socialism }

		icon = GFX_focus_spr_unify_the_london_bureau
		x = 1
		y = 1
		relative_position_id = SPR_lessons_from_the_civil_war
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			create_faction = SPC_international_bureau_of_revolutionary_socialist_unity
			hidden_effect = { news_event = { id = lar_news.21 hours = 6 } }
			every_other_country = {
				limit = {
					has_government = communism
					is_in_faction = no
					is_subject = no
					NOT = {
						capital_scope = {
							is_on_continent = asia
						}
					}
				}
				country_event = { id = generic.5 hours = 6 random_hours = 6 }
			}
		}
	}

	focus = {
		id = SPR_against_trotskyism_and_stalinism
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_unify_the_london_bureau }

		icon = GFX_focus_attack_soviet
		x = 0
		y = 2
		relative_position_id = SPR_unify_the_london_bureau
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					MEX = {
						has_country_leader = {
							character = SOV_lev_trotsky
							ruling_only = yes
						}
					}
				}
				create_wargoal = {
					type = puppet_wargoal_focus
					target = MEX
					expire = 0
				}
			}
			if = {
				limit = {
					any_country = {
						original_tag = SOV
						has_government = communism
						NOT = { has_completed_focus = SOV_the_right_opposition }
					}
				}
				hidden_effect = {
					every_other_country = {
						limit = {
							original_tag = SOV
							has_government = communism
							NOT = { has_completed_focus = SOV_the_right_opposition }
						}
						ROOT = {
							create_wargoal = {
								type = puppet_wargoal_focus
								target = PREV
								expire = 0
							}
						}
					}
				}
				custom_effect_tooltip = SPR_against_trotskyism_and_stalinism_tt
			}
		}
	}

	focus = {
		id = SPR_red_bulwark_in_the_west
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
			has_full_control_of_state = 172
			has_full_control_of_state = 166
			has_full_control_of_state = 794
			NOT = {
				any_state = {
					is_core_of = ROOT
					is_in_home_area = yes
					is_coastal = yes
					NOT = { is_controlled_by = ROOT }
				}
			}
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_spanish_red_army }
		prerequisite = { focus = SPR_soviet_industrial_aid }

		icon = GFX_goal_generic_construct_military
		x = 1
		y = 1
		relative_position_id = SPR_the_spanish_red_army
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
			custom_effect_tooltip = SPA_prepare_the_pyrenees_defenses_tt
			hidden_effect = {
				792 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 6756
						}
						level = 2
						instant_build = yes
					}
				}
				172 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3737
							id = 3931
						}
						level = 2
						instant_build = yes
					}
				}
				166 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 11838
						}
						level = 2
						instant_build = yes
					}
				}
				794 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 915
							id = 899
						}
						level = 2
						instant_build = yes
					}
				}
				165 = {
					add_building_construction = {
						type = bunker
						province = {
							id = 3899
							id = 3898
							id = 11779
							id = 9824
						}
						level = 2
						instant_build = yes
					}
				}
			}
			custom_effect_tooltip = SPA_defenses_against_invasion_tt
			every_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					is_in_home_area = yes
				}
				add_building_construction = {
					type = coastal_bunker
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
					level = 1
					instant_build = yes
				}
			}
			swap_ideas = {
				remove_idea = SPR_an_army_of_all_classes_1
				add_idea = SPR_an_army_of_all_classes_2
			}
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = semi_autonomous_state }
			}
		}
	}

	focus = {
		id = SPR_appeal_for_increased_autonomy
		available = {
			is_in_faction_with = SOV
			is_subject_of = SOV
		}
		bypass = {
			NOT = { is_subject_of = SOV }
		}
		prerequisite = { focus = SPR_red_bulwark_in_the_west }
		prerequisite = { focus = SPR_soviet_recovery_aid }

		icon = GFX_focus_CZE_german_puppet
		x = 0
		y = 1
		relative_position_id = SPR_red_bulwark_in_the_west
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			SOV = { country_event = { id = lar_spain.56 hours = 6 random_hours = 6 } }
		}
	}

	focus = {
		id = SPR_modernize_the_armed_forces
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_increase_arms_production }
		prerequisite = { focus = SPR_appeal_for_increased_autonomy }

		icon = GFX_goal_generic_build_tank
		x = 1
		y = 1
		relative_position_id = SPR_increase_arms_production
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_modernize_the_armed_forces
				bonus = 1.0
				uses = 1
				category = infantry_weapons
			}
			add_tech_bonus = {
				name = SPR_modernize_the_armed_forces
				bonus = 1.0
				uses = 1
				category = artillery
			}
			add_tech_bonus = {
				name = SPR_modernize_the_armed_forces
				bonus = 1.0
				uses = 1
				category = light_fighter
			}
			add_tech_bonus = {
				name = SPR_modernize_the_armed_forces
				bonus = 1.0
				uses = 1
				category = armor
			}
		}
	}

	focus = {
		id = SPR_a_red_iberia
		available = {
		}
		bypass = {
			has_war_with = POR
		}
		prerequisite = { focus = SPR_unify_the_london_bureau focus = SPR_modernize_the_armed_forces }

		icon = GFX_focus_generic_attack_portugal
		x = 2
		y = 1
		relative_position_id = SPR_unify_the_london_bureau
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					POR = {
						NOT = { has_government = communism }
					}
				}
				create_wargoal = {
					type = annex_everything
					target = POR
				}
			}
			else = {
				POR = { country_event = { id = lar_spain.59 hours = 6 random_hours = 6 } }
			}
		}
	}

	focus = {
		id = SPR_support_french_communists
		available = {
			is_subject = no
		}
		bypass = {
		}
		prerequisite = { focus = SPR_modernize_the_armed_forces }

		icon = GFX_focus_attack_france
		x = 0
		y = 1
		relative_position_id = SPR_modernize_the_armed_forces
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					FRA = {
						has_government = communism
						is_in_faction = no
					}
					is_in_faction = yes
				}
				FRA = { country_event = { id = generic.5 hours = 6 random_hours = 6 } }
			}
			else_if = {
				limit = {
					FRA = {
						NOT = { has_government = communism }
						communism > 0.2
					}
				}
				FRA = { country_event = { id = lar_spain.62 hours = 6 random_hours = 6 } }
			}
			else = {
				create_wargoal = {
				    type = puppet_wargoal_focus
				    target = FRA
				}
			}
		}
	}

	focus = {
		id = SPR_avenge_foreign_interference
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_a_red_iberia focus = SPR_support_french_communists }

		icon = GFX_focus_attack_germany
		x = 1
		y = 1
		relative_position_id = SPR_a_red_iberia
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_avenge_foreign_interference_tt
			every_other_country = {
				limit = {
					has_country_flag = SPR_sent_volunteers_to_SPA_flag
				}
				ROOT = {
					create_wargoal = {
					    type = annex_everything
					    target = PREV
					    expire = 0
					}
				}
			}
		}
	}

	focus = {
		id = SPR_provide_for_the_people
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_soviet_recovery_aid }

		icon = GFX_focus_prc_agrarian_socialism
		x = 0
		y = 1
		relative_position_id = SPR_soviet_recovery_aid
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_ideas = SPR_provide_for_the_people
		}
	}

	focus = {
		id = SPR_collectivize_industry
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_provide_for_the_people }

		icon = GFX_goal_generic_construct_civ_factory
		x = -1
		y = 1
		relative_position_id = SPR_provide_for_the_people
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_collectivize_industry_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_collectivize_industry_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_collectivize_industry_2civ }
				}
				set_state_flag = SPR_collectivize_industry_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_connect_the_country
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_provide_for_the_people }

		icon = GFX_goal_generic_construct_infrastructure
		x = 1
		y = 1
		relative_position_id = SPR_provide_for_the_people
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit	= {	has_state_flag = SPR_connect_the_country_1inf }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_connect_the_country_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_connect_the_country_1inf }
				}
				set_state_flag = SPR_connect_the_country_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_connect_the_country_1inf }
				}
				set_state_flag = SPR_connect_the_country_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_connect_the_country_1inf }
				}
				set_state_flag = SPR_connect_the_country_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_connect_the_country_1inf }
				}
				set_state_flag = SPR_connect_the_country_1inf
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_transplant_soviet_industry
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_collectivize_industry }
		prerequisite = { focus = SPR_connect_the_country }

		icon = GFX_goal_generic_construct_mil_factory
		x = 1
		y = 1
		relative_position_id = SPR_collectivize_industry
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_transplant_soviet_industry_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_transplant_soviet_industry_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_transplant_soviet_industry_2mil }
				}
				set_state_flag = SPR_transplant_soviet_industry_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_the_five_year_plan
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_transplant_soviet_industry }

		icon = GFX_goal_generic_production2
		x = 0
		y = 1
		relative_position_id = SPR_transplant_soviet_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			add_timed_idea = { idea = SPR_the_five_year_plan days = 1825 }
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
		}
	}

	focus = {
		id = SPR_slipway_enlargement
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_collectivize_industry }
		prerequisite = { focus = SPR_connect_the_country }

		icon = GFX_goal_generic_construct_naval_dockyard
		x = -1
		y = 1
		relative_position_id = SPR_collectivize_industry
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_slipway_enlargement_2DY }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}

		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_slipway_enlargement_2DY
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_slipway_enlargement_2DY }
				}
				set_state_flag = SPR_slipway_enlargement_2DY
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_a_red_fleet
		available = {
			is_in_faction_with = SOV
			SOV = { has_government = communism }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_slipway_enlargement }

		icon = GFX_goal_generic_navy_doctrines_tactics
		x = 0
		y = 1
		relative_position_id = SPR_slipway_enlargement
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			navy_experience = 50
			add_tech_bonus = {
				name = SPR_a_red_fleet
				bonus = 1
				uses = 1
				category = dd_tech
			}
			add_tech_bonus = {
				name = SPR_a_red_fleet
				bonus = 1
				uses = 1
				category = cl_tech
				category = ca_tech
			}
			add_tech_bonus = {
				name = SPR_a_red_fleet
				bonus = 1
				uses = 1
				category = bb_tech
			}
		}
	}

###  ### ###  #  # ###  #   ###  ##   ##  #  #  ##            ###  ### #   #  ##   ##  ###   ##  ###  ## 
#  # #   #  # #  # #  # #    #  #  # #  # ## # #              #  # #   ## ## #  # #  # #  # #  #  #  #   
###  ##  ###  #  # ###  #    #  #    #### # ##  #      ##     #  # ##  # # # #  # #    ###  ####  #   #  
#  # #   #    #  # #  # #    #  #  # #  # #  #   #            #  # #   #   # #  # #  # #  # #  #  #    # 
#  # ### #     ##  ###  ### ###  ##  #  # #  # ##             ###  ### #   #  ##   ##  #  # #  #  #  ##  

	focus = {
		id = SPR_maintain_the_second_republic
		available = {
			has_global_flag = spanish_civil_war
			hidden_trigger = { always = no }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_disband_the_army }
		mutually_exclusive = { focus = SPR_regional_defense_council_of_aragon focus = SPR_the_anti_fascist_workers_revolution }
		
		icon = GFX_focus_spr_maintain_the_republic
		x = 11
		y = 1
		relative_position_id = SPR_disband_the_army
		cost = 5

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_political_power = 60
			add_war_support = 0.05
			activate_mission = SPR_anarchist_uprising_mission
			custom_effect_tooltip = available_military_high_command
			show_ideas_tooltip = SPR_antonio_escobar_huerta
		}
	}

	focus = {
		id = SPR_new_leadership
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_maintain_the_second_republic }

		icon = GFX_goal_generic_intelligence_exchange
		x = -1
		y = 1
		relative_position_id = SPR_maintain_the_second_republic
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_stability = 0.05
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SPR_jesus_hernandez_tomas
		}
	}

	focus = {
		id = SPR_the_future_of_the_republic
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_new_leadership }

		icon = GFX_goal_support_democracy
		x = 0
		y = 1
		relative_position_id = SPR_new_leadership
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_political_power = 200
		}
	}

	focus = {
		id = SPR_petition_for_french_aid
		available = {
			NOT = { has_war_with = FRA }
			NOT = { has_global_flag = scw_over }
			FRA = {
				OR = {
					has_government = democratic
					has_government = communism
				}
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_future_of_the_republic }

		icon = GFX_focus_chi_reach_out_to_france
		x = 0
		y = 1
		relative_position_id = SPR_the_future_of_the_republic
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}

		completion_reward = {
			effect_tooltip = {
				add_war_support = 0.15
				FRA = {
					add_timed_idea = { idea = SPR_equipment_shipments days = 730 }
					add_opinion_modifier = { target = ROOT modifier = SPA_spanish_civil_war_commitments }
				}
			}
			custom_effect_tooltip = SPR_petition_for_french_aid_tt
			FRA = { country_event = { id = lar_spain.64 hours = 6 random_hours = 6 } }
		}
	}

	focus = {
		id = SPR_ensure_loyalty
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_maintain_the_second_republic }

		icon = GFX_goal_generic_political_pressure
		x = 1
		y = 1
		relative_position_id = SPR_maintain_the_second_republic
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_stability = 0.1
		}
	}

	focus = {
		id = SPR_enlist_the_carabineros
		available = {
			custom_trigger_tooltip = {
				tooltip = has_hired_juan_negrin_tt
				OR = {
					SPR_juan_negrin = {
						is_hired_as_advisor = yes
					}
					has_idea_with_trait = gran_carabinero
				}
			}
				
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_maintain_the_second_republic }

		icon = GFX_goal_generic_military_sphere
		x = 3
		y = 1
		relative_position_id = SPR_maintain_the_second_republic
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_enlist_the_carabineros_tt
			custom_effect_tooltip = SPR_remove_after_civil_war_tt
			hidden_effect = {
				division_template = {
					name = "Carabineros"
					template_counter = 3
					priority = 1
					division_names_group = SPR_INF_01
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_in_home_area = yes
					}
					create_unit = {
						division = "name = \"1. Carabineros\" division_template = \"Carabineros\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_in_home_area = yes
					}
					create_unit = {
						division = "name = \"2. Carabineros\" division_template = \"Carabineros\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_in_home_area = yes
					}
					create_unit = {
						division = "name = \"3. Carabineros\" division_template = \"Carabineros\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_in_home_area = yes
					}
					create_unit = {
						division = "name = \"4. Carabineros\" division_template = \"Carabineros\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_in_home_area = yes
					}
					create_unit = {
						division = "name = \"5. Carabineros\" division_template = \"Carabineros\" start_experience_factor = 0.1" 
						owner = ROOT
					}
				}
			}
		}
	}

	focus = {
		id = SPR_the_popular_army
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_ensure_loyalty }
		prerequisite = { focus = SPR_enlist_the_carabineros }

		icon = GFX_focus_generic_support_the_left_right
		x = 1
		y = 1
		relative_position_id = SPR_ensure_loyalty
		cost = 10

		available_if_capitulated = yes

		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			remove_ideas = SPR_disbanded_army_1
			add_tech_bonus = {
				name = SPR_the_popular_army
				bonus = 1
				uses = 1
				category = infantry_weapons
			}
			add_doctrine_cost_reduction = {
				name = SPR_the_popular_army
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
		}
	}

	focus = {
		id = SPR_take_the_initiative
		available = {
			NOT = { has_global_flag = scw_over }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_the_popular_army }

		icon = GFX_goal_generic_major_war
		x = -1
		y = 1
		relative_position_id = SPR_the_popular_army
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_tackle_the_vulnerable_fronts_tt
		}
	}

	focus = {
		id = SPR_no_pasaran
		available = {
			SPR_scw_in_progress = yes
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_the_popular_army }

		icon = GFX_focus_spr_no_pasaran
		x = 1
		y = 1
		relative_position_id = SPR_the_popular_army
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPR_no_pasaran_tt
			hidden_effect = {
				every_state = {
					limit = {
						is_controlled_by = ROOT
					}
					add_building_construction = {
						type = bunker
						province = {
							all_provinces = yes
							limit_to_victory_point = yes
						}
						level = 1
						instant_build = yes
					}
				}
				every_state = {
					limit = {
						is_controlled_by = ROOT
					}
					add_building_construction = {
						type = bunker
						province = {
							all_provinces = yes
							limit_to_victory_point > 2
						}
						level = 1
						instant_build = yes
					}
				}
				every_state = {
					limit = {
						is_controlled_by = ROOT
					}
					add_building_construction = {
						type = bunker
						province = {
							all_provinces = yes
							limit_to_victory_point > 9
						}
						level = 1
						instant_build = yes
					}
				}
				every_state = {
					limit = {
						is_controlled_by = ROOT
					}
					add_building_construction = {
						type = bunker
						province = {
							all_provinces = yes
							limit_to_victory_point > 29
						}
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SPR_a_frontline_suited_for_intellectuals
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_no_pasaran }

		icon = GFX_focus_research
		x = 0
		y = 1
		relative_position_id = SPR_no_pasaran
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_strengthen_the_anti_fascist_coalition
		available = {
		}
		bypass = {
			has_global_flag = scw_over
		}
		prerequisite = { focus = SPR_crush_the_revolution }
		prerequisite = { focus = SPR_no_pasaran }

		icon = GFX_goal_generic_national_unity
		x = 4
		y = 1
		relative_position_id = SPR_crush_the_revolution
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			add_stability = 0.05
			add_war_support = 0.1
		}
	}

	focus = {
		id = SPR_oppose_the_communists
		available = {
			has_country_leader = {
				character = SPR_manuel_azana
				ruling_only = yes
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPR_strengthen_the_anti_fascist_coalition }
		mutually_exclusive = { focus = SPR_end_fascism_at_all_costs }

		icon = GFX_goal_anti_comintern_pact
		x = -1
		y = 1
		relative_position_id = SPR_strengthen_the_anti_fascist_coalition
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY}
		completion_reward = {
			add_popularity = {
			    ideology = communism
			    popularity = -0.1
			}
			remove_ideas = SPR_popular_front_2
			add_timed_idea = { idea = SPR_oppose_the_communists days = 730 }
			remove_country_leader_trait = figurehead_president
			add_country_leader_trait = great_survivor
		}
	}

	focus = {
		id = SPR_fortify_the_central_government
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_oppose_the_communists }

		icon = GFX_focus_generic_diplomatic_treaty
		x = 0
		y = 1
		relative_position_id = SPR_oppose_the_communists
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL}
		completion_reward = {
			add_stability = 0.1
			add_political_power = 120
		}
	}

	focus = {
		id = SPR_secure_democratic_principles
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_fortify_the_central_government }

		icon = GFX_goal_support_democracy
		x = -1
		y = 1
		relative_position_id = SPR_fortify_the_central_government
		cost = 10

		available_if_capitulated = yes

		search_filters = {FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL}

		completion_reward = {
			add_stability = 0.1
			add_popularity = {
				ideology = democratic
				popularity = 0.1
			}
		}
	}

	focus = {
		id = SPR_subvert_soviet_control
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_soviet_recovery_aid }
		prerequisite = { focus = SPR_secure_democratic_principles }

		icon = GFX_goal_generic_demand_territory
		x = 1
		y = 1
		relative_position_id = SPR_secure_democratic_principles
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}

		completion_reward = {
			SOV = { add_opinion_modifier = { target = ROOT modifier = SPR_subvert_soviet_control } }
			remove_ideas = SPR_soviet_military_advisors
			remove_ideas = SPR_soviet_industrial_aid
			remove_ideas = SPR_soviet_recovery_aid
			remove_ideas = SPR_provide_for_the_people
			remove_ideas = SPR_the_five_year_plan
			add_timed_idea = { idea = SPR_subvert_soviet_control days = 1095 }
			custom_effect_tooltip = SPR_subvert_soviet_control_tt
		}
	}

	focus = {
		id = SPR_war_of_independence
		available = {
		}
		bypass = {
		}
		will_lead_to_war_with = SOV
		prerequisite = { focus = SPR_subvert_soviet_control }

		icon = GFX_focus_spr_war_of_independence
		x = 0
		y = 1
		relative_position_id = SPR_subvert_soviet_control
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}

		completion_reward = {
			if = {
				limit = {
					NOT = {
						has_government = democratic
					}
				}
				set_politics = {
					ruling_party = democratic
				}
			}
			add_popularity = {
			    ideology = democratic
			    popularity = 0.1
			}
			effect_tooltip = {
				SOV = {
					end_puppet = ROOT
					remove_from_faction = ROOT
				}
			}
			SOV = {
				country_event = lar_spain.67
			}
			custom_effect_tooltip = SPR_war_of_independence_tt
		}
	}

	focus = {
		id = SPR_those_who_would_not_help_us
		available = {
			NOT = { is_subject_of = SOU }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_war_of_independence }
		mutually_exclusive = { focus = SPR_enemies_of_our_enemy }

		icon = GFX_goal_generic_small_arms
		x = -1
		y = 1
		relative_position_id = SPR_war_of_independence
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			effect_tooltip = {
				every_other_country = {
					limit = {
						OR = {
							tag = ENG
							tag = USA
							tag = FRA
						}
						exists = yes
						has_capitulated = no
					}
					add_timed_idea = { idea = SPR_equipment_shipments days = 730 }
				}
			}
			custom_effect_tooltip = SPR_those_who_would_not_help_us_tt
			every_other_country = {
					limit = {
					OR = {
						tag = ENG
						tag = USA
						tag = FRA
					}
					exists = yes
					has_capitulated = no
				}
				country_event = { id = lar_spain.68 hours = 6 random_hours = 6 }
			}
		}
	}

	focus = {
		id = SPR_ideological_allies
		available = {
			any_other_country = {
				has_government = democratic
				is_faction_leader = yes
			}
			is_in_faction = no
			NOT = { has_global_flag = POR_iberian_summit_in_progress_flag }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_those_who_would_not_help_us }

		ai_will_do = {
			factor = 0
		}

		icon = GFX_focus_chi_british_cooperation
		x = -1
		y = 1
		relative_position_id = SPR_those_who_would_not_help_us
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					ENG = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
					}
				}
				ENG = {
					country_event = generic.2
				}
			}
			else_if = {
				limit = {
					USA = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
					}
				}
				USA = {
					country_event = generic.2
				}
			}
			else_if = {
				limit = {
					FRA = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
					}
				}
				FRA = {
					country_event = generic.2
				}
			}
			else_if = {
				limit = {
					any_country = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
						is_major = yes
					}
				}
				random_country = {
					limit = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
						is_major = yes
					}
					country_event = generic.2
				}
			}
			else = {
				random_country = {
					limit = {
						has_government = democratic
						is_faction_leader = yes
						NOT = { has_war_with = ROOT }
					}
					country_event = generic.2
				}
			}
		}
	}

	focus = {
		id = SPR_enemies_of_our_enemy
		available = {
			NOT = {
				has_war_with = GER
				has_war_with = ITA
			}
			NOT = { is_subject_of = SOU }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_war_of_independence }
		mutually_exclusive = { focus = SPR_those_who_would_not_help_us focus = SPR_join_the_global_fight_against_fascism }

		icon = GFX_goal_generic_dangerous_deal
		x = 1
		y = 1
		relative_position_id = SPR_war_of_independence
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			effect_tooltip = {
				every_other_country = {
					limit = {
						OR = {
							tag = GER
							tag = ITA
						}
						exists = yes
						has_capitulated = no
					}
					diplomatic_relation = {
					    country = ROOT
					    relation = non_aggression_pact
					    active = yes
					}
				}
			}
			custom_effect_tooltip = SPR_those_who_would_not_help_us_tt
			every_other_country = {
					limit = {
					OR = {
						tag = GER
						tag = ITA
					}
					exists = yes
					has_capitulated = no
				}
				country_event = { id = lar_spain.71 hours = 6 random_hours = 6 }
			}
		}
	}

	focus = {
		id = SPR_deal_with_the_devil
		available = {
			NOT = { is_subject_of = SOU }
		}
		bypass = {
		}
		prerequisite = { focus = SPR_enemies_of_our_enemy }

		icon = GFX_focus_chi_mission_to_germany
		x = 1
		y = 1
		relative_position_id = SPR_enemies_of_our_enemy
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			effect_tooltip = {
				add_timed_idea = { idea = SPR_deal_with_the_devil days = 730 }
			}
			custom_effect_tooltip = SPR_deal_with_the_devil_tt
			GER = { country_event = { id = lar_spain.74 hours = 6 random_hours = 6 } }
		}
	}

	focus = {
		id = SPR_foreign_industrial_aid
		available = {
			OR = {
				ENG = {
					has_idea = SPR_equipment_shipments
				}
				USA = {
					has_idea = SPR_equipment_shipments
				}
				FRA = {
					has_idea = SPR_equipment_shipments
				}
				AND = {
					has_completed_focus = SPR_enemies_of_our_enemy
					OR = {
						has_non_aggression_pact_with = GER
						has_non_aggression_pact_with = ITA
					}
				}
				NOT = { is_subject_of = SOU }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPR_those_who_would_not_help_us focus = SPR_enemies_of_our_enemy }

		icon = GFX_focus_generic_industry_2
		x = 1
		y = 1
		relative_position_id = SPR_those_who_would_not_help_us
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_foreign_industrial_aid_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			every_state = {
				limit = { has_state_flag = SPR_foreign_industrial_aid_2mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_foreign_industrial_aid_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_foreign_industrial_aid_2civ }
				}
				set_state_flag = SPR_foreign_industrial_aid_2mil
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_stabilize_the_nation
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_fortify_the_central_government focus = SPR_communists_in_the_government }

		icon = GFX_goal_generic_political_pressure
		x = 1
		y = 1
		relative_position_id = SPR_fortify_the_central_government
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_STABILITY}
		completion_reward = {
			custom_effect_tooltip = SPR_recovering_from_civil_war_focus_tt
			add_stability = 0.2
		}
	}

	focus = {
		id = SPR_end_fascism_at_all_costs
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_strengthen_the_anti_fascist_coalition }
		mutually_exclusive = { focus = SPR_oppose_the_communists }

		icon = GFX_focus_generic_anti_fascist_diplomacy
		x = 1
		y = 1
		relative_position_id = SPR_strengthen_the_anti_fascist_coalition
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			swap_ideas = {
				remove_idea = SPR_popular_front_2
				add_idea = SPR_popular_front_3
			}
		}
	}

	focus = {
		id = SPR_communists_in_the_government
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_end_fascism_at_all_costs }

		icon = GFX_focus_generic_soviet_politics
		x = 0
		y = 1
		relative_position_id = SPR_end_fascism_at_all_costs
		cost = 10

		available_if_capitulated = yes

		search_filters = {FOCUS_FILTER_POLITICAL}
		completion_reward = {
			set_politics = {
				ruling_party = communism
			}
			swap_ideas = {
				remove_idea = SPR_popular_front_3
				add_idea = SPR_popular_front_4
			}
			unlock_national_focus = SPR_red_bulwark_in_the_west
			unlock_national_focus = SPR_increase_arms_production
			custom_effect_tooltip = SPR_communists_in_the_government_tt
			# Stalinist
			# SPR_ignacio_hidalgo_de_cisneros
			# SPR_etelvino_vega
			# SPR_francisco_ciutat_de_miguel
			# SPR_dolores_ibarruri
			####
			# Democratic
			# SPR_domenec_batet
			# SPR_toribio_martinez_cabrera
			# SPR_antonio_azarola_y_gresillon
			# SPR_luis_gonzalez_ubieta
			# SPR_indalegio_prieto
			# SPR_nicolas_molero
			# SPR_juan_negrin
			# SPR_francisco_largo_caballero
			# SPR_augusto_barcia_trelles
			# SPR_diego_martinez_barrio
		}
	}

	focus = {
		id = SPR_restore_higher_education
		available = {
			num_of_factories > 50
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPR_fortify_the_central_government focus = SPR_communists_in_the_government }

		icon = GFX_focus_research2
		x = 3
		y = 1
		relative_position_id = SPR_fortify_the_central_government
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SPR_engineering_advances
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_stabilize_the_nation focus = SPR_restore_higher_education }

		icon = GFX_goal_generic_production
		x = 1
		y = 1
		relative_position_id = SPR_stabilize_the_nation
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_3
				}
				remove_ideas = SPA_recovering_from_civil_war_3
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war_2
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war_2
					add_idea = SPA_recovering_from_civil_war_3
				}
			}
			else_if = {
				limit = {
					has_idea = SPA_recovering_from_civil_war
				}
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
			else_if = {
				limit = {
					NOT = { has_global_flag = scw_over }
				}
				effect_tooltip = {
					swap_ideas = {
						remove_idea = SPA_recovering_from_civil_war
						add_idea = SPA_recovering_from_civil_war_2
					}
				}
			}
			add_tech_bonus = {
				name = SPR_engineering_advances
				bonus = 1
				uses = 1
				category = industry
			}
			add_tech_bonus = {
				name = SPR_engineering_advances
				bonus = 1
				uses = 1
				category = light_fighter
			}
			add_tech_bonus = {
				name = SPR_engineering_advances
				bonus = 1
				uses = 1
				category = armor
			}
		}
	}

	focus = {
		id = SPR_rebuild_the_nation
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_engineering_advances }

		icon = GFX_goal_generic_construct_civ_factory
		x = 0
		y = 1
		relative_position_id = SPR_engineering_advances
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_rebuild_the_nation_2civ }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_rebuild_the_nation_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_rebuild_the_nation_2civ }
				}
				set_state_flag = SPR_rebuild_the_nation_2civ
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_reprofessionalize_the_military
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_strengthen_the_anti_fascist_coalition }

		icon = GFX_goal_generic_army_artillery2
		x = 3
		y = 1
		relative_position_id = SPR_strengthen_the_anti_fascist_coalition
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_MANPOWER}
		completion_reward = {
			add_ideas = SPR_professional_military_1
		}
	}

	focus = {
		id = SPR_experiences_from_the_civil_war
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_reprofessionalize_the_military }

		icon = GFX_goal_generic_army_doctrines
		x = 0
		y = 1
		relative_position_id = SPR_reprofessionalize_the_military
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			army_experience = 15
			add_doctrine_cost_reduction = {
				name = SPR_engineering_advances
				cost_reduction = 0.5
				uses = 2
				category = land_doctrine
			}
		}
	}

	focus = {
		id = SPR_a_new_military_academy
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_experiences_from_the_civil_war }
		prerequisite = { focus = SPR_restore_higher_education }

		icon = GFX_focus_generic_military_academy
		x = 0
		y = 2
		relative_position_id = SPR_experiences_from_the_civil_war
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			army_experience = 25
			swap_ideas = {
				remove_idea = SPR_professional_military_1
				add_idea = SPR_professional_military_2
			}
		}
	}

	focus = {
		id = SPR_revive_the_republican_navy
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_strengthen_the_anti_fascist_coalition }

		icon = GFX_goal_generic_construct_naval_dockyard
		x = 5
		y = 1
		relative_position_id = SPR_strengthen_the_anti_fascist_coalition
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_revive_the_republican_navy_1DY }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
				set_state_flag = SPR_revive_the_republican_navy_1DY
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_revive_the_republican_navy_1DY }
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
				set_state_flag = SPR_revive_the_republican_navy_1DY
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_revive_the_republican_navy_1DY }
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
				set_state_flag = SPR_revive_the_republican_navy_1DY
			}
		}
	}

	focus = {
		id = SPR_navy_modernization
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_revive_the_republican_navy }

		icon = GFX_focus_generic_cruiser2
		x = 0
		y = 1
		relative_position_id = SPR_revive_the_republican_navy
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			navy_experience = 25
			add_tech_bonus = {
				name = SPR_navy_modernization
				bonus = 1
				uses = 2
				category = dd_tech
			}
			add_tech_bonus = {
				name = SPR_navy_modernization
				bonus = 1
				uses = 2
				category = cl_tech
				category = ca_tech
			}
		}
	}

	focus = {
		id = SPR_expand_the_naval_academy
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_navy_modernization }
		prerequisite = { focus = SPR_restore_higher_education }

		icon = GFX_goal_generic_navy_doctrines_tactics
		x = 0
		y = 2
		relative_position_id = SPR_navy_modernization
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			navy_experience = 50
			add_doctrine_cost_reduction = {
				name = SPR_navy_modernization
				cost_reduction = 0.5
				uses = 3
				category = naval_doctrine
			}
		}
	}

	focus = {
		id = SPR_prepare_for_the_next_war
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_a_new_military_academy }
		prerequisite = { focus = SPR_expand_the_naval_academy }

		icon = GFX_goal_generic_build_tank
		x = 1
		y = 1
		relative_position_id = SPR_a_new_military_academy
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_prepare_for_the_next_war_2mil }
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}

		search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			add_war_support = 0.1
			add_doctrine_cost_reduction = {
				name = SPR_engineering_advances
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = SPR_prepare_for_the_next_war_2mil
			}
		}
	}

	focus = {
		id = SPR_wartime_industry
		available = {
			has_war = yes
		}
		bypass = {
		}
		prerequisite = { focus = SPR_prepare_for_the_next_war }

		icon = GFX_goal_generic_construct_mil_factory
		x = 2
		y = 1
		relative_position_id = SPR_prepare_for_the_next_war
		cost = 10

		available_if_capitulated = yes

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SPR_wartime_industry_1mil }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		search_filters = {FOCUS_FILTER_INDUSTRY}
		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
				}
				set_state_flag = SPR_wartime_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_wartime_industry_1mil }
				}
				set_state_flag = SPR_wartime_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_wartime_industry_1mil }
				}
				set_state_flag = SPR_wartime_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
					}
					is_core_of = ROOT
					NOT = { has_state_flag = SPR_wartime_industry_1mil }
				}
				set_state_flag = SPR_wartime_industry_1mil
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SPR_fuel_for_the_war_machine
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_wartime_industry }
		
		icon = GFX_goal_generic_construction2
		x = 0
		y = 1
		relative_position_id = SPR_wartime_industry
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPR_fuel_for_the_war_machine
				bonus = 1.5
				uses = 2
				category = excavation_tech
			}
			custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
		}
	}

	focus = {
		id = SPR_join_the_global_fight_against_fascism
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_prepare_for_the_next_war }
		mutually_exclusive = { focus = SPR_enemies_of_our_enemy }

		icon = GFX_focus_generic_anti_fascist_diplomacy
		x = 0
		y = 1
		relative_position_id = SPR_prepare_for_the_next_war
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			every_country = {
				limit = {
					has_government = fascism
					is_major = yes
					NOT = { is_in_faction_with = ROOT }
				}
				ROOT = {
					create_wargoal = {
						target = PREV
						type = topple_government
						expire = 0
					}
				}
			}
		}
	}

	focus = {
		id = SPR_the_anti_fascist_crusade
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPR_join_the_global_fight_against_fascism }

		icon = GFX_focus_generic_strike_at_democracy1
		x = 0
		y = 1
		relative_position_id = SPR_join_the_global_fight_against_fascism
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPR_the_anti_fascist_crusade
		}
	}
}
