﻿### 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 = 50 y = 2500 }

	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_time_waster
		icon = GFX_goal_generic_production2
		x = 99
		y = 20
		cost = 313
		ai_will_do = {	factor = 1000	}
		available = { is_ai = yes	}
		completion_reward = {}
	}

	focus = {
		id = SPA_a_great_spain
		available = {
			OR = {
				is_ai = no
				date > 1936.1.1
			}
			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_goal_generic_demand_territory
		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 = 15
		}
	}

	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 = 200
		}
	}

	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
		}
	}

	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 = 60
			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
			}
			OR = {
				is_ai = no
				date > 1936.1.1
			}
		}		
		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_goal_generic_national_unity
		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_focus_spa_the_phalanx_ascendant
		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 = -3
		y = 1
		relative_position_id = SPA_the_phalanx_ascendant
		cost = 10

		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 = 5

		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 }
		prerequisite = { focus = SPA_secure_the_national_defense_council }
		
		icon = GFX_goal_generic_construct_mil_factory
		x = 1
		y = 1
		relative_position_id = SPA_bolster_offensive_infrastructure
		cost = 10

		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 = 5

		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 = 5

		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 = 5

		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 = 10

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

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

		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_goal_generic_intelligence_exchange
		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_absorb_carlist_remnants
		available = {
			NOT = { country_exists = SPB }
		}
		bypass = {
		}
		prerequisite = { focus = SPA_eliminate_the_carlists }
		
		icon = GFX_goal_generic_dangerous_deal
		x = -1
		y = 1
		relative_position_id = SPA_eliminate_the_carlists
		cost = 10

		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_goal_generic_propaganda
		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_focus_generic_strike_at_democracy2
		x = -1
		y = 1
		relative_position_id = SPA_establish_the_directory
		cost = 10

		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 = 10

		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 = 10

		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_develop_all_talent
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_a_one_party_state }
		
		icon = GFX_focus_research
		x = -3
		y = 1
		relative_position_id = SPA_a_one_party_state
		cost = 10

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

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

		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_the_national_syndicalist_state
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_a_one_party_state }
		
		icon = GFX_goal_generic_propaganda
		x = 1
		y = 1
		relative_position_id = SPA_a_one_party_state
		cost = 10

		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 = {
				drop_cosmetic_tag = yes
				set_cosmetic_tag = SPA_spanish_empire
				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_syndicalize_production
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state }
		
		icon = GFX_goal_generic_production2
		x = -1
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		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 = {
			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_strengthen_the_supreme_reality_of_spain
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state }
		
		icon = GFX_focus_spa_strengthen_the_supreme_reality_of_spain
		x = -3
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		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.1
			every_owned_state = {
				limit = {
					OR = {
						state = 165
						state = 171
						state = 792
					}
				}
				remove_dynamic_modifier = { modifier = autonomous_state }
			}
		}
	}

	focus = {
		id = SPA_glory_and_wealth_on_the_sea_lanes
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_strengthen_the_supreme_reality_of_spain }
		
		icon = GFX_goal_generic_navy_doctrines_tactics
		x = -2
		y = 1
		relative_position_id = SPA_strengthen_the_supreme_reality_of_spain
		cost = 10

		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 = 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 = 10

		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_a_great_maritime_power
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_improve_domestic_naval_facilities }
		
		icon = GFX_goal_generic_navy_battleship
		x = 0
		y = 1
		relative_position_id = SPA_improve_domestic_naval_facilities
		cost = 10

		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 = {
			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
			}
		}
	}

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

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_RESEARCH}
		completion_reward = {
			add_tech_bonus = {
				name = SPA_commerce_protection
				bonus = 1
				uses = 1
				category = ca_tech
			}

			add_mastery_bonus = {
				name = SPA_commerce_protection
				bonus = 0.1
				days = 240
				track = screens

			}
		}
	}

	focus = {
		id = SPA_exemplify_the_art_and_science_of_warfare
		available = {
			num_of_factories > 50
		}
		bypass = {
		}
		prerequisite = { focus = SPA_strengthen_the_supreme_reality_of_spain }
		
		icon = GFX_focus_research2
		x = 1
		y = 1
		relative_position_id = SPA_strengthen_the_supreme_reality_of_spain
		cost = 10

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

	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_goal_generic_demand_territory
		x = 0
		y = 2
		relative_position_id = SPA_strengthen_the_supreme_reality_of_spain
		cost = 10

		available_if_capitulated = yes
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_WAR_SUPPORT}
		completion_reward = {
			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
		}
	}

	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 }
						}
					}
				}
				AND = {
					ENG = { owns_state = 118 }
					NOT = { is_in_faction_with = ENG }
				}
			}
		}
		bypass = {
			NOT = { country_exists = POR }
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_focus_generic_attack_portugal
		x = -2
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 10

		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
					}
				}
				create_wargoal = {
					type = take_state_focus
					target = ENG
					generator = { 118 }
					expire = 0
				}
			}
		}
	}

	focus = {
		id = SPA_absorb_the_portuguese_empire
		available = {
			
		}
		bypass = {
		}
		prerequisite = { focus = SPA_unite_iberia }
		
		icon = GFX_goal_generic_forceful_treaty
		x = 1
		y = 1
		relative_position_id = SPA_unite_iberia
		cost = 10

		available_if_capitulated = yes

		completion_reward = {

			IF = {
				limit = {
					NOT = {
						any_state = {
							AND = {
								is_core_of = POR
								is_controlled_by = ROOT
							}
						}
					}
				}
				custom_effect_tooltip = SPA_absorb_the_portuguese_empire_tt
			}
			every_state = {
				limit = {
					is_core_of = POR
					NOT = { 
						is_core_of = ROOT
					}
					is_controlled_by = ROOT
				}
				add_core_of = ROOT
			}

			if = {
				limit = {
					country_exists = BRA
					BRA = {
						NOT = { is_subject_of = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
				create_wargoal = {
				    type = annex_everything
				    target = BRA
				    expire = 0
				}
			}
			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_claim_the_aragonese_possessions
		available = {
			NOT = {
				is_in_faction_with = ITA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_unite_iberia }
		
		icon = GFX_goal_generic_territory_or_war
		x = 0
		y = 2
		relative_position_id = SPA_unite_iberia
		cost = 10

		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_reclaim_spanish_africa
		available = {
			NOT = {
				is_in_faction_with = FRA
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_goal_generic_occupy_states_ongoing_war
		x = 0
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 10

		available_if_capitulated = yes

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

	focus = {
		id = SPA_reassert_american_dominance
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_goal_generic_political_pressure
		x = 1
		y = 2
		relative_position_id = SPA_the_will_to_empire
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			custom_effect_tooltip = SPA_reassert_american_dominance_tt
		}
	}

	focus = {
		id = SPA_retake_the_americas
		available = {
			OR = {
				NOT = { is_in_faction_with = ARG }
				NOT = { is_in_faction_with = CHL }
				NOT = { is_in_faction_with = PRU }
				NOT = { is_in_faction_with = VEN }
				NOT = { is_in_faction_with = COL }
				NOT = { is_in_faction_with = BOL }
				NOT = { is_in_faction_with = MEX }
				NOT = { is_in_faction_with = USA }
			}
		}
		bypass = {
		}
		prerequisite = { focus = SPA_reassert_american_dominance }
		
		icon = GFX_focus_spa_the_war_of_vengeance
		x = 0
		y = 1
		relative_position_id = SPA_reassert_american_dominance
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = {
					NOT = { is_in_faction_with = ARG }
				}
				create_wargoal = {
				    type = annex_everything
				    target = ARG
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = CHL }
				}
				create_wargoal = {
				    type = annex_everything
				    target = CHL
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = PRU }
				}
				create_wargoal = {
				    type = annex_everything
				    target = PRU
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = VEN }
				}
				create_wargoal = {
				    type = annex_everything
				    target = VEN
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = COL }
				}
				create_wargoal = {
				    type = annex_everything
				    target = COL
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = BOL }
				}
				create_wargoal = {
				    type = annex_everything
				    target = BOL
				    expire = 0
				}
			}
			if = {
				limit = {
					NOT = { is_in_faction_with = MEX }
				}
				create_wargoal = {
				    type = annex_everything
				    target = MEX
				    expire = 0
				}
			}
			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
				}
			}
		}
	}

	focus = {
		id = SPA_embrace_pan_hispanism

		icon = GFX_focus_CHL_promote_pan_hispanic_rhetoric

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

		prerequisite = {
			focus = SPA_retake_the_americas
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
			is_subject = no
			custom_trigger_tooltip = {
				tooltip = SPA_embrace_pan_hispanism_tt
				CHL = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				ARG = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				ECU = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				PRU = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				URG = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				PAR = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				BOL = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				COL = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				VEN = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				PAN = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				COS = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				NIC = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				HON = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				ELS = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				GUA = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				MEX = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				DOM = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				CUB = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				PUE = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
			}
			AND = {
				controls_state = 375
				controls_state = 376
				controls_state = 377
				controls_state = 378
				controls_state = 379
				controls_state = 380
				controls_state = 382
				controls_state = 366
			}
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			add_stability = -0.1
			add_political_power = -100

			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {
						state = 375
						state = 376
						state = 377
						state = 378
						state = 379
						state = 380
						state = 382
						state = 366
						is_core_of = CHL 
						is_core_of = ARG
						is_core_of = URG
						is_core_of = PAR
						is_core_of = PRU
						is_core_of = BOL
						is_core_of = ECU
						is_core_of = VEN
						is_core_of = COL
						is_core_of = PAN
						is_core_of = COS
						is_core_of = NIC
						is_core_of = HON
						is_core_of = ELS
						is_core_of = GUA
						is_core_of = MEX
						is_core_of = CUB
						is_core_of = DOM
						is_core_of = PUE
					}
				}
				add_core_of = ROOT
			}

			hidden_effect = {
				news_event = { 
					id = lar_spain.100
					days = 1
					random_days = 2
				}
			}

		}
	}

	focus = {
		id = SPA_embrace_the_spanish_destiny
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_will_to_empire }
		
		icon = GFX_goal_demand_sudetenland
		x = 2
		y = 1
		relative_position_id = SPA_the_will_to_empire
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = SPA_embrace_the_spanish_destiny
		}
	}

	focus = {
		id = SPA_the_national_and_popular_army_of_spain
		available = {
			has_global_flag = scw_over
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state focus = SPA_fuse_the_parties }
		
		icon = GFX_goal_generic_army_doctrines
		x = 2
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		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_mandatory_pre_military_training
		available = {
		}
		bypass = {
		}
		prerequisite = { focus = SPA_the_national_syndicalist_state }
		prerequisite = { focus = SPA_the_national_and_popular_army_of_spain }
		
		icon = GFX_focus_generic_military_academy
		x = 0
		y = 2
		relative_position_id = SPA_the_national_syndicalist_state
		cost = 10

		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 = 0
		y = 1
		relative_position_id = SPA_mandatory_pre_military_training
		cost = 10

		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_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_the_national_syndicalist_state focus = SPA_fuse_the_parties }

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		icon = GFX_goal_support_fascism
		x = 4
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		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_the_national_syndicalist_state focus = SPA_fuse_the_parties }
		
		icon = GFX_goal_generic_consumer_goods
		x = 6
		y = 1
		relative_position_id = SPA_the_national_syndicalist_state
		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_from_template = {
				template = faction_template_european_dominance
				name = SPA_latin_bloc
				icon = GFX_faction_logo_generic_15
			}

			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 = 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_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 = 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_controlled_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 = 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 = 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_mastery_bonus = {
				name = SPR_the_peoples_fleet
				bonus = 0.2
				days = 180
				track = submarines
			}
		}
	}

	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_from_template = {
				template = faction_template_POR_popular_front_bloc
				name = SPC_international_bureau_of_revolutionary_socialist_unity
				icon = GFX_faction_logo_generic_9 
			}

			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 = {
							OR = {
								is_on_continent = asia
								is_on_continent = australia
							}
						}
					}
				}
				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 = 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 = 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
		}
	}

}
