doctrine_marriage_type = {
	group = "marriage"
	
	doctrine_concubine_regula = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_concubine_regula }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}

		is_shown = {
			religion_tag = regula_religion
		}

		parameters = {
			number_of_spouses = 999
#			number_of_consorts = 0 # To avoid prestige penalties.
		}

		character_modifier = {
			name = doctrine_concubine_regula_modifier
		 	opinion_of_male_rulers = 20
		}
	}

	doctrine_monogamy = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_monogamy }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 1
			marriage_event = yes
		}
	}

	doctrine_polygamy = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_polygamy }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 4
			spouse_piety_loss = yes
		}
	}

	doctrine_concubines = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_concubines }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 1
			number_of_consorts = 3
		}
	}
}

doctrine_gender = {
	group = "main_group"

	doctrine_gender_magister_dominated = {
		is_shown = {
			religion_tag = regula_religion
		}
		piety_cost = {
			value = faith_doctrine_cost_high
			if = {
				limit = { has_doctrine = doctrine_gender_female_dominated }
				multiply = faith_unchanged_doctrine_cost_mult
			}
			else_if = {
				limit = { has_doctrine = doctrine_gender_male_dominated }
				multiply = faith_changed_doctrine_cost_mult_two_step
			}
		}
		parameters = {
			female_dominated_law = yes
			male_claims_are_weak = yes
			men_cannot_inherit_implicit_claims = yes
			men_cannot_be_granted_titles = yes
			female_dominated_council = yes
		}
		character_modifier = {
			name = male_ruler_female_dominant
		 	opinion_of_male_rulers = 10
		# }
		# character_modifier = {
		#	name = female_ruler_male_dominant
			opinion_of_female_rulers = 20
		}
	}

	doctrine_gender_male_dominated = {
		is_shown = {
			NOT = { has_game_rule = full_gender_equality }
		}
		piety_cost = {
			value = faith_doctrine_cost_high
			if = {
				limit = { has_doctrine = doctrine_gender_male_dominated }
				multiply = faith_unchanged_doctrine_cost_mult
			}
			else_if = {
				limit = { has_doctrine = doctrine_gender_female_dominated }
				multiply = faith_changed_doctrine_cost_mult_two_step
			}
		}
		parameters = {
			male_dominated_law = yes
			female_claims_are_weak = yes
			women_cannot_inherit_implicit_claims = yes
			women_cannot_be_granted_titles = yes
			male_dominated_council = yes
		}
		character_modifier = {
			name = female_ruler_male_dominant
			opinion_of_female_rulers = -10
		}

		can_pick = {
			NAND = {
				exists = religious_head
				religious_head.culture = { has_cultural_parameter = female_only_inheritance }
			}
		}
	}
	doctrine_gender_equal = {
		piety_cost = {
			value = faith_doctrine_cost_high
			if = {
				limit = { has_doctrine = doctrine_gender_equal }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			gender_equal_law = yes
		}
	}
	doctrine_gender_female_dominated = {
		is_shown = {
			NOT = { has_game_rule = full_gender_equality }
		}
		piety_cost = {
			value = faith_doctrine_cost_high
			if = {
				limit = { has_doctrine = doctrine_gender_female_dominated }
				multiply = faith_unchanged_doctrine_cost_mult
			}
			else_if = {
				limit = { has_doctrine = doctrine_gender_male_dominated }
				multiply = faith_changed_doctrine_cost_mult_two_step
			}
		}
		parameters = {
			female_dominated_law = yes
			male_claims_are_weak = yes
			men_cannot_inherit_implicit_claims = yes
			men_cannot_be_granted_titles = yes
			female_dominated_council = yes
		}
		character_modifier = {
			name = male_ruler_female_dominant
			opinion_of_male_rulers = -10
		}
	}
}