ideas = {

	hidden_ideas = { # Used to prevent AI to hold outside of the Iberian Peninsula during the SCW
		SPA_death_before_surrender_capitulation = {

			name = SPR_death_before_surrender

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				surrender_limit = 0.05
				max_surrender_limit_offset = 0.05
			}
		}
	}
	country = {

		SPA_death_before_surrender = {

			name = SPR_death_before_surrender

			picture = SPR_nationalist_remnants

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				surrender_limit = 0.1
				max_surrender_limit_offset = 0.1
				industrial_capacity_factory = 0.1
				weekly_manpower = 500
				training_time_factor = -0.1
				join_faction_tension = 0.50
				generate_wargoal_tension = 0.50
				ai_get_ally_desire_factor = -50
				ai_join_ally_desire_factor = -50	
				equipment_capture = 0.05
			}
		}

		SPA_anti_republican_offensive = {

			picture = SPR_nationalist_remnants

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			targeted_modifier = {
				tag = SPD
				attack_bonus_against = 0.10
				defense_bonus_against = 0.10
			}
		}

		SPA_anti_anarchist_offensive = {

			picture = SPR_nationalist_remnants

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			targeted_modifier = {
				tag = SPC
				attack_bonus_against = 0.10
				defense_bonus_against = 0.10
			}
		}

		SPA_anti_carlist_offensive = {

			picture = SPR_nationalist_remnants

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			targeted_modifier = {
				tag = SPB
				attack_bonus_against = 0.10
				defense_bonus_against = 0.10
			}
		}

		SPA_recovering_from_civil_war = {

			name = SPA_recovering_from_civil_war

			picture = FRA_matignon_agreements

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				ai_get_ally_desire_factor = -500
				ai_join_ally_desire_factor = -500
				join_faction_tension = 1.0
				industrial_capacity_factory = -0.10
				industrial_capacity_dockyard = -0.10
				production_speed_buildings_factor = -0.1
		        required_garrison_factor = -0.10
		        resistance_damage_to_garrison = -0.10
			}

			rule = { 
			     can_decline_call_to_war = yes
                 can_not_declare_war = yes
			}

		}

		SPA_recovering_from_civil_war_2 = {

			name = SPA_recovering_from_civil_war

			picture = FRA_matignon_agreements

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				ai_get_ally_desire_factor = -500
				ai_join_ally_desire_factor = -500
				join_faction_tension = 1.0
				industrial_capacity_factory = -0.05
				industrial_capacity_dockyard = -0.05
				production_speed_buildings_factor = -0.05
		        required_garrison_factor = -0.05	
		        resistance_damage_to_garrison = -0.05
			}

			rule = { 
			can_decline_call_to_war = yes
			}

		}

		SPA_recovering_from_civil_war_3 = {

			name = SPA_recovering_from_civil_war

			picture = FRA_matignon_agreements

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				ai_get_ally_desire_factor = -250
				ai_join_ally_desire_factor = -250
				join_faction_tension = 0.5
			}

			rule = { can_decline_call_to_war = yes }
		}

		SPA_awaiting_the_rebellion = {

			picture = generic_morale_bonus

			allowed = {
				tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				political_power_gain = -0.5
			}
		}

		SPA_carlism_1 = {

			name = SPA_carlism

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
				OR = {
					has_government = democratic
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				war_support_weekly = -0.001
				neutrality_drift = 0.05
				army_defence_factor = -0.1
				army_attack_factor = -0.1
				army_org_factor = -0.1
			}
		}

		SPA_carlism_2 = {

			name = SPA_carlism

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				war_support_weekly = -0.001
				neutrality_drift = 0.03
				army_defence_factor = -0.05
				army_attack_factor = -0.05
				army_org_factor = -0.1
			}
		}

		SPA_carlism_3 = {

			name = SPA_carlism

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				neutrality_drift = 0.01
				army_org_factor = -0.05
			}
		}

		SPA_carlism_4 = {

			name = SPA_carlism

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				conscription = 0.005
				neutrality_drift = 0.01
			}
		}

		SPA_carlism_5 = {

			name = SPA_carlism

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				conscription = 0.01
			}
		}

		SPA_planned_uprising = {

			picture = generic_infantry_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				no_supply_grace = 24
			}
		}

		SPA_spanish_civil_war_commitments = {

			picture = generic_manpower_bonus

			allowed = {
				OR = {
					original_tag = ITA
					original_tag = GER
					original_tag = SOV
					original_tag = FRA
				}
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				send_volunteer_size = 1
				send_volunteers_tension = -0.15
				lend_lease_tension = -0.15
			}
		}

		SPA_foreign_training_staff = {

			picture = german_advisors

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				training_time_factor = -0.10
			}
		}

		SPA_eliminate_the_carlists = {

			picture = SPA_eliminate_the_carlists

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			targeted_modifier = {
				tag = SPB
				attack_bonus_against = 0.10
				defense_bonus_against = 0.10
			}
		}

		SPA_no_compromise_on_carlist_ideals = {

			picture = SPA_carlism

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			targeted_modifier = {
				tag = SPA
				attack_bonus_against = 0.10
				defense_bonus_against = 0.10
			}
		}

		SPA_expand_conscription = {

			picture = generic_manpower_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				conscription = 0.01
			}
		}

		SPA_regional_agrarian_commissions = {

			picture = generic_agrarian_reform

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
			}
		}

		SPA_embrace_the_spanish_destiny = {

			picture = SPA_embrace_the_spanish_destiny

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = { 
				non_core_manpower = 0.02
				compliance_growth = 0.1
			}
		}

		SPA_mandatory_pre_military_training_1 = {

			name = SPA_mandatory_pre_military_training

			picture = generic_infantry_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				conscription = 0.01
				training_time_factor = -0.1
				minimum_training_level = -0.1
			}
		}

		SPA_mandatory_pre_military_training_2 = {

			name = SPA_mandatory_pre_military_training

			picture = generic_infantry_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				conscription = 0.02
				training_time_factor = -0.1
				minimum_training_level = -0.1
			}
		}

		SPA_fascist_economic_aid = {

			picture = generic_production_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				production_speed_arms_factory_factor = 0.1
			}
		}

		SPA_italian_shipbuilding_expertise = {

			picture = generic_navy_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				industrial_capacity_dockyard = 0.1
			}
		}

		SPA_the_duty_to_work = {

			picture = SPA_duty_to_work

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				industrial_capacity_factory = 0.1
			}
		}

		SPA_national_recovery_1 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
			}
		}

		SPA_national_recovery_2 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.05
			}
		}

		SPA_national_recovery_3 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.1
			}
		}

		SPA_national_recovery_4 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.1
				production_speed_industrial_complex_factor = 0.05
			}
		}

		SPA_national_recovery_5 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.1
				production_speed_industrial_complex_factor = 0.1
			}
		}

		SPA_national_recovery_6 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.1
				production_speed_industrial_complex_factor = 0.1
				industrial_capacity_factory = 0.05
				industrial_capacity_dockyard = 0.05
			}
		}

		SPA_national_recovery_7 = {

			name = SPA_national_recovery

			picture = SPA_national_recovery

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				consumer_goods_factor = -0.05
				production_speed_infrastructure_factor = 0.15
				production_speed_industrial_complex_factor = 0.15
				industrial_capacity_factory = 0.05
				industrial_capacity_dockyard = 0.05
			}
		}

		SPA_expand_the_axis_gold_trade = {

			picture = SPR_seize_the_gold_reserves

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				production_speed_buildings_factor = 0.1
				min_export = 0.1
			}
			targeted_modifier = {
				tag = GER
				extra_trade_to_target_factor = 0.05
			}
			targeted_modifier = {
				tag = ITA
				extra_trade_to_target_factor = 0.05
			}
		}

		SPA_a_methodical_approach = {

			picture = CZE_planning_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				max_planning = 0.05
			}
		}

		SPA_the_plan_imperial = {

			picture = generic_sea_focused_navy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				industrial_capacity_dockyard = 0.15
				production_speed_dockyard_factor = 0.15
				experience_gain_navy = 0.05
			}
		}

		SPA_la_division_azul = {

			picture = SPA_la_division_azul

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				send_volunteer_size = 4
				send_volunteers_tension = -0.25
			}
		}

		SPA_disjointed_carlist_juntas = {

			picture = SPA_disjointed_carlist_juntas

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				stability_weekly = -0.0050
				army_defence_factor = -0.1
				army_attack_factor = -0.1
			}
		}

		SPA_crusade_against_democracy_1 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
			}
		}

		SPA_crusade_against_democracy_2 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				conscription = 0.005
			}
		}

		SPA_crusade_against_democracy_3 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				conscription = 0.01
			}
		}

		SPA_crusade_against_democracy_4 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				army_morale_factor = 0.05
				conscription = 0.02
			}
		}

		SPA_crusade_against_democracy_5 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				army_morale_factor = 0.05
				political_power_factor = 0.05
				conscription = 0.03
			}
		}

		SPA_crusade_against_democracy_6 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				army_morale_factor = 0.05
				political_power_factor = 0.05
				conscription = 0.04
			}
		}

		SPA_crusade_against_democracy_7 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.05
				offence = 0.05
				army_org_factor = 0.05
				army_morale_factor = 0.05
				political_power_factor = 0.10
				conscription = 0.04
			}
		}

		SPA_crusade_against_democracy_8 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.10
				offence = 0.10
				army_org_factor = 0.05
				army_morale_factor = 0.05
				political_power_factor = 0.10
				conscription = 0.04
				research_speed_factor = -0.05
				neutrality_drift = 0.02
			}
		}

		SPA_crusade_against_democracy_9 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.10
				offence = 0.10
				army_org_factor = 0.10
				army_morale_factor = 0.10
				political_power_factor = 0.10
				conscription = 0.05
				research_speed_factor = -0.05
				neutrality_drift = 0.03
			}
		}

		SPA_crusade_against_democracy_10 = {

			name = SPA_crusade_against_democracy

			picture = SPA_crusade_against_democracy

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			modifier = {
				defence = 0.1
				offence = 0.1
				army_org_factor = 0.1
				conscription = 0.05
				army_morale_factor = 0.10
				political_power_factor = 0.15
				conscription_factor = 0.10
				consumer_goods_factor = -0.05
				research_speed_factor = -0.05
				no_supply_grace = 24
				neutrality_drift = 0.05
				democratic_acceptance = -50
				communism_acceptance = -50
			}
		}

		SPA_rebuild_the_battlefleet = {

			picture = generic_navy_bonus

			allowed = {
				original_tag = SPR
			}

			allowed_civil_war = {
				always = yes
			}

			research_bonus = {
				naval_equipment = 0.1
			}

			modifier = {
				industrial_capacity_dockyard = 0.1
				repair_speed_factor = 0.15
			}
		}
	}


}