joint_focus = {
	id = SSB_the_saadabad_pact
	icon = GFX_focus_TUR_treaty_of_saadabad

	x = 0
	y = 0

	offset = {
		x = 64
		y = 0
		trigger = {
			tag = IRQ
			AND = {
				NOT = { has_completed_focus = IRQ_promote_kurdish_culture }
				NOT = { has_completed_focus = IRQ_party_of_national_brotherhood }
				NOT = { has_completed_focus = IRQ_rally_behind_the_hashemite_dynasty }
			}
		}
	}

	offset = {
		x = 38
		y = 0
		trigger = {
			tag = IRQ
			AND = {
				has_completed_focus = IRQ_promote_kurdish_culture
				NOT = { has_completed_focus = IRQ_party_of_national_brotherhood }
				NOT = { has_completed_focus = IRQ_rally_behind_the_hashemite_dynasty }
			}
		}
	}


	offset = {
		x = 58
		y = 0
		trigger = {
			tag = IRQ
			AND = {
				NOT = { has_completed_focus = IRQ_promote_kurdish_culture }
				OR = {
					has_completed_focus = IRQ_party_of_national_brotherhood
					has_completed_focus = IRQ_rally_behind_the_hashemite_dynasty
				}
			}
		}
	}

	offset = {
		x = 61
		y = 0
		trigger = {
			tag = AFG
		}
	}

	offset = {
		x = -25
		y = 0
		trigger = {
			has_game_rule = {
				rule = obsolete_focus_branches_visibility
				option = HIDE
			}
			has_completed_focus = AFG_support_king_zahir
		}
	}

	offset = {
		y = 0
		x = 70
		trigger = {
			tag = PER
		}
	}

	offset = {
        x = -51
        y = 0
        trigger = {
        	tag = PER
            has_game_rule = {
                rule = obsolete_focus_branches_visibility
                option = HIDE
            }
            has_completed_focus = PER_legacy_of_greatness
        }
    }

    offset = {
        x = -51
        y = 0
        trigger = {
        	tag = PER
            has_game_rule = {
                rule = obsolete_focus_branches_visibility
                option = HIDE
            }
            has_completed_focus = PER_stand_with_giants
        }
    }

	offset = {
		x = -10
		y = 0
		trigger = {
			tag = TUR
		}
	}

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		NOT = {
			has_war_with = PER
			has_war_with = IRQ
			has_war_with = AFG
			has_war_with = TUR
		}
	}

    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY}

	allow_branch = {
		has_dlc = "Graveyard of Empires"
	}

	completion_reward_joint_originator = {
		set_variable = { SSB_trade_cost_for_target_factor = 0 }
		set_variable = { SSB_production_speed_infrastructure_factor = 0 }
		set_variable = { SSB_trade_opinion_factor = 0 }
		set_variable = { SSB_cic_to_target_factor = 0 }
		set_variable = { SSB_mic_to_target_factor = 0 }
		set_variable = { SSB_production_speed_arms_factory_factor = 0 }
		set_variable = { SSB_war_support_factor = 0 }
		set_variable = { SSB_stability_factor = 0 }
		set_variable = { SSB_experience_gain_army = 0 }
		set_variable = { SSB_experience_gain_air = 0 }
		set_variable = { SSB_experience_gain_navy = 0 }
		set_variable = { SSB_country_resource_oil = 0 }
		set_variable = { SSB_country_resource_chromium = 0 }
		set_variable = { SSB_army_defence_against_major_factor = 0 }
		set_variable = { SSB_army_defence_against_minor_factor = 0 }
		set_variable = { SSB_conscription_factor = 0 }
		set_variable = { SSB_intelligence_agency_defense = 0 }
		set_variable = { SSB_production_factory_efficiency_gain_factor = 0 }
		set_variable = { SSB_production_factory_max_efficiency_factor = 0 }
		set_variable = { SSB_acclimatization_hot_climate_gain_factor = 0 }
		set_variable = { SSB_heat_attrition_factor = 0 }
		set_variable = { SSB_special_forces_cap = 0 }
		set_variable = { SSB_local_resources_factor = 0 }
		set_variable = { SSB_justify_war_goal_time = 0 }
		set_variable = { SSB_opinion_gain_monthly = 0 }
		set_variable = { SSB_annex_cost_factor = 0 }
		set_variable = { SSB_political_power_factor = 0 }
		set_variable = { SSB_agency_upgrade_time = 0 }

		set_country_flag = SSB_is_saadabad_leader
		add_dynamic_modifier = { modifier = SSB_saadabad_pact }
		# These checks may look unecessary/redundant. It's not, this is needed for the tooltip to look right.
		if = {
			limit = {
				NOT = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
			}
			add_to_variable = {
				var = SSB_stability_factor
				value = 0.05
				tooltip = stability_factor_tt
			}
		}
		else = {
			hidden_effect = {
				add_to_variable = {
					var = SSB_stability_factor
					value = 0.05
					tooltip = stability_factor_tt
				}
			}
		}

		if = {
			limit = {
				NOT = { has_event_target = SSB_leader }
			}
			ROOT = { save_global_event_target_as = SSB_leader } 
		}
	}

	completion_reward_joint_member = {
		country_event = { id = PER_imperial_events.200 hours = 2}
	}
}

joint_focus = {
	id = SSB_military_cooperation
	icon = GFX_focus_BRA_reach_out_to_military_dem
	prerequisite = { focus = SSB_the_saadabad_pact }
	relative_position_id = SSB_the_saadabad_pact

	x = -1
	y = 1

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_INDUSTRY}

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_war_support_factor
			value = 0.05
			tooltip = war_support_factor_tt
		}
		add_to_variable = {
			var = SSB_production_speed_arms_factory_factor
			value = 0.05
			tooltip = production_speed_arms_factory_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_economic_cooperation
	icon = GFX_focus_AFG_a_modern_economy
	prerequisite = { focus = SSB_the_saadabad_pact }
	relative_position_id = SSB_the_saadabad_pact

	x = 1
	y = 1

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_INTERNATIONAL_TRADE FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY}

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_production_speed_infrastructure_factor
			value = 0.05
			tooltip = production_speed_infrastructure_factor_tt
		}
		add_to_variable = {
			var = SSB_stability_factor
			value = 0.05
			tooltip = stability_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_baghlan_sugar_factory_branches
	icon = GFX_focus_AFG_sugar_factory
	prerequisite = { focus = SSB_economic_cooperation }
	relative_position_id = SSB_economic_cooperation

	x = 2
	y = 1

	cost = 5

	text_icon = SSB_AFG_focus_style

	available = {
		tag = AFG
		has_completed_focus = AFG_sugar_processing
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

    search_filters = { FOCUS_FILTER_INDUSTRY }

	bypass = {}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_production_factory_max_efficiency_factor
			value = 0.075
			tooltip = production_factory_max_efficiency_factor_tt
		}
		add_to_variable = {
			var = SSB_production_factory_efficiency_gain_factor
			value = 0.075
			tooltip = production_factory_efficiency_gain_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_expand_road_and_rail_connections
	icon = GFX_focus_generic_railroad
	prerequisite = { focus = SSB_economic_cooperation }
	relative_position_id = SSB_economic_cooperation

	x = 0
	y = 1

	cost = 10

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
		IRQ = {
			has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			has_civil_war = no
		}
		AFG = {
			has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			has_civil_war = no
		}
		PER = {
			has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			has_civil_war = no
		}
		TUR = {
			has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			has_civil_war = no
		}
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		custom_trigger_tooltip = {
			tooltip = FOCUS_WILL_BYPASS_IF_UNAVAILABLE
			OR = {
				IRQ = { NOT = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } } }
				IRQ = { has_civil_war = yes }
				AFG = { NOT = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } } }
				AFG = { has_civil_war = yes }
				PER = { NOT = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } } }
				PER = { has_civil_war = yes }
				TUR = { NOT = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } } }
				TUR = { has_civil_war = yes }
			}
		}
		
	}

	ai_will_do = {
		factor = 0
	}

	bypass_effect = {
		set_global_flag = SSB_this_was_bypassed_dt
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL}

	completion_reward_joint_originator = {

		if = {
			limit = {
				NOT = {
					has_global_flag = SSB_this_was_bypassed_dt
				}
			}
			build_railway = {
				level = 2
				build_only_on_allied = no
				fallback = yes
				#path = { 11829 11811 6871 3951 6808 9806 11784 11747 804 3862 3964 6977 6888 9761 6965 9860 876 10399 9858 10497 12318 12476 10811 3916 8123 3795 12046 2097 12855 829 5050 2065 8040 1982 8125 10922 10837 12818 12704 12748 8009 1888 10806 12871 8053 12788 1995 7916 10737 }

				path = { 11829 14737 11811 890 3905 6908 11747 804 11844 3807 3870 921 6977 9777 9761 6965 9860 876 11739 10497 12318 7530 10811 13734 10106 1600 3795 13736 2097 12855 829 5050 2065 1982 10922 10837 10768 10385 7602 7573 5073 1957 1888 10806 12871 8053 12788 1995 7916 10737 }

				start_province = 11829
				target_province = 10737
			}
			if = {
				limit = {
					IRQ = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = IRQ }
				}
				give_military_access = IRQ
			}
			if = {
				limit = {
					PER = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = PER }
				}
				give_military_access = PER
			}
			if = {
				limit = {
					AFG = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = AFG }
				}
				give_military_access = AFG
			}
			if = {
				limit = {
					TUR = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = TUR }
				}
				give_military_access = TUR
			}
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_production_speed_infrastructure_factor
				value = 0.1
				tooltip = production_speed_infrastructure_factor_tt
			}
		}
	}

	completion_reward_joint_member = {
		if = {
			limit = {
				NOT = {
					has_global_flag = SSB_this_was_bypassed_dt
				}
			}
			if = {
				limit = {
					IRQ = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = IRQ }
				}
				give_military_access = IRQ
			}
			if = {
				limit = {
					PER = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = PER }
				}
				give_military_access = PER
			}
			if = {
				limit = {
					AFG = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = AFG }
				}
				give_military_access = AFG
			}
			if = {
				limit = {
					TUR = { has_dynamic_modifier = { modifier = SSB_saadabad_pact } }
					NOT = { tag = TUR }
				}
				give_military_access = TUR
			}
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_production_speed_infrastructure_factor
				value = 0.075
				tooltip = production_speed_infrastructure_factor_tt
			}
		}
	}
}

joint_focus = {
	id = SSB_integration_of_our_infrastructure
	icon = GFX_focus_GER_integrated_economies
	prerequisite = { focus = SSB_expand_road_and_rail_connections }
	relative_position_id = SSB_expand_road_and_rail_connections

	x = 0
	y = 1

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_INTERNATIONAL_TRADE FOCUS_FILTER_STABILITY}

	completion_reward = {
		add_ideas = SSB_saadabad_trade_agreement
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_stability_factor
			value = 0.05
			tooltip = stability_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_berlin_baghdad_railway_into_iran_afghanistan
	icon = GFX_focus_IRQ_train
	prerequisite = { focus = SSB_expand_road_and_rail_connections }
	relative_position_id = SSB_expand_road_and_rail_connections

	x = 3
	y = 1

	cost = 5

	text_icon = SSB_IRQ_focus_style

	available = {
		tag = IRQ
		has_completed_focus = IRQ_finish_the_berlin_baghdad_railway
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = { FOCUS_FILTER_INTERNATIONAL_TRADE FOCUS_FILTER_INDUSTRY }

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_trade_opinion_factor
			value = 0.3
			tooltip = trade_opinion_factor_tt
		}
		add_to_variable = {
			var = SSB_production_speed_infrastructure_factor
			value = 0.06
			tooltip = production_speed_infrastructure_factor_tt
		}
	}

	completion_reward_joint_member = {
		country_event = {
			id = PER_ssb_events.7
			hours = 6
		}
	}
}

joint_focus = {
	id = SSB_joint_military_exercises
	icon = GFX_focus_generic_advanced_military_studies
	prerequisite = { focus = SSB_military_cooperation }
	relative_position_id = SSB_military_cooperation

	x = 0
	y = 2

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_ARMY_XP FOCUS_FILTER_AIR_XP FOCUS_FILTER_NAVY_XP}

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_experience_gain_army
			value = 0.15
			tooltip = experience_gain_army_tt
		}
		add_to_variable = {
			var = SSB_experience_gain_air
			value = 0.1
			tooltip = experience_gain_air_tt
		}
		add_to_variable = {
			var = SSB_experience_gain_navy
			value = 0.05
			tooltip = experience_gain_navy_tt
		}
	}

	completion_reward_joint_originator = {
		army_experience = 35
		air_experience = 20
		navy_experience = 10
	}
}

joint_focus = {
	id = SSB_coordinate_military_production
	icon = GFX_focus_PER_limit_foreign_influence
	prerequisite = { focus = SSB_military_cooperation }
	relative_position_id = SSB_military_cooperation

	x = -3
	y = 1

	cost = 10

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_POLITICAL}

	completion_reward_joint_originator = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_justify_war_goal_time
			value = -0.20
			tooltip = justify_war_goal_time_tt
		}
		add_to_variable = {
			var = SSB_annex_cost_factor
			value = -0.20
			tooltip = annex_cost_factor_tt
		}
		add_to_variable = {
			var = SSB_political_power_factor
			value = 0.125
			tooltip = political_power_factor_tt
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_justify_war_goal_time
			value = -0.15
			tooltip = justify_war_goal_time_tt
		}
		add_to_variable = {
			var = SSB_annex_cost_factor
			value = -0.15
			tooltip = annex_cost_factor_tt
		}
		add_to_variable = {
			var = SSB_political_power_factor
			value = 0.075
			tooltip = political_power_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_savak_protect_us
	icon = GFX_focus_PER_form_savak
	prerequisite = { focus = SSB_coordinate_military_production }
	relative_position_id = SSB_coordinate_military_production

	x = 0
	y = 1

	cost = 5

	text_icon = SSB_PER_focus_style

	available = {
		tag = PER
		has_completed_focus = PER_form_savak
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = { FOCUS_FILTER_POLITICAL }

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_intelligence_agency_defense
			value = 0.2
			tooltip = intelligence_agency_defense_tt
		}
		add_to_variable = {
			var = SSB_agency_upgrade_time
			value = -0.2
			tooltip = agency_upgrade_time_tt
		}
	}
}

joint_focus = {
	id = SSB_expand_turkeys_military_infrastructure
	icon = GFX_focus_GRE_a_land_of_mountains
	prerequisite = { focus = SSB_joint_military_exercises focus = SSB_integration_of_our_infrastructure }
	relative_position_id = SSB_joint_military_exercises

	x = -2
	y = 2

	cost = 5

	text_icon = SSB_TUR_focus_style

	available = {
		tag = TUR
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		TUR = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

	completion_reward_joint_originator = {
		TUR = { # tag for tooltip purposes
			add_tech_bonus = {
				name = SSB_expand_turkeys_military_infrastructure
				bonus = 1.0
				uses = 1
				category = mountaineers_tech
			}
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_special_forces_cap
				value = 0.1
				tooltip = special_forces_cap_tt
			}
		}
	}

	completion_reward_joint_member = {
		set_technology = {
			tech_mountaineers = 1
			popup = no
		}
		add_tech_bonus = {
			name = SSB_expand_turkeys_military_infrastructure
			bonus = 0.5
			uses = 1
			category = mountaineers_tech
		}
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_special_forces_cap
			value = 0.1
			tooltip = special_forces_cap_tt
		}
	}
}

joint_focus = {
	id = SSB_expand_afghanistans_military_infrastructure
	icon = GFX_focus_PER_desert_training
	prerequisite = { focus = SSB_joint_military_exercises focus = SSB_integration_of_our_infrastructure }
	relative_position_id = SSB_joint_military_exercises

	x = 0
	y = 2

	cost = 5

	text_icon = SSB_AFG_focus_style

	available = {
		tag = AFG
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		AFG = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	search_filters = {}

	completion_reward_joint_originator = {
		AFG = { # tag for tooltip purposes
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_acclimatization_hot_climate_gain_factor
				value = 0.25
				tooltip = acclimatization_hot_climate_gain_factor_tt
			}
			add_to_variable = {
				var = SSB_terrain_penalty_reduction
				value = -0.25
				tooltip = heat_attrition_factor_tt
			}
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_acclimatization_hot_climate_gain_factor
			value = 0.20
			tooltip = acclimatization_hot_climate_gain_factor_tt
		}
		add_to_variable = {
			var = SSB_terrain_penalty_reduction
			value = -0.20
			tooltip = heat_attrition_factor_tt
		}
	}

}

joint_focus = {
	id = SSB_expand_iraqs_military_infrastructure
	icon = GFX_focus_generic_resource_extraction
	prerequisite = { focus = SSB_joint_military_exercises focus = SSB_integration_of_our_infrastructure }
	relative_position_id = SSB_joint_military_exercises

	x = 2
	y = 2

	cost = 5

	text_icon = SSB_IRQ_focus_style

	available = {
		tag = IRQ
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		IRQ = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	search_filters = {FOCUS_FILTER_INDUSTRY}

	completion_reward_joint_originator = {
		IRQ = { # tag for tooltip purposes
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_local_resources_factor
				value = 0.15
				tooltip = local_resources_factor_tt
			}
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_local_resources_factor
			value = 0.10
			tooltip = local_resources_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_expand_irans_military_infrastructure
	icon = GFX_focus_generic_military_industry
	prerequisite = { focus = SSB_joint_military_exercises focus = SSB_integration_of_our_infrastructure }
	relative_position_id = SSB_joint_military_exercises

	x = 4
	y = 2

	cost = 5

	text_icon = SSB_PER_focus_style

	available = {
		tag = PER
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		PER = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	search_filters = {FOCUS_FILTER_INDUSTRY}

	completion_reward_joint_originator = {
		PER = { # tag for tooltip purposes
			custom_effect_tooltip = SSB_spirit_tooltip
			add_to_variable = {
				var = SSB_production_speed_arms_factory_factor
				value = 0.10
				tooltip = production_speed_arms_factory_factor_tt
			}
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_production_speed_arms_factory_factor
			value = 0.075
			tooltip = production_speed_arms_factory_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_expand_turkish_chromium_deposits
	icon = GFX_focus_generic_chromium
	prerequisite = { focus = SSB_expand_turkeys_military_infrastructure }
	relative_position_id = SSB_expand_turkeys_military_infrastructure

	x = -1
	y = 1

	cost = 5

	text_icon = SSB_TUR_focus_style

	available = {
		tag = TUR
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		TUR = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_INDUSTRY}

	completion_reward = {

	}

	completion_reward_joint_originator = {
		TUR = {
			custom_effect_tooltip = SSB_chromium_2_tt
		}
		hidden_effect = {
			TUR = {
				capital_scope = {
					add_resource = {
						type = oil
						amount = 4
					}
					add_resource = {
						type = tungsten
						amount = 5
					}
					add_resource = {
						type = aluminium
						amount = 6
					}
					add_resource = {
						type = steel
						amount = 6
					}
				}
			}
			PER = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.11 hours = 6 }
				}
			}
			AFG = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.11 hours = 6 }
				}
			}
			IRQ = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.11 hours = 6 }
				}
			}
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_chromium_tt
		hidden_effect = {
			capital_scope = {
				add_resource = {
					type = chromium
					amount = 10
				}
			}
		}
	}
}

joint_focus = {
	id = SSB_expand_iranian_oil_fields
	icon = GFX_focus_PER_increase_oil_sales
	prerequisite = { focus = SSB_expand_irans_military_infrastructure }
	relative_position_id = SSB_expand_irans_military_infrastructure

	x = 1
	y = 1

	cost = 5

	text_icon = SSB_PER_focus_style

	available = {
		tag = PER
		SSB_basic_available_trigger = yes
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {
		PER = {
			NOT = {
				has_dynamic_modifier = { modifier = SSB_saadabad_pact }
			}
		}
	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = { SSB_basic_available_trigger = yes }

	search_filters = {FOCUS_FILTER_INDUSTRY}

	completion_reward_joint_originator = {
		PER = {
			custom_effect_tooltip = SSB_oil_2_tt
		}
		hidden_effect = {
			PER = {
				capital_scope = {
					add_resource = {
						type = tungsten
						amount = 4
					}
					add_resource = {
						type = aluminium
						amount = 5
					}
					add_resource = {
						type = steel
						amount = 6
					}
					add_resource = {
						type = chromium
						amount = 6
					}
				}
			}
			TUR = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.10 hours = 6 }
				}
			}
			AFG = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.10 hours = 6 }
				}
			}
			IRQ = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = SSB_saadabad_pact }
					}
					country_event = { id = PER_SSB_events.10 hours = 6 }
				}
			}
		}
	}

	completion_reward_joint_member = {
		custom_effect_tooltip = SSB_oil_tt
		hidden_effect = {
			capital_scope = {
				add_resource = {
					type = oil
					amount = 10
				}
			}
		}
	}
}

joint_focus = {
	id = SSB_combined_arms
	icon = GFX_goal_generic_alliance
	prerequisite = { focus = SSB_expand_turkeys_military_infrastructure focus = SSB_expand_afghanistans_military_infrastructure focus = SSB_expand_iraqs_military_infrastructure focus = SSB_expand_irans_military_infrastructure }
	relative_position_id = SSB_the_saadabad_pact

	x = -1
	y = 7

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
		if = {
			limit = { tag = PER }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = IRQ
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = IRQ }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = PER
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = AFG }
			OR = {
				is_in_faction_with = PER
				is_in_faction_with = IRQ
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = TUR }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = IRQ
				is_in_faction_with = PER
			}
		}
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = {
		SSB_basic_available_trigger = yes
		OR = {
			is_in_faction_with = PER
			is_in_faction_with = AFG
			is_in_faction_with = IRQ
			is_in_faction_with = TUR
		}
	}

	search_filters = {FOCUS_FILTER_MANPOWER}

	completion_reward = {
		custom_effect_tooltip = SSB_spirit_tooltip
		add_to_variable = {
			var = SSB_conscription_factor
			value = 0.05
			tooltip = conscription_factor_tt
		}
		add_to_variable = {
			var = SSB_army_defence_against_minor_factor
			value = 0.05
			tooltip = army_defence_against_minor_factor_tt
		}
		add_to_variable = {
			var = SSB_army_defence_against_major_factor
			value = 0.15
			tooltip = army_defence_against_major_factor_tt
		}
	}
}

joint_focus = {
	id = SSB_saadabad_research_cooperation
	icon = GFX_focus_research2
	prerequisite = { focus = SSB_expand_turkeys_military_infrastructure focus = SSB_expand_afghanistans_military_infrastructure focus = SSB_expand_iraqs_military_infrastructure focus = SSB_expand_irans_military_infrastructure }
	relative_position_id = SSB_the_saadabad_pact

	x = 1
	y = 7

	cost = 5

	text_icon = SSB_AFG_IRQ_PER_TUR_focus_style

	available = {
		SSB_basic_available_trigger = yes
		if = {
			limit = { tag = PER }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = IRQ
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = IRQ }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = PER
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = AFG }
			OR = {
				is_in_faction_with = PER
				is_in_faction_with = IRQ
				is_in_faction_with = TUR
			}
		}
		if = {
			limit = { tag = TUR }
			OR = {
				is_in_faction_with = AFG
				is_in_faction_with = IRQ
				is_in_faction_with = PER
			}
		}
	}


    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

	bypass = {

	}

	ai_will_do = {
		factor = 0
	}

	joint_trigger = {
		SSB_basic_available_trigger = yes
		OR = {
			is_in_faction_with = PER
			is_in_faction_with = AFG
			is_in_faction_with = IRQ
			is_in_faction_with = TUR
		}
	}
	search_filters = {FOCUS_FILTER_RESEARCH}

	completion_reward = {
		add_to_tech_sharing_group = SSB_tech_sharing_group
		country_event = {
			id = PER_ssb_events.9
			hours = 12
		}
	}
}